Embeddings into left-orderable simple groups

We prove that every countable left-ordered group embeds into a finitely generated left-ordered simple group. Moreover, if the first group has a computable left-order, then the simple group also has a computable left-order. We also obtain a Boone-Higman-Thompson type theorem for left-orderable groups with recursively enumerable positive cones. These embeddings are Frattini embeddings, and isometric whenever the initial group is finitely generated. Finally, we reprove Thompson's theorem on word problem preserving embeddings into finitely generated simple groups and observe that the embedding is isometric.


INTRODUCTION
A group is simple if it has no proper non-trivial normal subgroups. Infinite finitely generated simple groups were discovered in [Hig51]. In fact, every countable group embeds into a finitely generated simple group [Hal74,Gor74], see also [Sch76,Tho80].
1.1. Left-order preserving embeddings into simple groups. A group is left-ordered if it has a linear order that is invariant under multiplications from the left.
By [KKL19,Theorem 4.5], every finitely generated left-ordered groups embeds into a finitely generated left-ordered group whose derived subgroup is simple.
Infinite finitely generated simple and left-ordered groups were discovered by Hyde and Lodha in [HL19], see also [MBT18,HLNR19]. We extend the construction of such groups [HL19,MBT18] as follows.
Theorem 1. Every countable left-ordered group G embeds into a finitely generated left-ordered simple group H. Moreover, the order on H continues the order on G.
We also study additional geometric and computability properties of such embeddings, see Remark 1.1 and Theorem 2.
A subgroup G of H is called Frattini embedded if any two elements of G that are conjugate in H are also conjugate in G. Also, if there exist finite generating sets X and Y of G and H, respectively, such that the word metric of G with with respect to X coincides with the word metric of G with respect to Y , then it is said that G is isometrically embedded in H.
Remark 1.1. The embedding of Theorem 1 can be chosen to be a Frattini embedding. If G is finitely generated, the embedding is also isometric.
A systematic study of computability aspects of orders on groups was initiated in [DK86], see also [Dow98]. A left-order is computable if it is decidable whether a given element is positive, negative or equal to the identity. In particular, a finitely generated computably left-ordered group has a decidable word problem.
The following theorem is the computable version of Theorem 1.
Theorem 2. Every countable computably left-ordered group G embeds into a finitely generated computably left-ordered simple group H. Moreover, the order on H continues the order on G.
In addition, the embedding is a Frattini embedding, and if G is finitely generated, then it is isometric.

Boone-Higman and Thompson's theorem revisited. A landmark result on computability in groups
is the Boone-Higman theorem. It states that a finitely generated group has decidable word problem if and only if it embeds into a simple subgroup of a finitely presented group. Thompson strengthened Boone-Higman's theorem by showing that the simple group can be chosen to be finitely generated [Tho80].
The next theorem is a version of Thompson's theorem that, in addition, preserves the geometry of the group.
Theorem 3 (cf. Theorem A.1). Every countable group G embeds into a finitely generated simple group H such that if G has decidable word problem, then so does H.
In addition, the embedding is a Frattini embedding. If G is finitely generated, then the embedding is isometric.
Remark 1.2. Belk and Zaremsky [BZ20, Theorem C] recently proved that every finitely generated group isometrically embeds into a finitely generated simple group, but they did not study the Frattini property or computability properties of their embedding. Their result and Theorem 3 strengthen a theorem of Bridson, who proved that every finitely generated group quasi-isometrically embeds into a finitely generated group without any non-trivial finite quotient [Bri98]. Remark 1.3. If the group G in Theorem 3 is not finitely generated, instead of saying G has decidable word problem, it is more common to say that G is a computable group (see Definition 2.2 below).
Bludov and Glass obtained a left-orderable version of the Boone-Higman theorem by showing that a left-orderable group has decidable word problem if and only if it embeds into a simple subgroup of a finitely presented left-orderable group [BG09,Theorem E]. In this context, it is natural to ask whether the simple group can be made finitely generated, cf. [Gla81,p. 251,Problem 4].
The next theorem answers this question in the positive given that the set of positive elements is recursively enumerable. Namely, the following theorem holds.
Theorem 4. Let G be a left-orderable finitely generated group that has a recursively enumerable positive cone with respect to some left-order. Then G has decidable word problem if and only if G embeds into a finitely generated simple subgroup of a finitely presented left-orderable group.
Remark 1.4. The existence of left-orderable groups with decidable word problem that do not embed in a group with computable left order was shown in [Dar19].
Also, the existence of finitely generated left-orderable groups with decidable word problem but without recursively enumerable positive cone is first shown in [Dar19]. Earlier, the analogous result for countable but not finitely generated groups was shown in [HT18].
The question whether Theorem 4 holds without the assumption that G has a left-order with recursively enumerable positive cone remains open. Also it is open whether a finitely generated left-orderable simple group with decidable word problem but without recursively enumerable positive cone exists.
1.3. Sketch of the embedding constructions. We sketch the proof of Theorems 1 and 2. We start with a countable computably left-ordered group G.
Step 1 (Embedding into a finitely generated group). By a classical wreath product construction [Neu60] every countable left-ordered group embeds into a 2-generated left-ordered group. A version of this embedding construction with additional computability properties was established in [Dar15]. We use the construction from [Dar15] (see Theorem 5.15) to embed the initial left-orderable countable group G into a two-generated left-orderable group that also preserves the computability properties of the left-order on G.
Step 2 (Embedding into a perfect group). A group is perfect if it coincides with its first derived subgroup.

By
Step 1 we assume that G is finitely generated. We let T (ϕ) be a finitely generated left-ordered simple group of [MBT18]. We note that T (ϕ) is computably left-ordered and G embeds into a finitely-generated left-orderable perfect subgroup G 1 of G R T (ϕ) that preserves the computability property of the left-order on G, see Theorem 5.1. Our construction might be considered as a modification of a similar embedding result from [Tho80].
Step 3 (Embedding into a simple group of piecewise homeomorphisms of flows). Finally, let G 1 be a finitely generated (computably) left-ordered perfect group in which G embeds. We embed G 1 into a finitely generated (computably) left-ordered simple group. To this end, we extend the construction of [MBT18]. In [MBT18], Matte-Bon and Triestino construct a finitely generated left-orderable simple group T (ϕ) of piecewise linear homeomorphisms of flows of the suspension of a minimal subshift ϕ, see Subsection 3.2.
The main observation is that every group H of piecewise homeomorphisms of an interval with countably many breakpoints (see Definition 3.8) embeds into a subgroup T (H, ϕ) of piecewise homeomorphisms of flows of the suspension, see Definition 3.13. We then study the subgroup T (H, ϕ). In particular, it is finitely generated if H is so. Just as in [MBT18], a standard commutator argument implies that it is simple given that H is perfect, and if H preserves the orientation of the interval, then it is also left-orderable.
Finally, we use the dynamical realisation of left-orderability: every left-ordered group embeds into the group of orientation preserving homeomorphisms of an interval. We use this embedding to conclude that G 1 , and hence also G, embeds into the finitely generated left-ordered simple group T (G 1 , ϕ). To analyze the required computability aspects as well as to show that the embeddings are isometric and Frattini, we use a modified version of the dynamical realization of left-orderability, see Proposition 6.7.
If G has decidable word problem, it embeds into a group of computable piecewise homeomorphisms of an interval [Tho80,§3]. If we use this embedding in Step 3 of the above construction, then we obtain the aforementioned result of [Tho80], Theorem 3.
1.4. Plan of the paper. In Section 2, we review computable groups and computably left-ordered groups.
In particular, we explain the computability of the standard dynamical realization of left-orderabitity.
After that, we come to the main parts of our paper. In Section 3, we discuss Step 3, that is, we extend Matte-Bon and Triestino's construction of left-orderable finitely generated simple groups in order to embed perfect groups into finitely generated simple groups.
Step 2, our version of Thompson's splinter group construction, is discussed in Section 5.
Step 1 is reviewed in Section 5.4. Finally, we prove Theorems 1, 2 and 4. To analyze the computability aspects required by Theorem 2 as well as to obtain the isometry and Frattini properties of the embeddings, we introduce a stronger version of the standard dynamical realization of left-orderability that we call modified dynamical realization(see Section 6). In Section 7, we prove Theorem 3 using the groups of piecewise homeomorphisms of flows discussed in Section 3.
Acknowledgements. We thank Y. Lodha, M. Triestino and M. Zaremsky for their interest and useful comments on a previous version of this work. The first named author thanks Université Rennes-I for hospitality and financial support and was supported by ERC-grant GroIsRan no.725773 of A. Erschler. The second named author was supported by ERC-grant GroIsRan no.725773 of A. Erschler and by Austrian Science Fund (FWF) project J 4270-N35.
A function f : N → N is computable if there is a Turing machine such that it outputs the value of f on the input. A subset of N is recursively enumerable if there is a computable map (i.e. enumeration) from N onto that set. Moreover, it is recursive if, in addition, its complement is recursively enumerable as well.
Similarly, a function f : Q → Q is computable if there is a Turing machine that, for every input Moreover, if J is an interval in R, then we call a function f : J → R computable if its restriction to the rational numbers in J maps to Q and this restriction is computable.
2.1. Group presentations and the word problem. Let S be a finite set. We denote by (S ∪ S −1 ) * the set of all finite words over the alphabet S ∪ S −1 .
Definition 2.1 (word problem). Let G = S be a finitely generated group. The word problem is decidable The decidability of the word problem does not depend on the choice of the finite generating set.
2.2. Computable groups. For a countable group G = {g 1 , g 2 , . . .}, let m : N × N → N be the function such that Remark 2.5. In case G = S , |S| < ∞, G is computably left-orderable with respect to some enumeration if and only if there is a left-order on G such that the set {w ∈ (S ∪ S −1 ) * | 1 w} ⊆ (S ∪ S −1 ) * is a recursive set. In this case is called computable left-order on G, and its computability property does not depend on the choice of the finite generating set, see [Dar19] for details.
Remark 2.6. Every computably left-orderable group is computable. In particular, every finitely generated computably left-ordered group has decidable word problem.
By [HT18] there is a left-orderable computable group without any computable left-order. In fact, there is a finitely generated orderable computable group without any computable order [Dar19].
Example 2.7. The natural order on the group of rational numbers is computable.
Example 2.8 (Thompson's group F ). A dyadic point in R is one of the form n 2 m , for some n , m ∈ Z. An interval is dyadic if its endpoints are dyadic.
Let J be a closed dyadic interval in R. We denote by Q J the set of the rational points on J. We denote by F J the group of piecewise linear homeomorphisms of J that are differentiable except at finitely many dyadic points and such that the respective derivatives, where they exist, are powers of 2.
We define the left-order on F J in the following way, cf. [CFP96, Theorem 4.11]: let Q J = {q 1 , q 2 , . . .} be a fixed recursive enumeration. Let f, g ∈ F J be distinct and let i 0 be the minimal index such that In fact, this order is computable: indeed, let f, g ∈ F J be given as words in a finite generating set. As the word problem in F J is decidable, the case of f = g can be computably verified. We note that the elements of F J are computable functions. In addition, an element of F J is uniquely determined by its restriction to the rationals. Thus, if f = g, the minimal index i 0 such that f (i 0 ) = g(i 0 ) exists and can be computably determined. Therefore, the order is computable.
2.4. Positive cones. If G is left-ordered, then the positive cone is the set of all positive elements of G.
We note that the positive cone is a semigroup. In fact, if G admits a linear order such that the positive elements generate a semigroup in G, then the linear order is a left-order on G, see [DNR14,CR16].
Lemma 2.9. Let G = {g 1 , g 2 , . . .} be a finitely generated group with a fixed enumeration, and '≺' be a left-order on G. Then '≺' is computable if and only if its positive cone is recursively enumerable and the word problem in G is decidable.
Proof. If the order is computable, then the word problem is decidable, see Remark 2.6. In addition, there is a partial algorithm to confirm that a positive element, given as a word in the generators of G, is positive. This implies that the positive cone is recursively enumerable.
On the other hand, if the positive cone is recursively enumerable and the word problem decidable, let w be a word in the generators of G. We first computably determine whether or not w = 1. If w = 1, we stop.
Otherwise either w or w −1 is in the positive cone of G. As the positive cone is recursively enumerable, there is a partial algorithm to confirm that a positive element is in the positive cone. We simultaneously run this algorithm for w and w −1 . As one of these elements is positive, it stops for w or w −1 . We thus know whether w is positive or negative. This completes the proof.
2.5. Dense orders. A linear order on a set S is dense if for any g ≺ h ∈ S, there exists g ∈ S such that g ≺ g ≺ h.
Recall that by Q J the set of the rational points on an interval J ⊂ R. We fix a recursive enumeration Q J = {q 0 , q 1 , . . .} such that the natural order on Q J is computable with respect to this enumeration. If, in addition, the order on S is computable, then the map i → Φ(s i ) is computable.
We recall the proof of this lemma, that we will later modify to prove Lemma 6.8.
Proof. We define Φ : S → Q J iteratively as Φ : s ji → q ji for i ∈ N. First, define s j0 = s 0 and q j0 = q 0 . Now assuming that S k := {s j0 , . . . , s j k } and Q k := {q j0 , . . . , q j k } are already defined, let us define its extension according to the following procedure: (1) Choose the smallest i such that s i / ∈ S k and set S k+1 = S k ∪ {s i }. Choose the smallest j such that q j / ∈ Q k and Φ : S k ∪ {s i } → Q k ∪ {q j } is an order preserving bijection. Set s j k+1 = s i and q j k+1 = q j .
(2) Choose the smallest j such that r j / ∈ Q k+1 , and choose the smallest i such that s i / ∈ S k+1 and Φ −1 : Q k+1 ∪ {q j } → S k+1 ∪ {s i } is an order preserving bijection. Set s j k+2 = s i and q j k+2 = q j .
(3) Repeat the process starting from Step 1.
Since the orderings of S and Q J are computable with respect to the fixed enumerations, the above described iterative procedure of defining Φ is also computable. Therefore, the map i → Φ(s i ) ∈ Q J is computable.
Remark 2.11. If G is left-ordered, then the lexicographical left-order on the group G × Q is dense (and has no minimal or maximal elements). In addition, if G = {g 1 , g 2 , . . .} has a computable left-order, the lexicographical left-order on G × Q is computable with respect to the induced enumeration. Moreover, the standard embedding G → G × Q that sends g → (g, 0) is computable and a Frattini embedding.
2.6. Dynamical realization of computably left-ordered groups. Let J be an interval in R. We denote the group of homeomorphisms of J by Homeo(J), and the subgroup of orientation preserving homeomorphisms of J by Homeo + (J).
We note that for every interval J ⊂ R, every countable left-ordered group G admits an embedding of We also note the following fact.
Proposition 2.12. Let G be a countable group.
If G is left-orderable, then there is an embedding ρ G : G → Homeo + (J) such that, for all g ∈ G \ {1}, the map ρ G (g) : J → J does not fix any rational interior point of J.
If G is computably left-orderable, then, in addition, all the maps ρ G (g) can be granted to be computable.
We actually need a strong variant of Proposition 2.12, see Proposition 6.7, but to the best of our knowledge, the computability aspect of Proposition 2.12 does not exist in the literature neither. For this reason we decided to include a proof of Proposition 2.12. We analyze computability aspects based on the proof given in [CR16,§2.4].
By Remark 2.11, we may assume that the order on G is dense. Then, by Lemma 2.10, there is an order Definition 2.13. Let Ψ : G → Q J be an order preserving bijection. We define ρ Ψ G : We note the following.
Lemma 2.14. Let Ψ : G → Q J be an order preserving bijection. The map ρ Ψ G : Lemma 2.15. Let Ψ : G → Q J be an order preserving bijection. If x ∈ Q J such that ρ Ψ G (g)(x) = x, then g = 1.
Proof of Proposition 2.12. Suppose G = {g 1 , g 2 , . . .} has a computable left-order with respect to the given enumeration. By Lemma 2.10, we may assume that the map i → Ψ(g i ) is computable. By Lemmas 2.14 and 2.15, ρ Ψ G : G → Homeo + (J) satisfies the properties required by Proposition 2.12.

GROUPS OF PIECEWISE HOMEOMORPHISMS OF FLOWS
We first collect definitions and facts on groups of piecewise linear homeomorphisms of flows from [MBT18]. As every countable group embeds as a subgroup in a group of piecewise homeomorphisms of flows, we then start to study such groups in more generality.
We recall from Example 2.8 that a dyadic point in R is one of the form n 2 m for some n , m ∈ Z. Moreover, for a dyadic interval J, F J is Thompson's group acting on J.
3.1. Minimal subshifts. Let A be a finite alphabet and ϕ a shift on A Z . If X is a closed and shift-invariant subset of A Z , then (X, ϕ) is a dynamical system that is called subshift. A subshift is minimal if the set of ϕ-orbits is dense in X.
Let (X, ϕ) be a minimal subshift of A Z . Then X is totally disconnected and Hausdorff, and every ϕ-orbit is dense in X.
The suspension (or mapping torus) Σ of (X, ϕ) is the quotient of X × R by the equivalence relation defined by (x, t) ∼ (ϕ n (x), t − n), n ∈ Z. We denote the corresponding equivalence class of (x, t) ∈ The map Φ t that sends [x, s] to [x, s + t] is a homeomorphism and defines a flow Φ on Σ, the suspension flow, so that (Σ, Φ) is a dynamical system as well. The orbits of the suspension flow are homeomorphic to the real line.
We denote by H(ϕ) the group of homeomorphisms of Σ that preserves the orbits of the suspension flow, and by H 0 (ϕ) the subgroup of H(ϕ) that, in addition, preserves the orientation on each orbit.
3.2. The group T(ϕ). Let C be a clopen subset of X and let J ⊂ R be of diameter < 1. The embedding of C × J into X × R descends to an embedding into Σ that we denote by π C,J .
For every clopen C ⊂ X and subset J of diameter < 1 in R, the map π C,J is a chart for the suspension, whose image is denoted by U C,J . If z is in the interior of U C,J , then π C,J is a chart at z.
Definition 3.1 (Dyadic chart). Let C be a clopen subset of X, and let J be a dyadic interval of length < 1 in R. Then π C,J : C × J → Σ is called dyadic chart.   [MBT18]). The group T(ϕ) is the subgroup of H 0 (ϕ) consisting of all elements h ∈ H 0 (ϕ) such that for all z ∈ Σ there is a dyadic chart π C,J at z and a piecewise dyadic map f : J → f (J) with finitely many breakpoints such that the restriction of h to U C,J is given by We recall that F J denotes the group of piecewise dyadic homeomorphisms of J with finitely many breakpoints.
Definition 3.4. Let π C,J be a dyadic chart and let f ∈ F J . Then f C,J is the map in T(ϕ) whose restriction to U C,J is given by and that is the identity map elsewhere. We let F C,J be the subgroup of T(ϕ) generated by the elements The group T(ϕ) is infinite, simple, left-ordered and finitely generated [MBT18, Corollary C]. As noted in [MBT18], the first examples of such groups [HL19] are subgroups of T(ϕ).
In Section 3.5, we revisit the proof of simplicity given in [MBT18]. In Section 3.6, we revisit the proof of left-orderability given in [MBT18]. To this end we note the following.
In particular, the T(ϕ)-action on Σ is minimal.
For any group H, we denote by H the first derived subgroup of H.
Lemma 3.6 (Lemma 4.8 of [MBT18]). Let C ⊂ X be clopen and J ⊂ R be dyadic. If C × J is covered by a family {C i × J i } i∈I for clopen C i ⊂ C and dyadic intervals J i ⊂ J, then F C,J is contained in the group generated by i∈I F Ci,Ji We assume without restriction that (X, ϕ) is a minimal subshift over the two letter alphabet A = {0, 1}.
For k, n ∈ Z and a word w = a 0 a 1 . . . a k over A, we denote by C n,w the cylinder subset of X consisting As a matter of fact, the cylinder subsets are clopen and form a basis for the topology of X. We note that ϕ (C n,w ) = C n−1,w .
In particular, T(ϕ) can be generated by six elements.
. . , whose union is I, • for all of these I i the restriction of h to I i is a homeomorphism onto its image, If, in addition, the intervals I i and h(I i ) are dyadic, we say that h has dyadic breakpoints. If, the restrictions of h to the intervals I i are dyadic maps, we say that h has dyadic pieces.
If S is a set, bij(S) denotes the group of permutations of S.

Let us fix a half-open interval
the subgroup of all piecewise homeomorphisms with dyadic breakpoints on J. The subgroup of C(J) of orientation preserving bijections is denoted by C + (J).
Example 3.9. Every countable group embeds into C(J).
Example 3.10. Every countable left-orderable group embeds into the group of orientation preserving homeomorphisms of J, and therefore into C + (J).
Since the set of non-dyadic rational points of J is dense in J, the next lemma is a basic property of the (piecewise) continuity.
Lemma 3.11. Every function in C(J) is uniquely determined by its values on non-dyadic rational points on J. Moreover, every function from C(J) is continuous at non-dyadic rational points.
To construct respective embeddings into finitely generated simple groups we propose the following extension of the construction in [MBT18].
3.4. Groups of flows of piecewise homeomorphisms. Let us fix a subgroup G of C(J).
and g Σ,J is the identity map elsewhere.
We extend Definition 3.3 as follows.
Lemma 3.14. The group G embeds into T (G, ϕ) by g → g Σ,J . Moreover, if G is finitely generated, then T (G, ϕ) is finitely generated as well.
Proof. The second statement follows from the definition of T (G, ϕ) and the fact that T (ϕ) is finitely generated. For the first statement, it is enough to notice that, by definition, g Σ,J is an identity map if and only if g = 1.
If, in addition, t is not dyadic, we say that [x, t] is a non-dyadic rational point.
Lemma 3.16. There exists a dense and recursive set of non-dyadic rational points in Σ.
Proof. Let us choose a recursive countable subset X := {x 1 , x 2 , . . .} ⊂ X that is dense in X, for example, the set of proper ternary fractions. Moreover, for all i ∈ N, let R i ⊂ Σ be defined as Note that each of R i is a recursive set. Therefore, since X is also recursive by our choice, the we get that R is recursive as well.
Lemma 3.17. If G is a subgroup of C(J), then the elements of T (G, ϕ) are uniquely defined by their values on any (countable) dense set of non-dyadic rational points of Σ. Moreover, the elements of T (G, ϕ) are continuous at non-dyadic rational points of Σ.
Proof. By Lemma 3.16 there a fixed countable dense set of non-dyadic rational points in Σ. Let R ⊂ Σ be such a set. Let us define X ⊂ X such that for each x ∈ X there exists t ∈ Q such that [x, t] ∈ R.
Since R is dense, X is dense as well.
Therefore, the elements of T (G, ϕ) are uniquely defined by their restrictions to the Φ-orbits of the elements [x, 0] for x ∈ X . Now, the lemma follows from the combination of this observation with Lemma 3.11.
3.5. Simplicity and rigid stabilizers. To prove simplicity results, we use the following standard tool.
Let Y be a set, and H a group acting faithfully on Y . Then the rigid stabilizer of a subset U ⊂ Y is the subgroup of H whose elements move only points from U . We denote the rigid stabilizer of U by RiSt(U ).
The following lemma is used to prove simplicity of Lemma 3.18. Let N be a normal subgroup of H. If there is a non-trivial element g ∈ N and a non-empty Claim 1: The group T(ϕ) is in N .
The proof of Claim 1 follows the arguments of simplicity in [MBT18].
Proof of Claim 1. Let us fix a non-trivial element g ∈ N . Then, by Lemma 3.17, there exists a non-dyadic rational point y ∈ Σ such that g(y) = y. By Lemma 3.17, the elements of are continuous at the non-dyadic rational points of Σ. Therefore, since Σ is a Hausdorff space and Let z ∈ Σ, and choose h ∈ T(ϕ) such that h(z) ∈ U . Such a map h exists as, by Lemma 3.5, the action Therefore, for every chart π C,K there is a covering {C i × K i } of C × K such that F Ci,Ki is in N . By Lemma 3.6, we conclude that for every chart π C,K the group F C,K is in N . Now we use that . By the previous claim, f X,J ∈ N . Therefore, the first derived subgroup of the rigid stabilizer of the interior of U X×J is in N by Lemma 3.18. Finally, we note that τ Σ,J (G) is in the rigid stabilizer of the interior of U X,J . Thus τ Σ,J (G) is in N . As G is assumed to be perfect, this yields the claim. Now, to conclude the proof of Lemma 3.19, we only need to combine the above claims with the fact that, by definition, Proof. First of all, note that since G ≤ C + (J), the action of T (G, ϕ) on Φ-orbits of elements of X ⊂ Σ is orientation preserving.
. .} be a fixed, recursively enumerated and dense subset of non-dyadic rationals in Σ. The existence of such sets is by Lemma 3.16.
such that q k > s k . Therefore, by Lemma 3.11, for all f = 1 either f > 1 or f −1 > 1 and for f 1 , f 2 > 1, f 1 f 2 > 1. By Lemma 3.17, the defined order is a left-order on T (G, ϕ) .
Recall that the set R is recursive. Therefore, to check whether f > 1, we can consecutively compute

CHART REPRESENTATIONS AND THE WORD PROBLEM IN T (G, ϕ)
Recall that J is a fixed interval that is strictly contained in [0, 1). Let us fix a subgroup G in C(J), and assume that G is finitely generated and consists of computable functions. 4.1. Chart representations.
where h i is a piecewise homeomorphism with countably many breakpoints on I i and h i (I i ) = J i , such that {U Ci×Ii } and {U Ci×Ji } cover Σ, and such that the restriction of h to

Each of the triples
be a chart representation of h such that for every h i , 1 ≤ i ≤ n, one of the following takes place:    (1) If I = I 0 ∪ I 1 , then (C × I, C × J, f ) can be replaced by (C × I 0 , C × f (I 0 ), f | I0 ) and and      Proof. We will prove only that shift operations on charts of type (II) preserve the canonicity of chart representations, as the rest of statements of the lemma are straightforward.
Suppose that the initial chart of type (II), on which a shift operation of order m is applied, is (C i × Suppose that Λ = f g 1 f 1 . . . g n f n is decomposed as in Definition 4.6. Then,Λ =f g 1 f 1 . . . g nfn , The chartΛ is also a G-dyadic map. Therefore, be chart representations such that I i = J i = [0, 1]. Then we say that the chart representation is their composition.
Then there is an algorithm to determine a canonical chart representation Proof. We describe the algorithm.
Then there is an algorithm to determine a canonical chart representation Proof. The proof is analogous to the proof of Lemma 4.20.
. We conclude that h i (t) = t − m and ϕ m (x) = x. But ϕ is a minimal subshift, that is, every orbit of ϕ is dense.
In particular, m = 0. Therefore h i = id. This yields one side of the assertion. The inverse assertion is trivial. Λf is a G-dyadic map, so that, by assumption, we can algorithmically check whether h = id.

EMBEDDINGS INTO PERFECT GROUPS
Our next goal is to prove the following.
Theorem 5.1. Every countable group G embeds into a finitely generated perfect group H. In addition, (1) if G is computable, then H has decidable word problem; (2) if G is left-ordered, then H is left-ordered; (3) if G is computably left-ordered, then the left order on H is computable; (4) the embedding is a Frattini embedding.
We first prove Theorem 5.1 for finitely generated groups. In Section 5.4, we reduce the general case to the finitely generated case. 5.1. Splinter Groups. Let us assume that G is a finitely generated group. We now construct a finitely generated perfect group in which G embeds. Our construction resembles the splinter group construction of [Tho80,§2]. We comment on the construction of [Tho80] in Section 5.5.
Let us fix an action of T (ϕ) on the real line as follows: let us fix z 0 := [x 0 , 0] ∈ Σ. As the action of T(ϕ) on Σ preserves the Φ-orbits, T (ϕ) acts on the Φ-orbit of z 0 , the action is orientation-preserving, and its orbits are dense. Finally, recall that the Φ-orbit of z 0 is homoemorphic to R. We fix such a homeomorphism. This induces an action of T (ϕ) on R. We fix this action of T(ϕ).
Let C 0 (R, G) denote the group of functions from R to G of bounded support. The action of T (ϕ) on R induces an action σ of T (ϕ) on C 0 (R, G) such that for every h ∈ C 0 (R, G) and f ∈ T (ϕ), The permutational wreath product G R T(ϕ) is defined as the semi-direct product C 0 (R, G) σ T(ϕ), For every g ∈ G, we define the following function g in C 0 (R, Definition 5.2 (Splinter groups). The splinter group is the subgroup of the permutational wreath product G R T(ϕ) generated by G and T(ϕ). We denote it by Sp(G, ϕ).
Proof of Lemma 5.4. Since T(ϕ) is simple, it is in Sp(G, ϕ) . By Lemma 5.5, G is in Sp(G, ϕ) as well.
Proof. Let X and Y be finite generating sets of G and T (ϕ), respectively. We prove that the embedding of G = X into Sp(G, ϕ) = X ∪ Y by g →ḡ is an isometric embedding, whereX is the image of X in Sp(G, ϕ).
Let g ∈ G. Also, let f i ∈ T (ϕ) and g i ∈ G, 1 ≤ i ≤ n, be such that where | · | is the length of the group element with respect to the corresponding generating set. We havē where h i = f 1 . . . f i , 1 ≤ i ≤ n. Therefore, it must be that h n = 1 and where I ⊆ {1, . . . , n} is the set of indexes i such that h i (1/2) ∈ [1/2, 1). Thus we get . . = f n = 1 and I = {1, . . . , n}, which implies that |g| X = |ḡ|X ∪Y . Since g is an arbitrary element of G, the last conclusion finishes the proof.
Lemma 5.7. The embedding of G into Sp(G, ϕ) by g →ḡ is a Frattini embedding.
Proof. Let g, h ∈ G, and suppose thatḡ andh are conjugate in Sp(G, ϕ). We want to show that g is conjugate to h in G.

5.2.
The word problem for Sp(G, ϕ). We recall that T(ϕ) is computably left-ordered, acts orderpreservingly on R, and that this action is computable.
We adapt a notion of splinter table introduced in [Tho80, p. 413].
Definition 5.8 (Splinter table). A splinter table corresponding to the element (t, f ) ∈ Sp(G, ϕ) is a finite tuple of the form (J 1 , . . . , J n ; g 1 , . . . , g n ; f ), where J 1 , . . . , J n is a disjoint finite collection of bounded intervals from R whose union contains the support of t : R → G such that t(J i ) = g i ∈ G.
Let J := 1 i n J i and I := 1 j m I j .
Let (r, q) := (t, f )(s, e). Then q = f e, and r = t σ(f )s is a step function such that for all 1 i n and for all 1 j m r (J i ∩ f (I j )) = g i h j , r (J i \ f (I)) = g i , r (f (I j ) \ J) = h j and the identity elsewhere.
By the properties of T(ϕ), the inverse of f as well as J i ∩ f (I j ), J i \ f (I) and f (I j ) \ J can be computably determined.
Corollary 5.11. Every element of Sp(G, ϕ) can be represented by a splinter table.
Note that (J 1 , . . . , J n ; g 1 , . . . , g n ; f ) is a splinter table corresponding to the trivial element of Sp(G, ϕ) if and only if g 1 = . . . = g n = 1 and f = 1. Therefore, combining this observation and Lemma 5.10 with the fact that the word problem of T (ϕ) is decidable (Corollary 4.26), we immediately get the following.
Lemma 5.12. If the word problem for G is decidable, then so is the word problem for Sp(G, ϕ).

We conclude:
Lemma 5.13. If G is left-ordered, then so is Sp(G, ϕ). The order on Sp(G, ϕ) continues the order on G.
Lemma 5.14. If G is computably left-ordered, then so is Sp(G, ϕ). The order on Sp(G, ϕ) continues the order on G.
Proof. We fix a computable left-order on T (ϕ), see Corollary 4.26. Let (t, f ) ∈ Sp(G, ϕ). First run the algorithm for the word problem, see Lemma 5.12. If (t, f ) represents the identity stop. Otherwise, check whether or not f is positive, negative or the identity. In the first two cases, we are done. Otherwise, we can computably determine the leftmost (maximal) interval J of the splinter representation of (t, f ) such that t(J) = 1. Then we use that the left-order on G is computable to determine whether or not t(J) is positive or negative. 5.4. Embeddings into finitely generated groups. To conclude the proof of Theorem 5.1, we need the following result of [Dar15], see also [Dar19, Theorem 3] for more details on assertions (1)-(3).
Theorem 5.15. Every countable group G embeds into a 2-generated group H. In addition, (1) if G is computable, then H has decidable word problem; (2) if G is left-ordered, then H is left-ordered; (3) if G is computably left-ordered, then the left order on H is computable; (4) the embedding of G into H is a Frattini embedding.
Moreover, the left-order on H continues the left-order on G.
Here we briefly explain why the embedding from [Dar15] is a Frattini embedding.
Proof of assertion (4) of Theorem 5.15. As it is shown in Section 2 of [Dar15], for G = {g 1 , g 2  Therefore, n = 0, henceḡ(1) is conjugate toh(1) in G z . Repeating this argument one more time with respect to the pairḡ(1),h(1) ∈ G z and using the fact that (ḡ(1))(1) = g and (h(1))(1) = h, we get that g is conjugate to h in G. Since g, h ∈ G are arbitrarily chosen elements from G, we get that the embedding from [Dar15] that satisfies Theorem 5.15 is Frattini.
Proof of Theorem 5.1. By Theorem 5.15, we assume without loss of generality that G is 2-generated.
Let H be the splinter group Sp(G, ϕ). Let X be a Cantor set, whose elements are represented as infinite sequences in letters 0 and 1. We note that the so called Thompson's group V is exactly the group Ft(X) defined in [Tho80,p. 405]. In fact, V is an infinite finitely generated simple group that acts on X [Tho80, Proposition 1.5, Corollary 1.9].
We note that the splinter group of [Tho80] is the subgroup of G X V generated by V and the functions g from X to G that take the value g on all sequences starting with 01, and the identity elsewhere. Lemma Unfortunately, the group V and, hence, the splinter group of [Tho80] are not left-orderable.

EMBEDDINGS OF LEFT-ORDERED GROUPS
Let J be a dyadic interval in [0, 1]. Since every left-ordered group embeds as a subgroup into Homeo + (J), we have the following.
Proposition 6.1. Every countable left-ordered group G embeds into a finitely generated left-ordered group H. In addition, the order on H continues the order on G.
Proof. Let G be countable left-orderable group. Then, by Theorem 5.1, G embeds into a finitely generated perfect left-orderable group G 1 . On its own turn, since G 1 is left-orderable, it embeds into Homeo + (J).
We now construct an embedding as in the previous proposition, that, in addition, is Frattini and isometric (provided that G is finitely generated), as required by Remark 1.1, and that has the computability properties required by Theorem 2. To achieve this, we modify the construction of Proposition 2.12 of embeddings of left-ordered groups into Homeo + (J).
Definition 6.2. For any r = 2 k p q ∈ Q \ {0}, where p and q are odd integers, we call {r} d := k the dyadic part of r.
We observe: Definition 6.4. Let I and J be fixed intervals and g : Q I → Q J be a bijection. Then we say that g is strongly permuting the dyadic parts if the following two conditions take place.
(1) For each m ∈ Z, there exists at most one x ∈ Q I such that {x} d = m and {g(x)} d ≤ 0; (2) If If g is a bijection from I to J, when we say that g is strongly permuting the dyadic parts if it maps rational points to rational points and its restriction g | Q I : Q I → Q J satisfies Definition 6.4. Remark 6.5. If g : Q I → Q J is strongly permuting the dyadic parts, then, for each m ∈ Z, the set Let us consider, for 0 < i n, • bijective dyadic maps f i : • bijective maps g i : J i → I i−1 , whose restriction to Q Ji strongly permutes the dyadic parts.
Lemma 6.6. If Λ = g 1 f 1 g 2 f 2 . . . g n f n , then, for large enough N ∈ N, the set is unbounded from above. In particular, Λ = id.
Proof. We will prove the lemma by induction on n.
The statement now follows as g 1 strongly permutes the dyadic parts (see Remark 6.5).
6.2. The modified dynamical realization. Let J be a fixed closed interval in R with non-empty interior.
We prove: Proposition 6.7. Let G be a countable group.
If G is left-orderable, then there is an embedding Ψ : G → Homeo + (J) such that, for all g ∈ G \ {1}, the map Ψ(g) : J → J is strongly permuting the dyadic parts and does not fix any rational interior point of J.
If G is computably left-orderable, then, in addition, all the maps Ψ(g) can be taken to be computable.
As in the proof of Proposition 2.12, we fix a recursive enumeration Q J = {q 0 , q 1 , . . .} such that the natural order on Q J is computable with respect to this enumeration.
We first strengthen Lemma 2.10 that states that there is an order preserving bijection Φ : G → Q J .
Step 2n + 1. Let G 2n = {g i1 , . . . , g i2n } and Q 2n = {r i1 , . . . , r i2n } be already defined. Let us define g i2n+1 as the element of the smallest index that is not in G 2n . Suppose that g is < g i2n+1 < g it and that no element from G 2n is in between g is and g it . Then define r i2n+1 ∈ Q J to be of the smallest index such that Step 2n + 2. Let G 2n+1 := {g i1 , . . . , g i2n+1 } and Q 2n+1 = {r i1 , . . . , r i2n+1 } be already defined. Let us define r i2n+2 as the rational of the smallest index that is not in Q 2n+1 . Suppose that r is < r i2n+2 < r it and that no element from Q 2n+1 is in between r is and r it . Then let us define g i2n+2 ∈ G as the element of the smallest index such that (E1) g i2n+2 / ∈ G 2n+1 and g is < g i2n+2 < g it , and The bijection Θ defined this way is order preserving by (O1) and (E1). Condition (O2) yields assertion (1), and (E2) yields assertion (2). Finally, as the procedure is algorithmic, we also obtain assertion (3).
To this end, we enumerate Q J such that Θ(g i ) = r i and let r i = r j ∈ Q J . We define r k = Ψ(h)(r i ) = Θ(hg i ) and r l = Ψ(h)(r j ) = Θ(hg j ), so that g k = hg i and g l = hg j .
We first show property (1) of Definition 6.4. By contradiction, assume that there exist i = j such the indices k and l are even. Then, since g k = hg i = (hg j )(g −1 j )(g i ) and g l = hg j = (hg i )(g −1 i )(g j ), by (2) of Lemma 6.8, the largest index is among i or j. Let j > i. Then, since {r i } d = {r j } d , we get the index j is even. Since g j = g i (hg i ) −1 (hg j ), again by (2) of Lemma 6.8, we get a contradiction, which yields the claim.
Next, we prove property (2) of Definition 6.4. By contradiction, assume that there exist r i = r j ∈ Q J such that {r i } d = {r j } d and suppose that {r l } d = {r k } d . Without loss of generality, l > i, j, k (if, say, j > i, k, l, then instead of h we could consider h −1 ). Then, since {r k } d = {r l } d , by (1) of Lemma 6.8, l has to be even. Therefore, since Θ(hg j ) = r l and l is even, by (2) of Lemma 6.8, hg j ∈ g m g −1 n g p | 1 m, n, p < j . On the other hand, since l > i, j, k, we get hg j = (hg i )(g −1 i )(g j ), a contradiction.
This completes the proof of Proposition 6.7.
6.3. The embedding theorems. Let G be countable left-orderable group. Then, by Theorem 5.1, G embeds into a finitely generated perfect left-orderable group G 1 . Moreover, this embedding is a Frattini embedding.
For the definition of G 2 -dyadic maps, see Definition 4.6.
Lemma 6.9. Let Λ be a G 2 -dyadic map. If G 2 has decidable word problem, then there is an algorithm to decide whether or not Λ = id.
Proof. Let n > 0 and, for all 0 i n, let J i ⊂ J and let g i : J i → I i−1 be the restriction of an element of G 2 such that g i = id. Moreover, let f i : Since, for all 0 < i < n, J i ⊂ [1/4, 1/2] and, by definition, λ i is a power of 2, we get that c i = 0 for 0 < i < n. Then, by Lemma 4.25, Λ := g 1 f 1 g 2 f 2 . . . g n f n = id.
If n = 1 and f 1 = id, then Λ = g 1 ∈ G. Then we decide using the algorithm for the word problem in G.
Combining Lemmas 5.6 and 6.9, we also conclude the following.
We represent t by a canonical chart representation Let k be a index such that 1/2 is in the closure of J k and such that (after applying a chart refinement if necessary) J k ⊆ J. As g is fixing 1/2, there is J k ⊆ J k such that g(J k ) ⊆ J k and such that 1/2 is in the closure of J k . We let I k = t −1 k (J k ) and I k = t −1 k gt k (I k ). Then the triple (C × I k , C × I k , t −1 k gt k ) is in a chart representation of t −1 gt. Up to applying the algorithm of Lemma 4.20 to this chart representation, we may assume that I k is in [0, 1]. Moreover, up to applying a chart refinement if necessary, we may assume that either I k ∩ J is empty or consists of one point (1/4 or 1/2), or I k ⊆ J.
If I k ∩ J is empty or consists of one point, then (C × I k , C × I k , t −1 k gt k ) is in a chart representation of ht −1 gt. Thus t −1 k gt k = id on I k by Lemma 4.24. This implies that g acts as the identity on J k . Since non-trivial elements of G 2 do not fix any rational interior points of J, the element g = 1.
Otherwise, the triple (C × I k , C × h(I k ), ht −1 k gt k ) is in a chart representation of ht −1 gt. Thus ht −1 k gt k = id on I k by Lemma 4.24. Then h(I k ) = I k . This is only possible if I k ⊆ J. But then Lemma 6.9, implies that t k acts as an element of G 2 . Since non-trivial elements of G 2 do not fix any rational interior points of J, this implies that g and h are conjugate in G 1 .
We can now conclude Theorems 1, 2 and 4.
The group H is finitely generated left-orderable and simple by Lemmas 3.14, 3.20 and 3.19. By construction, G embeds into H, and the order on H extends the order on G. Moreover, by Lemma 6.11, the embedding of G is a Frattini embedding.
If G is computably left-ordered, we may in addition assume that G 1 is computably left-ordered, see Theorem 5.1. By Proposition 6.7, for all g ∈ G 1 , Ψ(g) is computable. Therefore, by Lemma 2.9, the positive cone of H is recursively enumerable. Moreover, by Lemma 6.9 and Lemma 4.25, the group H has decidable word problem. By Lemma 2.9, the left-order on H is computable.
Proof of Theorem 4. Let G be finitely generated left-orderable group with a recursively enumerated positive cone. If G has decidable word problem, then the left-order on G is computable by Lemma 2.9.
Then Theorem 2 implies that G embeds into a finitely generated computably left-ordered simple group H.
In particular, the word problem in H is decidable. Thus H can be defined by a recursively enumerable set of relations. By [BG09,Theorem D], H embeds into a left-orderable finitely presented group.
On the other hand, if H is a finitely generated simple subgroup of a finitely presented group, then it has decidable word problem (see [LS77,Theorem 3.6]). Therefore, G has decidable word problem as well.

EMBEDDINGS OF COMPUTABLE GROUPS
In this section we prove Theorem 3, the isometric version of Thompson's theorem [Tho80]. In Appendix we present yet another proof of Theorem 3 that, using the setting of our paper, mimics the original idea of [Tho80].
Theorem 7.1. Every computable group G Frattini embeds into a finitely generated simple group H with decidable word problem. If G is finitely generated, then the embedding is isometric.
Remark 7.2. The original statement [Tho80] is for finitely generated groups, but finite generation can be replaced by computability of G due to Theorem 5.15. 7.1. The embedding construction. Let G be a computable group. By Theorem 5.1, G embeds into a finitely generated perfect group G 1 with decidable word problem (if G is finitely generated, this claim also follows from [Tho80,§2]). g (2) , . . .} be enumerated so that m : N × N → N, defined as m((i, j)) = k if g (i) g (j) = g (k) , is computable. By Remark 2.3 the existence of such m is equivalent to decidability of the word problem.
Let us fix two recursively enumerated recursive sets of dyadic numbers {x 1 , x 2 , . . .} and {y 1 , y 2 , . . .} such that the following takes place (1) 0 < x 1 < y 1 < x 2 < y 2 < . . . < 1 3 , (2) x i and y i are of the form m 2 n and m+1 2 n , respectively, For every l ∈ N, let ξ l : J → J be such that, for every k ∈ N, it is an affine map from D k onto D m (l,k) and that is identity outside of ∪ ∞ i=1 D i . In particular, the map ξ l : D k → D m(l,k) is dyadic. Let us define λ : G 1 → C(J) by λ(g (l) ) = ξ l , for all l ∈ N.
Remark 7.4. The map λ is an embedding of G 1 into computable maps in C(J).
Let Λ = g 1 f 1 g 2 f 2 . . . g n f n : I n → I 0 , where f i : I i → J i and g i : J i → I i−1 , be a G 2 -dyadic map as in Definition 4.6. Recall that in particular we have J i ⊆ J = (0, 1 3 ] for 1 ≤ i ≤ n. We say that Λ is a special G 2 -dyadic map if for each 1 ≤ i ≤ n we have 1/3 ∈ J i (closure of J i ). Correspondingly, we say that a chart of type (II), see Definition 4.8, is special if the local representation in this chart is of the form The following lemma is a direct consequence of Remark 7.3 and of the fact that the maps f i , g i , Lemma 7.5. There exist a finite collection of intervals K 1 , K 2 , . . . , K s ⊆ (0, 1 3 ] such that Λ| Ki∩I0 is a special G 2 -dyadic map. Moreover, such intervals K 1 , K 2 , . . . , K s can be found algorithmically.
Lemma 7.6. If h : I → J is a surjective dyadic map such that 1/3 is in the closures of I and J, and I, J ⊆ (0, 1 3 ], then h is the identity map.
Proof. The lemma follows from the fact that 1 3 is non-dyadic. By Lemma 7.6, we have: Corollary 7.7. Special local representations are of the form f 0 g 1 f 1 . In particular, if a special G 2 -dyadic map or a special chart of type (II) fixes 1/3, then it acts as an element of G 2 .
Since the word problem for G 2 is decidable, this implies that there exists an algorithm that decides whether or not a special G 2 -dyadic map represents the identity map. This, combined with Lemmas 7.5 and 4.25, leads to the following corollary.
We adapt the proof of Lemma 6.11.
We represent t by a canonical chart representation We recall that t i (I i ) = J i . Let k be a index such that 1/3 is in the closure of J k and such that (after applying a chart refinement if necessary) J k ⊆ J. As g is fixing 1/3, there is J k ⊆ J k such that g(J k ) ⊆ J k and such that 1/3 is in the closure of J k . We let I k = t −1 k (J k ) and I k = t −1 k gt k (I k ). Then the triple (C × I k , C × I k , t −1 k gt k ) is in a chart representation of t −1 gt. Up to applying the algorithm of Lemma 4.20 to this chart representation, we may assume that I k is in [0, 1]. Moreover, up to applying a chart refinement if necessary, we may assume that either I k ∩ J is empty or consists of one point 1/3, or I k ⊆ J.
If I k ∩J is empty or consists of one point 1/3, then (C ×I k , C ×I k , t −1 k gt k ) is in a chart representation of ht −1 gt. Thus t −1 k gt k = id on I k by Lemma 4.24. This implies that g acts as the identity on J k . As 1/3 is in the closure of J k , this implies that g = 1.
Otherwise, the triple (C × I k , C × h(I k ), ht −1 k gt k ) is in a chart representation of ht −1 gt. Thus ht −1 k gt k = id on I k by Lemma 4.24. But then t k ht −1 k g : J k → J k has to be the identity as well. As g is fixing 1/3, t k ht −1 k has to fix 1/3. If t k was dyadic (i.e. of type (I)), it would have to fix 1/3, so that t k = id by Lemma 7.6. If t k is of type (II), we may assume that t k is special, see Lemma 7.5. Then, by Corollary 7.7, t k acts as an element of G 2 .
Thus g and h are conjugated by elements of G 2 . This implies that g and h are conjugated in G 1 . Combining Lemma 7.9 with Lemma 5.7, we obtain: Corollary 7.10. The embedding G → T (G 2 , ϕ) is Frattini.
Proof. We fix a finite generating set X for G 1 , and denote the generating set of T (ϕ) given by Lemma 3.7 by Y . We denote the union of the bijective images of X and Y in T (G 2 , ϕ) by Z and recall that Z generates T (G 2 , ϕ). We assume that all generating sets are symmetric. We denote by |.| A the word metric with respect to the generating set A.
Let g ∈ G 2 and let t = z 1 · · · z m be a reduced word in the alphabet Z that represents g −1 ∈ T (G 2 , Φ), so that tg = 1. In addition, we assume that m = |g| Z . We represent every generator z i by a canonical chart representation, see Lemma 4.15. Lemma 4.23 then gives a canonical chart representation Recall that the maps t i are compositions t i = h 1 · · · h mi , where each map h j is a local representation in the canonical chart representation of a generator in Z and m i m. In addition, up to applying the algorithm of Lemma 4.20 to this chart representation of t, we may assume Let I k be an interval such that 1/3 is in the closure of I k and such that (after applying a chart refinement if necessary) I k ⊆ J.
is in a canonical chart representation of the identity. By Lemma 4.24, t i g is the identity mapping. In particular, g −1 (I k ) = J i , so that J i ⊆ J and 1/3 is in the closure of We note that t i is not dyadic (i.e. of type (I)) by Lemma 7.6. If t i = f g 1 f 1 · · · g n f n is a chart of type (II), then, by Lemma 7.5, we may assume that t i is special. Thus t i = g 1 · · · g n ∈ G 2 (Lemma 7.6), where n m i m.
Thus we may assume that t i = x j1 · · · x jm i ∈ G 2 . Then |g| X m i m = |g| Z . We conclude that the embedding is isometric. Combining Lemma 7.11 with Lemma 5.6, we obtain: Corollary 7.12. If G is finitely generated, then the embedding G → T (G 2 , ϕ) is isometric.
Proof of Theorem 7.1. The simplicity of T (G 2 , ϕ) follows from Lemma 3.19. From Corollary 7.8, the word problem in T (G 2 , ϕ) is decidable provided that it is decidable in G 2 . By Corollary 7.10, the embedding G → T (G 2 , ϕ) is Frattini. By Corollary 7.12, it is an isometric embedding provided that G is finitely generated. Therefore, the embedding G → T (G 2 , ϕ) satisfies Theorem 7.1.

APPENDIX A. THOMPSON'S EMBEDDING REVISITED
Here we adapt the original embedding construction of [Tho80] to the setting of our paper and note that, in addition, it is an isometric embedding.
Theorem A.1. Every computable group G Frattini embeds into a finitely generated simple group H with decidable word problem. Moreover, if G is finitely generated, the embedding is isometric.
Remark A.2. The original statement [Tho80] is for finitely generated groups, but finite generation can be replaced by computability of G due to Theorem 5.15.
A.1. The embedding construction. Let G be a computable group. By Theorem 5.1, G embeds into a finitely generated perfect group G 1 with decidable word problem (if G is finitely generated, this claim also follows from [Tho80, §2]).
Let G 1 = {g 1 , g 2 , . . .} be enumerated so that m : N × N → N, defined as m((i, j)) = k if g i g j = g k , is computable. By Remark 2.3 the existence of m is equivalent to decidability of the word problem.
Let J = [ 1 2 , 1). For strictly positive k ∈ N, let We observe that any two such intervals are disjoint.
We denote by I l k the left half of the interval, and by I r k the right half, so that For every l ∈ N, let ξ l : J → J be the piecewise homeomorphism, whose pieces are dyadic, and that, for every k ∈ N, maps I r k onto I r m(l,k) and that is the identity map elsewhere on J. Let us define λ : G 1 → C(J) by λ(g l ) = ξ l , for all l ∈ N.
This contradicts the definition of G 2 -dyadic maps, Definition 4.6.
For n ∈ Z, we write s n (x) := 2 −n x + (1 − 2 −n ). All dyadic maps that fix 1 are of this form. Note that s n+m = s n • s m . We call |n| the degree of s n .
Lemma A.9. Let n = 0, and let g ∈ G 2 . Then, for all k > |n|, gs n and s n are equal on I r k . Moreover, s n g acts as the identity on at most finitely many I r k .
Proof. Let n > 0 and k > n. Direct computations show that Since, by definition, g acts trivially on I l k−n , we get gs −n coincides with s −n on I r k . Similarly, I r k ⊂ s n (I l k−n ), so that s n (I r k−n ) does not intersect with I r l , for any l > 0. Thus, by definition, g acts trivially on s n (I r k−n ), and gs n coincides with s n on I r k−n . In addition, as g permutes the intervals I r k , s n g acts as the identity on at most finitely many I r k .
Let m > 0 and for all 1 i m, let g i = 1 in G 2 , and n i = 0 in N. Let us fix Λ = g m s nm · · · g 1 s n1 to be a G 2 -dyadic map as in Lemma A.5. Let S 0 = id, S 1 = s n1 , and, recursively, S i = s ni S i−1 .
Lemma A.10. If, for all i < m, S i = id and k is strictly larger than the degree of S i , then Λ acts as g m S m on I r k . In particular, Λ = id.
Proof. Let k be strictly larger than the degree of S i , for all i < m. By Lemma A.9, as k > |n 1 |, g 1 s n1 equals to s n1 on I r k . Thus, restricted to these intervals, g m s nm · · · g 1 s n2+n1 equals to Λ. By induction this yields the first assertion.
We show that g m s nm+...+n1 = id on all but finitely many of the intervals I r k . If s nm+...+n1 = id, this is by Lemma A.9. Otherwise g m s nm+...+n1 = g m = id, which yields the claim by Remark A.4.
If m > 0, let i 0 be the smallest index such that n i0 + . . . + n 1 = 0, and recursively define i j to be the smallest index such that n ij + . . . + n ij−1+1 = 0. Let i M be the largest such index < m.
Lemma A.11. If n m + . . . + n 2 + n 1 = 0, then Λ equals to g m g i M g i M −1 · · · g i1 g i0 on all but a finite number of intervals I r k , which can be algorithmically determined. Otherwise, Λ = id.
Proof. If m = 0 the claim follows by Lemma A.10. Let m > 0.
By Lemma A.9, g m s nm g m−1 . . . g i1 and Λ are equal on I r k unless k is smaller than the degree of S i , for some i i 0 . Inductively, g m s nm g m−1 . . . g ij and g m s nm g m−1 . . . g ij−1+1 s ij−1+1 equal on I r lj := g ij−1 · · · g i0 (I r k ) unless l j is smaller than the degree of S i , for some i j−1 < i i j . Finally, g m s nm+...+i M +1 and g m s nm g m−1 . . . g i M +1 s M +1 are equal on I l M = g i M · · · g i0 (I r k ), unless l M is smaller than the degree of S i , for some i M −1 < i i M .
Let g := g i M g i M −1 · · · g i1 g i0 . We conclude that Λ is equal to g m s m+...+i M +1 g on all but a finite number of intervals I r k . As the degree of the S i is computable, we can algorithmically determine these intervals. If s m+...+i M +1 = id, this concludes the proof. Otherwise, by Lemma A.9, Λ acts as s nm+...i M +1 g on all but finitely many intervals I r k . Thus, Λ = id by Lemma A.9.
Corollary A.12. There is an algorithm to decide whether Λ is the identity on the intervals I r k in J .
Proof. By Lemma A.11, there is a computable number k 0 > 0 such that, for all k k 0 , Λ = id on I r k , if, and only if, g m g i M · · · g i1 g i0 = 1. As the word problem in G is decidable, this can be algorithmically determined. On the other hand, for each k, there is an (obvious) algorithm to decide whether or not Λ acts as the identity on I r k . We apply this algorithm for each k < k 0 . This completes the proof. Proof. Since, for all k, x ∈ S −1 1 (I r k ), we have that Λ(x) = g m s mn · · · g n2 s n2 s n1 (x). By induction, Λ(x) = S m (x), which is the claim.
Proof of Lemma A.5. By Lemma A.8, all dyadic factors in a G 2 -dyadic map fix 1. We first compute the degree of S m . If the degree of S m is not 0, then Lemma A.11 implies that Λ = id.
Otherwise, Lemma A.13 implies that Λ is the identity on J \ ∞ k=1 m i=0 S −1 i (I r k ). Let 0 i m. We argue that there is an algorithm to decide whether or not Λ is the identity on the intervals S −1 i (I r k ) in J . This will complete the proof. Let x ∈ S −1 i (I r k ), and let y ∈ I r k be the point such that x = S i (y). We note that Λ(x) = x if, and only if, Λ(S i y) = S i y, if, and only if, S −1 i ΛS i (y) = y. Therefore, we need to decide whether or not the G 2 -dyadic map S −1 i ΛS i is the identity on the intervals I r k such that S −1 i (I r k ) ⊂ J . Let k 0 > 0 be the smallest index such that for all k k 0 , I r k ⊂ S i (J ). As S i (J ) can be algorithmically determined, k 0 can be computed as well. Thus, we need to decide whether or not S −1 i ΛS i is the identity on the intervals I r k in 2 k 0 −1 2 k 0 , 1 . By Corollary A.12 such an algorithm exists.
The proof of this lemma is analogous to the proof of Lemma 6.11.
We represent t by a canonical chart representation (C i × I i , C j × J i , t i ) such that i J i = [0, 1]; and represent t −1 by (C i × J i , C i × I i , t i ). We recall that t i (I i ) = J i .
Let k be an index such that 1 is in the closure of J k and such that (after applying a chart refinement if necessary) J k ⊆ J. As g is fixing 1, there is J k ⊆ J k such that g(J k ) ⊆ J k and such that 1/3 is in the closure of J k . We let I k = t −1 k (J k ) and I k = t −1 k gt k (I k ). Then the triple (C × I k , C × I k , t −1 k gt k ) is in a canoncial chart representation of t −1 gt. Up to applying the algorithm of Lemma 4.20 to this chart representation, we may assume that I k is in [0, 1]. Moreover, up to applying a chart refinement if necessary, we may assume that either I k ∩ J is empty or consists of one point 1, or I k ⊆ J.
If I k ∩ J is empty or consists of one point, then (C × I k , C × I k , t −1 k gt k ) is in a chart representation of ht −1 gt. Thus t −1 k gt k = id on I k by Lemma 4.24. This implies that g acts as the identity on J k . As 1 is in the closure of J k , this implies that g = 1.
Otherwise, (C × I k , C × h(I k ), ht −1 k gt k ) is in a chart representation of ht −1 gt. Thus ht −1 k gt k = id on I k by Lemma 4.24. But then t k ht −1 k g : J k → J k has to be the identity as well. As g is fixing 1, t k ht −1 k has to fix 1.
If t k does not fix 1, h acts (up to applying finitely many chart refinements if necessary) as a dyadic map on I k . But it has to fix t −1 k (1). Thus h acts as the identity on I k . This implies that g = 1 by Remark A.3. Otherwise, by Lemma A.11, there are g i M , . . . , g i0 ∈ G 2 such that, on all but finitely many of the intervals I r j , the maps h −1 t −1 k gt k equals to h −1 g −1 i0 · · · g −1 i M gg i M · · · g i0 . By Remark A.4, this implies that h and g are conjugated in G 1 .
Moreover, the embedding of Thompson is also an isometric embedding.
Proof. We fix a finite generating set for G 1 . This gives a finite generating set for (G 2 , Φ). We denote by |h| the word metric of h.
Let g ∈ G 2 and t ∈ T (G, Φ) such that tg = 1. We represent t by finitely many (canonical) charts (C i × I i , C i × J i , t i ) such that I i = [0, 1]. We note that |t i | |t|.
Let I k be the interval such that 1 is in the closure of I k and such that (after applying a chart refinement if necessary) I k ⊆ J.
Then (C i × g −1 (I k ), C i × J i , t i g) is in a canonical chart representation of tg. By Lemma 4.24, t i g is the identity mapping. In particular, g −1 (I k ) = J i , so that J i ⊆ J and 1 is in the closure of J i .
If t i is a dyadic map, then t i = id (Lemma A.9) and thus g = 1 .
If t i ∈ G 2 , then g = t −1 i and |g| = |t i | |t|. Otherwise, t i = g 1 f 1 · · · g n f n is a G 2 -dyadic map. Moreover, by Remark A.4, we may assume that all dyadic maps f i fix 1. Thus, by Lemma A.11, g = g i1 · · · g m . Thus |g| m |f |.
We conclude that the embedding is isometric.
Combining Lemma A.15 with Lemma 5.6, we obtain