Fields definable in the free group

We prove that no infinite field is definable in the theory of the free group


Introduction
After the work of Sela [18] and Kharlampovich-Myasnikov [6] leading to the positive answer to Tarski's question, there is an increasing model theoretic interest in the first-order theory of nonabelian free groups.
Although Sela proved that any definable set is equivalent to a boolean combination of ∀∃-definable sets we are far from understanding these "basic" sets. According to Sela these sets admit a natural geometric interpretation, but admittedly neither geometers nor logicians have absorbed the sophisticated techniques that occur in his voluminous work. Thus, in principle, it is hard to determine whether a subset of some cartesian power of a nonabelian free group is definable or not.
Moreover, starting from Zilber's seminal work towards understanding uncountably categorical theories via some naturally defined pregeometries (see [23]), questions about what kind of groups are definable or whether an infinite field is definable in a given first order theory have become important within the community of model theorists.
Recently, some positive results along this line of thought have appeared. The following theorem has been proved independently in [7] and [9]. When it comes to infinite definable fields in some nonabelian free group, intuitively speaking, one expects to find none. To the best of our knowledge this was first posed as a conjecture in [13]. This problem proved very hard to tackle, and the only positive result towards its solution had been the following theorem proved in the thesis [20] of the second-named author. Theorem 1.2. Let F n be the free group of rank n. Let φ be a formula over F n . Suppose φ(F n ) = φ(F ω ), where φ(F) denotes the solution set of φ in F. Then φ cannot be given definably an abelian group structure.
On the other hand, in many model theoretic questions concerning existing "configurations" in a first order theory one does not need to understand the exact set of solutions of a formula but just its rough "shape". Indeed in this vein there has been progress. A definable set (or a parametric family) can be endowed with an envelope that contains the definable set, and moreover it carries a natural geometric 298 AYALA DENTE BYRON AND RIZOS SKLINOS structure from which we can read properties that when they hold "generically" for the envelope, they also hold for the definable set. The method of envelopes has been proved very useful in proving (weak) elimination of imaginaries (see [14]) but also in proving that the first order theory of the free group does not have the finite cover property (see [21]). We will utilize envelopes once more in order to confirm the above conjecture.
The main theorem of this paper is: Let F be a nonabelian free group. Then no infinite field is definable in F.
Our proof is based on the following theorem, which is a consequence of the quantifier elimination procedure. We record it next in the simplest possible form. Theorem 1.3 (Sela). Let F := F(ā). Let T (G, F) be a hyperbolic tower where G := ū,x,ā | Σ(ū,x,ā) and let φ(x,ā) be a first order formula over F. Suppose there exists a test sequence, (h n ) n<ω : G → F for T (G, F) such that F |= φ(h n (x),ā).
Then for any test sequence, (h n ) n<ω : G → F, for T (G, F) there is n 0 such that F |= φ(h n (x),ā) for all n > n 0 .
The notions of a hyperbolic tower and of a test sequence over it will be defined in sections 4 and 6, respectively.
We obtain the following "generalisation" to an arbitrary formula, but only after strengthening the hypothesis and weakening the conclusion of Merzlyakov's theorem as follows.
Theorem 2. Let F := F(ā). Let F |= ∀x∃ <∞ȳ φ(x,ȳ,ā) and assume there exist a test sequence (b n ) n<ω and a sequence of tuples (c n ) n<ω such that F |= φ(b n ,c n ,ā). Then there exists a tuple of wordsw(x,ā) in x * F such that for any test sequence (b n ) n<ω in F we have that there exists n 0 (that depends on the test sequence) with F |= φ(b n ,w(b n ,ā),ā) for all n > n 0 .
We remark that our main theorem implies, together with the elimination of the "exists infinitely many" quantifier ∃ ∞ , that no infinite field is definable in any model of this theory.
The proof splits into two parts. Roughly speaking for any definable set X we prove that either X is internal to a finite set of centralizers or it cannot be given definably an abelian group operation; i.e., there is no definable set Y ⊂ X × X × X such that Y is the graph of an abelian group operation on X. To conclude that no infinite field is definable we prove that centralizers of nontrivial elements are one-based.
The paper is structured as follows: in the next section we take the opportunity to recall some basic geometric stability theory and introduce the reader to the results that will allow us to conclude our theorem in the case a definable set is "coordinated" by a finite set of centralizers.
The following section contains introductory material that concerns Bass-Serre theory as well as results for a special class of groups called limit groups. The material here is by no means original and is certainly well known. Since in many of our arguments we will use actions on trees or normal forms for groups that admit a graph of groups splitting, we hope that this section will provide an adequate background for the uninitiated.
Section 4 contains many of the core notions which are important in this paper. We start by explaining when a group admits the structure of a tower and then we continue by introducing a construction that leads to the notion of a twin tower. Twin towers will play a fundamental role in our main proof.
In sections 5 and 6 we record and extend some constructions and results of Sela that appear in [16], [17], and [14]. Here the reader will find all the technical apparatus that makes our main proof possible. Theorems 6.25, 6.32, and 6.34 lie in the core of our result.
Finally, in the last section we bring everything together and we prove the main result. We split the proof into two cases: the abelian case and the nonabelian case. The abelian case is resolved using geometric stability, while the nonabelian case is resolved using geometric group theory. We have also added an example, which we call the hyperbolic case, where our proof is free of certain technical phenomena, so the reader could clearly see the idea behind it.

Some geometric stability
In this section we provide some quick model theoretic background on stable theories. A gentle introduction to stability and forking independence has been given in [10], so to avoid repetition we refer the reader there. Our main focus in this paper will be on geometric stability and in particular on the notion of onebasedness. For more details the reader can consult [11]. We work in the monster model M of a stable theory T . Definition 2.1. A definable set X (in M) is called weakly normal if for every a ∈ X only finitely many translates of X under Aut(M) contain a.

Definition 2.2. The first order theory T is one-based if every definable set (in M)
is a boolean combination of weakly normal definable sets.
The simplest example of a one-based theory is the theory of a vector space (V, +, 0, {r k } k∈K ) over a field K, where for each k ∈ K, r k is a function symbol which is interpreted in the structure as scalar multiplication by the element k ∈ K. In the same vein we have: For the purposes of our paper one-based theories have an important property proved by Pillay in [12].
Fact 2.4 (Pillay). Let T be one-based. Then no infinite field is interpretable in T .
A set is interpretable if it is definable up to a definable equivalence relation. Thus, in particular no infinite field is definable in a one-based theory.
3.1. Bass-Serre theory. Bass-Serre theory gives a structure theorem for groups acting on (simplicial) trees, i.e., acyclic connected graphs. It describes a group (that acts on a tree) as a series of amalgamated free products and HNN extensions. The mathematical notion that contains these instructions is called a graph of groups. For a complete treatment we refer the reader to [19].
We start with the definition of a graph.  • a graph G(V, E); • a family of groups {G u } u∈V ; i.e., a group is attached to each vertex of the graph; • a family of groups {G e } e∈E ; i.e., a group is attached to each edge of the graph. Moreover, G e = Gē; • a collection of injective morphisms {f e : G e → G τ (e) | e ∈ E}; i.e., each edge group comes equipped with two embeddings to the incident vertex groups.
The fundamental group of a graph of groups is defined as follows.  E). Then the fundamental group, π 1 (G, T ), of G with respect to T is the group given by the following presentation: {G u } u∈V , {t e } e∈E | t −1 e = tē for e ∈ E, t e = 1 for e ∈ T, f e (a) = t e fē(a)tē for e ∈ E a ∈ G e .
Remark 3.4. It is not hard to see that the fundamental group of a graph of groups does not depend on the choice of the maximal subtree up to isomorphism (see [19,Proposition 20,p. 44]).
In order to give the main theorem of Bass-Serre theory we need the following definition.
Definition 3.5. Let G be a group acting on a simplicial tree T without inversions, denote by Λ the corresponding quotient graph, and denote by p the quotient map T → Λ. A Bass-Serre presentation for the action of G on T is a triple (T 1 , T 0 , {γ e } e∈E(T 1 )\E(T 0 ) ) consisting of • a subtree T 1 of T which contains exactly one edge of p −1 (e) for each edge e of Λ; • a subtree T 0 of T 1 which is mapped injectively by p onto a maximal subtree of Λ; • a collection of elements of G, is given by the identity if e ∈ T 0 and by conjugation by γ e if not.
Then G is isomorphic to π 1 (G).
Remark 3.7. The other direction of the above theorem also holds. Whenever a group G is isomorphic to the fundamental group of a graph of groups then there is a natural way to obtain a simplicial tree T and an action of G on T (see [19, section 5.3, p. 50]).
Among splittings of groups we will distinguish those with some special type vertex groups called surface type vertex groups. Definition 3.8. Let G be a group acting on a tree T without inversions and let (T 1 , T 0 , {γ e }) be a Bass-Serre presentation for this action. Then a vertex v ∈ T 0 is called a surface type vertex if the following conditions hold: • Stab G (v) = π 1 (Σ) for a connected compact surface Σ with nonempty boundary, such that either the Euler characteristic of Σ is at most −2 or Σ is a once punctured torus. • For every edge e ∈ T 1 adjacent to v, Stab G (e) embeds onto a maximal boundary subgroup of π 1 (Σ), and this induces a one-to-one correspondence between the set of edges (in T 1 ) adjacent to v and the set of boundary components of Σ.
We next follow [2] and define the notion of a generalized abelian decomposition (GAD).
• each vertex in V S is a vertex of surface type for the corresponding action on a tree; • each vertex group for a vertex in V A is noncyclic abelian; and • each vertex group for a vertex V R is called rigid.
, whose vertex is in V A . Then we denote by P (A) the subgroup of A generated by all incident edge groups. Moreover the subgroup of A that dies under every morphism h : A → Z that kills P (A) is called the peripheral subgroup and is denoted byP (A). • amalgamated free product A * C B so that H is a subgroup of A. Let g be an element in the centralizer of C in G. Then a Dehn twist in g is the automorphism fixing A pointwise and sending each element b of B to gbg −1 . • HNN-extension A * C so that H is a subgroup of A. Let g be an element in the centralizer of C in G. Then a Dehn twist in g is the automorphism fixing A and sending the Bass-Serre element t to tg. Definition 3.12 (Relative modular automorphisms). Let H be a subgroup of G.
) be a GAD of G in which H can be conjugated into a vertex group. Then Mod H (Δ) is the subgroup of Aut H (G) generated by: • inner automorphisms; • unimodular automorphisms of G u for u ∈ V A that fix the peripheral subgroup of G u and every other vertex group; • automorphisms of G u for u ∈ V S coming from homeomorphisms of the corresponding surface that fix all boundary components; • Dehn twists in elements of centralizers of edge groups, after collapsing the GAD to a one edge splitting in which H is a subgroup of a vertex group.
Moreover we define the modular group of G relative to H, Mod H (G), to be the group generated by Mod H (Δ) for every GAD Δ of G.

3.2.
Actions on real trees. Real trees (or R-trees) generalize simplicial trees in the following way.

Definition 3.13.
A real tree is a geodesic metric space in which for any two points there is a unique arc that connects them.
When we say that a group G acts on a real tree T we will always mean an action by isometries.
Moreover, an action G T of a group G on a real tree T is called nontrivial if there is no globally fixed point and minimal if there is no proper G-invariant subtree. Lastly, an action is called free if for any x ∈ T and any nontrivial g ∈ G we have that g · x = x.
We next collect some families of group actions on real trees.
Definition 3.14. Let G λ T be a minimal action of a finitely generated group G on a real tree T . Then we say: (i) λ is of discrete (or simplicial) type if every orbit G.x is discrete in T . In this case T is simplicial, and the action can be analyzed using Bass-Serre theory. (ii) λ is of axial (or toral) type if T is isometric to the real line R and G acts with dense orbits; i.e., G.x = T , for every x ∈ T . (iii) λ is of surface (or IET) type if G = π 1 (Σ) where Σ is a surface with (possibly empty) boundary carrying an arational measured foliation and T is dual tõ Σ; i.e., T is the lifted leaf space inΣ after identifying leaves of distance 0 (with respect to the pseudometric induced by the measure).
We will use the notion of a graph of actions in order to glue real trees equivariantly. We follow the exposition in [3, section 1.3]. , {p e } e∈E(T ) ) consists of the following data: • a simplicial type action G T ; • for each vertex u in T a real tree Y u ; • for each edge e in T , an attaching point p e in Y τ (e) . Moreover: (1) G acts on R :

To a graph of actions
we can assign an Rtree Y A endowed with a G-action. Roughly speaking this tree will be u∈V (T ) Y u / ∼, where the equivalence relation ∼ identifies p e with pē for every e ∈ E(T ). We say that a real G-tree Y decomposes as a graph of actions A if there is an equivariant isometry between Y and Y A .
Interesting actions on real trees can be obtained by sequences of morphisms from a finitely generated group to a free group. We explain how in the next subsection.
3.3. The Bestvina-Paulin method. The construction we are going to record is credited to Bestvina [1] and Paulin [8] independently.
We fix a finitely generated group G and we consider the set of nontrivial equivariant pseudometrics d : G × G → R ≥0 , denoted by ED(G). We equip ED(G) with the compact-open topology (where G is given the discrete topology). Note that convergence in this topology is given by It is not hard to see that R + acts cocompactly on ED(G) by rescaling; thus the space of projectivised equivariant pseudometrics on G is compact.
We also note that any based G-space (X, * ) (i.e., a metric space with a distinguished point equipped with an action of G by isometries) gives rise to an equivariant pseudometric on G as follows: We say that a sequence of G-spaces (X i , * i ) i<ω converges to a G-space (X, * ) if the corresponding pseudometrics induced by (X i , * i ) converge to the pseudometric induced by (X, * ) in PED(G).
A morphism h : G → H where H is a finitely generated group induces an action of G on X H (the Cayley graph of H) in the obvious way, thus making X H a G-space. We have: Lemma 3.16. Let F be a nonabelian free group. Let (h n ) n<ω : G → F be a sequence of pairwise nonconjugate morphisms. Then for each n < ω there exists a base point * n in X F such that the sequence of G-spaces (X F , * n ) n<ω has a convergent subsequence to a real G-tree (T, * ), where the action of G on T is nontrivial.

Limit groups.
Definition 3.17. Let G be a group and let (h n ) n<ω : G → F be a sequence of morphisms. Then the sequence (h n ) n<ω is called convergent if for every g ∈ G, there exists n g such that either h n (g) = 1 for all n > n g or h n (g) = 1 for all n > n g .
Moreover, if (h n ) n<ω : G → F is a convergent sequence, then we define its stable kernel Kerh n := {g ∈ G | g is eventually killed by h n }. Definition 3.18. Let G be a finitely generated group. Then G is a limit group if there exists a convergent sequence (h n ) n<ω : G → F with trivial stable kernel.
Limit groups can be given a constructive definition. To this end we define: we define its envelopeG v in Δ in the following way: for every a ∈ V A we replace G a in G(V, E) by its peripheral subgroup. ThenG v is the group generated by G v together with the centralizers of incident edge groups. Definition 3.20 (Strict morphisms). Let η : G L be an epimorphism and let Δ : ) be a GAD of G in which every edge group is maximal abelian in at least one vertex group of the one edged splitting induced by the edge. Then η is strict with respect to Δ if the following hold: • η is injective on each edge group; • η is injective on the peripheral subgroup of each abelian vertex group; • η(G s ) is not abelian for every s ∈ V S .

Definition 3.21.
A group L is a constructive limit group if it belongs to the following hierarchy of groups defined recursively.
Base step. Level 0 consists of finitely generated free groups.
Recursive step. A group G belongs to level i + 1 if it is either the free product of two groups that belong to level i or there exists a GAD, Δ, for G and a strict map η : G H with respect to Δ onto some H that belongs to level i.
The following theorem appears as Theorem 5.12 in [15].
Theorem 3.22 (Sela). Let L be a finitely generated group. Then L is a limit group if and only if it is a constructive limit group.
3.5. Graded limit groups. A graded limit group is a limit group together with a distinguished finitely generated subgroup. We will be interested in a special kind of graded limit group called solid limit groups. Solid and rigid limit groups were defined in [15,Definition 10.2], and the corresponding notion in the work of Kharlampovich-Myasnikov [6] is the notion of a group without sufficient splittings. • the morphism h n = h n • η n , where η n : Sld F * Γ for some group Γ, H is mapped onto F by η n , h n : F * Γ → F stays the identity on F, and η n is short with respect to Mod H (Sld) or • the morphism h n is short with respect to Mod H (Sld) and moreover where B n is the ball of radius n in the Cayley graph of Sld. If (h n ) n<ω : Sld → F is a convergent flexible sequence, then we call Sld/Kerh n a flexible quotient of Sld.
It is not hard to see, using the shortening argument, that flexible quotients are proper. Moreover one can define a partial order and an equivalence relation on the class of flexible quotients of a solid limit group. Let Sld be a solid limit group with respect to a finitely generated subgroup H and let η i : Sld Q i for i ≤ 2 be flexible quotients with their canonical quotient maps. Then Q 2 ≤ Q 1 if ker η 1 ⊆ ker η 2 , and Q 1 ∼ Q 2 if there exists σ ∈ Mod H (Sld) such that ker(η 1 • σ) = ker η 2 .

AYALA DENTE BYRON AND RIZOS SKLINOS
For the following theorem see the discussion before Definition 10.5 in [15]. Theorem 3.28 (Sela). Let Sld be a solid limit group with respect to a finitely generated subgroup H. Assume that Sld admits a flexible quotient. Then there exist finitely many classes of maximal flexible quotients.
A morphism from a solid limit group to a free group that does not factor through one of the maximal flexible quotients (after precomposition by a modular automorphism) is called a solid morphism; otherwise it is called flexible (see [15, Definition 10.6]).

Towers
In this section we are interested in limit groups that have a very special structure, namely, the structure of a tower. A tower is built recursively adding floors to a given basis, which is taken to be a free product of fundamental groups of surfaces with free abelian groups. Each floor is built by "gluing" a finite set of surface flats and abelian flats to the previous one following specific rules, to be made precise in the next subsection. The corresponding notion in the work of Kharlampovich-Myasnikov is the notion of an NTQ group, i.e., the coordinate group of a nondegenerate triangular quasiquadratic system of equations (see [4,Definition 9]).
Limit groups that admit the structure of a tower play a significant role in the proof of the elementary equivalence of nonabelian free groups. This class of limit groups is connected with generalizations of Merzlyakov's theorem as proved in [16] and [5]. We will analyse and further expand this connection in section 6.   Figure 1). Then G has the structure of a surface flat over H if G acts minimally on a tree T and the action admits a Bass-Serre presentation (T 1 , T 0 , {γ e }) such that: • the set of vertices of T 1 is partitioned into two sets, {v} and V , where v is a surface type vertex; • T 1 is bipartite between v and V (T 1 ) \ {v}; • H is the free product of the stabilizers of vertices in V ; • either there exists a retraction r : G → H that sends Stab G (v) to a nonabelian image or H is cyclic and there exists a retraction r : G * Z → H * Z which sends Stab G (v) to a nonabelian image.
has the structure of a surface flat over F g := x 1 , . . . , x g (see Figure 2).   Remark 4.5. A more concise way to refer to a group G that has the structure of an abelian flat over a subgroup H is to say that G is obtained from H by gluing a free abelian group Z n along the (maximal abelian) subgroup E of H.
We note that when we say "gluing Z n along the subgroup E of H", the outcome will really be the amalgamated free product (E ⊕ Z n ) * E H, but we keep this terminology as it will be convenient in what follows.
We observe that if G has the structure of an abelian flat over a subgroup H, then it is not hard to find a retraction r : G → H: one can use the projection of E ⊕ Z m to E and extend this to a morphism from G to H which fixes H. . · x 2 n . Concisely, G is obtained from x 1 , . . . , x n | x 2 1 · · · x 2 n by gluing the free abelian group Z k along the subgroup x 1 of x 1 , . . . , x n | x 2 1 · · · x 2 n .

AYALA DENTE BYRON AND RIZOS SKLINOS
We can combine surface and abelian flats in order to obtain the "floors" of a tower. Definition 4.7 (Floor). Let G be a group and let H be a subgroup of G (see Figure 4). Then G has the structure of a floor over H if G acts minimally on a tree T and the action admits a Bass-Serre presentation (T 1 , T 0 , {γ e }), where the set of vertices of T 1 is partitioned into three subsets, V S , V A , and V R , such that: • each vertex in V S is a surface type vertex; • for each vertex u ∈ V A , its stabilizer G u is a free abelian group; • the tree T 1 is bipartite between V S ∪ V A and V R ; • the subgroup H of G is the free product of the stabilizers of vertices in V R ;  In the opposite direction a floor can be decomposed into flats in many possible ways; i.e., a floor can be seen as a sequence of surface and abelian flats, and we will often see such a sequence as giving a preferred order to the flats of the floor.
We can now bring everything together to define: Definition 4.8. A group G has the structure of a tower (of height m) over a subgroup H if there exists a sequence G = G m > G m−1 > · · · > G 0 = H such that for each i, 0 ≤ i < m, one of the following holds: (i) The group G i+1 has the structure of a floor over G i , in which H is contained in one of the vertex groups that generate G i in the floor decomposition of G i+1 over G i . Moreover, the pegs of the abelian flats of the floor are glued along (maximal abelian) groups that are not conjugates of each other and they cannot be conjugated into groups which correspond to abelian flats of any previous floor. (ii) The group G i+1 is a free product of G i with a finitely generated free group.
The next lemma follows from the definition of a constructible limit group. Lemma 4.9. If G has the structure of a tower over a limit group, then G is a limit group.
If G has the structure of a tower over a subgroup H it will be useful to collect the information witnessing it. Thus we define: Definition 4.10. Suppose G has the structure of a tower (of height m) over H. Then the tower corresponding to G, denoted by T (G, H), is the following collection of data: where: • the splitting G(G i+1 , G i ) is the splitting that witnesses that G i+1 has the structure of a floor over G i , respectively, the free splitting G i * F n for some finitely generated free group F n ; is the retraction that witnesses that G i+1 has the structure of a floor over G i , respectively, the retraction r i+1 : Remark 4.11. The notation G(G) will refer to a splitting of G as a graph of groups. The notation G(G, H) will refer either to a free splitting of G as H * F n or to a splitting that corresponds to a floor structure of G over H.
A tower in which no abelian flat occurs in some (any) decomposition of its floors into flats is called a hyperbolic tower (or regular NTQ group in the terminology of Kharlampovich-Myasnikov). Furthermore, if a floor consists only of abelian flats we call it an abelian floor.
For the rest of the paper we assume the following.

Convention.
Suppose T (G, F) is a tower. Let {E j } j∈J be the collection of pegs that correspond to the abelian flats that occur along the floors of the tower. Let {E j } j∈J , with J ⊆ J, be the subcollection of the pegs that can be conjugated into a subgroup of the base floor F; i.e., there is Then, we assume that: (1) when the above subcollection is not empty, the first floor G(G 1 , G 0 ) of the tower T (G, F) consists only of the abelian flats corresponding to the above subcollection and glued along E γ j j to F, and each floor above the first (abelian) floor is either a free product or it consists of a single flat (abelian or surface); (2) when the above subcollection is empty, we assume that each floor is either a free product or it consists of a single flat (abelian or surface).

Twin towers.
We next work towards constructing a tower by "gluing" two copies of a given tower together.   Proof. The first embedding f 1 can be taken to be the identity since H is a subgroup of H Db , and clearly H Db has an abelian floor structure over H with the pegs corresponding to the maximal abelian groups of H that contain the pegs of G(H, F).
The second embedding f 2 is obtained as follows: • it agrees with Id on F, and • it sends each free abelian group Z m that is glued along a peg E in F in forming the abelian flats of the abelian floor G(H, F) isomorphically onto the corresponding free abelian group glued along the peg in H that contains E in forming the abelian flats of the abelian floor G(H Db , H).
The following lemmata are immediate.
Then G Db is isomorphic to the fundamental group of the graph of groups that has the same data as We now pass to proving that replacing the first (abelian) floor by its double yields a natural tower structure for the corresponding group.
Db and the embedding induced by the tower structure from G 1 to G i .
, which are naturally inherited from the corresponding splittings in T (G, F).
Proof. The proof is by induction on the height m of the tower.
Db has a natural abelian floor structure over F as observed in Definition 4.12.
Inductive step. We will assume that the result holds for any tower of height at most i and we show it for towers of height i + 1. We take cases according to whether G i+1 is a free product over G i or has a surface flat structure over G i or has an abelian flat structure over G i : Db has a tower structure over F corresponding naturally to the tower structure of G i+1 over F. • Assume that G i+1 has a surface flat structure over G i witnessed by (G(G i+1 , G i ), r i+1 ). We consider the rigid vertex group, say G u , of the above graph of groups that contains F. Since G 1 is freely indecomposable with respect to F, the vertex group G u must contain G 1 . We consider the graph of groups with the same data as (G(G i+1 , G i ), r i+1 ) apart from replacing G u by G u * G 1 G 1 Db . Then by Lemma 4.14 the fundamental group of this latter graph of groups is isomorphic to G i+1 Db , and together with the retraction r i+1 : G i+1 Db → G i Db that agrees with r i+1 on G i+1 and stays the identity on G 1 Db it witnesses that G i+1 Db has a surface flat structure over G i Db . • Assume that G i+1 has an abelian flat structure over Db : indeed since A cannot be conjugated to any of the pegs of the first abelian floor G(G 1 , F) and A is maximal abelian in G i , it must be maximal abelian in G i Db . Moreover, by Lemma 4.15, it cannot be conjugated to any other peg in G i Db . Thus, together with the retraction r i+1 : G i+1 Db → G i Db that agrees with r i+1 on G i+1 and stays the identity on G 1 Db it witnesses that G i+1 has an abelian flat structure over G i Db . Changing slightly the hypothesis of the previous lemma yields the following remark.
, as in Lemma 4. 16. Before moving to the definition of a twin tower we record some easy lemmata that will help us prove that our construction of a twin tower is indeed a tower. Lemma 4.18. Suppose G has the structure of a tower over a limit group L. Let E be a maximal abelian subgroup of G and suppose E ∩ L is not trivial. Let B be the maximal abelian group in L that contains E ∩ L. Then either E is B or E is the free abelian group B ⊕ Z n that corresponds to an abelian flat of some floor of the tower glued along B to L.
The following lemma is an easy exercise in normal forms.

Lemma 4.19. Let G := A * C B be a limit group and let E be a maximal abelian group in A. Suppose that no nontrivial element of E commutes with a nontrivial element of C. Then E is maximal abelian in G.
We define the notion of a twin tower, first in a case which is free of some technical complexity, in the following proposition. Proposition 4.20 (Twin tower -nonabelian case). Suppose G has the structure of a tower T (G, F) over F. Assume that the first floor G(G 1 , G 0 ) is not an abelian floor. Then the amalgamated free product G * F G admits a natural tower structure over F which we call the twin tower of G with respect to T (G, F) (see Figure 6).
, r m )) be the sequence witnessing that G is a tower over F. Let G m+i := G i * F G be the amalgamated free product of G i with G over F. We claim that there exists a sequence where the splitting G(G m+i+1 , G m+i ) has the same data as the splitting G(G i+1 , G i ), apart from replacing the vertex group G u that contains F with G u * F G, and moreover it witnesses that G * F G has the structure of a tower over F. We proceed by induction: Base step. We show that G m+1 is a free product or has a surface flat structure or has an abelian flat structure over G m = G, according to whether G 1 is a free product or has a surface flat structure F. In addition, we show that it respects the requirements of being a floor of a tower together with the already given sequence of floors. We take cases: Thus, G m+1 has a free product structure over G. • Assume that G 1 has a surface flat structure over F. We consider the graph of groups with the same data as in G(G 1 , F) apart from replacing the vertex group F by the amalgamated free product G * F F. Then the fundamental group of this graph of groups is isomorphic to G m+1 , and together with the retraction r m+1 : G m+1 → G m that agrees with r 1 on G 1 and stays the identity on G, it witnesses that G m+1 has a surface flat structure over G m .
Inductive step. Assume that the result holds for all G m+1 , . . . , G m+i . We will show that it holds for G m+i+1 . We take cases according to whether G i+1 is a free product or has a surface flat structure or an abelian flat structure over G i : Thus, G m+i+1 is a free product of G m with F n and it satisfies the conditions of being part of a tower with the already given sequence of floors.
Consider the graph of groups decomposition with the same data as in G(G i+1 , G i ), apart from replacing the vertex group G u that contains F with the amalgamated free product G u * F G. The fundamental group of this graph of groups is isomorphic to G m+i+1 , and together with the retraction r m+i+1 : G m+i+1 → G m+i that agrees with r i+1 on G i+1 and stays the identity on G, it witnesses that G m+i+1 has a surface flat structure over . This is a splitting of G m+i+1 , and moreover, by Lemma 4.19, A is maximal abelian in G i * F G. A maximal abelian group of G m+i that contains a peg of a previous abelian flat must live either in G i or in G. Now it is enough to observe that A cannot be conjugated to a maximal abelian group of G and if a conjugate A g of A intersects nontrivially another maximal abelian group of G i , then g ∈ G i . In addition, we define the map r m+i+1 : G m+i+1 G m+i to agree with r i+1 on G i+1 and stay the identity on G.
We can give G a tower structure over F 2 := e 1 , e 2 as follows. The tower consists of two floors: • The first floor is just a surface flat that is obtained by gluing Σ 1,1 , whose fundamental group π 1 (Σ 1,1 ) is , along its boundary to the subgroup [e 1 , e 2 ] of the free group F 2 . In group theoretic terms the first floor is the amalgamated free product G 1 := F 2 * [e 1 ,e 2 ]=s π 1 (Σ 1,1 ). The retraction r 1 sends x i to e i and stays the identity on e i . • The second floor is just an abelian flat that is obtained by gluing Z 2 along the (maximal) abelian subgroup x 3 1 x 4 2 of G 1 . In group theoretic terms the second floor is the amalgamated free product The retraction r 2 sends z 1 and z 2 to z and stays the identity on G 1 .
The group G * F 2 G can be given a twin tower structure as follows. This tower has four floors, which we describe: • The first two floors are identical to the floors of the tower structure of G.
• The third floor is just a surface flat that is obtained by gluing Σ 1,1 , whose , along its boundary to the subgroup [e 1 , e 2 ] of the free group F 2 . In group theoretic terms the third floor is the amalgamated free product G 3 := G 2 * [e 1 ,e 2 ]=s π 1 (Σ 1,1 ). The retraction r 3 sends y i to e i and stays the identity on G 2 . • The fourth floor is just an abelian flat that is obtained by gluing Z 2 along the (maximal) abelian subgroup y 3 1 y 4 2 of G 3 . In group theoretic terms the fourth floor is the amalgamated free product The retraction r 4 sends z 1 and z 2 to z and stays the identity on G 3 . Figure 7).

Proposition 4.22 (Twin tower -abelian case
Db is f and f e : G 1 → G is the identity map. Then the amalgamated free product G Db * G 1 Db ( f G Db ) admits a natural tower structure over F.
, r m )) witnesses that G has the structure of a tower over F. Let be the natural tower structure (see Lemma 4.16) of G Db over F, and let . We claim that there exists a natural sequence of floors that witnesses that G Db * G 1 Db ( f G Db ) has a tower structure over F. We construct this sequence starting with the m floors of the tower T (G Db , F) and we proceed recursively as follows: Db is a free product or has a surface flat structure or has an abelian flat structure over G m Db according to whether f G 2 Db is a free product or has a surface flat structure or has an abelian flat structure over G 1 Db : We consider the graph of groups with the same data as Db with the group G Db . The fundamental group of this latter graph of groups is G m+1 Db , and together with the retraction r Db m+1 : G m+1 Db → G Db that agrees with r f 2 on f G 2 Db and stays the identity on G Db , it witnesses that G m+1 Db has a surface flat structure over Db . By definition A cannot be conjugated to any other peg of some abelian flat of T (G Db , F); thus it is maximal abelian in G Db and satisfies the properties that make G Db * A (A ⊕ Z n ) the m + 1-th floor of our tower.
Recursive step. Suppose we have constructed the m + i-th floor of the tower. We show that G m+i+1 Db is a free product or has a surface flat structure or an abelian flat structure over G m+i Db according to whether f G i+2 Db is a free product or has a surface flat structure or an abelian flat structure over f G i+1 Db : Db . We consider the graph of groups with the same data as The fundamental group of this latter graph of groups is G m+i+1 Db , and together with the retraction r Db m+i+1 : Db and stays the identity on G Db , it witnesses that G m+i+1 Db has a surface flat structure over G m+i Db .
Db . We consider the amalgamated free product ( Db . Since A cannot be conjugated to any other previous peg of the tower T (G Db , F) and the tower T and it satisfies the properties that make G m+i Db * A (A⊕Z n ) the m+i+1-th floor of our tower.
We can give G a tower structure over F 2 := e 1 , e 2 as follows. The tower T (G, F 2 ) consists of two floors: • The first floor is just an abelian flat obtained by gluing Z 2 along the maximal abelian group e 2 1 e 2 2 of F 2 . In group theoretic terms, the group 316 AYALA DENTE BYRON AND RIZOS SKLINOS corresponding to the first floor is the amalgamated free product G 1 := F 2 * e 2 1 e 2 2 =z ( z ⊕ Z 2 ). The retraction r 1 : G 1 F 2 sends z 1 and z 2 to z and stays the identity on F 2 .
• The second floor is just a surface flat obtained by gluing Σ 1,1 , whose fundamental group is , along its boundary to the subgroup [z 1 , e 1 ] of G 1 . In group theoretic terms the group corresponding to the second floor is the amalgamated free product G 2 := G 1 * [z 1 ,e 1 ]=s π 1 (Σ 1,1 ). The retraction r 2 : G 2 G 1 sends x 1 to z 1 , x 2 to e 1 , and stays the identity on G 1 . We now consider the double of G 1 with respect to the splitting G(G 1 , F) of the first point above. As a group G 1 Db has the following presentation: . It can be seen as the amalgamated free product G 1 . The twin tower that corresponds to T (G, F 2 ) consists of three floors as follows: • The first floor is the floor double of G(G 1 , F 2 ), and the group corresponding to this floor is G 1 Db . The retraction r Db 1 sends each z 1 , z 2 , y 1 , y 2 to z and stays the identity on F 2 .
• The second floor is just a surface flat obtained by gluing Σ 1,1 , whose fundamental group is In group theoretic terms the group corresponding to the second floor is the amalgamated free product G 2 Db sends x 1 to z 1 , x 2 to e 1 , and stays the identity on G 1 Db . • The third floor is again a surface flat obtained by gluing Σ 1,1 , whose fundamental group is p 1 , p 2 , s | s −1 [p 1 , p 2 ] , along its boundary to the subgroup [y 1 , e 1 ] of G 2 Db . In group theoretic terms the group corresponding to the second floor is the amalgamated free product G 3 Db := G 2 Db * [y 1 ,e 1 ]=s π 1 (Σ 1,1 ). The retraction r Db Db sends p 1 to y 1 , p 2 to e 1 , and stays the identity on G 2 Db . The group corresponding to the twin tower has presentation

Closures of towers.
We pass to the notion of a tower closure. We first define the notion of an abelian floor closure. Let {A m i } i∈I be free abelian groups and let f i : We call {f i } i∈I a family of closure embeddings.
We denote by cl(G) the group that is the fundamental group of a graph of groups in which all the data is as in In the following paragraph we identify closure embeddings with finite-index subgroups of a "formal" free abelian group A m := (1, 0, . . . , 0), . . . , (0, 0, . . . , 1) . Such an identification will be of use when we wish to understand when a homomorphism from a tower h : G → F extends to cl(G). For simplicity and in accordance with our convention on tower structures, we phrase it for an abelian flat over F, but it holds for an arbitrary tower.
Remark 4.25. Suppose G has the structure of an abelian flat over F, so G is isomorphic to the amalgamated product of F with c ⊕ Z m over c. Let γ generate the centraliser of (the image of) c in F, so that c = γ l for some l, and let f : for some k i,j ∈ Z. Denote by K = (k i,j ) 1≤i,j≤m the coefficient matrix. Since the image of f is of finite index in A m , det K = 0, and so the image of K (considered as a linear transformation on A m ) is of finite index in A m . Now let h : G → F be a morphism which restricts to the identity on F. Then h sends each z i to some power x i of γ, and we can assign to h the vector (x 1 , . . . , x m ). If h extends to a morphism H : cl(G) → F, then there are integers (y 1 , . . . , y m ) such that H(a i ) = γ y i and x i = k i,0 l + k i,1 y 1 + · · · + k i,m y m . Clearly, the existence of such y i 's is also a sufficient condition for h to extend, so h extends to cl(G) if and only if (x i − l · k i,0 ) m i=1 belongs to Im(K) or (x i , . . . , x m ) belongs to (l · k 1,0 , . . . , l · k m,0 ) + Im(K). Let f : c ⊕ Z 2 → c ⊕ A 2 be the morphism that restricts to the identity on c and sends z 1 to c 2 a 3 1 a 2 and z 2 to a 1 a 2 . This is a closure embedding, and cl(G) is the amalgamated product cl(G) = F 2 * e 5 1 =c ( c ⊕ Z 2 ⊕ A 2 / z 1 = c 2 a 3 1 a 2 , z 2 = a 1 a 2 ).

AYALA DENTE BYRON AND RIZOS SKLINOS
A morphism h : G → F 2 (that restricts to the identity on F 2 ) satisfies h(z i ) = e x i 1 for i = 1, 2. It extends to a morphism H : cl(G) → F 2 if and only if x 1 = 5l + 3y 1 + y 2 and x 2 = y 1 + y 2 for some y 1 , y 2 ∈ Z. Such y 1 , y 2 exist if and only if (x 1 − 5l, x 2 ) = y 1 (3, 1) + y 2 (1, 1); that is, (x 1 , x 2 ) belongs to the coset [5l, 0] of the image of K = ( 3 1 1 1 ). Remark 4.27. Suppose G has the structure of a floor over a limit group L. Suppose {Z m i } i∈I is the collection of the free abelian groups that we glue along the corresponding pegs {E i } i∈I in forming the abelian flats of the floor. Let (G(cl(G), L), {f i } i ∈ I) be the closure of G with respect to some family of closure embeddings. Let G = G 1 * · · · * G m be a free splitting of G. Then for each Thus, there exists a free splitting, H 1 * · · · * H m , of cl(G) such that each H i is the group obtained by gluing that is contained in G i and adding the relations in this new vertex group according to the family of the closure embeddings; i.e., γ i zγ −1 • the underlying graph is the same as the underlying graph of G(G i+1 , G i ); • the vertex groups G i 1 , . . . , G i m whose free product is G i are replaced by the corresponding groups in G i cl ; • the abelian flats Z m j are replaced by A m j ⊕ Z m j ; and • in the new abelian vertex groups E j ⊕A m j ⊕Z m j we add relations according to the family of closure embeddings; i.e., z = f i+1 j (z) for every z ∈ E j ⊕Z m j .
It is not hard to see the following.

Symmetrizing closures of twin towers.
When moving to the closure of a twin tower it could be the case that "twin" abelian flats that appear in the floors of the twin tower embed in different ways in the ambient free abelian groups. For example, if E ⊕ Z 2 is an abelian flat generated by z 1 , z 2 andÊ ⊕Ẑ 2 is its twin generated byẑ 1 ,ẑ 2 , then we could have the closure embeddings f : E ⊕ Z 2 → E ⊕ A 2 which correspond to (1, 2) + Im(K), K = ( 3 1 1 1 ) andf :Ê ⊕Ẑ 2 →Ê ⊕Â 2 which correspond to (3, 4) + Im(K),K = ( 4 5 1 3 ). We would like the images of z i ,ẑ i under f,f to correspond to the same words in the generators of a closure. This is achieved by closure-embedding A 2 ,Â 2 in B 2 ,B 2 with corresponding closureembeddings g,ĝ with coefficient matrices L,L such that KL =KL. In this case, the closure embedding g • f corresponds to (1, 2) + Im(KL), andĝ •f corresponds to (3, 4) + Im(KL). Both columns of KL =KL are in the image of K, so finding L,L comes down to finding two vectors in the images of both K andK, which are linearly independent. This can be done, since Im(K), Im(K) are of finite index in A 2 , and so is their intersection.
We define the symmetric closure of a closure of a twin tower as follows. Let cl(T #T (G, F)) be a closure with respect to some closure embeddings . As a consequence, if h : G → F extends to a closure of G, it also extends to its symmetric closure.

Solid limit groups and strictly solid morphisms
In this section we record the definitions of a strictly solid morphism and a family of such morphism as given by Sela. A strictly solid morphism is a morphism from a solid limit group to a free group that satisfies certain conditions. These morphisms are of fundamental importance in the work of Sela in answering Tarski's question: first because of a boundedness result (see [17,Theorem 2.9]) and second because in contrast to solid morphisms they are first order definable.
The definition of a strictly solid morphism requires a technical construction, called the completion of a strict map. The next subsection explains this construction.
In subsection 5.2 we define the above special class of morphisms and their families.

Completions.
We start by modifying a GAD for a limit group G in order to simplify the conditions for a map η : G L to be strict with respect to it. The goal is to transform the GAD in a way that the rigid vertex groups will be enlarged to their envelopes, every edge group connecting two rigid vertex groups will be maximal abelian in both vertex groups of the one edged splitting induced by its edge (and after replacing all abelian vertex groups with their peripheral subgroups), and abelian vertex groups will be leaves connected through a rigid vertex to the rest of the graph.
The following lemma of Sela will be helpful. We consider the following modification of Δ: Step 1. We replace every vertex group G u with u ∈ V A by its peripheral subgroup and we place u in the set V R (i.e., we consider it rigid); we call this GAD Δ 0 . Step 2. We modify Δ 0 according to Lemma 5.2 in order to obtainΔ 0 .
Step 3. To every rigid vertex inΔ 0 whose vertex group was a peripheral subgroup in Δ 0 we attach an edge whose edge group is the peripheral subgroup itself, and the vertex group on its other end is the abelian group that contained the peripheral subgroup in Δ. These new vertex groups will be abelian type vertex groups. We denote byΔ this GAD for G. We will either explicitly or implicitly use the above modification for the rest of the paper.
Definition 5.4. Let G be a group and let G(G) be a GAD for G with m edges and at least one rigid vertex. Let η : G H and let (G(G), η) be strict. Let G 0 ⊆ G 1 ⊆ · · · ⊆ G m := G(G) be a sequence of subgraphs of groups such that G i has i edges. We define the group Comp i together with its splitting G(Comp i ) by the following recursion: Base step. The subgraph of groups G 0 consists of a single vertex V which we may assume is rigid. Then Comp 0 is the group H and G(Comp 0 ) is the trivial splitting.
Recursive step. Let e i+1 be the edge in G i+1 \ G i . We take cases: Case 1. Suppose e i+1 connects two rigid vertices. We further take cases: 1A. Assume that the centralizer of η(G e i+1 ) in Comp i cannot be conjugated either to the centralizer of η(G e ) for some edge e in G i that connects two rigid vertex groups or to the centralizer of the image of the peripheral subgroup of some abelian vertex group in G i . Then Comp i+1 is the fundamental group of the graph of groups obtained by gluing to G(Comp i ) a free abelian flat of rank 1 along the centralizer of η(G e i+1 ) in Comp i . The latter graph of groups is G(Comp i+1 ). 1B. Assume that the centralizer of η(G e i+1 ) in Comp i can be conjugated to the centralizer C (in Comp i ) either of η(G e ) for some edge e in G i that connects two rigid vertex groups or of the image of the peripheral group of some abelian vertex group (i.e., a vertex group whose vertex belongs to V A ) in G i . Then Comp i is the fundamental group of the graph of groups obtained by gluing to G(Comp i ) a free abelian flat of rank 1 along C.
Case 2. Suppose e i+1 connects a rigid vertex with a free abelian vertex group of rank n and let P be its peripheral subgroup. We may assume that the free abelian vertex group is not in G i and we further take cases: 2A. Assume that η(P ) cannot be conjugated either to the centralizer of η(G e ) for some edge e in G i that connects two rigid vertex groups or to the centralizer of the image of the peripheral subgroup of some abelian vertex group in G i . Then Comp i+1 is the fundamental group of the graph of groups obtained by gluing to G(Comp i ) a free abelian flat of rank n along the centralizer of η(P ) in Comp i , and moreover in the new abelian vertex group we add the relations identifying the peripheral subgroup in its centralizer. The latter graph of groups is G(Comp i+1 ). 2B. Assume that η(P ) can be conjugated to the centralizer C (in Comp i ) either of η(G e ) for some edge e in G i that connects two rigid vertex groups or of the image of the peripheral group of some abelian vertex group (i.e., a vertex group whose vertex belongs to V A ) in G i . Then Comp i+1 is the group corresponding to the graph of groups obtained by gluing to G(Comp i ) a free abelian flat of rank n along C.
Case 3. Suppose e i+1 := (u, v) connects a surface type vertex with a rigid vertex (i.e., a vertex that belongs to V R ). We further take cases according to whether the surface type vertex belongs to G i or not: 3A. Assume that the surface vertex group G v does not belong to G i . Then Comp i+1 is the amalgamated free product Comp i * G e i+1G v whereG v is an isomorphic copy of G v witnessed by the isomorphism f : G v →G v , and the edge group embeddingsf e i+1 ,fē i+1 are defined as follows: where f e i +1 , fē i+1 are the injective morphisms that correspond to the edge group of the splitting π 1 (G i ) * G e i+1 G v . 3B. Assume that the surface vertex group G u belongs to G i . Then by our recursive hypothesis there exists an isomorphic copy of G u , say f : where the edge group embeddingsf e i+1 ,fē i+1 are defined as follows: where f e i+1 , fē i+1 are the injective morphisms that correspond to the edge group of the splitting Finally the group Comp(G(G), η) := Comp m is called the completion of G with respect to G(G), the sequence G 0 ⊂ · · · ⊂ G m , and η.
The completion of a group G with respect to a strict map η : G → L has a natural structure of a floor over L. Moreover, Sela has proved [16, Lemma 1.13] that G admits a natural embedding into its completion.

Lemma 5.5. Let G be a group and let (G(G), (V S , V A , V R )) be a GAD for G. Let L be a limit group and let η : G L be such that (G(G), η) is strict. Let Comp(G(G), η) be the completion of G with respect to G(G) and η. Then G admits a natural embedding to Comp(G(G), η).
Proof. Let G 0 ⊂ G 1 ⊂ · · · ⊂ G m := G(G) be the sequence of subgraphs of groups that covers the graph of groups G(G) and with respect to which we have constructed the completion Comp(G(G), η). We will prove by induction that for each i ≤ m, there exists an injective map f i : η) agrees with η up to conjugation, by an element that is either trivial or does not live in L, in the vertex groups whose vertices belong to V R in the GAD for G.
Base step. We take f 0 to be η π 1 (G 0 ). Since we have assumed that the unique vertex in G 0 belongs V R and Comp 0 is L, one sees that f 0 : π 1 (G 0 ) → Comp 0 is injective and respects our hypothesis on vertex groups whose vertices belong to V R .
Inductive step. Let f i : π 1 (G i ) → Comp i be the morphism that satisfies our induction hypothesis. We find an injective morphism f i+1 : π 1 (G i+1 ) → Comp i+1 that extends f i and satisfies the hypothesis on vertex groups whose vertices belong to V R . We take cases according to the initial and terminal vertices of the edge e := (u, v) ∈ G i+1 \ G i .
• Suppose we are in Case 1A of Definition 5.4. Then π 1 (G i+1 ) is either the amalgamated free product Suppose that π 1 (G i+1 ) is an amalgamated free product. By the induction hypothesis f i G u = Conj(γ u ) • η G u . We define f i+1 to agree with f i on π 1 (G i ) and f i+1 (g) = γ u zη(g)z −1 γ −1 u for g ∈ G v . Note that obviously γ u z does not belong to Comp i ; thus it does not belong to L. The map f i+1 is indeed a morphism since for any g ∈ G e we have that fē(g) is an element that lives in G u ; thus f i+1 (fē(g)) = f i (fē(g)) = γ u η(fē(g))γ −1 u . On the other hand f i+1 (f e (g)) = γ u zη(f e (g))z −1 γ −1 u , and since η(f e (g)) is in C we get that f i+1 (f e (g)) = γ u η(f e (g))γ −1 u . Therefore, since η(fē(g)) = η(f e (g)), we see that f i+1 (f e (g)) = f i+1 (fē(g)).
We continue by proving that f i+1 is injective. Let g := a 1 b 1 · · · a n b n be an element of We show that this form is reduced with respect to Comp i * C (C ⊕ z ). Suppose not. Then either γ −1 u f i (a j )γ u , for some 2 ≤ j ≤ n, or η(b j ) for some j ≤ n is in C. In the first case this means that γ −1 u f i (a j )γ u commutes with some (any) nontrivial element, say γ, of η(G e ). Thus f i (a j ) commutes with γ u γγ −1 u , but γ u γγ −1 u is the image of an element in G e under f i , and since f i is injective we have that a j commutes with an element of G e by the maximality condition of G e . This shows that a j belongs to G e , a contradiction. In the second case, this means that η(b j ) commutes with some (any) nontrivial element, say γ, of η(G e ). Thus since η is injective on G v , we see that b j commutes with an element of G e . By the maximality condition of G e , b j must belong to G e , a contradiction.

Suppose that π 1 (G i+1 ) is an HNN extension. By the induction hypothesis
We define f i+1 to agree with f i on π 1 (G i ) and f i+1 (t) = γ v η(t)zγ −1 u , where t is the stable letter of the HNN extension. The map f i+1 is indeed a morphism, since for any g ∈ G e we have that f e (g) is an element that lives in and it follows that f i+1 is a morphism. We continue by proving that f i+1 is injective. Let g := g 0 t 1 g 1 t 2 · · · t n g n with i ∈ {−1, 1} be an element in reduced form with respect to the HNN extension.
We will show by induction that for every n ≥ 1, if g is an element of π 1 (G i+1 ) of length n (in reduced form) with respect to the HNN extension that π 1 (G i+1 ) admits, then f i+1 (g) can be put in reduced form of length at least one with respect to the amalgamated free product depending on whether n is positive or negative. For the base step (n = 1), the result is obvious. Suppose it is true for every k < n; we show it is true for n. We take cases with respect to whether n−1 , n are positive or negative. Since the cases when both are negative or both are positive are symmetric we assume that both are positive and we leave the symmetric case as an exercise. Thus, f i+1 (g) = f i+1 (g 0 t 1 g 1 t 2 · · · tg n−1 ) · f i+1 (tg n ), and by the induction hypothesis f i+1 (g 0 t 1 g 1 t 2 · · · t n−1 g n−1 ) can be put in reduced form of length at least one that ends with zγ −1 u f i (g n−1 ).
This latter element has the desired properties, since if γ −1 u f i (g n−1 )γ v η(t) belongs to C, then we consider zγ −1 u f i (g n−1 )γ v η(t)z as an element of C ⊕ z \ C, and if not, then already the element is in reduced form ending with zγ −1 u f i (g n ). We now treat the case where n−1 = 1 and n = −1. In this case f i+1 (g) = f i+1 (g 0 t 1 g 1 t 2 · · · tg n−1 ) · f i+1 (t −1 g n ), and by the induction hypothesis f i+1 (g 0 t 1 g 1 t 2 . . . tg n−1 ) can be put in reduced form of length at least one that ends with It is enough to show that γ −1 u f i (g n−1 )γ u does not belong to the centralizer C of η(G e ). Suppose, for a contradiction, that it does. Then γ −1 u f i (g n−1 )γ u commutes with some (any) element of η(G e ); such an element can be written as γ −1 u f i (β)γ u for some β ∈ G u . Therefore, f i (g n−1 ) commutes with f i (b), and since f i is injective, we see that g n−1 commutes with b. We can now use the maximality of fē(G e ) to conclude that g n−1 belongs to it, contradicting the reduced form for g. The case where n−1 = −1 and n = 1 is symmetric to the previous case, and we leave it to the reader.
• Suppose we are in case 1B of Definition 5.4. Suppose the centralizer of η(G e ) (in Comp i ) can be conjugated by the element γ into C, where C satisfies the hypothesis of case 1B. Then π 1 (G i+1 ) is either the amalgamated free product and Comp i+1 is the amalgamated free product Comp i * C (C ⊕ z ).

Suppose that π 1 (G i+1 ) is an amalgamated free product. By the induction hypothesis
It is not hard to check that f i+1 is a morphism, the reason being that for any element g of G e , since γη(f e (g))γ −1 belongs to C, it commutes with z; thus f i+1 (f e (g)) = γ u η(f e (g))γ −1 u and this is enough. We next prove that f i+1 is injective. Let g := a 1 b 1 · · · a n b n be an element of π 1 (G i ) * G e G v in reduced form. Then We show that this form is reduced with respect to Comp i * C (C ⊕ z ). Suppose not. Then either γγ −1 u f i (a j )γ u γ −1 , for some 2 ≤ j ≤ n, or γη(b j )γ −1 for some j ≤ n is in C. In the first case this means that γγ −1 u f i (a j )γ u γ −1 commutes with some (any) nontrivial element, say β, of γη(G e )γ −1 . Thus Thus f i (a j ) commutes with γ u γ −1 βγγ −1 u , and the latter can be taken to be the image of some element of G e under f i . The injectivity of f i tells us that a j commutes with a nontrivial element of G e , and the maximality of G e gives us that a j belongs to G e , a contradiction. The argumentation for the case where γη(b j )γ −1 , for some j ≤ n, is in C is similar.
Suppose that π 1 (G i+1 ) is an HNN extension. By the induction hypothesis where t is the stable letter of the HNN extension. One can check in a way similar to the corresponding case 1A that f i+1 is an injective morphism.
• Suppose we are in case 2A of Definition 5.4. Then π 1 (G i+1 ) is the amalgamated free product π 1 (G i ) * G e G v , where G v is a free abelian group of rank n and Comp i+1 is the amalgamated free product Comp i * C A where C is isomorphic to the centralizer of the image of the peripheral subgroup P (G v ) by η (which is actually the same as G e ) and A is the free abelian group C ⊕ Z n with the relations identifying the peripheral subgroup as a subgroup of C and as a subgroup of Z n . By the induction hypothesis is an isomorphism between G v and its copy in Comp i+1 . It is not hard to check that f i+1 is a morphism: Let g ∈ G e . Then f i+1 (f e (g)) = γ u f (f e (g))γ −1 u and f i+1 (fē(g)) = γ u η(fē(g))γ −1 u . Since f (f e (g)) = η(fē(g)) in Comp i+1 , we have what we wanted. We next prove that f i+1 is injective. Let g := a 1 b 1 · · · a n b n be an element of π 1 (G i ) * G e G v in reduced form.
; thus we only need to check that γ −1 u f i (a j )γ u is not infē(C) for 2 ≤ j ≤ n. Suppose not. Then γ −1 u f i (a j )γ u commutes with some (any) element of η(fē(G e )). Therefore, f i (a j ) commutes with γ u η(fē(g))γ −1 u , for some g ∈ G e , but that is the image of g under f i , and since f i is injective we see that a j commutes with fē(g). By the maximality of fē(G e ) we have that a j belongs to it, a contradiction.
• Suppose we are in case 3A of Definition 5.4. Then π 1 (G i+1 ) is the amalgamated free product π 1 (G i ) * G e G v and Comp i+1 is the amalgamated free product Comp i * G eG v , whereG v is an isomorphic copy of G v witnessed by the isomorphism f : It is not hard to check that f i+1 is a morphism: Let g ∈ G e . Then f i+1 (f e (g)) = γ u f (f e (g))γ −1 u and f i+1 (fē(g)) = γ u η(fē(g))γ −1 u . Since η(fē(g)) = f (f e (g)) in Comp i * G eG v we have what we wanted. We next prove that f i+1 is injective. Let g := a 1 b 1 · · · a n b n be an element of We only need to check that γ −1 u f i (a j )γ u does not live in η(G e ) for any 2 ≤ j ≤ n. Suppose, for a contradiction, not. Then f i (a j ) is γ u η(γ)γ −1 u , for some γ ∈ G e , but the latter is the image of γ under f i , and since f i is injective we have that a j is γ, a contradiction.
• Suppose we are in case 3B of Definition 5.4. Then π 1 (G i+1 ) is the amalgamated free product π 1 (G i ) * G e G v or the HNN extension π 1 (G i ) * G e , and Comp i+1 is the HNN extension Comp i * G e . Suppose that π 1 (G i+1 ) is an amalgamated free product. By the induction hypothesis It is not hard to check that f i+1 is a morphism: Let g ∈ G e . Then f i+1 (f e (g)) = γ u t −1 η(f e (g))tγ −1 u and f i+1 (fē(g)) = γ u f (fē(g))γ −1 u . Since η(f e (g)) = tf (fē(g))t −1 in Comp i * G e , we have what we wanted. We next prove that f i+1 is injective. Let g := a 1 b 1 · · · a n b n be an element of π 1 (G i ) * G e G v in reduced form. Then we prove that f i+1 (g) = f i (a 1 )γ u t −1 η(b 1 )tγ −1 u · · · f i (a n )γ u t −1 η(b n )tγ −1 u is in reduced form with respect to Comp i * G e . We need to check that η(b j ) is not inf (G e ) (which is actually η(f e (G e ))) for any j ≤ n and γ −1 u f i (a j )γ u is not infē(G e ) (which is actually f (fē(G e ))) for any 2 ≤ j ≤ n. But both follow easily by the fact that b j is in G v \ f e (G e ) and a j ∈ π 1 (G i ) \ fē(G e ).
Suppose that π 1 (G i+1 ) is an HNN extension. By the induction hy- , we have what we wanted. We next prove that f i+1 is injective. Let g := g 0 t 1 g 1 t 2 · · · t n g n , with j ∈ {1, −1}, be an element in reduced form with respect to the HNN extension π 1 (G i ). Then we prove that is in reduced form. We need to check that when j = 1 and j+1 = −1, then γ −1 u f i (g j )γ u does not live infē(G e ) (which is actually f (fē(G e ))) and when j = −1 and j+1 = 1, then γ −1 v f i (g j )γ v does not live inf e (G e ) (which is actually η(f e (G e ))). We show just the former, since the latter case is symmetric. Suppose, for a contradiction, that γ −1 u f i (g j )γ u is in f (fē(G e )). Then there exists an element in γ ∈ fē(G e ) such that f i (g j ) = γ u f (γ)γ −1 u , but then f i (g j ) = f i (γ), and since f i is injective we see that g j = γ, a contradiction.
It is not hard to deduce from the construction of the completion that: For the notion of the abelian JSJ decomposition of a solid limit group we refer the reader to [15, Theorem 9.2].

Strictly solid morphisms and families.
We start by defining the notion of a degenerate map with respect to a tower over a solid limit group.
Definition 5.7. Let T (G, Sld) be a tower of height m over a limit group L, and let s : L → F be a morphism. We say that a morphism h :  . . . , (G(G 1 , G 0 ), r 1 ), Sld}, and let s : Sld → F be a morphism. We say that s is degenerate if for all morphisms h : G → F that factor through the tower T (G, Sld) based on s and some i < m one of the following holds: • an edge group of (G(G i+1 , G i ), (V S , V A , V R )) is always mapped to the trivial element; • a vertex group, G u , of (G(G i+1 , G i ), (V S , V A , V R )) with u ∈ V A is always mapped to a cyclic subgroup of F.
As a matter of fact being degenerate is a condition definable by a system of equations.  Moreover, a morphism h : Sld → F is called strictly solid if it is nondegenerate and it is not tower equivalent with respect to Comp(Sld, Id) to a flexible morphism.
The relation of tower equivalence between two morphisms is an equivalence relation, and we call the set of nondegenerate morphisms that belong to the class of a strictly solid morphism a strictly solid family.
We prove the following: Proof. Let G 0 ⊆ G 1 ⊆ · · · ⊆ G m := JSJ(Sld) be the sequence of the subgraphs of groups used in the construction of the completion Comp (Sld, Id). We recall that G 0 is the vertex group that contains H and it is rigid by definition. Let f b : Sld → Comp(Sld) be the identity map that sends Sld onto the Comp 0 , and let, for each i ≤ m, g i : π 1 (G i ) → Comp i be the natural injective map as in the proof of Lemma 5.5. We will define recursively a sequence of morphisms (F i ) i≤m : Base step. We define F 0 : Comp 0 → F to be essentially the map h 1 , i.e., a morphism such that F 0 • f b = h 1 . Clearly, since g 0 (π 1 (G 0 )) belongs to Comp 0 and h 1 , h 2 agree on π 1 (G 0 ), the morphism F 0 satisfies the required properties.
Before moving to the recursive step we note that property (2) is automatically satisfied for i > 1 once property (1) is satisfied.
Recursive step. Suppose there exists a morphism F i that satisfies properties (1)-(3). We define F i+1 according to the cases for the edge e := (u, v) ∈ G i+1 \ G i .
• Suppose we are in case 1A of Definition 5.4. Then π 1 (G i+1 ) is either the amalgamated free product π 1 (G i ) * G e G v (if v / ∈ G i ) or the HNN extension π 1 (G i ) * G e (if v ∈ G i ), and Comp i+1 is the amalgamated free product Comp i * C (C ⊕ z ) where C is the centralizer of G e in Comp i . By the hypothesis we have that h 1 (g) = r v h 2 (g)r −1 v for every g ∈ G v and h 1 (g) = r u h 2 (g)r −1 u for every g ∈ G u . Suppose that π 1 (G i+1 ) is an amalgamated free product. The fact that h 1 and h 2 are morphisms induces a relation between r v and r u . For every g ∈ G e we have that h 2 (fē(g)) = h 2 (f e (g)); thus r −1 u h 1 (fē(g))r u = r −1 v h 1 (f e (g))r v . The last equation implies that r v r −1 u commutes with h 1 (f e (g)); thus r v = cr u for some element c in the centralizer of h 1 (f e (g)).
By the inductive hypothesis and the definition of the map g i : u h 1 (g)r u for some γ u ∈ Comp i . This implies that r u F i (γ u ) commutes with h 1 (g) for every g ∈ G u . Therefore r u F i (γ u ) = d for some element d in the intersection of all centralizers C(h 1 (g)) for g ∈ G u .
Finally, we define F i+1 to agree with F i in Comp i and F i+1 (z) = d −1 r u r −1 v . This definition indeed makes F i+1 a morphism as r u r −1 v and d both commute with the image of C under F i . Moreover, Suppose that π 1 (G i+1 ) is an HNN extension. By the fact that h 1 and h 2 are morphisms we get, for every g ∈ G e , that h 1 (t)h 1 (fē(g))h 1 (t) −1 = h 1 (f e (g)) and h 2 (t)h 2 (fē(g))h 2 (t) −1 = h 2 (f e (g)).
By the inductive hypothesis and the definition of the map g i : The same line of thought as above gives us that . We can easily check that as well as that F i+1 is a morphism. For the latter we only need to check that F i+1 (z) commutes with F i+1 (fē(g)) for some nontrivial g ∈ G e . Indeed, Again we can replace, by the induction hypothesis, with h 2 (f e (g)), so We can continue by replacing h 2 (t) −1 h 2 (f e (g))h 2 (t) with F i • g i (fē(g)), so where G v is a free abelian group of rank n and Comp i+1 is the amalgamated free product Comp i * C A, where C is isomorphic to the centralizer (in Comp i ) of the peripheral subgroup P (G v ) of G v and A is the free abelian group C ⊕ Z n , where Z n is an isomorphic copy of G v witnessed by φ : G v → Z n , together with the relations identifying the peripheral subgroup as a subgroup of C and as a subgroup of Z n . Moreover, g i+1 (g) = γ u φ(g)γ −1 u for every g ∈ G u , where G u is by our modification the peripheral subgroup of G v .
By the hypothesis we have that h 1 (g) = r u h 2 (g)r −1 u for every g ∈ G u . By the inductive hypothesis we know that for every g ∈ G v . It is immediate to check that F i+1 • g i+1 (g) = h 2 (g) for every g ∈ G v ; thus we only check that F i+1 is a morphism. Let g ∈ G u . We show that F i (g) = F i+1 (φ(g)), as these are the relations in the group A. Indeed, F i (g) = h 1 (g) and F i+1 (φ(g)) = F i (γ u ) −1 h 2 (g)F i (γ u ), and replacing h 2 (g) by r −1 , which is by ( * ) equal to h 1 (g), as we wanted.
• Suppose we are in case 3A of Definition 5.4. Then π 1 (G i+1 ) is the amalgamated free product π 1 (G i ) * G e G v , where G v is the fundamental group of a surface, and Comp i+1 is the amalgamated free product where G u is a rigid vertex. By the hypothesis we have that h 1 (g) = r u h 2 (g)r −1 u for every g ∈ G u . By the inductive hypothesis we know that for every g ∈ G v . It is easy to see that F i+1 • g i+1 (g) = h 2 (g) for every g ∈ G v ; thus we only check that F i+1 is a morphism. Indeed, F i+1 (fē(g)) = h 1 (fē(g)) and F i+1 (φ(f e (g))) = F i (γ u ) −1 h 2 (f e (g))F i (γ u ), and replacing h 2 (f e (g)) by h 2 (fē(g)) and then by r −1 u h 1 (fē(g))r u , which is by ( * ) equal to h 1 (fē(g)), we get what we wanted.
• Suppose we are in case 3B of Definition 5.4. Then π 1 (G i+1 ) is the amalgamated free product π 1 (G i ) * G e G v or the HNN extension π 1 (G i ) * G e , and Comp i+1 is the HNN extension Comp i * G e . In this case there exists an isomorphic copy φ : G u →G u of the surface group G u in Comp i , and the edge group embeddings aref e = f b • f e ,fē = φ • fē. Suppose that π 1 (G i+1 ) is an amalgamated free product. In this case g i (g) = γ u φ(g)γ −1 u for every g ∈ G u , and g i+1 (g) = γ u t −1 f b (g)tγ −1 u for every g ∈ G v , where t is the Bass-Serre element of the HNN extension Comp i * G e . By the hypothesis we have that h 1 It is easy to see that F i+1 •g i+1 (g) = h 2 (g) for every g ∈ G v ; thus we only need to check that F i+1 is a morphism. Indeed, for every g ∈ G e , F i+1 (f e (g)) = h 1 (f e (g)) and v , and finally it is h 1 (fē(g)), as we wanted. Suppose that π 1 (G i+1 ) is an HNN extension. In this case g i (g) = γ u φ(g)γ −1 u for every g ∈ G u , and u where t is the Bass-Serre element of the HNN extension π 1 (G i ) * G e , andt is the Bass-Serre element of the HNN extension Comp i * G e . By the hypothesis we have that h 1 (g) = r v h 2 (g)r −1 v for every g ∈ G v .

AYALA DENTE BYRON AND RIZOS SKLINOS
We define F i+1 to agree with F i in Comp i and It is easy to see that F i+1 • g i+1 (t) = h 2 (t); thus we only need to check that F i+1 is a morphism. Indeed, F i+1 (f e (g)) = h 1 (f e (g)) and and replacing tfē(g)t −1 with f e (g) we get , which finally equals h 1 (f e (g)), as we wanted.

Test sequences, diophantine envelopes, and applications
In this section we record a notion that we will use extensively throughout the rest of the paper: the notion of a test sequence over a tower (see [16, p. 222]). A test sequence is a sequence of morphisms from a group that has the structure of a tower to a free group that, roughly speaking, witnesses the tower structure of the group in the limit action. The corresponding notion in the work of Kharlampovich-Myasnikov [6] is the notion of a generic family. We give more details in subsection 6.1.
As we have already noted in the introduction of our paper, it is hard to decide when a subset of some cartesian product of a nonabelian free group F is definable in F. Our main idea is that one can deduce certain properties of a definable set through "generic" points in its envelope. The envelope of a definable set consists of a finite set of diophantine sets which moreover have a geometric structure. The union of the diophantine sets that take part in the envelope "covers" the definable set, and in addition "generic" elements (with respect to the geometric structure of each diophantine set) live in the definable set. In subsection 6.3 we give all the details.
In the final subsection we explain the connections between the geometric tools developed and model theory. We prove some variations of Merzlyakov's theorem that make apparent the usefulness of passing from an arbitrary definable set to the diophantine sets in its envelope.
6.1. Test sequences. We begin by giving some examples of groups that have the structure of a tower and we define the notion of a test sequence for them. The simplest cases of groups that admit a structure of a tower are finitely generated free groups and free abelian groups.
For the rest of this section we fix a nonabelian free group F and a basis of F with respect to which we will measure the length of elements of F. Definition 6.1. Let x 1 , . . . , x k be a free group of rank k. Then a sequence of morphisms (h n ) n<ω : x → F is a test sequence with respect to x if h n (x) satisfies the small cancellation property C (1/n) for each n < ω.
Remark 6.2. Without loss of generality we will assume that all the x i 's have similar growth under (h n ) n<ω ; i.e., for each i, j < k there are c i,j , c i,j ∈ R + such that be a free abelian group of rank k. Let x i 1 > x i 2 > · · · > x i k be some order on the x i 's. Then a sequence of morphisms (h n ) n<ω : Z k → F is a test sequence with respect to the free abelian group Z k (and the given order , where b n satisfies the small cancellation property C (1/n) for each n < ω, and m i j+1 (n) m i j (n) goes to 0 as n → ∞ for every j < k.
We continue by defining a test sequence for a tower that consists of a single abelian flat over the parameter free group.
be a free abelian group of rank k. Let G be the amalgamated free product F * C C ⊕ Z k , where C := c is infinite cyclic and fē(c) = a for some a ∈ F such that a is maximal abelian in F and f e (c) = c. Let x i 1 > x i 2 > · · · > x i k be some order on the fixed basis of Z k .
Then a sequence of morphisms (h n ) n<ω : G → F is a test sequence with respect to (the tower structure of) G (and the given order) if h n F = Id for every n < ω m i j (n) goes to 0 as n → ∞ for every j < k.
Remark 6.5. In particular when in the above definition k = 1, any infinite sequence (h n ) n<ω : G → F with h n F = Id is a test sequence with respect to (the tower structure of) G. Definition 6.6. If (h n ) n<ω : G → H is a sequence of morphisms from G to a finitely generated group H (with a fixed generating set) and g 1 , g 2 are in G, then we say that the growth of g 1 dominates the growth of g 2 (under (h n ) n<ω ) if |h n (g 2 )| H |h n (g 1 )| H → 0 as n → ∞, where |g| H is the word length of g with respect to the fixed generating set for H.
When a tower consists only of abelian floors and free products we define a test sequence as follows. Definition 6.7 (Test sequence for abelian towers). Let G be a group that has the structure of a tower T (G, F) over F. Suppose T (G, F) only contains abelian floors and free products. For each abelian floor of the tower we choose an order for the abelian flats or equivalently we assume that each abelian floor consists of a single abelian flat. For each abelian flat Then a sequence of morphisms (h n ) n<ω : G → F is called a test sequence for T (G, F) (with respect to the given order of abelian flats and the given order of their generating sets) if the following conditions hold: • h n F = Id for every n < ω.
• We define the conditions of the restriction of (h n ) n<ω to the i + 1-th flat by taking cases according to whether G i+1 has a structure of a free product or a free abelian flat over G i : (1) Suppose G i+1 is the free product of G i with F l . Letḡ = (g 1 , . . . , g n ) be a generating set for G i and letx = (x 1 , . . . , x l ) be a basis for F l . Then h n (ā,x) satisfies the small cancellation property for each n, and the growth ofx is equivalent to the growth ofḡ.
is obtained from G i by gluing a free abelian flat along E (where E is maximal abelian in G i ). Let γ n be the generator of the cyclic group (in F) that E is mapped into by h n G i . Then we define h n (x i 1 ) = γ where m i k (n) → ∞ and m i j+1 (n) m i j (n) goes to 0 as n → ∞ for every j < k. Moreover the growth of x i k (under h n ) dominates the growth of every element in G i (under h n ).
More generally, in order to define a test sequence for a group G that has the structure of a tower T (G, F) over F we first need to order the abelian flats, the surface flats, and the free factors that appear in the floors of the tower, and in addition we need to order the base elements of each abelian flat.

Definition 6.8 (Ordering a tower). Let
be a tower of height m over F. Assume that each floor is either a single flat (abelian or surface) or it is a free product. For each i < m, let B i be one of the following: • if G(G i+1 , G i ) is a surface flat that is obtained by gluing a surface Σ g,n along its boundary onto some subgroups of G i , then B i is the subgroup of G i+1 generated by the fundamental group of the surface together with the Bass-Serre elements corresponding to loops generated by the edges of the surface: π 1 (Σ g,n ), t 1 , . . . , t n ; • if G(G i+1 , G i ) is an abelian flat obtained from G i by gluing a free abelian group Z k along the maximal abelian subgroup E, We say that B i 0 < B i 1 < · · · < B i m is a legitimate ordering if the following conditions hold: • r 1 (B i 0 ) ≤ F; • for each 0 < j < m, the image of B i j under the retraction r i j +1 is a subgroup of the group F, B i 0 , . . . , B i j −1 . Moreover, the tower T (G, F) together with a legitimate ordering and an order for the basis of each abelian flat is called an ordered tower. We will denote an ordered tower (for some ordering) by (T (G, F), <).
A tower can always be ordered by choosing an arbitrary order on the surface flats and abelian flats of each floor, then placing the flats of the i-th floor before those of the i + 1-th floor and choosing an order for the basis elements of each abelian flat. On the other hand, one could have more complicated legitimate orderings in the sense that a flat that is part of a higher floor than some other flat can be ordered before this latter flat. In any case, one can obtain from a legitimate ordering a tower structure by reshuffling the floors according to the legitimate order and changing the retractions accordingly. We give some examples. Example 6.9. We consider the tower over F with two floors defined as follows: • The first floor G(G 1 , F) is a surface flat that is obtained by gluing the surface Σ 1,1 (whose fundamental group is x 1 , x 2 ) along its boundary onto the subgroup of F which is generated by the commutator of two noncommuting elements a 1 , a 2 . Thus, G 1 := F, x 1 , x 2 | [x 1 , x 2 ] = [a 1 , a 2 ] , and r 1 : G 1 F is the morphism staying the identity on F and sending x i to a i for i ≤ 2. Note that B 0 is x 1 , x 2 . • The second floor G(G 2 , G 1 ) is a surface flat that is obtained by gluing the surface Σ 1,1 (whose fundamental group is y 1 , y 2 ) along its boundary onto the subgroup of F which is generated by the commutator of two noncommuting elements b 1 , b 2 . Thus, G 2 := G 1 , y 1 , y 2 | [y 1 , y 2 ] = [b 1 , b 2 ] , and r 2 : G 2 G 1 is the morphism staying the identity on G 1 and sending y i to b i for i ≤ 2. Note that B 1 is y 1 , y 2 .
As noted above one can give G 2 the following tower structure: • The first floor G(Ĝ 1 , F) is a surface flat that is obtained by gluing the surface Σ 1,1 (whose fundamental group is y 1 , y 2 ) along its boundary onto the subgroup of F which is generated by the commutator of b 1 , b 2 . Thus, • The second floor G(G 2 ,Ĝ 1 ) is a surface flat that is obtained by gluing the surface Σ 1,1 (whose fundamental group is x 1 , x 2 ) along its boundary onto the subgroup of F which is generated by the commutator of a 1 , a 2 . Thus, a 2 ] , andr 2 : G 2 Ĝ 1 is the morphism agreeing with r 1 on F, x 1 , x 2 and stays the identity on y 1 , y 2 . Example 6.10. We consider the tower over F with two floors defined as follows: • The first floor G(G 1 , F) is a surface flat that is obtained by gluing the surface Σ 1,1 (whose fundamental group is x 1 , x 2 ) along its boundary onto the subgroup of F which is generated by the commutator of two noncommuting elements a 1 , a 2 . Thus, G 1 := F, x 1 , x 2 | [x 1 , x 2 ] = [a 1 , a 2 ] , and r 1 : G 1 F is the morphism staying the identity on F and sending x i to a i for i ≤ 2. Note that B 0 is x 1 , x 2 .
• The second floor G(G 2 , G 1 ) is a surface flat that is obtained by gluing the surface Σ 1,1 (whose fundamental group is y 1 , y 2 ) along its boundary onto the subgroup which is generated by the commutator of x 1 and b for some nontrivial b ∈ F. Thus, G 2 := G 1 , y 1 , y 2 | [y 1 , y 2 ] = [x 1 , b] , and r 2 : G 2 G 1 is the morphism staying the identity on G 1 and sending y 1 to x 1 and y 2 to b. Note that B 1 is y 1 , y 2 .
This tower admits only one legitimate ordering: the natural one, B 0 < B 1 .
One can easily check that B 1 < B 0 is not a legitimate ordering since r 2 (B 1 ) is not a subgroup of F. Remark 6.11. It is not hard to check that: • a twin tower admits two natural legitimate orderings; • a tower closure inherits an ordering from the corresponding tower. Definition 6.12 (Test sequence for a general tower). Suppose G has the structure of a tower T (G, F) over F and let (T (G, F), <) be some ordering on it. Then a sequence of morphisms (h n ) n<ω : G → F is a test sequence for this (ordered) tower if it satisfies the combinatorial conditions (i)-(xiv) in [16, p. 222].
The existence of a test sequence for a group that has the structure of a tower (for any ordering of the tower) has been proved in [16,Lemma 1.21]. Proposition 6.13. Suppose G has the structure of a tower T (G, F) over F. Let (T (G, F), <) be some ordering. Then a test sequence for (T (G, F), <) exists.
The conditions consisting of the definition of a test sequence in [16] are used there to show how a test sequence designs an action of a tower on a limiting real tree. In particular, the following facts (appearing in [16]; cf. Theorem 1.3, Proposition 1.8, Theorem 1.18) about test sequences will be of use for us. Fact 6.14 (Free product limit action). Let T (G, F) be a tower and let (h n ) n<ω : G → F be a test sequence for T (G, F).
Suppose G i+1 is the free product of G i with a group F l and (h n G i+1 ) n<ω is the restriction of (h n ) n<ω to G i+1 . Then, any subsequence of (h n G i+1 ) n<ω that converges, as in Lemma 3.16, induces a faithful action of G i+1 on a based real tree (Y, * ), with the following properties: (1) The action G i+1 Y decomposes as a graph of actions in the following way:  Suppose G i+1 is a surface flat over G i := G i 1 * . . . * G i m , witnessed by A(G i+1 , G i ), and (h n G i+1 ) n<ω is the restriction of (h n ) n<ω to the i + 1-flat of T (G, F).
Then, any subsequence of (h n G i+1 ) n<ω that converges, as in Lemma 3.16, induces a faithful action of G i+1 on a based real tree (Y, * ), with the following properties: if v is not a surface type vertex, then Y v is a point stabilized by the corresponding G i j for some j ≤ m; (3) if u is the surface type vertex, then Stab G (u) = π 1 (Σ g,l ) and the action Stab G (u) Y u is a surface type action coming from π 1 (Σ g,l ).
Fact 6.16 (Abelian flat limit action). Let T (G, F) be a limit tower and let (h n ) n<ω : G → F be a test sequence with respect to T (G, F). Z) is obtained from G i by gluing a free abelian flat along A (where A is a maximal abelian subgroup of G i ) and (h n G i+1 ) n<ω is the restriction of (h n ) n<ω to the i + 1-flat of T (G, F).
(3) Stab G (u) := A/K ⊕ Z Y u is a simplicial type action, its Bass-Serre presentation, (Y 1 u , Y 0 u , t e ), consists of a segment Y 1 u := (a, b) whose stabilizer is A/K, a point Y 0 u = a whose stabilizer is A/K, and a Bass-Serre element t e which is z; Using the above properties we can prove the following. Let T (G, Sld) be a tower over Sld and let (s n ) n<ω : Sld → F be a convergent sequence of nondegenerate (with respect to T (G, Sld)) strictly solid morphisms with trivial stable kernel.
Let g ∈ G and assume that for each n there exists a graded test sequence (h n m ) m<ω : G * Sld Comp(Sld) → F based on s n such that |{h n m (g) | m < ω}| < ∞. Then g ∈Ĥ.
Proof. The proof is by induction on the height of the floor in the tower T (G, Sld) that g belongs to. Suppose that g belongs to the ground floor, i.e., g ∈ Sld, and consider the image of g under the edge map of G * Sld Comp(Sld) in Comp(Sld). If g belongs to the ground floor of Comp(Sld), i.e., to i b (Sld), then by Lemma 5.6 g belongs toĤ as we wanted. On the other hand, if g belongs to Comp(Sld) i+1 \ Comp(Sld) i (in the first floor of the completion) we can choose a morphism s j : Sld → F such that g · Ker(s j ) belongs to Comp(Sld) i+1 /Ker(s j ) but not to Comp(Sld) i /Ker(s j ). Since the restriction of {h j m } to Comp(Sld) is a test sequence for Comp(Sld), by Facts 6.19, 6.20, 6.21 if the set {h j m (g)} is finite, then g stabilizes a point in the limit tree and so belongs to the ground floor of Comp(Sld), a contradiction.
Similarly, we continue by assuming that g belongs to some higher level G i+1 \ G i in the tower T (G, Sld). In this case, we can choose a morphism s j : Sld → F so that g · Ker(s j ) belongs to G i+1 /Ker(s j ) but not to G i /Ker(s j ). By the same argument, g must take infinitely many values under (h j m ) m<ω , and this gives a contradiction.
6.3. Diophantine envelopes. In this subsection we start by collecting some theorems of Sela that give an understanding of the "rough" structure of definable sets or parametric families of definable sets in nonabelian free groups. We will use the machinery developed in the previous subsections, namely, towers and test sequences on them.
To give a rough idea before moving to the detailed statements: we would like to have an object (e.g. a definable set equipped with some geometric structure) which we can more easily handle than an "arbitrarily complicated" definable set but as close as possible (in terms of the solution sets) to the definable set. The next theorem as well as Theorem 6.26 can be obtained from Theorem 1.3 of [14] by applying the techniques to construct formal (graded) limit groups and the description of the output of the quantifier elimination for a definable set. Theorem 6.23 (Sela -Graded diophantine envelope). Let φ(x,ȳ,ā) be a parametric family (with respect toȳ) of first order formulas over F. Then there exist finitely many, maybe no, graded towers {GT (G i , Sld i )} i≤k , which we call the graded diophantine envelope, where for each i ≤ k, G i is generated byt i ,x,ȳ,ā, Sld i := v i ,ȳ,ā is a solid limit group with respect to the subgroup generated by ȳ,ā , for which the following hold: (i) for each i ≤ k, there exists a convergent sequence of nondegenerate (with respect to T (G i , Sld i )) strictly solid morphisms s n : Sld i → F with trivial stable kernel, and for each n there exists a graded test sequence (h n m ) n<ω : F |= φ(b 0 ,c 0 ,ā), then there exist i ≤ k and: (1) a nondegenerate (with respect to T (G i , Sld i )) strictly solid morphism s : We also record the following easy corollary of the above theorem.
We use Theorem 6.23 and the definition of a graded test sequence in order to prove the following theorem. Recall that ∃ <∞ xφ(x) reads that the solution set of φ(x) is nonempty and contains finitely many elements. Proof. The first property of the graded envelope (Theorem 6.23(i)) brings us to the situation of Lemma 6.22 for each graded tower GT (G i , Sld i ). Thus the result follows.
The following theorem is a consequence of Theorem 1.3 in [14]. It has been used in the proof of the stability of the first order theory of nonabelian free groups as well as in showing that this theory is not equational, but also in the (weak) elimination of imaginaries. Theorem 6.26 (Sela). Let T (G, F) where G := ū,x,ā | Σ be a tower over F. Let φ(x,ā) be a first order formula over F. Suppose there exists a test sequence, (h n ) n<ω : G → F for T (G, F), such that F |= φ(h n (x),ā).

Then there exist:
• a closure, R := cl(T (G, F)), of T (G, F); • finitely many closures, R 1 := cl 1 (R), . . . , R k := cl k (R), of R; • for each i ≤ k, finitely many closures, cl 1 (R i ), . . . , cl m i (R i ), so that a subsequence of (h n ) n<ω extends to a test sequence of R and either: • it cannot be extended to a test sequence for any of the closures R i or • for each i ≤ k that can be extended to a test sequence for R i , there exists 1 ≤ j ≤ m i so that it extends to a test sequence for cl j (R i ) of R i . Finally, for any test sequence, (h n ) n<ω : G cl → F, for R for which one of the above conditions holds, there exists n 0 < ω such that F |= φ(h n (x),ā) for all n > n 0 .
The above fact has some strong consequences regarding definability. We record some corollaries that resolve some long-standing questions.
A first order formula φ(x) is generic in a group G if finitely many translates of the solution set of the formula in G cover G.

Corollary 6.27. A first order formula φ(x) over F is generic if and only if it contains a test sequence for the tower T ( x * F, F).
We note that the following Corollary has been proved by C. Perin using different methods.
Corollary 6.28. Let c ∈ F \ {1}. Then the induced structure on (C F (c), ·) (seen as a subgroup of (F, ·)) is the structure of a pure group; i.e., every definable set in the induced structure can be defined by multiplication alone.
Proof. By [20] and [21] it is enough to prove that every infinite definable subset of C F (c) is generic in C F (c). Let X be an infinite definable subset of C F (c) = γ . Then we can extract from X a test sequence (b n ,ā) n<ω for the tower T ( x, z | [x, z] * z=γ F, F), obtained by gluing an infinite cyclic group along the centralizer of c in F.
According to the definition of a test sequence and Theorem 6.26 there exist test sequences (γ kn+l ) n<ω and (γ −kn+l ) n<ω for some natural numbers k > 0 and l ≥ 0 such that all but finitely many elements of them belong to the definable set X. Thus, X is generic in C F (c).
Moreover, for any morphism h : G → F that factors through T (G, F), there exists some i ≤ k such that h extends to a morphism from G cl i to F that factors through cl i (T (G, F)).
One can generalize Merzlyakov's theorem after strengthening the assumptions in the following way. Theorem 6.31. Let F |= ∀x∃ <∞ȳ φ(x,ȳ,ā) and assume there exist a test sequence (h n ) n<ω : G → F with respect to the hyperbolic tower T (G, F), G := u, x, a | T (u, x, a) (for some ordering (T (G, F), <)) and a sequence of tuples (c n ) n<ω in F such that F |= φ(h n (x),c n ,ā). Then there exists a tuple of wordsw(x,ā) ⊂ G such that for any test sequence (h n ) n<ω : G → F for the tower T (G, F), there exists n 0 (that depends on the test sequence) with F |= φ(h n (x), h n (w(x,ā)),ā) for all n > n 0 .
If h : G → F is a morphism and H is a subgroup of G, then by h H we denote the restriction of h on H. We prove: Theorem 6.32. Let T (G, F) be a tower over F := F(ā) with G := ū,ȳ,ā , and let Sld := v,ȳ,ā | Σ(v,ȳ,ā) be a solid limit group with respect to H := ȳ,ā ≤ G.
Assume that for some ordering of the tower (T (G, F), <) there exists a test sequence (h n ) n<ω : G → F that extends to a sequence (H n ) n<ω : G * H Sld → F so that for each n < ω, (H n Sld) n<ω is a strictly solid morphism. Then: • (Existence for a single test sequence) There exist a closure cl(T (G, F)) of T (G, F) with G cl := w,ū,ȳ,ā and a morphism r : Sld → G cl with r(ȳ,ā) = (ȳ,ā) such that a subsequence of (h n ) n<ω (still denoted (h n ) n<ω ) extends to a test sequence (g n ) n<ω : G cl → F of cl(T (G, F)) for the inherited ordering and for which, for each n, g n • r is in the same strictly solid family as H n Sld. • (Universal property for all test sequences) There exist finitely many closures cl 1 (T (G, F)), . . . , cl k (T (G, F)) with G cl i := w i ,ū,ȳ,ā , and for each i ≤ k there is a morphism r i : Sld → G cl i with r i (ȳ,ā) = (ȳ,ā) such that for every test sequence with respect to (T (G, F) <), (h n ) n<ω : G → F, which extends to a sequence (H n ) : G * H Sld → F so that, for each n < ω, H n Sld is a strictly solid morphism, there exists i ≤ k such that a subsequence of (h n ) n<ω extends to a test sequence (g n ) n<ω : G cl i → F for the inherited ordering and, for each n < ω, g n • r i is in the same strictly solid family as H n Sld.
We first record a result of Sela (see [17,Proposition 1.9]) which is essential in proving Theorem 6.32. Proposition 6.33 (Sela). Let Sld be a solid limit group with respect to a finitely generated subgroup H. Let (s n ) n<ω : Sld → F be a converging sequence of strictly solid morphisms. Let q : Sld Q := Sld/Kers n and let Δ be a GAD of Q relative to q(H).
Then for each edge group and rigid (nonabelian) vertex group of JSJ H (Sld), its image by q can be either • conjugated into an edge group or rigid (nonabelian) vertex group of Δ or • if conjugated into an abelian vertex group, then it is conjugated into the peripheral subgroup of this group.
Proof of Theorem 6.32. The proof follows the arguments in the proof of Theorem 1.18 in [16]. Thus we only point out the parts that differ.
We note that by Lemma 5.9 there exists a system of equations Ψ = 1 over F that collects all morphisms h : Sld → F that are degenerate.
We start with a test sequence (h n ) n<ω : G → F that by the hypothesis we can extend to a sequence of morphisms (H n ) n<ω : G * H Sld → F such that each morphism restricts to a strictly solid morphism on Sld. For each n we choose the shortest possible morphism (with respect to a fixed basis of F) that belongs to the same strictly solid family as H n Sld. The problem in applying directly the arguments of the proof of Theorem 1.18 in [16] would be that the shortening argument could shorten our morphisms in a way that they do not belong in the same strictly solid family. According to Proposition 6.33 and Lemma 5.11 this is not possible. Thus, the quotient group G * H Sld/Ker(H n ) under the stable kernel of (H n ) n<ω would have the structure of a closure of T (G, F), as we wanted.
The universal property follows exactly as in Theorem 1.18 in [16]. Theorem 6.31 is an easy corollary of our next result.
Suppose there exist a test sequence (h n ) n<ω : G → F for T (G, F) and a sequence {(b n ) n<ω } of tuples in F such that F |= φ(b n , h n (ȳ),ā).
Proof. We consider the solid limit groups on which the graded towers of the envelope of {φ(x,ȳ,ā)} are based. By Theorem 6.25 the tuplex of each graded tower belongs toĤ i of eachĴSJ(Sld i ). By the properties of the graded envelope every test sequence for T (G, F) that can be extended to a sequence of solutions for φ has a subsequence that extends to a sequence of morphisms of G * H i Sld i , so h n extends to H n : G * H i Sld i . Now by Theorem 6.32 there are closures cl 1 , . . . , cl n with x i = r i (x) such that h n extends to g n : G cl i → F. Since g n • r is in the same strictly solid family as H n Sld, by Theorem 6.25 it does not change the value of H n (x i ) = b n ; that is, F |= φ(g n (x i ), h n (y), a).

Main proof
In this final section we bring everything together in order to prove the main result of this paper: no infinite field is definable in a nonabelian free group. We have split the proof into two parts. Assuming that X is an infinite definable set, in subsection 7.1 we tackle the case where X is coordinated by a finite set of centralizers. In this case we have already proved that X is one-based; thus we cannot give it a definable field structure. In subsection 7.3 we prove that in any other case X cannot be given definably the structure of an abelian group.
We have inserted a subsection between subsections 7.1 and 7.3 that is free of certain technical problems in order to make the ideas of our proof more transparent. 7.1. Abelian case. In this subsection we tackle the special case where the diophantine envelope of a definable set X consists essentially of the ground floor F (the coefficient group) and only abelian floors are glued over centralizers of elements in F, the prototypical case being that X is a product of centralizers. Since centralizers are pure groups (see Corollary 6.28, their theory is one-based; thus X cannot be given definably a field structure. In the general case we can show that X is internal to a product of centralizers, thus still one-based. Then X cannot be given definably the structure of a field. Proof. By Corollary 6.24(i), we have that X is a subset of the diophantine set D(x) := ∃ū( k i=1 Σ i (ū,x,ā) = 1). But then by the hypothesis we have that there are finitely many wordsw i (z,ā) so that for each elementb of D there exist some i and some elementsc 1 , . . . ,c l from centralizers of elements in F such thatb = w i (c 1 , . . . ,c l ,ā).
Thus, D is internal to a set of centralizers (see Definition 2.6), and by Corollary 6.28 these centralizers are one-based sets. Now by Fact 2.4 and Theorem 2.7, no infinite definable subset of D can be given definably a field structure. 7.2. Hyperbolic case. In this subsection we tackle a case in which a diophantine envelope for a definable set X contains a hyperbolic tower. In contrast to the abelian case, this case is not strictly needed, but it will serve as a toy example for the general case.