On uniform canonical bases in $L_p$ lattices and other metric structures

We discuss the notion of \emph{uniform canonical bases}, both in an abstract manner and specifically for the theory of atomless $L_p$ lattices. We also discuss the connection between the definability of the set of uniform canonical bases and the existence of the theory of beautiful pairs (i.e., with the finite cover property), and prove in particular that the set of uniform canonical bases is definable in algebraically closed metric valued fields.


Introduction
In stability theory, the canonical base of a type is a minimal set of parameters required to define the type, and as such it generalises notions such as the field of definition of a variety in algebraic geometry. Just like the field of definition, the canonical base is usually considered as a set, a point of view which renders it a relatively "coarse" invariant of the type. We may ask, for example, whether a type is definable over a given set (i.e., whether the set contains the canonical base), or whether the canonical base, as a set, is equal to some other set. However, canonical bases, viewed as sets, cannot by any means classify types over a given model of the theory, and they may very well be equal for two distinct types. The finer notion of uniform canonical bases, namely, of canonical bases from which the types can be recovered uniformly, is a fairly natural one, and has appeared implicitly in the literature in several contexts (e.g., from the author's point of view, in a joint work with Berenstein and Henson [BBH], where convergence of uniform canonical bases is discussed).
Definitions regarding uniform canonical bases and a few relatively easy properties are given in Section 1. In particular we observe that every stable theory admits uniform canonical bases in some imaginary sorts, so the space of all types can be naturally identified with a type-definable set. We then turn to discuss the following two questions.
The first question is whether, for one concrete theory or another, there exist mathematically natural uniform canonical bases, namely, uniform canonical bases consisting of objects with a clear mathematical meaning. A positive answer may convey additional insight into the structure of the space of types as a type-definable set. This is in contrast with the canonical parameters for the definitions, whose meaning is essentially tautological and can therefore convey no further insight. The case of Hilbert spaces is quite easy, and merely serves as a particularly accessible example. The case of atomless probability spaces (i.e., probability algebras, or spaces of random variables), treated in Section 2, is not much more difficult. Most of the work is spent in Section 3 where we construct uniform canonical bases for atomless L p lattices in the form of "partial conditional expectations" E t [·|E] and E [s,t] [·|E] (defined there). To a large extent, it is this last observation which prompted the writing of the present paper.
The second question, discussed in Section 4, is whether the (type-definable) set of uniform canonical bases is in fact definable. We characterise this situation in terms of the existence of a theory of beautiful pairs. In Section 5 we use earlier results to show that for the theory of algebraically closed metric valued fields, the theory of beautiful pairs does indeed exist, and therefore that the sets of uniform canonical bases (which we do not describe explicitly) are definable.
For stability in the context of classical logic we refer the reader to Pillay [Pil96]. Stability in the context of continuous logic, as well as the logic itself, are introduced in [BU10].

Uniform canonical bases
In classical logic, stable theories are characterised by the property that for every model M, every type p(x) ∈ Sx(M ) is definable, i.e., that for each formula ϕ(x,ȳ) (say without parameters, this does not really matter) there exists a formula ψ(ȳ) (with parameters in M ) such that for allb ∈ M : In this case we say that ψ is the ϕ-definition of p, and write ψ(ȳ) = d p(x) ϕ(x,ȳ).
Obviously, there may exist more than one way of writing a ϕ-definition for p, but since any two such definitions are over M and equivalent there, they are also equivalent in every elementary extension of M, and thus have inter-definable canonical parameters. In other words, the canonical parameter of the ϕ-definition of p is well-defined, up to inter-definability, denoted Cb ϕ (p). The collection of all such canonical parameters, as ϕ(x,ȳ) varies (and so doesȳ) is called the canonical base of p, denoted Cb(p). This is, up to inter-definability, the (unique) smallest set over which p is definable. The same holds for continuous logic with some minor necessary changes, namely that the ϕ-definition may be a definable predicate (i.e. a uniform limit of formulae, rather than a formula), and it defines p in the sense that We shall hereafter refer to definable predicates as formulae as well, since for our present purposes the distinction serves no useful end. Since canonical parameters are, a priori, imaginary elements, the canonical base is a subset of M eq . For most purposes of abstract model theory this is of no hindrance, but when dealing with a specific theory with a natural "home sort", it is interesting (and common) to ask whether types admit canonical bases which are subsets of the model. This is true, of course, in any stable theory which eliminates imaginaries. In continuous logic, this is trivially true for Hilbert spaces, it is proved for probability algebras in [Ben06], and for L p Banach lattices in [BBH11] (so all of these theories have, in particular, weak elimination of imaginaries, even though not full elimination of imaginaries).
A somewhat less commonly asked question is the following. Can we find, for each formula ϕ(x,ȳ), a formula dϕ(ȳ, Z), where Z is some infinite tuple of variables of which only finitely (or countably) many actually appear in dϕ, such that for every model M, and every type p(x) ∈ Sx(M ), The scarcity of references to this question is actually hardly surprising, since, first, the question as stated makes no sense, and, second, the answer is positive for every stable theory. Indeed, if we consider Cb(p) to be merely a set which is only known up to inter-definability, as is the common practice, then the expression dϕ ȳ, Cb(p) is meaningless. We remedy this in the following manner: Definition 1.1. Let T be a stable theory. A uniform definition of types in the sort ofx consists of a family of formulae dϕ(ȳ, Z) ϕ(x,ȳ)∈L , where Z is a possibly infinite tuple, such that for each type p(x) over a model M T there exists a tuple A ⊆ M eq in the sort of Z such that for each ϕ(x,ȳ): If, in addition, this determines the tuple A uniquely for each p then we write A = Cb(p) and say that the map p → Cb(p) is a uniform canonical base map (in the sort ofx), or that the canonical bases Cb(p) are uniform (in p(x)).
To complement the definition, a (non uniform) canonical base map is any map Cb which associates to a type p over a model some tuple Cb(p) which enumerates a canonical base for p.
First of all, we observe that every uniform canonical base map is in particular a canonical base map. Second, any uniform definition of types gives rise naturally to a uniform canonical base map. Indeed, for each ϕ we let w ϕ be a variable in the sort of canonical parameters for dϕ(ȳ, Z), and let dϕ ′ (ȳ, w ϕ ) be the corresponding formula. For a type p, let A be a parameter for the original definition, and for each ϕ let b ϕ be the canonical parameter of dϕ(ȳ, A), so dϕ(ȳ, A) = dϕ ′ (ȳ, b ϕ ). Now let W be the tuple consisting of all such w ϕ , so we may re-write dϕ ′ (ȳ, w ϕ ) as dϕ ′ (ȳ, W ), and let B be the tuple consisting of all such b ϕ . Then d p(x) ϕ(x,ȳ) = dϕ(ȳ, A) = dϕ ′ (ȳ, B) for all ϕ, and in addition this determines B uniquely. Thus Cb(p) = B is a uniform canonical base map.
Lemma 1.2. Every stable theory admits uniform definitions of types and thus uniform canonical base maps (in every sort).
Proof. This is shown for classical logic in, say, [Pil96], and for continuous logic (which encompasses classical logic as a special case) in [BU10].

1.2
Lemma 1.3. The image img Cb of a uniform canonical base map is a type-definable set.
Proof. All we need to say is that the tuple of parameters does indeed define a (finitely, or, in the continuous case, approximately finitely) consistent type, which is indeed a type-definable property.

1.3
Lemma 1.4. Let Cb be a uniform canonical base map in the sortx, and let f be definable function (without parameters) defined on img Cb, into some other possibly infinite sort (this is equivalent to requiring that the graph of f be type-definable). Assume furthermore that f is injective. Then Cb ′ = f •Cb is another uniform canonical base map. Moreover, every uniform canonical base map can be obtained from any other in this manner.
Proof. The main assertion follows from the fact that if f is definable and injective and dϕ(ȳ, Z) is a formula then dϕ ȳ, f −1 (W ) is also definable by a formula on the image of f . For the moreover part, given two uniform canonical base maps Cb and Cb ′ , the graph of the map f : Cb(p) → Cb ′ (p) is type-definable (one canonical base has to give rise to the same definitions as the other, and this is a type-definable condition), so f is definable.

1.4
Thus, in the same way that a canonical base for a type is exactly anything which is inter-definable with another canonical base for that type, a uniform canonical base is exactly anything which is uniformly inter-definable with another uniform canonical base. A consequence of this (and of existence of uniformly canonical bases) is that in results such as the following the choice of uniform canonical bases is of no importance.
Notation 1.5. When M is a model andā a tuple in some elementary extension, we write Cb(ā/M ) for Cb(p) where p = tp(ā/M ).
Lemma 1.6. Letz = f (x,ȳ) be a definable function in T (say without parameters), possibly partial, and let Cb be uniform. Then the map uniformly across all models of T . In case f is definable with parameters in some set A, so is f Cb , uniformly across all models containing A.
Proof. For the first assertion, it is enough to observe that we can define tp f (ā,b)/M by where ψ(x,ȳz) = ϕ f (x,ȳ),z . The case with parameters follows.

1.6
Lemma 1.7. Let Cb be a uniform canonical base map, say on the sort of n-tuples, into some infinite sort, and let Cb(p) i denote its ith coordinate. Then the mapā → Cb(ā/M ) i is uniformly continuous, and uniformly so regardless of M.
Proof. For a uniform canonical base map constructed from a uniform definition as discussed before Lemma 1.2 this follows from the fact that formulae are uniformly continuous. The general case follows using Lemma 1.4 and the fact that definable functions are uniformly continuous.

1.7
Remark 1.8. The notion of a uniform canonical base map can be extended to simple theories, and the same results hold. Of course, canonical bases should then be taken in the sense of Hart, Kim and Pillay [HKP00], and one has to pay the usual price of working with hyper-imaginary sorts.
Now the question we asked earlier becomes Question 1.9. Let T be a stable theory. Find a natural uniform canonical base map for T . In particular, one may want the image to be in the home sort, or in a restricted family of imaginary sorts.
Usually we shall aim for the image to lie in the home sort, plus the sort {T, F } in the case of classical logic, or [0, 1] in the case of continuous logic.
Example 1.10. Let T = IHS, the theory of infinite dimensional Hilbert spaces, or rather, of unit balls thereof (from now on we shall tacitly identify Banach space structures with their unit balls).
The "folklore" canonical base for a type p = tp(v/E) is the orthogonal projection P E (v). Indeed, by quantifier elimination it will be enough to show that p(x) admits a ϕ-definition over P E (v) for every formula of the form ϕ(x, y) = λ i x i + y 2 , for any choice of scalarsλ. We then observe that for all u ∈ E we have The second and third terms are definable from u using P E (v) as parameters, while the first term is simply a constant which does not depend on u.
Since P E (v) alone does not allow us to recover λ i v i 2 , and therefore does not allow us to recover p either, this canonical base is not uniform. By adding the missing information (namely, the inner product on the v i , in the sort [−1, 1]) we obtain a uniform canonical base: This example, where we take a canonical base which is not uniform and make it uniform merely by adding information in a constant sort (namely, {T, F } in classical logic, or [0, 1] in continuous logic) is a special case of the following.
Definition 1.11. Say that a canonical base map is weakly uniform if it can be obtained from a uniform map by composition with a definable function (which need not necessarily be injective, so the resulting canonical base need not suffice to recover the type uniformly -compare with Lemma 1.4).
For example, in the case of Hilbert spaces discussed above, the canonical base map tp(v/E) → P E (v) is weakly uniform.
Proposition 1.12. Let Cb be any uniform canonical base map, and let us write its target sort as Z 0 ×Z 1 , where Z 1 is a power of the constant sort. Let Cb 0 be the restriction to the sort Z 0 . Then Cb 0 is a weakly uniform canonical base map. Conversely, every weakly uniform canonical base map can be obtained in this fashion.
Proof. The main assertion is quite immediate, and it is the converse which we need to prove. Let Cb 0 be a weakly uniform canonical base map on a sortx, with target sort Z 0 . By definition, it is of the form f • Cb ′ , where Cb ′ is a uniform canonical base map with target sort W and f : img Cb ′ → Z 0 is definable. Let Φ be the set of all formulae ϕ(x, W ). For every such formula, the value ϕ ā, Cb ′ (ā/M ) is uniformly definable from Cb ′ (ā/M ), call it g ϕ Cb ′ (ā/M ) , and let g = (g ϕ ) ϕ∈Φ . Then (f, g) : img Cb ′ → Z 0 × Z 1 is definable, and Z 1 is a power of the constant sort. If we show that (f, g) is injective then, by Lemma 1.4, we may conclude that Cb = (f, g) • Cb ′ is the desired uniform canonical base map.
So let us consider a model M and two tuplesā andb in the sortx, lying in some extension N M. Let C = Cb ′ (ā/M ), D = Cb ′ (b/M ), and assume that (f, g)(C) = (f, g)(D). Then g(C) = g(D) means thatāC ≡bD. Since also f (C) = f (D), we haveāf (C) ≡bf (C), i.e.,ā ≡ f (C)b . Finally, by hypothesis, f (C) is a canonical base for both types, whenceā ≡ Mb and therefore C = D. This completes the proof.

1.12
Thus our question can be restated as Question 1.13. Let T be a stable theory. Find a natural weakly uniform canonical base map for T with image in the home sort.
Unfortunately, the canonical bases mentioned above for probability algebras and L p lattices are not even weakly uniform, so we cannot apply Proposition 1.12 and the problem of finding uniform canonical bases requires some new ideas.

Uniform canonical bases in atomless probability spaces
The easier of the two "interesting cases" is that of atomless probability algebras. There is a caveat, though, namely a uniform canonical base exists not in the home sort of events (see Corollary 2.5), but in the (still mathematically natural) imaginary sort of [0, 1]-valued random variables.
Thus, in order to construct uniform canonical bases for AP r in the sort of [0, 1]-valued random variables, it will be enough (and in a sense, better) to show that ARV admits uniform canonical bases in the home sort.
For models M N ARV and X ∈ N let us write E[X|M ] for the conditional expectation Proof. By the definable continuous calculus, the function (X, Y ) → |Xk − Y | 2 is uniformly definable, and by Lemma 1.6 the predicate Xk − y 2 is uniformly definable for y ∈ M from Cb( where the infimum is taken in M. Thus the graph of the function Cb(X/M ) → E[Xk|M ] is typedefinable in M, whence it follows that the function itself is definable, and uniformly so in all models of ARV . For the second assertion, use definable continuous calculus and the fact that forȲ ∈ M m we have

2.1
Theorem 2.2. For n-types over models in ARV , is a uniform canonical base (in the home sort).
Proof. By Lemma 2.1, this tuple is uniformly definable from any other uniform canonical base, so by Lemma 1.4 all that is left to show is that this tuple determines the type. By Lemma 2.1 again, this tuple determines E[XkȲl] for everyȲ ∈ M m andl ∈ N m . By the Stone-Weierstaß Theorem, every continuous function τ : [0, 1] n+m → [0, 1] is uniformly approximated by polynomials, so E[τ (X,Ȳ )] is determined for every such τ andȲ , which, by quantifier elimination, is enough to determine tp(X/M ).

2.2
Corollary 2.3. For n-types over models in AP r, is a uniform canonical base (in the sort of [0, 1]-valued random variables), where P[·|A ] denotes conditional probability.

2.3
Let us now show that this cannot be improved.
Proof. Assume there were one, say (f, g) : For i < κ, the event f i (X r ) must be definable from X r , namely from A, and therefore must belong to the discrete set {0, 1, A, ¬A}.
Since the map f i , being definable, must be continuous, we conclude that is not injective after all.

2.4
Corollary 2.5. The theory AP r does not admit a weakly uniform canonical base in its home sort (of events).
Proof. Let A AP r, say the probability algebra of Ω, and let B be the probability algebra of Ω × [0, 1]. Then B AP r as well, and identifying A ∈ A with A × [0, 1], we obtain an embedding A ⊆ B which is elementary by quantifier elimination of AP r. More generally X ∈ L 1 (A , [0, 1]), let B X = {(ω, r) : r ≤ X(ω)} ∈ B (which is well defined, up to null measure). Thus, with Cb a uniform canonical base map as in

Uniform canonical bases in atomless L p lattices
Recall that LpL denotes the theory of L p lattices for some fixed p ∈ [1, ∞), and that ALpL denotes the theory of atomless ones: their models are exactly those abstract Banach lattices which are isomorphic to a Banach lattice of the form L p (Ω), where Ω is a measure space, atomless in the case of ALpL. We may write the measure space more explicitly as (Ω, Σ, µ), where Ω is a set of points, Σ a σ-algebra on Ω and µ a σ-additive measure on Σ, atomless in the case of ALpL.
Stability, independence and related notions were studied for ALpL by Berenstein, Henson and the author in [BBH11]. Here we shall consider Banach lattices (as we do all Banach space structures) via their unit balls (from which the entire Banach lattice can be recovered), in the language {0, −, x+y 2 , | · |}, where, for aesthetic reasons, we halve the distance: d(x, y) = x−y 2 (see [Ben09]). The results of [BBH11] were given in a different, yet equivalent, formalism, so they hold fully in ours. The theory ALpL was shown to be ℵ 0 -stable, and canonical bases of 1-types were described as tuples of conditional slices in the home sort (see Section 5 there). Even though they are very natural invariants of a 1-type, conditional slices are not uniform, or even weakly uniform, in the sense of the present paper. Our aim here is to replace the conditional slices with a related object which does provide a uniform canonical base.
We start by quickly recalling the Krivine calculus on Banach lattices (see also [LT79]).
Lemma 3.1. Every lattice term t(x) defines a function t : R n → R which is finitely piecewise affine, continuous, and R + -homogeneous of degree one, by which we mean that t(αx) = αt(x) for all α ≥ 0.
In addition, an arbitrary function ϕ : R n → R is continuous and R + -homogeneous of degree one if and only if it can be approximated by lattice terms uniformly on every compact.
Proof. The first assertion, as well as the if part of the second, are clear. For the only if, let us assume that ϕ is continuous and R + -homogeneous of degree one. Then it is determined by its restriction to the unit sphere. Since every uniform approximation of ϕ on the unit sphere yields a uniform approximation on the entire unit ball, it will be enough to show that lattice terms are dense in C(S n−1 , R). They obviously form a lattice there, so it will be enough to show that for every distinctx,ȳ ∈ S n−1 , every a, b ∈ R and every ε > 0, there is a lattice term t such that |t(x) − a|, |t(ȳ) − b| < ε.
We may assume that x 0 = y 0 . If |x 0 | = |y 0 | then we may assume that x 0 < 0 < y 0 and define t(z) = a y0 z − 0 + b y0 z + 0 . Otherwise, we may assume that |x 0 | < |y 0 |, in which case the opposite inequality must hold for some other coordinate, say |y 1 | < |x 1 |. Then x 1 y 0 − x 0 y 1 = 0 and we may define Either way, t(x) = a and t(ȳ) = b, which is even better than what we needed.

3.1
It is also a fact that if t is a lattice term with bound t on [−1, 1] n then for any Banach lattice E and every sequencef ∈ E n one has |t(f )| ≤ t i |f i |. It follows that if t k → ϕ uniformly on [−1, 1] n then t k (f ) converges in norm to a limit ϕ(f ) which does not depend on the choice of converging lattice terms, and at a rate which only depends on the sequence t k and on i |f i | . It follows that the map ϕ : E n → E is uniformly definable across all (unit balls of) Banach lattices. Moreover, if q ∈ (1, ∞) and q ′ = q q−1 is its conjugate exponent, then the duality pairing f, Proof. The map θ : f → f p q clearly is a bijection between L p (Ω) and L q (Ω). For any definable map or predicate in L q (Ω), call it τ , let τ Lq denote its pre-image in L p (Ω) by θ. Thus, for example, x Lq = x p q , so θ is also a bijection between the respective unit balls. Also, 0 Lq = 0, and similarly for −, and | · | (namely, they commute with θ). For x+y 2 , we have ( x+y 2 ) Lq = x p/q +y p/q 2 q p : as a map R 2 → R, this is continuous and R + -homogeneous of degree one, and therefore uniformly definable in all Banach lattices, and in particular in models of LpL. Finally, d(x, y) Lq = x−y 2 Lq = ( x−y 2 ) Lq p q , and we already know that ( x−y 2 ) Lq is definable. It follows that the predicate f → f p is definable in L p (Ω): and f − = |f |−f 2 , and for the general case we use the bi-definability proved above with q = 1. By the same arguments, (x, y) → x , which is definable from f 1 q g 1 q ′ and therefore from (f, g), concluding the proof.

3.3
Recall from [BBH11] that for any embedding E ⊆ F of L p lattices there are presentations of E and F as L p (Ω 1 , Σ 1 , µ 1 ) ⊆ L p (Ω 2 , Σ 2 , µ 2 ), such that Ω 1 ⊆ Ω 2 , Σ 1 ⊆ Σ 2 and µ 2 extends µ 1 . For g ∈ E, f ∈ F , and presentation as above, we say that Uniqueness of g is clear, and existence is fairly standard (at least under some mild hypotheses on the measure spaces in question). It is shown in [BBH11] that, moreover, E[f |Σ 1 ] does not depend on the choice of presentation (i.e., of measure spaces), and is therefore denoted g = E[f |E], the conditional expectation of f with respect to E, which will be an essential tool for this section. We shall see below (Lemma 3.6) that for p > 1, the Krivine calculus provides us with a more elementary argument showing that the conditional expectation depends only on tp(f /E) (and not on the presentation), and moreover definably so (an even more elementary argument shows independence of the presentation when p = 1, see Remark 3.7).
Let us recall from [BBH11] a few facts regarding types in ALpL. Recall first that f, g in a Banach lattice are called orthogonal, in symbols f ⊥ g, if |f | ∧ |g| = 0, and if E ⊆ F are two Banach lattices then We say that F is atomless over E if for every g ∈ E, g ≥ 0, there is f ∈ F , 0 ≤ f ≤ g, such that f ⊥ g − f and f = g /2, or equivalently, if for any concrete presentation as above, µ 2 is atomless over Σ 1 . If this is the case then, by virtue of the above, together with [BBH11, Fact 2.15], for any f in an extension of E, tp(f ↾ E /E) is realised in F . If, in addition, E ⊥ ⊆ F is non trivial, then any 1-type (or indeed, n-type, but we shall not require this) over E is realised in F .
Let Ω be a measure space, and let A (Ω) be the algebra (or more precisely, the relatively complemented distributive lattice) of finite measure sets modulo null measure sets, which, with some abuse of terminology, we shall call the measure algebra of Ω. Let Ω ′ be the Stone space of A (Ω), an extremally disconnected locally compact space, equipped with the unique regular Borel measure which associates to each compact open set the (finite) measure of the corresponding measurable subset of Ω, which exists by Carathéodory's Theorem. With Ω and Ω ′ as above, A (Ω ′ ) is canonically isomorphic to A (Ω), yielding a canonical identification L p (Ω) ∼ = L p (Ω ′ ), so we may assume that Ω = Ω ′ . Such a space has the particular property that every g ∈ L p (Ω) has a unique continuous representative, so it makes sense to speak of the value g(ω) ∈ [−∞, ∞] at some ω ∈ Ω, which is finite for almost all ω.
Algebraic and lattice operations, and therefore the lattice order, are reflected in these continuous representatives. If A ⊆ L p (Ω) is countable (or separable) then A is bounded in L p (Ω) if and only if the point-wise supremum g(ω) = sup f ∈A f (ω) is in L p , in which case it is equal almost everywhere to the continuous representative of sup A.
Proof. The construction is straightforward. To see that it has the desired properties, it is enough to consider restrictions to finite measure sub-spaces, in which case this is shown in [Ben06, Theorem 1.9 and Proposition 1.14]. For a more elaborate discussion, see [Fre04, Chapter 32].

3.5
This spares us the headache of choosing representatives: for example, given a convex function x → Ψ f (x) ∈ L p (Ω), it is automatically true that x → Ψ f (x)(ω) is convex for each ω.
Let us fix E ALpL and a type q = tp(f /E) for some f in an extension of E. Let us also fix a concrete representation E = L p (Ω), with Ω as in Fact 3.5, and define E ′ = L p (Ω ∪ {+, −}) × [0, 1] , where the interval is taken with the Lebesgue measure, and each of ± has measure one. Let π 0 : Ω × [0, 1] → Ω denote the projection, and identify a function g : Ω → R with g • π 0 : Ω × [0, 1] → R, as well as with its extension by zeroes to (Ω ∪ {±}) × [0, 1], yielding a canonical embedding E ⊆ E ′ , which, by quantifier elimination for ALpL, is elementary. By the previous paragraph, we may assume that f ∈ E ′ . The conditional expectation of f with respect to Ω (namely, to its Borel algebra) is and E[f |Ω] ≤ f by Jensen's inequality and convexity of x → x p (for f ≥ 0 the integral is finite almost everywhere, by Fubini's Thoerem and Jensen's inequality, so it is defined almost everywhere for all f ).
Lemma 3.6. Assume that p > 1, and let E ALpL, q ∈ S 1 (E), and f q in E ′ as above. Then the conditional expectation E[f |Ω] defined above depends only on q, that is to say that for any presentation Given f in some extension of E, let f 0 = E |f | E ∈ E, and consider the function It is convex, and therefore admits one-sided derivatives and similarly The function Ψ f is determined by tp(f /E), and by Lemma 3.6, for p > 1 it is even uniformly definable from the canonical base. Conversely, Convention 3.8. Given f in an extension of E and f 0 = E |f | E as above, one can always choose a concrete representation E = L p (Ω) such that f 0 = 1 A is an indicator function. We may moreover assume that Ω is as in Fact 3.5, in which case A is a compact open set. We fix such a presentation for the rest of the section. We may still assume that f ∈ E ′ = L p (Ω ∪ {+, −}) × [0, 1] , as in the discussion preceding Lemma 3.6. Lemma 3.9. Under Convention 3.8, the conditional distribution of f ↾ E with respect to Ω is determined by In particular, the triplet (Ψ f , f ± ), determines tp(f /E).
Proof. Indeed, for ω ∈ A we have The second assertion now follows from Fact 3.4.

3.9
A useful tool in the study of convex functions is the Legendre transform, which allows to pass between the spaces of points and of slopes. For a function ϕ : The function ϕ * is always convex and continuous on C ϕ * (namely at the boundary, since, being convex, it is automatically continuous in the interior). If ϕ * is not identically ∞, which is always the case when ϕ is convex, we can define the double Legendre transform ϕ * * , which is the greatest function below ϕ which is convex and continuous on C ϕ , . If ϕ is convex and continuous on C ϕ then ϕ = ϕ * * . In this case, we have for every x ∈ C ϕ and t ∈ C ϕ * : (At the boundary of the domain, the derivatives may be ±∞, and are always finite in the interior.) This can be generalised to functions on spaces of higher dimension, with tx replaced with a duality pairing, see for example in Rockafellar [Roc70].
Working with a presentation E = L p (Ω) as per Convention 3.8, we can deduce similar properties for the lattice-valued Ψ f .

3.10
Remark 3.11. If one is bothered with the presence of f 0 in the definition, one can also prove that which looks formally closer to the (double) scalar Legendre transform. By the reasoning of Lemma 3.10, one can also prove a version of (1), namely This was indeed the path followed in an earlier version of this article, but the present seems more direct.
For 0 < t < 1, let us define f t = D − t Ψ * , which determines an increasing sequence (f t ) ⊆ E. Following Convention 3.8, we may then define (measurably)f : Proof. Let us show that the conditional distribution off ↾ E =f · 1 Ω with respect to the Borel algebra of Ω, call it Σ, is the same as that of f ↾ E . Indeed, let f 0 = 1 A . Thenf 1 Ω A = 0 = f 1 Ω A , while for (almost all) ω ∈ A we have by Lemma 3.9 and (1): It follows that f ↾ E p = f ↾ E p < ∞, sof ∈ E ′ , and as in Lemma 3.9 we conclude that the types are the same. It follows that whence the stated inequality.

3.12
A comparison with [BBH11, Section 5] yields that f t agrees with the conditional slice S 1−t (f /E), as defined there, for all t at which Ψ * f is differentiable (namely, at which , and in particular for almost all t. The realisation constructed above is called there an "increasing realisation", and is shown to be unique when f = f ↾ E . It follows that each 1-type over E has a unique realisation in f ∈ E ′ such that f (ω, t) is increasing in t on Ω × [0, 1], is a non negative constant on {+} × [0, 1], and is a non positive constant on {−} × [0, 1]. In other words, the map Ψ * f (together with f ± ) not only determines tp(f /E), but also provides the means for a fairly direct construction of a canonical realisation of the type.
The continuity of Lemma 3.13. Assume that p > 1.
Proof. For t = 0, 1 this is already known by Lemma 3.6. Since Cb(f /E) → Cb(|f |/E) is also definable, f 0 = E |f | E is uniformly definable from the canonical base. We may therefore assume that 0 < t < 1, and use f 0 as a parameter. Similarly, for each x the map First of all, let us fix N > 0, and let Then the map Cb(f /E) → g N,n is definable (for each n), and 0 ≤ h N − g N,n ≤ 2N f 0 /n, so g N,n → h N at a rate which depends on f and on N alone. It follows that Cb(f /E) → h N is definable.
The measure of {ω : |f t (ω)| > N } vanishes as N → ∞, and at a rate which depends only on f t , which we already bounded in terms of t and f . We conclude that h N → E t [f |E] at a rate which depends only on f and t, which is enough.
Proof. By Proposition 1.12 it is enough to prove the first assertion. We have already seen that On the other hand, by Lemma 3.10 the tuple f + , f − , E t [f |E] t∈D determines Ψ f and therefore, by Lemma 3.9, it determines tp(f /E).

3.14
We have already observed that Moreover, for p > 1 (fixed) the rate of convergence depends uniformly on f . Indeed, otherwise Lemma 3.13 together with a compactness argument would yield a type (or a canonical base of a type, which is the same thing) for which convergence fails altogether. On the other hand, for p = 1, consider for some ε the case where µ(Ω) = 1 and f ε (x, t) = −ε −1 1 Ω×[0,ε] . Then f ε = 1 and E ε [f ε |E] = −1 Ω , also of norm one, so the rate of convergence is not uniform. Thus Lemma 3.13, and therefore Lemma 3.6, fail for p = 1. This is essentially the only obstacle, and by keeping away from the endpoints of [0, 1] we do manage to get an analogue of Theorem 3.14 for p = 1. For 0 ≤ t < s ≤ 1 let us define Lemma 3.15. Let p ∈ [1, ∞). Then for every 0 < s < t < 1, Proof. For p > 1 this is already known, so we only need to deal with the case of p = 1. For each q > 1 we may apply the bidefinability of AL1L and ALqL, and calculate as calculated in the L q lattice defined in the L 1 lattice). It will be enough to show that as q → 1, The space of all increasing functions [t, s] → [− 1 t , 1 1−s ] is compact in the topology of convergence in measure, which means that the convergence above is uniform in f , that is to say that for any desired ε > 0 there exists q 0 = q 0 (t, s, ε) > 1 such that for all 1 < q < q 0 : Integrating we obtain

3.16
We have thus produced (weakly) uniform canonical bases in the home sort for 1-types in ALpL. For n-types, we use the following general fact. Proof. Indeed, this information determines tp(t ·f /E), and in particular tp(t ·f ↾ E /E) for allt ∈ Q n and therefore for allt ∈ R n . Now apply [BBH11, Proposition 3.7].

3.17
Theorem 3.18. Let Cb be a uniform canonical base map for 1-types. Then is a uniform canonical base map for n-types. (We may view tp(f ) as a sequence in [0, 1] via any embedding of S n (ALpL) in [0, 1] ℵ0 .) If Cb is a weakly uniform canonical base map for 1-types then is a weakly uniform canonical base map for n-types.
Proof. For the first assertion, it is enough to show that tp(f /E) is determined by these data. Indeed, Then tp(f ↾ E /E) determines tp(h↾ E /E), and in particular h↾ E , while h is determined by tp(f ), so h↾ E ⊥ is determined as well. Alongside the facts that h↾ E ⊥ is positive and orthogonal to E, this is enough to determine tp(h↾ E ⊥ /E), so tp(h/E) is determined. We may choose any realisation of this type, in a sufficiently saturated extension of E, and without changing tp(f /E), we may assume this realisation is indeed h.
We may further assume that h↾ E = 1 A and h↾ E ⊥ = 1 B in some concrete presentation of the ambient model. Now tp(f ) determines tp(f /h), which, again by [BBH11, Proposition 3.7], can be identified with the joint conditional distribution off with respect to {∅, A ∪ B} (which is essentially the same thing as the distribution off restricted to A ∪ B, with the caveat that A ∪ B has finite measure which is not necessarily one, i.e., is not necessarily a probability space). Similarly, tp(f ↾ E /E) determines tp(f ↾ E ) and thus tp(f ↾ E /h↾ E ), which can be identified with the joint conditional distribution off ↾ E with respect to {∅, A}. Subtracting, we obtain the joint conditional distribution off ↾ E ⊥ with respect to {∅, B}, namely tp(f ↾ E ⊥ /h↾ E ⊥ ), and thus tp(f ↾ E ⊥ ) and finally tp(f ↾ E ⊥ /E,f ↾ E ). Thus tp(f /E) is known and the proof of the first assertion is complete. The second assertion follows. Remark 3.20. At least for p = 1 this cannot be improved, in the sense that the types of everyk ·f need not determine tp(f ). Indeed, let f 1 , f 2 and f 3 be disjoint positive functions of norm one, and let Then tp(kg + ℓh) = tp(kg − ℓh) for all k, ℓ, but tp(g, h) = tp(g, −h).

On uniform canonical bases and beautiful pairs
It is implicitly shown by Poizat [Poi83], based on Shelah's f.c.p. Theorem [She90], that a stable classical theory does not have the finite cover property if and only if the set of uniform canonical bases (for all types in any one given sort) is definable, rather than merely type-definable (here, a definable set in an infinite sort means a set which is closed under coordinate-wise convergence, and such that the projection to each finite sub-sort is definable in the ordinary sense). A similar result should hold for continuous logic, where the finite cover property (and in particular Shelah's f.c.p. Theorem) have not yet been properly studied. Here we concentrate on the relation between the existence of a good first order theory for beautiful pairs and the definability of the sets of uniform canonical bases.
We fix a stable theory T in a language L admitting quantifier elimination as well as a uniform canonical base map Cb. We may write the latter as (Cb n ) n , since it consists of a map for the sort of n-tuples for each n (we shall assume that L is single sorted, otherwise even more complex notation is required). We define L P = L ∪ {P }, where P is a new unary predicate symbol (1-Lipschitz, in the continuous setting). We also define L Cb to consist of L along with, for each n, n-ary function symbols to the target sorts of Cb n . We denote the (possibly infinite) tuple of these new function symbols f Cb (x), where n = |x|. In the continuous setting, uniform continuity moduli for the f Cb are as per Lemma 1.7. We let L P,Cb = L P ∪ L Cb .
By a pair of models of T we mean any elementary extension N M T . We shall identify such a pair with the structures (M, P ), (M, f Cb ) or (M, P, f Cb ), as will be convenient, where P (x) = d(x, N ) and f Cb (x) = Cb(x/N ). The property that the predicate P defines an elementary sub-structure is elementary, so the class of all pairs of models of T is elementary as well, and we shall denote its theory by T P,0 . Similarly, T P,Cb,0 will be the L P,Cb -theory of pairs, which consists in addition of the axioms saying that f Cb (x) = Cb(x/P ).
It is easy to check that all these axioms are indeed expressible by an inductive L P -theory and an inductive L P,Cb -theory, respectively. Clearly, T P,Cb,0 is a definitional expansion of T P,0 , so we may unambiguously refer to a model of T P,Cb,0 as (M, P ). On the other hand, the predicate P is also superfluous in T P,Cb,0 , since it can be recovered in the classical and continuous cases, respectively, as Since T admits quantifier elimination, the formulae on the right hand side can be taken to be quantifierfree. We may therefore express the same properties as above in an inductive L Cb -theory T Cb,0 , for which T P,Cb,0 is merely a quantifier-free definitional expansion. We may therefore work quite interchangeably in one setting or the other, i.e., with or without the predicate P .
Lemma 4.1. The theory T Cb,0 admits amalgamation over arbitrary sets (which generate isomorphic substructures). If T is complete, then T Cb,0 also admits the joint embedding property.
Proof. Let (M i , P ) T Cb,0 for i = 0, 1 and let A be a common sub-structure. Since, for every sentence ϕ, we have ϕ Mi = dϕ ∅, Cb(∅/P ) and Cb(∅/P ) ∈ A, we have M 0 ≡ M 1 even if T is incomplete. Let N be a sufficiently saturated model of the common complete theory. We first choose an embedding θ : A → N . Then, we may choose two extensions, θ i : , and the same holds for the images under θ i . It follows that θA | ⌣θP (A) θ 0 P (M 0 ), θ 1 P (M 1 ), and we may choose a sub-model P (N ) N such that P (N ) ⊇ θ i P (M i ) and θA | ⌣θP (A) P (N ). We may now extend each θ i to all of M i , such that θ i M i | ⌣θA,θ iP (Mi) P (N ). Then in particular θ i M i | ⌣θ iP (Mi) P (N ). Then θ i : (M i , P ) → (N , P ) respects L Cb , and we are done. If T is complete then we can amalgamate models over the (unique) ∅-generated substructure.

4.1
(This argument already appears, in essence, in [BPV03], the only novelty is that we use the language L Cb to ensure that every sub-structure is P -independent, i.e., verifies A | ⌣P (A) P .) It follows that a model companion of T Cb,0 (or of T P,Cb,0 , this is the same thing), if it exists, eliminates quantifiers, i.e., it is a model completion. Even if it does not exist we may still consider it as a Robinson theory in the sense of Hrushovski [Hru97].
Lemma 4.2. Modulo T Cb,0 , the restriction of every quantifier-free L Cb -formula to P is L-definable there.

4.2
Definition 4.3. Following Poizat [Poi83], we say that a pair (M, P ) of models of T is beautiful if P is approximately ℵ 0 -saturated and N is approximately ℵ 0 -saturated over M (namely, the L(M )-structure (N , a) a∈M is approximately ℵ 0 -saturated). We define T b Cb to be the L Cb -theory of all beautiful pairs of models of T .
Theorem 4.4. Let T be a stable theory with quantifier elimination and a uniform canonical base map, as above. Then the following are equivalent.
(i) The image set img Cb n is definable for each n (i.e., its projection to every finite sort is a definable set in that sort).
Cb is κ-saturated for some κ > |T | then M is κ-saturated over P (M ). In particular, every sufficiently saturated model of T b Cb is itself a beautiful pair. (iii) The theory T Cb,0 admits a companion T Cb such that for some κ > |T |, if (M, P ) T Cb is κ-saturated then M is κ-saturated over P (M ). Moreover, such a companion is necessarily the model companion of T Cb,0 . (iv) The theory T Cb,0 admits a model completion T Cb (i.e., its model companion exists and eliminates quantifiers). If T is complete, this is further equivalent to: case we say that the class of beautiful pairs of models of T is weakly elementary, in the sense that any sufficiently saturated model of the theory of this class, T P , also belongs to it. By results of Poizat [Poi83], for a classical theory T this is further equivalent to T not having the finite cover property.
Cb is the model completion of T Cb,0 . Proof. In an ℵ 0 -categorical theory every type-definable set is definable.

4.6
Since the theories discussed in previous sections (IHS, AP r and ALpL) are ℵ 0 -categorical, they satisfy the equivalent conditions of Theorem 4.4 in a somewhat uninteresting fashion. In the next section we consider a more interesting example of a non ℵ 0 -categorical theory.
Just as we remarked in Section 1, these results can be extended to simple theories, where beautiful pairs are replaced with lovely pairs (see [BPV03]). The price to be paid is either to work with hyper-imaginary sorts (which can be done relatively smoothly in continuous logic) or to assume that uniform canonical bases exist in real or imaginary sorts (which is a strong form of elimination of hyper-imaginaries).

The case of ACM V F
A convenient feature of condition (iii) of Theorem 4.4 is that it remains invariant under the addition (or removal) of imaginary sorts. It may therefore serve as a criterion for the definability of the sets of uniform canonical bases even when these do not exist in any of the named sorts. As an example of this, let us consider the theory ACM V F of algebraically closed metric valued fields, as defined in [Bena]. Proof. We recall that a model of ACM V F is not a valued field but rather a projective line KP 1 over one, equipped with a modified distance function d(x, y) = x − y = |x−y| max |x|,1·max |y|,1 when x, y = ∞ and d(x, ∞) = 1 max |x|,1 . Given a polynomial Q(Z,W ,V ) over Z and a tupleē, let Q(X,ē, P ) denote the collection of all roots of instances Q(X,ē,f ) wheref ∈ P (or more exactly, of the homogeneisation thereof, so ∞ can also be obtained a root). Let us define T Cb to consist of T Cb,0 along with the axioms saying that every r ∈ [0, 1], b ∈ P and Q(X,ē,V ) as above there is a such that d(a, b) = d a, Q(X,ē, P ) = r, or at least approximately so. One checks that Q(X,ē, P ) is a definable set, so this is expressible in continuous logic.
In order to check that T Cb is indeed a companion, let us consider an instance of the axioms. Since the map x → x −1 is an isometric bijection of KP 1 , and for every Q there is Q ′ such that x −1 : x ∈ Q(X,ē, P ) = Q ′ (X,ē, P ), we may assume that |b| ≤ 1. We may then add a such that |a − c| = max r, |b − c| for all c ∈ Q(X,ē, P ) {∞}, so in particular |a| = max |b|, r ≤ 1. It follows that d a, Q(X,ē, P ) = d(a, b) = r. Now, let (KP 1 , P ) be an ℵ 1 -saturated model of T Cb , and we claim that the opposite holds, namely, that for all b ∈ P {∞}, countable set ∞ / ∈ A and r ∈ (0, ∞), if B denotes the algebraic closure of P ∪ A then there exists a such that |x − c| = max r, |b − c| for all c ∈ B. We notice that if |b| < r then replacing b with some b ′ ∈ P such that |b ′ | = r, which exists by saturation, does not change the conditions of the problem. We may therefore assume that |b| ≥ r. If |b|, r ≤ 1 then (by saturation of (KP 1 , P )) there exists x such that d(a, B) = d(a, b) = r, and as in the previous paragraph this x is as desired. Otherwise, |b| > 1. Again by saturation, we find a such that for all c ∈ B {∞}, |a − c| = max r ′ , |z − b −1 | with r ′ = r |b| 2 (since |b −1 |, r ′ ≤ 1). We observe that |a| = max |b −1 |, r|b −2 | = |b −1 |, i.e., |ab| = 1. A direct calculation yields that for c ∈ B {∞}, |a −1 − c| = max r c b , |b − c| (the case c = 0 may have to be considered separately). We now consider three cases (keeping in mind that |b| ≥ r): max r c b , |b| = |b| = max r, |c − b|, |c| < |b|, max r, |c − b|, |c| = |b|, max r c b , |c| = |c| = max r, |c − b|, |c| > |b|. Our claim is thus proved. Now let p(x) ∈ S 1 (P A), and let q be any global extension of p to KP 1 . Since KP 1 is ℵ 1 -saturated, there exists b ∈ KP 1 such that r = d(x, b) q(x) = d d(x, y) b, Cb(q) is minimal. Replacing p with q↾ P Ab , we may assume that b ∈ A. By our previous claim, there exists a ∈ KP 1 such that d(a, b) = d(a, B) = r, so this x must realise p.
We have thus shown that for every ℵ 1 -saturated model (KP 1 , P ) of the companion T Cb , KP 1 is ℵ 1saturated over P , so by Theorem 4.4 T Cb is the model completion of T Cb,0 , and every uniform canonical base map has a definable image.

5.1
On the other hand, there are no canonical bases, so in particular no uniform ones, in the home sort of ACM V F . Indeed, we observed in [Bena] that 1-types over models are parametrised by spheres, and it is not difficult to see that if S is a sphere of non zero radius then in the home sort dcl(S) = dcl(∅). In the case of 1-types it is relatively easy to construct an imaginary sort in which uniform canonical bases exist. Indeed, let us consider the set of all pairs (a, r) with a ∈ KP 1 and r ∈ [0, 1], more conveniently written as a r , and let [a r ] denote the closed ball of radius r around a. We define The set of all such quotients is incomplete, and the set of completions consists, in addition to all closed balls, of all spheres over the structure (this construction can be carried out in any bounded ultra-metric structure). In this imaginary sort, 1-types admit a uniform canonical base map. The case of canonical bases for n-types and general elimination of imaginaries for ACM V F are far more complex, compare with [HHM06] as well as with more recent results of Hrushovski and Loeser with respect to uniform canonical bases of generically stable types in ACV F .