Model Theory of R-trees

We show the theory of pointed $\R$-trees with radius at most $r$ is axiomatizable in a suitable continuous signature. We identify the model companion $\rbRT_r$ of this theory and study its properties. In particular, the model companion is complete and has quantifier elimination; it is stable but not superstable. We identify its independence relation and find built-in canonical bases for non-algebraic types. Among the models of $\rbRT_r$ are $\R$-trees that arise naturally in geometric group theory. In every infinite cardinal, we construct the maximum possible number of pairwise non-isomorphic models of $\rbRT_r$; indeed, the models we construct are pairwise non-homeomorphic. We give detailed information about the type spaces of $\rbRT_r$. Among other things, we show that the space of $2$-types over the empty set is nonseparable. Also, we characterize the principal types of finite tuples (over the empty set) and use this information to conclude that $\rbRT_r$ has no atomic model.


Introduction
Continuous logic is an extension of classical first order logic used to study the model theory of structures based on metric spaces. In this paper, we use continuous logic as presented in Ben Yaacov, Berenstein, Henson and Usvyatsov [4] and Ben Yaacov and Usvyatsov [6] to study the model theory of R-trees.
An R-tree is a metric space T such that for any two points a, b ∈ T there is a unique arc in T from a to b, and that arc is a geodesic segment (ie, an isometric copy of some closed interval in R). These spaces arise naturally in geometric group theory, for example: the asymptotic cone of a hyperbolic finitely generated group is an R-tree. 2

S Carlisle and C W Henson
An R-tree may be unbounded, while the existing full treatments of continuous model theory are restricted to bounded structures. With this in mind, we consider pointed trees, choose a real number r > 0, and axiomatize the theory RT r of pointed R-trees of radius at most r in a suitable continuous signature.
We then define the notion of richly branching and axiomatize the theory rbRT r of the class of richly branching pointed R-trees with radius r. We prove that the models of rbRT r are exactly the existentially closed models of RT r ; thus rbRT r is the model companion of RT r . Next, we investigate some model theoretic properties of rbRT r , showing that it is complete and has quantifier elimination. In particular, that means rbRT r is the model completion of RT r . Further, we prove that rbRT r is stable but not superstable and identify its model-theoretic independence relation. We characterize the principal types of rbRT r , and show that this theory has no atomic model. Finally, we show that rbRT r is highly non-categorical. In fact, for any density character this theory has the maximum possible number of pairwise non-isomorphic models; indeed, the models we construct are pairwise non-homeomorphic. We also give examples of richly branching R-trees which come from the literature, including some that will be familiar to geometric group theorists.
In the remainder of this introduction we detail the contents of each section of this paper.
In Sections 2 and 3 we provide background concerning R-trees and continuous logic, respectively. In Section 4 we specify a continuous signature L suitable for the class of pointed R-trees of radius at most r, and axiomatize this class of L-structures; the theory of the class is denoted RT r .
In Section 5 we discuss definability of certain sets and functions in RT r . In Section 6 we show RT r has amalgamation over substructures. This plays an important role in many of the primary results in this paper.
In Section 7 we introduce the class of richly branching pointed R-trees with radius r and axiomatize this class. The associated theory is denoted rbRT r . We then show that rbRT r is the model companion of RT r . The theory rbRT r is the main object of study in this paper.
In Sections 8 and 9 we verify the main model-theoretic properties of rbRT r . We show that this theory is complete and admits quantifier elimination. We characterize its types over sets of parameters and use this to show rbRT r is κ-stable if and only if κ = κ ω ; hence this theory is strictly stable (stable but not superstable). We also show that rbRT r is not a small theory; indeed, its space of 2-types over ∅ has metric density character 2 ω . (The space of 1-types over ∅ is isometric to the real interval [0, r] with the usual absolute value metric.) We give a simple geometric characterization of the independence relation of rbRT r . Finally, we show that non-algebraic types have built-in canonical bases (ie, these bases are sets of ordinary elements in models of rbRT r and do not require the introduction of imaginaries).
In Section 10 we discuss some models of rbRT r that have been constructed within the theory of R-trees by Dyubina and Polterovich [12,13] and some other models that arise in geometric group theory.
In Section 11 we use amalgamation constructions to build large families of models of rbRT r and to characterize its isolated types over ∅. For each infinite cardinal κ, we show there are 2 κ -many pairwise non-isomorphic models of rbRT r of density character κ. This is the maximum possible number of models, and the models we construct are, in fact, pairwise non-homeomorphic. We show that rbRT r has very few isolated n-types over ∅ and conclude that it has no atomic model (equivalently, it has no prime model).
In Section 12 we briefly discuss how the results in this paper could be obtained for the full class of pointed R-trees (ie, without imposing a boundedness requirement).
Research for this paper was supported by Simons Foundation grants (#202251 and #422088) to the second author.

R-trees
In this section we give some background concerning R-trees.

Definition
An arc in a metric space M is the image of a homeomorphism γ from an interval [0, r] ⊆ R into M for some r ≥ 0. A geodesic segment in a metric space M is the image of an isometric embedding γ : [0, r] → M . We say that such an arc or geodesic segment is from γ(0) to γ(r). A metric space M is called geodesic if for every a, b ∈ M there is at least one geodesic segment in M from a to b.
In other words, if x 0 , x 1 , . . . , x n are elements of [x 0 , x n ] listed in increasing order of distance from x 0 , then we write [x 0 , x n ] = [x 0 , x 1 , . . . , x n ] for this piecewise segment. Note that we also know [x 1 , That is, [a, e a , e b , b] is a piecewise segment.
Proof Follows from Lemmas 2.4 and 2.5.
Recall that (X, d) is a pseudometric space if d : X 2 → R ≥0 is symmetric, satisfies the triangle inequality, and has d(x, x) = 0 for all x ∈ X . Its quotient metric space is obtained by identifying x, y ∈ X iff d(x, y) = 0.
2.8 Definition (Gromov product) For a pseudometric space (X, d) and x, y, w ∈ X , define: (x · y) w = Proof See the proof of Proposition III.H. 1.22 in Bridson and Haefliger [7].

Definition If
A ⊆ M is a subset of the R-tree M , let E A denote the smallest subtree containing A. We call this the R-tree spanned by A. Note that The closure E A of E A is the smallest closed subtree containing A.
Note that if A is finite, then E A = E A and E A is complete and has finite diameter.

Definition
An R-tree M is finitely spanned if there exists a finite subset A ⊆ M such that M = E A .
2.14 Lemma (1) A metric space is an R-tree if and only if it is 0-hyperbolic and geodesic.
(3) Let (X, d) be a 0-hyperbolic metric space. For i = 1, 2, suppose f i : (X, d) → (M i , d i ) are isometric embeddings into R-trees, and let E i be the smallest subtree of M i containing f i (X). Then there is a unique isometry g from Proof (  Applying (D) to x, x and to y, y yields Similarly, applying (D) to x, y and to x, x yields that d(x, Y) is determined by the values of d on x, y, x , y . Likewise, applying (D) to x , y and to x , x yields the same conclusion for d(x , Y ).
Finally, applying (D) to the original pair u, u yields which gives the desired conclusion.
To construct the needed isometry g, there is an obvious definition from a segment of the form [ f 1 (x), f 1 (y)] in M 1 into M 2 , for each x, y ∈ X , by taking g to be the unique . What is proved above shows that the union of all such maps is a well defined isometry from E 1 onto E 2 that satisfies g • f 1 = f 2 . Every isometry from E 1 to E 2 that satisfies g • f 1 = f 2 must agree with this map g.

Definition
, then c is called an endpoint of M . Equivalently, an endpoint is a point with degree at most one.

Lemma
If an R-tree M is finitely spanned and C is the set of endpoints of M , then: (1) If B spans M then C ⊆ B.
(2) The set C spans M . Thus, C is finite, and it is the unique smallest set that spans M .
Proof Let M be a finitely spanned R-tree. Let D be the diameter of M . Let B be a set that spans M .
Proof of (1): Assume there is an endpoint c ∈ M not contained in B. Then there must exist a, b ∈ B such that c ∈ [a, b] and c = a, b. But, this is a contradiction because c is an endpoint.
Proof of (2): Let a ∈ M . Let S a be the set of all segments [b, c] ⊆ M such that a ∈ [b, c] and order S a by inclusion. This is a partial ordering on S a . Let Then I is a geodesic segment in M . Clearly a ∈ I , and the length of I is at most D. Therefore I ∈ S a , and I is an upper bound for the chain. The chain was arbitrary, so any chain has an upper bound. Therefore, by Zorn's Lemma there exists a maximal element of S a . Let [b a , c a ] denote such a maximal element. The elements b a and c a must be endpoints of M . Say, for instance, that b a is not an endpoint. Then there exist e, f ∈ M such that b a ∈ [e, f ] and b a = e, f , and then either [e, c a ] or [ f , c a ] will properly contain [b a , c a ]. This would mean [b a , c a ] was not maximal in S a . Therefore, for each a ∈ M , there exist endpoints b a and c a so that a ∈ [b a , c a ]. So, M is spanned by the set of its endpoints, and this spanning set is as small as possible by (1).
As noted above, if (X, d) is a R-tree, then so is its completion (X, d). The next result gives information about the structure of X .
2.18 Lemma Let (X, d, p) be a pointed R-tree and (X, d, p) its completion, and suppose x ∈ X \ X . Then: (1) there exist (x n ) in X converging to x such that [p, x 1 , . . . , x n , x] is a piecewise segment in X for all n ≥ 1; and (2) x is an endpoint in X .
Proof (1) Given x ∈ X \ X , let (y n ) be a Cauchy sequence in X that converges to x in the R-tree X . Without loss of generality we may assume that (d(y n , x)) is decreasing toward 0. For each n, let x n be the closest point in X on the segment [p, x] to y n . By Lemma 2.5, x n is on the segment [p, y n ] in X and thus x n ∈ X . Further, from the same Lemma and the assumptions on (y n ) we conclude that [p, x 1 , . . . , x n , x] is a piecewise segment in X for each n and (x n ) converges to x.
(2) If x were not an endpoint in X , there would be y ∈ X such that p and y were in different branches in X at x. By part (1), there must exist z ∈ X on the segment [p, y] in X such that z is closer to y than x. That is, [p, x, z, y] would be a piecewise segment in X . But then x would be on the segment [p, z], which lies entirely in X . This contradiction completes the proof.

Some continuous model theory
We investigate the model theory of R-trees using continuous logic for metric structures as presented in Ben Yaacov, Berenstein, Henson and Usvyatsov [4] and Ben Yaacov and Usvyatsov [6]. In this section we remind the reader of a few key concepts and results from those papers, and then we present a few facts about existentially closed models and model companions that are not discussed there. For the rest of this section we fix a continuous first order language L.
As explained in [4,Section 3], in continuous model theory it is required that structures and models are metrically complete. However, formulas and conditions are evaluated more generally in pre-structures, as explained in [4,Definition 3.3]. Further, it is shown in [4,Theorem 3.7] that the completion of a prestructure is an elementary extension. In this paper we use notation of the form M |= θ only when M is a structure; in other words, M must be metrically complete.
Next, some reminders about saturation in continuous logic. A set Σ(x 1 , . . . , x n ) of Lconditions (with free variables among x 1 , . . . , x n ) is called satisfiable in M if there exist a 1 , . . . , a n in M such that M |= E[a 1 , . . . , a n ] for every E(x 1 , . . . , x n ) ∈ Σ. Let κ be a cardinal. A model M of T is called κ-saturated if for any set of parameters A ⊆ M with cardinality < κ and any set Σ(x 1 , . . . , x n ) of L(A)-conditions, if every finite subset of Σ(x 1 , . . . , x n ) is satisfiable in (M, a) a∈A , then the entire set Σ(x 1 , . . . , x n ) is satisfiable in (M, a) a∈A .
Note that any non-principal ultrafilter on N is countably incomplete.

Proposition
For any cardinal κ, any L-structure M has a κ-saturated elementary extension.
A sup-formula of L is defined similarly. These sup-formulas are the universal formulas in continuous logic. For an L-theory T , we use the notation T ∀ for the set of universal sentences σ (sup-formulas with no free variables) such that the condition σ = 0 is implied by the theory T . Note that, as in classical first order logic, T ∀ is the theory of the class of L-substructures of models of T .

Definition
Let T be an L-theory and suppose M |= T . We say M is an existentially closed (e.c.) model of T if, for any inf -formula ψ(x 1 , . . . , x m ), any a 1 , . . . , a k ∈ M , and any N |= T that is an extension of M, we have ψ N (a 1 , . . . , a m ) = ψ M (a 1 , . . . , a m ).
An L-theory T is model complete if any embedding between models of T is an elementary embedding. Proof This is Robinson's Criterion for model completeness. The proof given by Hodges [14,Theorem 8.3.1] for classical first order logic can easily be adapted to the continuous setting.
In Ben Yaacov [2, Appendix A] there is some further discussion of inf -and supformulas and of model completeness.

Definition
Let T be an L-theory. A model companion of T is an L-theory S such that: • Every model of S embeds in a model of T .
• Every model of T embeds in a model of S. • S is model complete.
Note that the first two criteria in this definition together are equivalent to the statement S ∀ = T ∀ . As in classical first order logic, if a theory has a model companion, then that model companion is unique (up to equivalence of theories).
Recall that a theory T is inductive if whenever Λ is a linearly ordered set and (M λ | λ ∈ Λ) is a chain of models of T , then the completion of the union of (M λ | λ ∈ Λ) is a model of T .

Proposition
Let T be an inductive L-theory and let K be the class of existentially closed models of T . If there exists an L-theory S so that K = Mod(S), then S is the model companion of T .
Proof The proof of [14,Theorem 8.3.6] can be adapted to the continuous setting.
We say the L-theory T has amalgamation over substructures if for any substructures M 0 , M 1 and M 2 of models of T and embeddings f 1 : there exists a model N of T and embeddings g i : 3.8 Proposition Let T 1 and T 2 be L-theories such that T 2 is the model companion of T 1 . Assume T 1 has amalgamation over substructures. Then T 2 has quantifier elimination.
Proof The corresponding result in classical first order logic is the equivalence of (a) and (d) in [14,Theorem 8.4.1]. The proof given there can be adapted to the continuous setting. The theory of pointed R-trees with radius at most r By the radius of a pointed metric space (M, p) we mean the supremum of the distance d(p, x) as x varies over M , and when using the term we always require that this expression is finite.
In this section we first present the continuous signature used in this paper to study R-trees. We then give axioms for the theory RT r of R-trees with radius ≤ r.

Definition
Let RT r be the L r -theory consisting of the following conditions: Condition (2) formalizes the approximate midpoint property. In reading (3), recall that (x · y) w denotes the Gromov product (see Definition 2.8), which is given by an explicit formula ϕ(x, y, w) in the signature L r .
The next lemma shows that the class of complete pointed R-trees of radius ≤ r is axiomatized by RT r .

Lemma
The models of RT r are exactly the complete, pointed R-trees of radius ≤ r.
Proof First we assume M |= RT r . Then (M, d, p) is a complete, pointed metric space. Axiom (1) guarantees that M has radius ≤ r. Axiom 3 implies that M is 0-hyperbolic.
Axiom (2) implies that for any x, y ∈ M and any > 0 there is z ∈ M such that d(x, z) and d(y, z) are within of d(x, y)/2. We show that in a complete metric space that is 0-hyperbolic, this implies the exact midpoint property. (See Fact 2.2.) Given x, y ∈ M , for each n let z n ∈ M be such that d(x, z) and d(y, z) are within 1/n of d(x, y)/2. Applying the 4-point condition (see Lemma 2.10) we have n from which we get d(z m , z n ) ≤ 1/m + 1/n for all m, n. Therefore (z n ) converges in M to an exact midpoint between x and y.
Therefore, by Lemma 2.14(1), M is a pointed R-tree with radius ≤ r.
That a complete, pointed R-tree with radius ≤ r is a model of RT r is clear.

Remark
Structures in continuous logic are required to be metrically complete, while in general, R-trees are not complete. A pointed R-tree M with radius ≤ r can naturally be viewed as an L r -prestructure, which is an L r -structure iff it is complete (since the pseudometric on the prestructure is actually a metric). If M is not complete, then its metric completion is known to be an R-tree (see Chiswell [8,Lemma 2.4.14]). Further, the completion of a prestructure is known to be an elementary extension, and therefore the prestructure and its completion are completely equivalent from a modeltheoretic perspective. (See Ben Yaacov, Berenstein, Henson and Usvyatsov [4, pages 15-17].) Note that this also means any two pointed R-trees of radius ≤ r that have the same metric completion are indistinguishable from a model-theoretic perspective, and that a metrically complete R-tree can be identified model-theoretically with any of its dense sub-prestructures. (However, those metric sub-prestructures are not necessarily R-trees. In particular, they are not necessarily geodesic spaces.) We close this section by noting a property of RT r that will be used later.

Lemma
The theory RT r is inductive. That is, the completion of the union of an arbitrary chain of models of RT r is a model of RT r .
Proof The proof of Chiswell [8, Lemma 2.1.14] can be modified to show that the union of an arbitrary chain of pointed R-trees is again a pointed R-tree. Also, the completion of an R-tree is an R-tree. (See [8,Lemma 2.4.14].) Since base points are preserved by embeddings of models, the radius of the underlying pointed R-tree for the union of a chain is most r.
Alternatively, note that RT r is an ∀∃-theory, and therefore the class of its models is closed under completions of unions of chains.

Some definability in RT r
We now discuss the notion of definability for subsets of and functions on the underlying R-tree M of a model M of RT r . For background on definable predicates, sets and functions see Ben Yaacov, Berenstein, Henson and Usvyatsov [4]. The first result shows that every closed ball centered at the base point is uniformly quantifier-free 0-definable in models of RT r . Therefore, the closed ball B s (p) ⊆ M is uniformly 0-definable with respect to the theory RT r .

Lemma
Proof It suffices to show that ϕ M (x) is equal to the distance function dist(x, B s (p)).
Note that the preceding argument only needs that the underlying metric space M is a geodesic space.
Next, we present a short discussion of some specific definable functions, points and sets in models of RT r .
Let M be an R-tree and for s ∈ [0, 1] define the function ν s : Proof Let ψ be the formula: Proof Recall that in an R-tree, the Gromov product (a · b) x is equal to the distance from x to the segment [a, b], and this distance is realized by a unique closest point on Let M |= RT r and x 1 , x 2 , x 3 ∈ M . We will show that in M, .
Next, we discuss amalgamation for the L r -theory RT r . The following result from Chiswell [8] discussing amalgamating over points in R-trees is then extended to amalgamation of R-trees over subtrees. This leads to a proof of amalgamation over substructures for RT r . .
We next apply this lemma to prove R-trees can be amalgamated over subtrees.

Lemma
Given R-trees M 0 , M 1 and M 2 and isometric embeddings f i : M 0 → M i for i = 1, 2, there exists an R-tree N and isometric embeddings g i : Proof Without loss of generality, we may assume that M 0 is nonempty, and that the f i are inclusion maps. Further, we may assume that M i is complete for i = 0, 1, 2, since the maps f 1 , f 2 are isometric, and can thus be extended as needed. (Recall that the completion of an R-tree is again an Let α k be the cardinality of B k (which we may assume is nonempty, by extending M 2 if needed), For each i ∈ I we consider X i as a subtree of M 2 .
We claim that X = M 1 and the family (X i | i ∈ I) satisfy the hypotheses of Lemma 6.1. By construction, every point in M 0 is contained in some X i .
Further, given any point y ∈ M 2 \ M 0 , we may let x be the closest point to y in M 0 and take k so that x k = x; then we may take β to be a branch in M 2 at x k that contains y. It follows that would be an element of M 0 that was closer to y than x. Thus there exists i = (k, v) ∈ I for which β = β i and hence y ∈ X i . Thus we have M 2 = i∈I X i .
Applying Lemma 6.1, we get that N = ( i∈I X i ) ∪ M 1 with the metricd is an R-tree, and clearly N = M 2 ∪ M 1 as metric spaces. Define g i to be the inclusion of M i in N . Then To apply these results to models of RT r , we begin by proving any subset of a model of RT r gives rise to a unique model of RT r . In particular, any substructure extends to a unique model. Further, since f is an isometry, it extends further (also uniquely) to embed M into W .

Theorem
The L r -theory RT r has amalgamation over substructures. That is, if M 0 , M 1 and M 2 are substructures of models of RT r and f 1 : Proof First, by Lemma 6.3 we may assume that M 0 , M 1 and M 2 are models of RT r with underlying complete, pointed R-trees (M i , d i , p i ). Further, we may assume that M 0 ⊆ M i and p 0 = p i for i = 1, 2 and that the f i are inclusion maps.
We use Lemma 6.2 to construct the R-tree (N, d) and isometric embeddings g i : Define the base point of N to be q = p 1 = p 2 = p 0 . Since every point in each M i has distance ≤ r from p i = q, we conclude that the pointed R-tree (N, d, q) has radius S Carlisle and C W Henson ≤ r. Let N = (N, d, q) be the corresponding L r -structure. Then N is a model of RT r , and since g i are isometric embeddings preserving the base point, they give rise to embeddings of L r -structures as required.

The model companion of RT r
In this section we define what it means for a pointed R-tree of radius ≤ r to be richly branching. We then show that the theory of richly branching pointed R-trees with radius r is the model companion of RT r . Throughout the rest of this paper we assume r > 0.

Remark
The preceding definition and arguments below apply specifically to pointed R-trees with radius ≤ r. For general R-trees we define: an R-tree M is richly branching if the set of points at which there are at least 3 branches of infinite height is dense in M . Note that an R-tree that is richly branching in this sense must be unbounded.

Lemma
Let (X, d) be an R-tree in which the set of branch points is dense. Then for any distinct x, y ∈ X , the set of branch points on [x, y] is dense in [x, y].
Proof Let z be on the segment [x, y] and suppose 0 < δ < min[d(x, z), d(y, z)]. By assumption there is a branch point w in X with d(w, z) < δ . If w lies on [x, y] we are done. Otherwise, let u be the point on [x, y] that is closest to w. By Lemma 2.5 we have that x, y, w are in distinct branches at u, and That is, u is a branch point on [x, y] that is arbitrarily close to an arbitrary point on [x, y] that is distinct from x, y.
If we start with an unbounded richly branching R-tree M , assign an arbitrary base point p and select r > 0, we can make a richly branching R-tree with radius ≤ r as in Definition 7.1 by taking the closed ball of radius r with center p in M . Note that this yields an L r -prestructure and the completion is an L r -structure.
Conversely, suppose M is an R-tree and p is any point in M . If the closed ball of radius r with center p in M is richly branching in the sense of 7.1 for an unbounded set of r > 0, then M is richly branching as a general R-tree. (See Lemma 7.7 below.) Next we give axioms for the class of complete, richly branching, pointed R-trees with radius r.

Definition
To help parse these axioms and picture what they mean, note that in an R-tree: Consider Proof Let s = r − d(p, a), and assume 0 meaning c 1 , c 2 , c 3 must be distinct. Moreover, c 1 , c 2 and c 3 cannot lie along a single piecewise segment. To see this assume Thus, there are at least 3 branches at Y(c 1 , c 2 , c 3 ).
The next lemma shows that any branch at any point in a model of rbRT r must have maximum possible height, with that height realized by a point having distance r from p. This also implies every model of rbRT r has radius equal to r.

Lemma
Let M |= rbRT r and let a ∈ M . In any branch β at a, there exists at least one point b such that d(p, b) = r.
Proof Let a ∈ M and δ = r − d(p, a), and let β be a branch at a.
We first assume p / ∈ β (including the case where a = p). Thus a is not an endpoint in M , so we have δ > 0 by Remark 4.1. In what follows, by iterating the use of Lemma 7.6, we build a sequence b 1 , b 2 , b 3 , . . . of points in β so that for any k ∈ N, Since c and p are in different branches at a, it follows that d(a, c) ≤ δ . If r − d(p, c) ≥ δ/2, then let 0 < < d(a, c)/2. Use Lemma 7.6 to find c so that d(c, c ) < , and so that there are at least 3 branches at c with height at least Then find a point b 1 on a branch at c other than the one containing a. This makes [p, a, c , b 1 ] a piecewise segment. Select b 1 so that: Thus d(a, b 1 ) > δ/2. It follows that: Once we have b 1 , . . . , b i , we proceed in a manner analogous to what was done above Then for any j > i we have: is a piecewise segment. Using these facts and our choice of q we conclude: This proves the claim.
Finally, we deal with the case where p ∈ β . Since β is open, we may use Lemma 7.6 to find a point a ∈ β such that there are 3 branches at a . Select a branch β at a so that p / ∈ β and a / ∈ β . The latter guarantees β ⊆ β . Applying the first part of this proof to a and β yields a point b ∈ β such that d(p, b) = r.
The following theorem shows that complete richly branching pointed R-trees with radius r form an elementary class.

Theorem
The models of rbRT r are exactly the complete, richly branching R-trees with radius r.

S Carlisle and C W Henson
Proof Let (M, d, p) be a complete, richly branching pointed R-tree with radius r and let M be the corresponding L r -structure. Clearly M |= RT r , and it remains to verify that ϕ M = 0. Let a ∈ M . If d(p, a) = r, then let c 1 = c 2 = c 3 = a and note that these witness ψ M (a) = 0. So we assume d(p, a) < r, and let > 0 be such that /3 < r − d(p, a). Since M is richly branching, the set B from Definition Next Thus, ψ(a) M = 0, and since a was arbitrary, we conclude ϕ M = 0.
For the converse direction, assume M |= rbRT r , so (M, d, p) is a complete, pointed R-tree. Let a ∈ M and > 0. By Lemma 7.6 we may find b ∈ M so that d(a, b) < and there are at least 3 distinct branches at b. By Lemma 7.7 each branch at b contains a point with distance r from p, so the height of each branch is at least r − d(p, b). It also follows from 7.7 that M has radius r. Since a ∈ M and > 0 were arbitrary, we conclude the set B of points with at least 3 branches of height ≥ r − d(p, b) is dense in M . Therefore, M is richly branching.
Next, we turn to a series of lemmas that are needed for our proof that the theory rbRT r is the model companion of The next lemma connects κ-saturation to the number of branches at the points whose distance from the base point is < r, in a richly branching R-tree of radius r. (Recall from Remark 4.1 that every point at distance = r from the base point in such an R-tree is an endpoint.) The converse of this lemma is also true, and the resulting characterization of κ-saturated models of rbRT r is Theorem 8.5 below, which will be proved once we have shown that rbRT r admits quantifier elimination. Using these facts and the fact that d(a, a ) < /2, it is now straightforward to show that d(a, c))| < . and Let Σ be the set of all conditions x)) | ≤ 1/k and for k ∈ N and i = 1, . . . , n.
Since was arbitrary, we have that Σ is finitely satisfiable. Since there are only finitely many parameters in Σ, and M is ω -saturated, there must exist b ∈ M that satisfies all of these conditions simultaneously. For this b we have d(a, b) = r − d(p, a) and d(a, b), meaning b is in a different branch at a from any of the b i . This contradicts that each branch at a was represented by one of b 1 , . . . , b n . Therefore there must be at least ω -many branches at each point in M when M is ω -saturated. Now, let κ > ω and assume M is κ-saturated. Let a ∈ M with d(p, a) < r. Assume toward a contradiction that there are exactly α-many distinct branches at a where α < κ. Index the branches at a by i < α, and by Lemma 7.7 on each of these branches designate a point b i such that d(a, b i ) = r − d(p, a). Let A = {a} ∪ {b i | i < α} and note that A has cardinality less than κ. Define: It is straightforward to show Σ is finitely satisfiable, since by the first part of this proof there must be infinitely many branches at a. By κ-saturation there exists b ∈ M that satisfies all of these conditions. Using Lemma 2.4 we conclude that b is on a different branch out of a from each b i , contradicting the assumption that every branch at a was represented by one of the b i .

Lemma
Let κ be an infinite cardinal. Assume M is a κ-saturated model of rbRT r with underlying R-tree (M, d, p). Let K be a non-empty, finitely spanned R-tree. Designate a base point q in K . For any e ∈ M such that r − d(p, e) ≥ sup{d(q, x) | x ∈ K} and any collection {β i | i < α} of branches at e with cardinality α < κ, there exists an isometric embedding f of K into M such that f (q) = e and f (K) ∩ β i = ∅ for all i < α.
Proof By Lemma 7.10, (M, d, p) has at least κ-many branches at each point a satisfying d(p, a) < r. By Lemma 2.17, there is a minimal set that spans K , namely, the set of endpoints of K . Proceed by induction on the size of this minimal spanning set, building up the embedding at each step using the fact that there are κ-many branches of sufficient height at every interior point. The restriction that r − d(p, e) ≥ sup{d(q, x) | x ∈ K} keeps the image of the embedding inside M .

Theorem
The L r -theory rbRT r is the model companion of RT r .
Proof Since RT r is an inductive theory, by Lemma 3.7 it suffices to show that the models of rbRT r are exactly the existentially closed models of RT r . By Lemma 7.9 we know every existentially closed model of RT r is a model of rbRT r . It remains to show that every model of rbRT r is an existentially closed model of RT r . Let M |= rbRT r . Let N |= RT r be an extension of M. We may assume M and N are ω 1 -saturated. (This is because we may consider the structure M, N , ι where ι is the embedding from M to N , and take an ω 1 -saturated elementary extension of that structure. If we can verify the definition of existentially closed in that setting, it will be true of M and N .) Let (M, d, p) and (N, d, p) be the underlying pointed R-trees for M and N respectively.
To prove this claim, let b 1 , . . . , b l ∈ N , and let E a ⊆ M be the subtree spanned by a = a 1 , . . . , a k . Note that E a = E a . Define an equivalence relation on b 1 , . . . , b l by: For each v = 1, . . . , m let K v be the R-tree spanned by A v ∪ {e v } in N , with base point e v . Note that each K v is closed and for u = v, K u ∩ K v = ∅. Since (N, d, p) has radius r and p ∈ E a and e v is the unique closest point to x in E a , Lemma 2.4 gives ). If b i and b j are in A u = A v respectively, then using Lemma 2.7: Therefore the function f is an isometric embedding from . . , l}. Now let i ∈ {1, . . . , k} and j ∈ {1, . . . , l}. Let e v be the closest point to b i in E a . Then: Thus, the claim is true.
The values of quantifier free formulas in M are determined by distances in M . (This can be shown using induction on the definition of quantifier free formula, since connectives are continuous functions on atomic formulas, which in this case are all of the form d(t 1 , t 2 ) for terms t 1 , t 2 .) So, the preceding claim implies that for any quantifier free formula ϕ(x 1 , . . . , x k , y 1 , . . . , y l ) and any b 1 , . . . , b l ∈ N , there exist c 1 , . . . , c l ∈ M so that:

Properties of the theory rbRT r
In this section we show that rbRT r has quantifier elimination and is complete and stable, but not superstable. We characterize types, and show that the space of 2-types over the empty set has metric density 2 ω . We also characterize definable closure and algebraic closure in models of rbRT r . If A = A 1 , . . . , A n is a finite sequence of subsets of a model, we will use the shorthand notation A 1 . . . A n for the union A 1 ∪ · · · ∪ A n . If some A j has a single element, we write the element instead of the set; for example ABC stands for A ∪ B ∪ C and Ap stands for A ∪ {p}. This notation will be used mainly when we are considering types over sets of parameters.

Lemma
The L r -theory rbRT r has quantifier elimination.

Corollary
The L r -theory rbRT r is complete.
Proof In any model of rbRT r we may embed the structure consisting of just the base point. This fact together with quantifier elimination implies that rbRT r is complete.
We now turn our attention to a discussion of types and type spaces. Let M |= rbRT r . Recall that if b = b 1 , . . . , b n is tuple of elements in M, then tp M (b/A) is the complete n-type of b over A in M. The space of all n-types over ∅ in models of a theory T is denoted S n (T). The space of n-types over A is denoted S n (T A ) or S n (A) when the theory T is clear from context. If q is an n-type and a is an n-tuple from M such that M |= q(a) we say a realizes q in M, and write a |= q. If ϕ(x 1 , . . . , x n ) is an L r -formula, we write ϕ(x 1 , . . . , x n ) q for the value of this formula specified by the type q.
The following lemma gives criteria for when two n-tuples have the same type. Recall that for a subset A of a given R-tree M is the smallest subtree of M containing A. The closure E A is the smallest closed subtree containing A.    (2) and Lemma 2.14.

Statement (3) follows from
With Lemma 8.4 in hand, we can finish the characterization of κ-saturated R-trees, completing the result promised in Section 7. Our next result gives a description of the type space S n (A) with its logic topology, where A is a subset of a model M of rbRT r . If q ∈ S n (A), we take the free variables used in q to be the distinct variables x 1 , . . . , x n and require that X = {x 1 , . . . , x n } be disjoint from Ap. Note that q induces a pseudometric, which we denote ρ q , on ApX , by setting ρ q (t 1 , t 2 ) = d(t 1 , t 2 ) q for each t 1 , t 2 ∈ ApX . That is, if (b 1 , . . . , b n ) realizes q(x 1 , . . . , x n ) in some elementary extension N of M, and we let π : ApX → N be the evaluation map taking each a ∈ Ap to itself and taking each x i to b i , then we are setting ρ q (t 1 , t 2 ) equal to d N (π(t 1 ), π(t 2 )). Note that π can be viewed as the quotient map from the pseudometric space (ApX, ρ q ) to the metric space (Ap{b 1 , . . . , b n }, d N ), which is 0-hyperbolic since N is an R-tree. It follows that ρ q is 0-hyperbolic on ApX .

Theorem
(See Definition 2.9 and Lemma 2.14.) For each q ∈ S n (A), we regard ρ q as an element of the product space [0, 2r] (ApX) 2 , to which we give the product topology. Let HM(ApX) denote the set of all ρ ∈ [0, 2r] (ApX) 2 such that ρ defines a 0-hyperbolic pseudometric on ApX extending d M on Ap and satisfying ρ(p, x i ) ≤ r for all i = 1, . . . , n. This is a closed subset of [0, r] (ApX) 2 and hence it is a compact Hausdorff space in the induced topology. (1) The image of the map q → ρ q defined above on S n (A) is HM(ApX).
(2) The map q → ρ q is a homeomorphism between S n (A) with the logic topology and HM(ApX) with the induced topology.
Proof Let M |= rbRT r and let A ⊆ M .
(1) Suppose ρ ∈ HM(ApX). Recall that the quotient metric space of (ApX, ρ) is 0-hyperbolic (see the comment just before Lemma 2.11) and the quotient map from (ApX, ρ) to that metric space is isometric. Therefore, by Lemma 2.14(2) there is an isometric mapping f from (ApX, ρ) into an R-tree (N, d). We may assume that d(f (p), u) ≤ r for all u ∈ N and that (N, d) is complete, and hence that N = (N, d, f (p)) |= RT r . By Theorem 7.12 we may assume that N is a κ-saturated and strongly κ-homogeneous model of rbRT r , where κ is an infinite cardinal > |A|. Since

S Carlisle and C W Henson
rbRT r admits QE we may assume that Ap ⊆ N and that f is the identity on Ap. Now . . , f (x n )) ∈ N n , and let q(x 1 , . . . , It is easy to see that ρ = ρ q , and hence ρ is in the image of the map q → ρ q as desired. (2) Quantifier elimination for rbRT r implies that the map q → ρ q is 1-1 and continuous for the logic topology on S n (A) and the induced topology on HM(ApX), and this map is surjective by part (1). Both topologies are compact Hausdorff, and hence the map must be a homeomorphism.
Next, we give some results about the type spaces as metric spaces. First, a reminder of how the induced metric on types is defined.
Let M |= rbRT r be such that every type in S n (rbRT r )) is realized in M for each n ≥ 1. As defined in Ben Yaacov, Berenstein, Henson and Usvyatsov [4], the d -metric on n-types over the empty set is . . , b n and b = b 1 , . . . , b n are tuples in M. Note that since M realizes all 2n-types, the infimum in the definition is actually realized. This definition can be extended in the obvious way to spaces of types over parameters.
First we consider the distance between 1-types over A for the theory rbRT r .

Lemma
Let M |= rbRT r and A ⊆ M .
(1) As a metric space, S 1 (rbRT r ) = S 1 (∅) is isometric to [0, r]. (1) Lemma 8. 6 gives a bijection f from S 1 (∅) = S 1 (rbRT r ) onto [0, r], in which each type q(x) is mapped to d(p, x) q . We show that f is isometric. Given two 1-types q, q ∈ S 1 (rbRT r ) a configuration minimizing the distance between realizations b |= q and b |= q is the one where b, b and p are arranged along a piecewise segment. That showing that f is an isometry.
(2) This is a consequence of Lemmas 8.4, 8.6, and 2.14(3). Lemma 8.4 (1) shows that the pair (e, s) associated to q in (2) is indeed determined by q. A description of how to find b realizing a type q associated to (e, s) in a sufficiently saturated elementary extension of M is given in the last paragraph of the proof of Theorem 8.5.
(3) Let q, q ∈ S 1 (A). First assume e q = e q . Then for any realizations b |= q and b |= q , [b, e q , e q , b ] is a piecewise segment by Lemma 2.7, and the conclusion follows. If e q = e q , then as in the proof of (1), a minimizing configuration will have the three points b |= q and b |= q and p along a geodesic segment, and the conclusion follows.
Note that part (2) in Lemma 8.7 gives a description of S 1 (A) that is different from the one in Lemma 8.6. It is possible to give an analogous description of S n (A) when n > 1. Let x 1 , . . . , x n be distinct variables, with X = {x 1 , . . . , x n } disjoint from E Ap . Suppose we are given q(x 1 , . . . , x n ) ∈ S n (A) and a realization (b 1 , . . . , b n ) of q in some model M of rbRT r containing A. Let π be the function on the set E Ap X defined by π(e) = e for e ∈ E Ap and π(x i ) = b i for i = 1, . . . , n. According to parts (1) and (2) of Lemma 8.4, the type q is determined by the pseudometric η = η q on E Ap X that is defined by setting η(t 1 , t 2 ) = d M (π(t 1 ), π(t 2 )) for all t 1 , t 2 ∈ E Ap X . The key properties of η are the following: For every such pseudometric η there is an n-type q ∈ S n (A) for which η = η q . Indeed, by Lemma 2.14, such a pseudometric η is determined by its restriction to the set ApX , which is an element of HM(ApX) defined above. Thus it corresponds to a type in S n (A) by Lemma 8.6.
For n > 1 it seems to be very complex to give a precise description, as in the preceding lemma, of the metric on S n (A) over the theory rbRT r . Accordingly, we limit ourselves to giving (in the next result) a precise statement of the metric density of the space of 2-types over ∅. Its proof illustrates some of the ideas needed to understand these metric spaces more completely.

Proposition
The space of 2-types over the empty set has metric density character equal to 2 ω .
Proof It is clear that S 2 (rbRT r ) has cardinality 2 ω . Hence it suffices to find, for some δ > 0, a set of 2 ω -many types in S 2 (rbRT r ) that are pairwise at distance ≥ δ .
For each s ∈ [0, r] let q s (x, y) ∈ S 2 (rbRT r ) contain the conditions d(p, x) = d(p, y) = r and d(x, y) = 2s. Note that for every s there is a unique such type. If (a s , b s ) realizes q s in M |= rbRT r we let Y s = Y(p, a s , b s ), and note that d(a s , Suppose 0 ≤ t < s ≤ r. We will show that the distance between q s and q t is ≥ 2t. So if we take 0 < δ < r, the types in {q s | δ ≤ s ≤ r} are pairwise at distance ≥ 2δ , giving the desired result. So suppose for 0 ≤ t < s ≤ r we have (a s , b s ) realizing q s and (a t , b t ) realizing q t , in a model M of rbRT r , and that d(a s , a t ) ≤ 2t. Letting c = Y(p, a s , a t ) we have d(p, c) ≥ r − t, implying that Y s and Y t are both in the geodesic segment [p, c]. Then, since Y s = Y t , we have by Lemma 2.7 that [b s , Y s , Y t , b t ] is a piecewise segment, and hence which completes the proof since the realizations of q s , q t were arbitrary.
Remark A similar argument shows that if X is a metric R-tree that contains an isometric copy of every 4-point 0-hyperbolic metric space of diameter at most r, then the density character of X is at least 2 ω . Likewise, if a is a point different from p in M |= rbRT r , then the type space S 1 ({a}) (relative to rbRT r ) has density character exactly 2 ω .
Next, we show that the definable closure and the algebraic closure of a set of parameters A are the same, and are equal to the closed subtree spanned by Ap. If c / ∈ E Ap , let e be the unique closest point to c in E Ap . This e exists by Lemma 2.5. Let β be the branch at e that contains c. Using Lemma 6.1, construct an extension N |= rbRT r of M which adds an infinite number of branches at e, each of which is isometric to β . By Lemma 8.4, on each of these branches is a realization of tp(c/A). The distance between any two such realizations is 2d(e, c) > 0. This gives us a non-compact set of realizations of tp(c/A). Therefore, c / ∈ acl(A).

Proposition
To finish this section we show rbRT r is stable, but not superstable (ie, it is strictly stable).

Theorem
The theory rbRT r is stable. Indeed when κ is an infinite cardinal, rbRT r is κ-stable if and only if κ satisfies κ ω = κ.
For the other direction, assume κ < κ ω . We construct, via a tree construction, a subset A of M with |A| = κ and |E Ap | = κ ω . At Step 1, we choose κ-many points (a i | i < κ) on distinct branches at p, each with distance r/4 from p. We can do this since there are at least κ branches of sufficient height at every point in M by Theorem 8.5 and Lemma 7.7. Note that we only need κ-saturation to guarantee κmany branches. At Step 2, for each a i we choose κ-many points on distinct branches at a i , each with distance r/8 from a i , and distance 3r/8 from p. We index these points by (a i,j | i, j < κ). At Step n for n ≥ 2, we have already designated points a i 1 ,i 2 ,...,i n−1 each of which has distance n−1 k=1 r/2 k+1 from p. At each of these points choose κ-many points on distinct branches at a i 1 ,i 2 ,...,i n−1 , each with distance r/2 n+1 S Carlisle and C W Henson from a i 1 ,i 2 ,...,i n−1 , and distance n k=1 r/2 k+1 from p. We index these new points by (a i 1 ,i 2 ,...,in | i 1 , . . . , i n < κ). Let A = ∞ k=1 (a i 1 ,...,i k | i 1 , . . . , i k < κ). If we associate p with the empty sequence, then the elements of Ap are in 1-1 correspondence with κ <ω . So, the cardinality of A is |κ <ω | = κ.
If σ and τ are non-empty finite sequences from κ, we have that [p, a σ , a σ,τ ] is a piecewise segment in M . (Here σ, τ denotes the concatenation of σ and τ .) Moreover, for every such σ and every distinct i, j < κ, the points a σ,i , a σ,j , and p are in distinct branches at a σ .
For each function f : ω → κ with f (0) = 0 we define a sequence (b f n ) of elements of A by setting b f 0 = p and b f n = a f (1),...,f (n) for n > 0. For each n ∈ ω we have that [b f 0 , . . . , b f n ] is a piecewise segment in M . Further, b f k has distance r/2 k+1 from b f k−1 for every k > 1, making (b f n ) a Cauchy sequence. Since M is complete, b f n must converge to a limit, which we denote by u f . Note that d(p, u f ) = r/2; indeed, d(b f n , u f ) = r/2 n+1 for every n.
Let f and g be two such functions from ω to κ, and suppose m > 0 is the first index at which f (m) and g(m) disagree. An easy calculation shows that u f , u g , and p are in distinct branches at b f m−1 = b g m−1 in M and d(u f , u g ) = r/2 m−1 . In particular, the map f → u f is injective, so the set of all points u f has cardinality κ ω .
For each u f as above, let β f be the branch at u f in M that contains p. Evidently A ⊆ β f ; since β f ∪ {u f } is closed and path-connected, it must contain E Ap . We choose a point v f ∈ M in a different branch at u f from β f such that d(v f , u f ) = r/2. Note that u f is the closest point to v f in E Ap . By Lemma 8.4 the type of v f over A is determined by u f and d(v f , u f ). Further, by Lemma 8.7(3), for distinct f , g we have: Therefore, the metric density character of S 1 (A) is at least κ ω . Since A has cardinality κ and κ ω > κ, this shows that the theory rbRT r is not κ-stable. 9 The independence relation for rbRT r In this section we characterize the model theoretic independence relation of rbRT r and show that in models of rbRT r , types have canonical bases that are easily-described sets of ordinary (not imaginary) elements.
Let κ be a cardinal so that κ = κ ω and κ > 2 ω . In this section let U be a κ-universal domain for rbRT r . (That is, U is κ-saturated and κ-strongly homogeneous; see Ben Yaacov, Berenstein, Henson and Usvyatsov [4,Definition 7.13] and the discussion preceding it.) A subset of U is small if its cardinality is < κ. Let A, B and C be small subsets of U. Say A is * -independent from B over C, denoted A | * C B, if and only if for all a ∈ A we have dist(a, E BCp ) = dist(a, E Cp ).

Lemma
A | * C B if and only if for all a ∈ A the closest point to a in E BCp is the same as the closest point to a in E Cp .
Take an arbitrary a ∈ A. Let e 1 be the unique closest point to a in E BCp and e 2 the unique closest point to a in E Cp . We assumed dist(a, E BCp ) = dist(a, E Cp ), which implies d(a, e 1 ) = d(a, e 2 ). Since e 2 ∈ E Cp ⊆ E BCp , we know e 1 ∈ [a, e 2 ] by Lemma 2.5. Therefore, e 1 = e 2 . Since a was arbitrary, we know this holds for all a ∈ A.
(⇐) Assume for all a ∈ A the closest point to a in E BCp is the closest point to a in E Cp . Then clearly dist(a, E BCp ) = dist(a, E Cp ) for all a ∈ A.

Theorem
The relation | * is the model theoretic independence relation for rbRT r . Moreover, types over arbitrary sets of parameters are stationary.
Proof We will show | * satisfies all the properties of a stable independence relation on a universal domain of a stable theory as given in Ben Yaacov, Berenstein, Henson and Usvyatsov [4,Theorem 14.12]. Then by [4,Theorem 14.14] we know | * is the model theoretic independence relation for the stable theory rbRT r .
This means for all a ∈ A we have that the closest point in E BCp to a is e a ∈ E Cp . Thus, by Lemma 2.4, for any a ∈ A, for any y ∈ E BCp we have [a, y] ∩ E Cp = ∅. It follows that for any x ∈ E Ap , for any y ∈ E BCp there exists a point of E Cp on [x, y]. Let b ∈ B. Then for any x ∈ E Ap there is a point of E p C on [x, b]. It follows that the closest point in E ACp to any b ∈ B is in E Cp .   By quantifier elimination, tp(A/BC) is determined by {tp(a/BC) | a ∈ A} plus the information {d(a 1 , a 2 ) | a 1 , a 2 ∈ A}. These distances {d(a 1 , a 2 ) | a 1 , a 2 ∈ A} are fixed by tp(A/C). Thus, it suffices to show the conclusion in the case when A = {a} and A = {a }. If a or a is in Cp the conclusion is obvious, so assume a, a / ∈ Cp. The type of a (or a ) over BC is determined by two parameters, the unique point in E BCp that is closest to a, and the distance from a to that point. Since a | * C B, it follows that the closest point in E Cp to a is the same as the closest point in E BCp to a, and the same is true for a . Since tp(a/C) =tp(a /C), we know a and a have the same closest point e in E Cp and d(a, e) = d(a , e). Since e is also the closest point in E BCp to a and a , we know that tp(a/BC) =tp(a /BC) by Lemma 8.4.

Canonical Bases
A canonical base of a stationary type is a minimal set of parameters over which that type is definable. However, to avoid a discussion of definable types, we here use an equivalent definition of canonical base, as given in Ben Yaacov, Berenstein, and Henson [3]. As in that paper, we here take advantage of the fact (Lemma 8.9 and part (7) of the proof of Theorem 9.3) that every type over an arbitrary set of parameters is stationary.
For stable theories in general, canonical bases exist as sets of imaginary elements, however, in models of rbRT r , they are sets of ordinary elements. That is, the theory has built-in canonical bases. Indeed, in this setting they are very simple.
For sets A ⊆ B ⊆ U, and q ∈ S n (A) we say q ∈ S n (B) is a non-forking extension of q if b |= q implies b |= q and b | A B. By the definition of independence, the condition b | A B implies that the points e 1 , . . . , e n in E Ap closest to b 1 , . . . , b n respectively must also be the closest points to b 1 , . . . , b n in E Bp . Because rbRT r is stable and all types are stationary, non-forking extensions are unique. Denote the unique nonforking extension of q to the set B by q B . Given a type q over a set A ⊆ U and an automorphism f of U, f (q) denotes the set of L r -conditions over f (A) corresponding to the conditions in q, where each parameter a ∈ A is replaced by its image f (a).

Definition
A canonical base Cb(q/A) for a type q ∈ S n (A) is a subset C ⊆ U such that for every automorphism f ∈ Aut(U), we have: q U = f (q) U if and only if f fixes each member of C.
The following result describes canonical bases in rbRT r . 9.5 Theorem Let b = (b 1 , . . . , b n ) ∈ U n and A ⊆ U a set of parameters. Let q ∈ S n (A) be the type over A of the tuple b. Then a canonical base of q is given by the set {e i | 1 ≤ i ≤ n}, where e i ∈ E Ap is the closest point to b i in E Ap . Note that this set depends only on q.
Proof Let b, A ⊆ U and q ∈ S n (A) be as described in the statement of the theorem. Let C = {e i | 1 ≤ i ≤ n} where e i ∈ E Ap is the closest point to b i in E Ap . First, assume f is an automorphism of U fixing C pointwise. Let c = (c 1 , . . . , c n ) be a realization of q U (in some extension of U). Then c |= q and c | A U. To show f (q) U =q U it suffices to show that c |= f (q) and c | f (A) U, because then q U is the S Carlisle and C W Henson unique non-forking extension of f (q) to U. By Lemma 8.4, an n-type over a set A is determined by the values it assigns to the formulas d(x i , x j ) and d(x i , a) for a ∈ Ap.
Note that in f (q), the parameter-free L r -conditions are the same as in the type q. So, for example, d(x i , x j ) must have the same value in f (q) as in q. Thus, to show that c |= f (q) we just need to show that d(c i , a) = d(c i , f (a)) for all a ∈ Ap and i ∈ {1, . . . , n}.
We know c |= q. Thus Lemma 8.4 implies that e i must be the closest point to c i in E Ap . Also, c | A U implies that e i is also the closest point in U to c i . Since f (E Ap ) ⊆ U we know the closest point in f (E Ap ) to c i is e i = f (e i ). Therefore by Lemmas 2.4 and 2.5, we know d(c i , a) = d(c i , e i ) + d(e i , a) and d(c i , f (a)) = d(c i , e i ) + d(e i , f (a)) for any a ∈ Ap. Thus, establishing that c |= f (q). For the other direction, assume f is an automorphism of U that does not fix all of the elements of C. Without loss of generality, assume f (e 1 ) = e 1 . Let (c 1 , . . . , c n ) |= q U . Then the closest point in U to c 1 is e 1 , which is also the closest point to c 1 in E Ap . Then, since f (e 1 ) ∈ U, the point e 1 must be on the geodesic segment joining f (e 1 ) and c 1 , so d(f (e 1 ), c 1 ) = d(f (e 1 ), e 1 ) + d(e 1 , c 1 ). Thus, d(f (e 1 ), e 1 ) = d(f (e 1 ), c 1 ) − d(e 1 , c 1 ).
Since d(f (e 1 ), e 1 ) = 0, then d(f (e 1 ), c 1 ) = d(e 1 , c 1 ). But, d(e 1 , c 1 ) is the value of the formula d(e 1 , x 1 ) in q U , and by the definition of f (q), the value of d(f (e 1 ), x 1 ) in f (q) must equal the value of d(e 1 , x 1 ) in q. So, the L-condition |d(f (e 1 ), x 1 )−d(e 1 , c 1 )| = 0 is in the type f (q), and therefore in the type f (q) U . Thus, the tuple c = (c 1 , . . . , c n ) cannot be a realization of f (q) U , and therefore q U = f (q) U .

Models of rbRT r : Examples
In this section we discuss examples of models of rbRT r from the literature. Our first examples come from the explicitly described universal R-trees that are treated in Dyubina and Polterovich [13]. We show that they give exactly the (fully) saturated models of rbRT r . Our second examples come from asymptotic cones of hyperbolic finitely generated groups. They give exactly the unique saturated model of rbRT r of density 2 ω .
We begin with a lemma about the density of a κ-saturated model. (1) If there exists a ∈ M with degree κ, then the density character of M is at least κ.
(2) If M is κ-saturated, then the density character of M is at least κ ω .
Proof (1) If d(p, a) = r, then there is a single branch at a, namely the branch containing p. So, we must have d(p, a) < r. Using Lemma 7.7 and taking points on different branches at a each with distance r from p, we find a collection of κ-many points such that the distance between any two of them is 2(r − d(p, a)). Thus, the density character of M must be at least κ.
(2) By Theorem 8.5, at each point in the underlying R-tree of M of M there are at least κ-many branches. The tree construction from Theorem 8.10 then yields at least κ ω -many distinct points with pairwise distances at least r.

Universal R-trees
Next, we review the description of the (isometrically) universal R-trees from Dyubina and Polterovich [13] and relate them to saturated models of rbRT r .

Definition
Let µ be a cardinal. An R-tree M is called µ-universal if, for any R-tree N with ≤ µ branches at every point, there is an isometric embedding of N into M . (1) There exists τ f ≤ ρ f so that f = 0 for all t ∈ (−∞, τ f ).
(2) The function f is piecewise constant from the right. That is, for any t ∈ (−∞, ρ f ) there exists δ > 0 so that f is constant on [t, t + δ].
R-trees M 1 and M 2 with µ-many branches every point, select a base point in each. Then for each r > 0 the closed r-balls in M 1 and M 2 (centered at their respective base points) are saturated models of rbRT r . Hence those r-balls are isomorphic by the fact that saturated models of a complete theory with the same density are isomorphic. A back-and-forth argument can be used to build an isomorphism from M to N , where each time we extend the partial isomorphism to a new point we take its distance from the base point into account and work in closed r-balls for large enough r.

Asymptotic Cones
A finitely generated group is hyperbolic if its Cayley graph is a δ -hyperbolic metric space for some δ > 0. A non-elementary hyperbolic group is one that has no cyclic subgroup of finite index.

Definition
Let (M, d, p) be a metric space. Let U be a non-principal ultrafilter on N and let (ν m ) m∈N be a sequence of positive integers such that lim m→∞ ν m = ∞. The asymptotic cone of (M, d, p) with respect to (ν m ) m∈N and U is the ultraproduct of pointed metric spaces U (M, d/ν m , p). Denote this asymptotic cone by Con U,(νm) (M, d, p). Elements of Con U,(νm) (M, d, p) are denoted [a n ] where a n ∈ M for each n.
There are versions of this definition that allow, for example, a different choice of base point in each factor. Keeping the same base point is sufficient for our discussion.

Example
An asymptotic cone Con U,(νm) (G) of a finitely generated group is defined to be the asymptotic cone of its Cayley graph with base point e and some designated word metric on G. It is a fact that any asymptotic cone of a hyperbolic group is an R-tree and is homogeneous (see van den Dries and Wilkie [9] or Drutu [10]). In fact, in the case of a non-elementary hyperbolic group, all asymptotic cones are homogeneous with 2 ω branches at every point (see [10,Proposition 3.A.7]) and are thus are isometric to A 2 ω from Example 10.3. A proof of this fact is given below (Lemma 10.7).
10.6 Fact Say B and C are both finite generating sets for the hyperbolic group G and U is a non-principal ultrafilter on N. The word metrics d B and d C are Lipschitz equivalent (and the corresponding Cayley graphs are quasi-isometric). It follows that the asymptotic cones Con U,(νm) (G, d B , e) and Con U,(νm) (G, d C , e) are homeomorphic.

Corollary
Let G be a non-elementary hyperbolic group. Let M be the model of rbRT r with underlying space equal to the closed r-ball of Con U,(νm) (G, d C , e). Then M is the unique saturated model of rbRT r of density 2 ω .
Proof By the preceding lemma and Lemma 10.1, we know M has density 2 ω and M is 2 ω -saturated by Lemma 8.5.

Models of rbRT r : Constructions and non-categoricity
In this section we show that rbRT r has the maximum number of models of density character κ for every infinite cardinal κ. Indeed, for each κ we construct a family of 2 κmany such models such that no two members of the family are homeomorphic. (Two models of rbRT r are homeomorphic if their underlying R-trees are homeomorphic by a map that takes base point to base point. Note that non-homeomorphic models of rbRT r are necessarily non-isomorphic.) First we treat separable models, and the amalgamation techniques used in that case also allow us to characterize the principal types of rbRT r and to show that this theory has no atomic model. Then we use simple amalgamation constructions to handle nonseparable models.
11.1 Lemma Let S be a non-empty set of integers, each of which is ≥ 3. There exists a separable richly branching R-tree M such that (1) for each k ∈ S the set {x ∈ M | x has degree k} is dense in M , and (2) given a branch point x ∈ M the degree of x is an element of S.
Proof Let (k j | j ∈ N) be a sequence such that every element of S appears infinitely many times in the sequence, and every term of the sequence is an element of S. We construct an increasing sequence N 0 ⊆ N 1 ⊆ · · · ⊆ N j . . . of separable R-trees as follows.
Let N 0 be the R-tree R with base point 0. Let A 0 be a countable, dense subset of N 0 . Use Lemma 6.1 to add k 0 − 2 distinct rays (copies of R ≥0 ) at each point in A 0 , bringing the number of branches of infinite length at each point in A 0 up to k 0 . Call the resulting R-tree N 1 . Note that N 0 ⊆ N 1 . The R-tree N 1 is separable, since it is a countable union of separable spaces. Note also that all the points in N 1 \ A 0 only have 2 branches, and it is straightforward to show N 1 \ A 0 is uncountable and dense in N 1 .
Once N j has been constructed, to construct N j+1 let A j ⊂ N j \ (∪ j−1 i=0 A j ) be a countable, dense subset of N j . This is possible since N j \ (∪ j−1 i=0 A j ) is dense in N j . Use Lemma 6.1 to add k j − 2 rays at each point in A j , bringing the number of branches of infinite length at each point in A j up to k j . The resulting R-tree is N j+1 . Note that N j+1 is separable, since it is a countable union of separable spaces. Note also that all the points in N j+1 \ ∪ j j=0 A j still only have 2 branches, and that this set is uncountable and dense in N j+1 . Lastly, it is clear that given x ∈ N j+1 the number of branches at x must be either 2 (in which case x is not a "branch point") or one of {k 0 , . . . , k j }. This is because at the jth step, the only points at which we add rays are those in A j , and then in subsequent steps we do not add rays at any of those points.
Let M = ∪ j∈N N j be the union of this countable chain of separable R-trees. Then M is a separable R-tree (see Chiswell [8, Lemma 2.1.14].) Since for each N j the number of branches at each branch point is an element of S, this will also be true in M . Let k ∈ S. Let J(k) = {j ∈ N | k j = k}. By how we chose the sequence (k j ) the set J(k) is infinite. The set of points in M which have exactly k branches is ∪ j∈J(k) A j . We will show this set is dense in M . Let x ∈ M . Let j x ∈ N be the smallest integer such that x ∈ N jx . Let j * ∈ J(k) be such that j * > j x . We know that A j * is dense in N j * , and that x ∈ N jx ⊆ N j * . Therefore, there are points in A j * ⊆ ∪ j∈J(k) A j arbitrarily close to x. Our choice of x ∈ M was arbitrary, therefore ∪ j∈J(k) A j is dense in M . Because we chose a non-empty S with members all ≥ 3 the set of branch points with at least 3 branches of infinite length is dense in M . Therefore, M is a richly branching R-tree.

Remark
In the preceding proof, we did not use the fact that we are considering homeomorphisms of pointed topological spaces. The R-trees constructed in Lemma 11.1 are in fact non-homeomorphic, even when we are not required to preserve the base point.
Proof Any homeomorphism g between models M and N of rbRT r is a homeomorphism on the underlying R-trees which must preserve branching. In particular, given n ∈ N ≥3 , if there is a point with degree n in M , then there must be a point with degree n in N . Choose two different subsets S and S of N ≥3 , and construct a richly branching tree for each as in Lemma 11.1. Let M and M be the models of rbRT r based on the completions of their closed r-balls, respectively. By Lemma 2.18, taking the completion only adds points of degree 1. It follows that M and M cannot be homeomorphic. Since there are 2 ω -many different such sets S, there are 2 ω -many different non-homeomorphic, separable models of rbRT r .
Recall that given a continuous theory T , a type q ∈ S n (T) is principal if for every model M of T , the set q(M) of realizations of q in M is definable over the empty set. As in classical first order logic, given a complete theory in a countable signature, there is a Engeler-Ryll-Nardzewski-Svenonius theorem stating the equivalence between ωcategoricity and the fact that every type is principal. Theorem 11.3 obviously implies that rbRT r is not ω -categorical, and thus not every type of rbRT r is principal. Our next result gives a characterization of the principal types in S n (rbRT r ). In particular, a principal type is the type of a tuple of points that all lie along a single piecewise segment with p as an endpoint. Thus, there are very few of them. As a consequence, we conclude that rbRT r does not have a prime model (equivalently, does not have an atomic model, one in which only principal types are realized).
For a clear and comprehensive treatment of separable models in continuous model theory, we refer the reader to Section 1 in Ben Yaacov and Usvyatsov [5]. Note that where we and Ben Yaacov, Berenstein, Henson and Usvyatsov [4] use the word principal, the authors of [5] use isolated, which is now the standard terminology. In ([5, Theorem 1.11]) they prove an omitting types theorem, and as a corollary ([5, Corollary 1.13]) show that nonprincipal types can be omitted. Further, it follows from [5, Definition 1.7] and properties of definable sets in continuous model theory, that every principal type is realized in every model, and this is implicit in the discussion following that definition.

Theorem
Let q ∈ S n (rbRT r ). The following are equivalent: (1) The type q is principal.
We finish this section by showing that when κ is uncountable, then the number of different models of rbRT r having density character equal to κ is also the maximum possible, namely 2 κ . As in the case κ = ω , which was treated in the first part of this section, we produce large sets of models that are not only non-isomorphic, but in fact have underlying R-trees which are non-homeomorphic (as pointed topological spaces).
We will carry out the construction by induction on κ, and we begin with a useful lemma.
11.6 Lemma Let κ be an uncountable cardinal. The following conditions are equivalent: (1) The number of non-homeomorphic models of rbRT r of density character ≤ κ is at least κ. (2) The number of non-homeomorphic models of rbRT r of density character ≤ κ that have just one branch at the base point is at least κ. (3) The number of non-homeomorphic models of rbRT r of density character = κ is 2 κ .
Proof Let κ be an uncountable cardinal. Clearly, (3) implies (1). To show (2) implies (3), assume (2) and let (B α | α < κ) be a list of the pairwise non-homeomorphic models of rbRT r , each with density character ≤ κ and exactly one branch at the base point. Given a subset S ⊆ κ of cardinality = κ, take the collection of B α for α ∈ S and glue them all together at their base points using Theorem 6.4. Call this amalgam M S , and let p be the point in M S at which the B α are all glued together. Make p the base point of the L r -structure M S . Note that the density character of M S is exactly κ, since each branch of its underlying R-tree M S at p has density ≤ κ, and there are exactly κ-many branches at p. Moreover, it is easy to check that M S is a model of rbRT r .
By this construction, if B ranges over the branches of M S at p, the homeomorphism type of B ∪ {p} (with p as distinguished element) ranges bijectively over the homeomorphism types of B α (also with p as distinguished element) as α ranges over S. It follows that the homeomorphism type of M S determines S. Therefore the family many-sorted metric structure in which each sort is one of the (closed) bounded balls of (M, p) (centered at p), and the union of the family of distinguished balls is all of M . Everything done in this paper can easily be carried over to that setting. The disadvantages of doing so are the technical awkwardness of the many-sorted framework and the need for imposing an arbitrary family of radii for the bounded balls into which the full tree is stratified.
It is certainly more mathematically natural to consider pointed R-trees on their own, without imposing a many-sorted stratification. There are suitable logics for doing model theory with such unbounded structures. For example, a version of continuous first order logic for unbounded metric structures is described in Ben Yaacov [1]. Also, a logic based on positive bounded formulas and an associated concept of approximate satisfaction is presented in Section 6 of Dueñez and Iovino [11]. However, for neither of these approaches are the ideas and tools of model theory developed as we need them in this paper.
In each of these three available settings for treating arbitrary pointed R-trees, the arguments in this paper can be used easily to demonstrate: (1) the class of pointed Rtrees is axiomatizable and (2) for each r > 0, the ball {x | d(x, p) ≤ r} is a definable set (over ∅, uniformly in all pointed R-trees). Together with what is developed in Ben Yaacov, Berenstein, Henson and Usvyatsov [4] as well as in Ben Yaacov [1] and in Dueñez and Iovino [11], this quickly yields that the model theoretic frameworks for pointed R-trees provided by these three settings are completely equivalent. In particular, this approach yields a model companion for the theory of pointed R-trees whose models are exactly the richly branching R-trees (ie, the complete pointed Rtrees described in Remark 7.2). Furthermore, this model companion has suitably stated versions of all the properties of rbRT r that are proved in this paper.