> A group $G$ is not bi-orderable if and only if for some finite subset $J$ of $G\smallsetminus\{1\}$, for every $e\in \{-1,1\}^J$ there exists $n\ge 1$, group elements $c_1,\dots,c_n$, and a function $s:\{1,\dots,n\}\to J$ such that 
$$\prod_{i=1}^nc_is(i)^{e(s(i))}c_i^{-1}=1_G.$$

Indeed, first clearly if there is such $J$, then if by contradiction there is a bi-invariant total order, there exists $e$ such that $s^{e(s)}>1$ for all $i$, and then since being $>1$ is stable under conjugation and taking products, we get a contradiction.

The converse is where compactness takes place. Suppose that the condition fails. That is, for every finite subset $J$ there exists $e\in\{-1,1\}^J$ such that the condition fails: $1_G$ is not in the subsemigroup generated by the union of all conjugates of $\{s^{e(s)}:s\in J\}$. By <b>compactness</b>, there exists a function $e:G\smallsetminus\{1\}\to\{-1,1\}$ that satisfies the same condition. Then 

 - $e(g^{-1})=-e(g)$ for all $g\neq 1$, because $g^{e(g)}(g^{-1})^{e(g^{-1})}\neq 1$), 
 - $e(g)=e(hgh^{-1})$ for all $g\neq 1,h$, because $g^{e(g)+e(ghg^{-1})}=g^{e(g)}h^{-1}(hgh^{-1})^{e(hgh^{-1})}h\neq 1$;
 - $e(g)=1,e(h)=1$ imply $e(gh)=1$, because $(gh)^{1+e(gh)}=g^{e(g)}h^{e(h)}(gh)^{e(gh)}\neq 1$

   So defining $S=\{g\neq 1:e(g)=1\}$, we have $S$ stable under conjugation and product, and $G=1\sqcup S\sqcup S^{-1}$. Thus defining $g<h$ if $g^{-1}h\in S$ defines a bi-invariant (strict) total order. 

It is clear that the above criterion is "local" and in particular a group satisfies it iff it all its finitely generated subgroups do.

Note that similarly (and more simply) we have the classical:

> A group $G$ is not left-orderable if and only if for some finite subset $J$ of $G\smallsetminus\{1\}$, for every $e\in \{-1,1\}^J$ there exists $n\ge 1$ and a function $s:\{1,\dots,n\}\to J$ such that 
$$\prod_{i=1}^ns(i)^{e(s(i))}=1_G.$$

The interest of such criteria appears for instance considering orderability of ultraproducts (of possibly non-orderable groups, e.g., of finite groups). Namely, define for a given subset $J$, $n_J$ and $n'_J$ as the smallest integer $n$ in the above criterion (for left-, resp. bi-orderability), and $\infty$ otherwise. Define $\mu_G(k)=\inf_Jn_J$ and $\mu'_G(k)=\inf_Jn'_J$ where $J$ ranges over finite subsets of $G$ of cardinal $\le k$. So the above criteria say that $G$ is non-left-orderable (resp. non-bi-orderable) if and only if $\mu_G(k)<\infty$ (resp. $\mu'_G(k)<\infty$) for some $k$. By the way also note that $\mu_G(1)=\infty$ iff $G$ is torsion-free, and otherwise $\mu_G(1)$ equals the smallest prime $p$ such that $G$ has an element of order $p$.

 Then ($\bullet$) an ultraproduct $\prod^\omega G_i$ is left-orderable (resp. bi-orderable) if and only if $\forall k,\lim_{i\to\omega}\mu_{G_i}(k)=\infty$ (resp. $\forall k,\lim_{i\to\omega}\mu'_{G_i}(k)=\infty$). (And it is torsion-free iff $\lim_{i\to\omega}\mu_{G_i}(1)=\infty$.)

Note that this makes the failure of left orderability appear as a generalization of torsion.

In turn an application of the latter is the following

> <b>Proposition.</b> A pseudofinite group is bi-orderable iff it is torsion-free.

(A group is <i>pseudofinite</i> if it is elementary equivalent to some ultraproduct of finite groups. Examples of non-left-orderable torsion-free groups are mentioned at several places on MO, e.g., [here](https://mathoverflow.net/a/81106/14094))

<i>Proof of the nontrivial implication:</i> every nonprincipal ultraproduct of $C_p$ for $p$ prime is a torsion-free abelian group, and hence for every $k$, we have $\mu'_k(C_p)\to\infty$ when $p$ prime tends to infinity (an explicit estimate should be doable but I don't need it). Write $u_p=\min_{p'\ge p}\mu'_k(C_p)$, it tends to infinity too. Next, I claim that for every finite solvable group $G$ with smallest prime divisor $p$ of $|G|$, we have $\mu'_k(G)\ge u_p$. Indeed, considering a subset $J$ as in the definition, considering the subgroup generated by $J$ and passing to a cyclic quotient, we see that there exists a prime divisor $q$ of $|G|$ such that $ \mu'_k(G)\ge\mu'_k(C_q) \;(\ge u_p)$.

Now let $G$ be pseudofinite and torsion-free, hence it is elementary equivalent to some ultraproduct $U=\prod^\omega G_n$ of (a sequence of) finite groups, and hence $U$ is torsion-free as well. Since it is torsion-free, the smallest prime divisor $|p_n|$ of $G_n$ $\omega$-tends to infinity. In particular, $\omega$-a.e., $|G_n|$ is of odd order, hence solvable by the Feit-Thompson theorem [if one wishes to be self-contained, assume $G$ pseudo-(finite solvable)].
 Hence, by the previous paragraph, for every $k$, the number $\mu_k(G_n)$ $\omega$-tends to infinity. So, by the above criterion ($\bullet$) $U$ is bi-orderable. Since the criterion given at the beginning also shows that being bi-orderable is invariant under elementary equivalence, we deduce that $G$ is bi-orderable.