Itaï Ben

ON THEORIES OF RANDOM VARIABLES

Keywords: variables, continuous logic, metric structures

Nous étudions des théories d'espaces de variables aléatoires : en un premier temps, nous considérons les variables aléatoires à valeurs dans l'intervalle [0, 1], puis à valeur dans des structures métriques quelconques, généralisant la procédure d'aléatoirisation de structures classiques due à Keisler. Nous démontrons des résultats de préservation et de non-préservation de propriétés modèle-théoriques par cette construction :

(i) L'aléatoirisée d'une structure ou théorie stable est stable.

(ii) L'aléatoirisée d'une structure ou théorie simple instable n'est pas simple. Nous démontrons également que dans la structure aléatoirisée, tout type est un type de Lascar.

We study theories of spaces of random variables: first, we consider random variables with values in the interval [0, 1], then with values in an arbitrary metric structure, generalising Keisler's randomisation of classical structures. We prove preservation and non-preservation results for model theoretic properties under this construction:

(i) The randomisation of a stable structure is stable.

(ii) The randomisation of a simple unstable structure is not simple. We also prove that in the randomised structure, every type is a Lascar type.

Key words and phrases. random

Introduction

Mathematical structures arising in the theory of probabilities are among the most natural examples for metric structures which admit a model theoretic treatment, albeit not in the strict setting of classical first order logic. Examples include the treatment of adapted spaces by Keisler & Fajardo [START_REF] Fajardo | Model theory of stochastic processes[END_REF], in which no logic of any kind appears explicitly (even though many model theoretic notions, such as types, do appear). Another example, which is the main topic of the present paper, is Keisler's randomisation construction [START_REF]Randomizing a model[END_REF], in which one considers spaces of random variables whose values lie in some given structures. The randomisation construction was originally set up in the formalism of classical first order logic, representing the probability space underlying the randomisation by its probability algebra, namely, the Boolean algebra of events up to null measure (defined abstractly, a probability algebra is a measure algebra of total mass one, see Fremlin [START_REF] Fremlin | Measure theory volume 3: Measure algebras, Torres Fremlin[END_REF]). We consider that this formalism was not entirely adequate for the purpose, since the class of probability algebras is not elementary in classical first order logic, a fact which restricts considerably what can be done or proved (for example, the randomised structure interprets an atomless Boolean algebra, and can therefore be neither dependent nor simple). To the best of our knowledge, the first model theoretic treatment of a probabilistic structure in which notions such as stability and model theoretic independence were considered was carried out by the author in [START_REF]Schrödinger's cat[END_REF], for the class of probability algebras, in the formalism of compact abstract theories. While this latter formalism was adequate, in the sense that it did allow one to show that probability algebras are stable and that the model theoretic independence coincides with the probabilistic one, it was quite cumbersome, and soon to become obsolete.

Continuous first order logic is a relatively new formalism, at least in its present form, proposed by Alexander Usvyatsov and the author [START_REF]Continuous first order logic and local stability[END_REF] for model theoretic treatment of (classes of) complete metric structures. For example, we observe there that the class of probability algebras is elementary, its theory admitting a simple set of axioms, and that the theory of atomless probability algebras admits quantifier elimination, thus simplifying considerably many of the technical considerations contained in [START_REF]Schrödinger's cat[END_REF]. Viewing probability algebras as metric structures in this fashion, rather than as classical structures, allowed Keisler and the author [START_REF] Ben | Randomizations of models as metric structures[END_REF] to present the randomisation as a metric structure, and we contend that this metric randomisation is the "correct" one. Arguments to this effect include several preservation results which would be false in the formalism of [START_REF]Randomizing a model[END_REF]. For example, in [START_REF] Ben | Randomizations of models as metric structures[END_REF] we prove that if a structure is stable then so is its randomisation, while preservation of dependence was proved by the author in [START_REF]Continuous and random Vapnik-Chervonenkis classes[END_REF]. Another argument, both aesthetic and practical, is that types in the metric randomisation are very natural objects, namely regular Borel probability measures on the space of types of the original theory, also referred to nowadays as Keisler measures [START_REF] Keisler | Measures and forking[END_REF], and which turn out to be particularly useful for the study of dependent theories, e.g., in [START_REF] Hrushovski | Ya'acov Peterzil, and Anand Pillay, Groups, measures, and the NIP[END_REF].

We still find the current state of knowledge, and existing treatment, of randomisation, wanting on several points. First, since the randomisation of a discrete structure (or theory) necessarily produces a metric one, the question of randomising metric structures arises quite naturally. In fact, it is quite easy to construct the randomisation of a metric structure (or theory) indirectly, by letting its type spaces be the spaces of regular Borel probability measures as mentioned above, a fact which was used in [START_REF]Continuous and random Vapnik-Chervonenkis classes[END_REF] to point out that the preservation of dependence holds for the randomisation of metric structures as well, even though the latter had not yet been formally defined. However, the point of view of theories as type spaces, while a personal favourite of the author (see for example [START_REF] Ben | Positive model theory and compact abstract theories[END_REF]), is far from being universally accepted, creating the need for an "ordinary" construction of the randomisation of a metric structure, with a natural language, axioms, and all. A second point is that the treatment of randomisation in [START_REF] Ben | Randomizations of models as metric structures[END_REF] relies greatly on [START_REF]Randomizing a model[END_REF], many times referring to it for proofs, even though some fundamental aspects of the set-up are different, requiring the reader to continually verify that the arguments do transfer.

The aim of the present paper is to remedy these shortcomings by providing a self-contained treatment of randomisation in the metric setting, and show (or point out) that the preservation results of [START_REF] Ben | Randomizations of models as metric structures[END_REF][START_REF]Continuous and random Vapnik-Chervonenkis classes[END_REF] hold in the metric setting as well. In addition, we turn the preservation of dependence into a dichotomy by showing that if T is not dependent then its randomisation T R cannot even be simple, and in fact has T P 2 . We also improve a corollary of the preservation of stability of [START_REF] Ben | Randomizations of models as metric structures[END_REF], namely that in randomised stable structures types over sets are Lascar types, proving the same for arbitrary randomised structures. As a minor point, we simplify the language (and theory), and rather than name in L R (the randomisation language) the randomisation ϕ of each L-formula ϕ, we name the function symbols and the randomisations of the relation symbols of L alone.

The paper is organised as follows. In Section 1 we consider formal deductions in propositional continuous logic, after Rose, Rosser and Church. These are used in Section 2 to give axioms for the theory of spaces [0, 1]-valued random variables, which play the role played by probability algebras in [START_REF] Ben | Randomizations of models as metric structures[END_REF]. Model theoretic properties of this theory are deduced from those of the theory of probability algebras, with which it is biïnterpretable. In Section 3 we define and study the randomisations of metric structures, namely spaces of random variables whose values lie in metric structures. We give axioms for the theory of these random structures, prove quantifier elimination in the appropriate language, characterise types and so on. We also prove a version of Łoś's Theorem for randomisations, in which the ultra-filter is replaced with an arbitrary integration functional. In Section 4 we prove several preservation and non preservation results. In Section 5 we prove that in random structures, types over sets are Lascar types, so in the stable case they are stationary.

On results of Rose, Rosser and Chang

In the late 1950s Rose and Rosser [START_REF] Rose | Fragments of many-valued statement calculi[END_REF] proved the completeness of a proof system for Łukasiewicz's many-valued propositional logic, subsequently improved and simplified by Chang [START_REF]Proof of an axiom of Łukasiewicz[END_REF][START_REF] Chang | Algebraic analysis of many valued logics[END_REF][START_REF]A new proof of the completeness of the Łukasiewicz axioms[END_REF]. This logic is very close to propositional continuous logic. Syntactically, the notation is quite different, partially stemming from the fact we identify True with 0, rather than with 1. Also, the connective 1 2 does not exist in Łukasiewicz's logic. Semantically, we only allow the standard unit interval [0, 1] as a set of truth values, while some fuzzy logicians allow non-standard extensions thereof (namely, they allow infinitesimal truth values). We should therefore be careful in how we use their results.

In these references, Propositional Łukasiewicz Logic is presented using Polish (prefix) notation, without parentheses. A formula is either an atomic proposition, Cϕψ or N ϕ, where ϕ and ψ are simpler formulae. We shall prefer to use the notation of continuous logic, replacing Cϕψ with ψ -. ϕ and N ϕ with ¬ϕ.

Definition 1.1. Let S 0 = {P i : i ∈ I} be a set distinct symbols, which we view as atomic proposition. Let S be freely generated from S 0 with the formal binary operation -. and unary operation ¬. Then S is a Łukasiewicz logic. Definition 1.2. Let S be a Łukasiewicz logic.

(i) For every map v 0 : S 0 → [0, 1], let v : S → [0, 1] be the unique map extending v 0 such that v(ϕ -. ψ) = v(ϕ) -. v(ψ) and v(¬ϕ) = 1v(ϕ). We call v the truth assignment defined by v 0 , and v(ϕ) is the truth value of ϕ. (ii) If v(ϕ) = v(ψ) for every truth assignment v, we say that ϕ and ψ are equivalent, and write ϕ ≡ ψ. (iii) If v(ϕ) = 0 we say that v is a model of ϕ, in symbols v ϕ. If Σ ⊆ S, then v Σ if v ϕ for all ϕ ∈ Σ. We say that ϕ (or Σ) is satisfiable if it has a model. (iv) Let Σ ⊆ S and ϕ ∈ S. We say that Σ entails ϕ, or that ϕ is a logical consequence of Σ, if every model of Σ is a model of ϕ. This is denoted Σ ϕ. When we wish to make the ambient logic explicit we may write S , ≡ S , and so on.

Notation 1.3.

(i) We shall follow the convention that -. , like -, binds from left to right, and define ψ -. nϕ by induction on n:

ψ -. 0ϕ = ψ, ψ -. (n + 1)ϕ = ψ -. nϕ -. ϕ = (ψ -. nϕ) -. ϕ.
(ii) We use 1 as abbreviation for ¬(ϕ 0 -. ϕ 0 ), where ϕ 0 is any formula.

(iii) We also define

ϕ ∧ ψ = ϕ -. (ϕ -. ψ), ϕ ∨ ψ = ¬(¬ϕ ∧ ¬ψ), observing that v(ϕ ∧ ψ) = min v(ϕ), v(ψ) and v(ϕ ∨ ψ) = max v(ϕ), v(ψ) for all v.
Remark 1.4. Logical implication in Łukasiewicz logic can be infinitary by nature. Indeed, let ϕ n = 1 -. 2(1 -. nP ). Then ϕ n = 0 if and only if 1 -. nP ≥ 1 2 , i.e., if and only if P ≤ 1 2n . Letting Σ = {ϕ n } n∈N we have Σ P even though there is no finite Σ 0 ⊆ Σ such that Σ 0 P .

Let S be a Łukasiewicz logic generated by {P i : i ∈ I}, and ϕ ∈ S. Then the truth assignments to S are in bijection with [0, 1] I , and every formula ϕ ∈ S can be identified with a continuous function φ

: [0, 1] I → [0, 1] by φ(v) = v(ϕ).
Lemma 1.5. Let S be a Łukasiewicz logic, and assume that Σ ⊆ S has no model. Then there are n, m ∈ N and

ϕ i ∈ Σ for i < m such that 1 -. nϕ 0 -. . . . -. nϕ m-1 .
Proof. For every n, m ∈ N and φ ∈ Σ m , let ψ n, φ = 1 -. nϕ 0 -. . . . -. nϕ m-1 , and assume that ψ n, φ for all n and φ. In particular, for all n, m and φ ∈ Σ m there is v such that v(ψ 2n, φ) > 0, whereby v(ϕ i ) < 1 2n and thus v(ψ n, φ) > 1 2 . Call this v n, φ. Note that if n ≤ n ′ and φ ⊆ φ′ then v n ′ , φ′ (ψ n, φ) > 1 2 as well. Since [0, 1] I is compact, we obtain an accumulation point v ∈ [0, 1] I such that v(ψ n, φ) ≥ 1 2 for all n, m ∈ N and φ ∈ Σ m . It follows that v(ϕ) = 0 for all ϕ ∈ Σ.

1.5

The proof of Lemma 1.5 only uses the presence of the connectives -. and ¬ (the latter in order to obtain 1) in the language, and the fact that the evaluation φ : v → v(ϕ) is continuous for all ϕ. Thus, if we allowed additional continuous functions f : [0, 1] n → [0, 1] as connectives in Definition 1.1, e.g., the unary connective 1 2 : x → x 2 , the same proof would hold. Let us now consider formal deductions in Łukasiewicz logic. Recall that by Notation 1.3, ϕ ∧ ψ is abbreviation for ϕ -. (ϕ -. ψ) (which would be Aψϕ in the notation of [START_REF] Rose | Fragments of many-valued statement calculi[END_REF]). Thus, the four axiom schemes which, according to [START_REF] Rose | Fragments of many-valued statement calculi[END_REF][START_REF]Proof of an axiom of Łukasiewicz[END_REF], form a complete deduction system, are:

ϕ -. ψ -. ϕ (A1) (ρ -. ϕ) -. (ρ -. ψ) -. (ψ -. ϕ) (A2) (ϕ ∧ ψ) -. (ψ ∧ ϕ) (A3) (ϕ -. ψ) -. (¬ψ -. ¬ϕ) (A4) While Modus Ponens becomes: ϕ, ψ -. ϕ ψ (MP)
A deduction sequence from a set of premises Σ in this deduction system is a sequence of formulae, each of which is either a premise (i.e., a member of Σ), an axiom (i.e., an instance of A1-4, where ϕ, ψ and ρ can be any formulae), or is deduced by Modus Ponens from two earlier formulae in the sequence. We say that ϕ is deducible from Σ, in symbols Σ ⊢ ϕ (or Σ ⊢ S ϕ if we wish to be explicit) if there exists a deduction sequence from Σ containing ϕ. Soundness of this deduction system (i.e., Σ ⊢ ϕ =⇒ Σ ϕ) is easy to verify. A subset Σ ⊆ S is contradictory if Σ ⊢ ϕ for all ϕ ∈ S. Otherwise it is consistent. The completeness result we referred to can be now stated as: [START_REF] Rose | Fragments of many-valued statement calculi[END_REF][START_REF]A new proof of the completeness of the Łukasiewicz axioms[END_REF]). Let S be a Łukasiewicz logic, and ϕ ∈ S. Then ϕ if and only if ⊢ ϕ.

Fact 1.6 ([
Proposition 1.7. Let S be a Łukasiewicz logic, and let Σ ⊆ S. Then Σ is consistent if and only if it has a model.

Proof. One direction is by soundness. For the other, assume that Σ has no model. Then by Lemma 1.5 there are n and ϕ i ∈ Σ such that letting ψ = 1 -. nϕ 0 -. . . . -. nϕ m-1 we have ψ. By Fact 1.6 we have ⊢ ψ, and by Modus Ponens Σ ⊢ 1. By Fact 1.6 we also have ⊢ ϕ -. 1 for every formula ϕ, so Σ ⊢ ϕ and Σ is contradictory.

1.7

Unfortunately, this is not quite what we need, and we shall require the following modifications:

(i) We wish to allow non-free logics, i.e., logics which are not necessarily freely generated from a set of atomic propositions. In particular, such logics need not be well-founded (i.e., we may have an infinite sequence {ϕ n } n∈N such that each ϕ i+1 is a "proper sub-formula" of ϕ i ). (ii) The set of connectives {¬, -. } is not full in the sense of [START_REF]Continuous first order logic and local stability[END_REF]. We should therefore like to introduce an additional unary connective, denoted 1 2 , which consists of multiplying the truth value by one half.

Definition 1.8. A continuous propositional logic is a non empty structure (S, ¬, 1 2 , -. ), where -. is a binary function symbol and ¬, 1 2 are unary function symbols. A homomorphism of continuous propositional logics is a map which respects ¬, 1 2 and -. . A truth assignment to a continuous propositional logic S is a homomorphism v : S → [0, 1], where [0, 1] is equipped with the natural interpretation of the connectives. Models and logical entailment are defined in the same manner as above.

We say that S is free (over S 0 ) if there exists a subset S 0 ⊆ S such that S if freely generated from S 0 by the connectives {¬, 1 2 , -. }. In that case every map v 0 : S 0 → [0, 1] extends to a unique truth assignment.

The new connective 1 2 requires two more axioms:

1 2 ϕ -. (ϕ -. 1 2 ϕ) (A5) (ϕ -. 1 2 ϕ) -. 1 2 ϕ (A6)
Formal deductions in the sense of continuous propositional logic are defined as earlier, allowing A1-6 as logical axiom schemes.

Lemma 1.9. For every continuous propositional logic S (not necessarily free), ϕ, ψ ∈ S, Σ ⊆ S and n ∈ N:

(i) ⊢ ϕ -. ϕ. (ii) ⊢ (ϕ -. ψ) -. (1 -. n(ψ -. ϕ)). (iii) If Σ, ϕ -. ψ is contradictory then Σ ⊢ ψ -. ϕ.
Proof.

(i) In Łukasiewicz logic we have P -. P , and by Fact 1.6, ⊢ P -. P . By substitution of ϕ for P we get a deduction for ϕ -. ϕ in S.

(ii) Same argument. (iii) If Σ, ϕ -. ψ is contradictory then it is has no model. By the proof of Proposition 1.7 there is n ∈ N such that Σ ⊢ 1 -. n(ϕ -. ψ). Therefore Σ ⊢ ψ -. ϕ.
1.9

Theorem 1.10. Let S be a continuous propositional logic, not necessarily free, and let Σ ⊆ S. Then Σ is consistent if and only if it is satisfiable.

Proof. Let S f be the Łukasiewicz logic freely generated by {P ϕ : ϕ ∈ S}, and let:

Σ f 0 ={P ¬ϕ -. ¬P ϕ , ¬P ϕ -. P ¬ϕ : ϕ ∈ S} ∪ {P ϕ-. ψ -. (P ϕ -. P ψ ), (P ϕ -. P ψ ) -. P ϕ-. ψ : ϕ, ψ ∈ S} ∪ {P 1 2 ϕ -. P ϕ-. 1 2 ϕ , P ϕ-. 1 2 ϕ -. P 1 2 ϕ : ϕ ∈ S} Σ f ={P ϕ : ϕ ∈ Σ} ∪ Σ f 0 . Assume that Σ f has a model v f . Define v : S → [0, 1] by v(ϕ) = v f (P ϕ ). Since v f Σ f 0 ,
v is a truth assignment in the sense of S, and is clearly a model of Σ.

Thus, if Σ has no model, neither does Σ f . By Proposition 1.7 Σ f is contradictory. Thus, for every ψ ∈ S we have Σ f ⊢ P ψ . Take any deduction sequence witnessing this, replacing every atomic proposition P ϕ with ϕ. If a formula was obtained from previous ones using Modus Ponens, the same holds after this translation. Premises from Σ f become translated to one of several cases:

(i) Premises of the form P ϕ for ϕ ∈ Σ are replaced with ϕ ∈ Σ.

(ii) Premises of the first two kinds from Σ f 0 are replaced with something of the form ϕ -. ϕ, which we know is deducible without premises. (iii) Premises of the last kind from Σ f 0 are translated to instances of the axioms schemes A5-6. We conclude that Σ ⊢ ψ for all ψ ∈ S, and Σ is contradictory. The other direction is by easy soundness.

1.10

Let 2 -n be abbreviation for 1 2 • • • 1 2 1 (n times), where 1 is still as per Notation 1.3, so v(2 -n ) = 2 -n for any truth assignment v.

Corollary 1.11. Let S be a continuous propositional logic, not necessarily free, Σ ⊆ S and ϕ ∈ S. Then Σ ϕ if and only if Σ ⊢ ϕ -. 2 -n for all n.

Proof. Right to left is clear, so assume that Σ ϕ. Then Σ ∪ {2 -n -. ϕ} is non-satisfiable, and therefore contradictory by Theorem 1.10. By Lemma 1.9: Σ ⊢ ϕ -. 2 -n .

1.11

Remark 1.12. With some more effort, one can prove that if S is free and Σ is finite, then Σ ϕ if and only if Σ ⊢ ϕ. This can be shown to fail if we drop either additional hypothesis, and in any case will not be required for our present purposes.

These completeness results are extended to the full continuous first order logic in [START_REF] Ben | A proof of completeness for continuous first-order logic[END_REF]. We conclude with a word regarding the semantics of continuous propositional logics.

Definition 1.13. Let S be a continuous propositional logic. Its Stone space is defined to be the set S = Hom(S, [0, 1]), namely the space of truth assignments to S. We equip S with the induced topology as a subset of [0, 1] S (i.e., with the point-wise convergence topology).

For each ϕ ∈ S we define a function φ : S → [0, 1] by φ(v) = v(ϕ).

Proposition 1.14. Let S be a continuous propositional logic, S its Stone space, and let θ S denote the map ϕ → φ.

(i) The space S is compact and Hausdorff.

(ii) θ S ∈ Hom S, C( S, [0, 1]) . In particular, each φ is continuous.

(iii) For ϕ, ψ ∈ S we have θ S (ϕ) = θ S (ψ) if and only if ϕ ≡ ψ.

(iv) The image of θ S is dense in the uniform convergence topology on C( S, [0, 1]).

Moreover, the properties characterise the pair ( S, θ S ) up to a unique homeomorphism.

Proof. That the image is dense is a direct application of a variant of the Stone-Weierstrass theorem proved in [BU10, Proposition 1.4]. The other properties are immediate from the construction. We are left with showing uniqueness. Indeed, assume that X is a compact Hausdorff space and θ : S → C(X, [0, 1]) satisfies all the properties above. Define ζ : X → S by ζ(x)(ϕ) = θ(ϕ)(x). Thus ζ is the unique map satisfying θ S (ϕ)• ζ = θ(ϕ), and we need to show that it is a homeomorphism. Continuity is immediate. The image of θ is dense in uniform convergence and therefore separates points, so ζ is injective. Since X is compact and Hausdorff ζ must be a topological embedding. In order to see that ζ is surjective it will be enough to show that its image is dense. So let U ⊆ S be a non empty open set, which must contain a non empty set of the form {v ∈ S :

f (v) > 0} for some f ∈ C( S, [0, 1]). For n big enough there is v 0 ∈ S such that f (v 0 ) > 2 -n+1 . By density find ϕ 0 ∈ S such that φ0 -f ∞ < 2 -n . and let ϕ = ϕ 0 -2 -n ∈ S. Then {v ∈ S : v(ϕ) > 0} ⊆ U and v 0 (ϕ) = 0. Since ϕ ≡ 0 there is x ∈ X such that ζ(x)(ϕ) = θ(ϕ)(x) = 0, i.

The theory of [0, 1]-valued random variables

From this point and through the end of this paper, we switch to the setting of continuous first order logic. This means that structures, formulae, theory and so on, unless explicitly qualified otherwise, should be understood in the sense of [START_REF]Continuous first order logic and local stability[END_REF] (or [START_REF] Ben Yaacov | Model theory for metric structures, Model theory with Applications to Algebra and Analysis[END_REF]).

Let (Ω, F , µ) be a probability space. In [START_REF]Schrödinger's cat[END_REF] we considered such a space via its probability algebra F , namely the Boolean algebra of events F modulo null measure difference. Equivalently, the probability algebra F can be viewed as the space of {0, 1}-valued random variables (up to equality a.e.). Here we shall consider a very similar object, namely the space of [0, 1]-valued random variables. This space will be denoted L 1 (Ω, F , µ), [0, 1] , or simply L 1 (F , [0, 1]), where we consider that the measure µ is implicitly part of the structure of F . We equip this space with the natural interpretation of the connectives ¬, 1 2 and -. (e.g., (X -. Y )(ω) = X(ω) -. Y (ω)), as well as with the L

1 distance d(X, Y ) = E[|X -Y |],
for which it is a complete metric space. It is thus naturally a structure in the random variable language L RV = {0, ¬, 1 2 , -. }. Throughout, we shall use 1 as an abbreviation for ¬0 and E(x) as an abbreviation for d(x, 0). The intended interpretation of E(x) is the expectation. Notice that by definition, if M is any L RV -structure and a ∈ M then a = 0 ⇐⇒ d(a, 0) = 0 ⇐⇒ E(a) = 0.

2.1. The theories RV and ARV . We shall use the results of Section 1 to give axioms for the theory of [0, 1]-valued random variables equipped with the L 1 metric, in the language L RV given above.

The term algebra T RV of L RV is a free propositional continuous logic (freely generated by the variables of the language together with the symbol 0). Similarly, forgetting everything but the operations ¬, 1 2 and -. , any L RV -structure M is a (ordinarily, non-free) continuous propositional logic. Translating proofs from T RV to M we have ⊢ TRV τ =⇒ ⊢ M τ (ā) for all ā ∈ M.

We define the theory RV to consist of the following axioms. In each axiom we quantify universally on all free variables. Keep in mind also that x ∧ y is abbreviation for x -. (x -. y).

E(x) = E(x -. y) + E(y ∧ x) (RV1) E(1) = 1 (RV2) d(x, y) = E(x -. y) + E(y -. x) (RV3) τ = 0 whenever ⊢ TRV τ (RV4)
ARV is defined by adding the following axiom:

inf y E(y ∧ ¬y) ∨ E(y ∧ x) -E(x)

2.1

Thus, modulo RV1, the axiom scheme RV4 is equivalent to the finite set:

(x -. y) -. x = 0 (RV4.1) ((x -. z) -. (x -. y)) -. (y -. z) = 0 (RV4.2) (x ∧ y) -. (y ∧ x) = 0 (RV4.3) (x -. y) -. (¬y -. ¬x) = 0 (RV4.4) 1 2 x -. (x -. 1 2 x) = 0 (RV4.5) (x -. 1 2 x) -. 1 2 x = 0 (RV4.6)
Furthermore, modulo RV1, RV3 and RV4.1-4, axioms RV4.5-6 are further equivalent to:

1 2 x = x -. 1 2 x (RV5)
Indeed, left to right is by RV3. Axioms RV1 and RV4.1-4 imply that x -. x = 0 (by Fact 1.6), giving right to left.

The following is fairly obvious:

Fact 2.2. Let (Ω, F , µ) be a probability space and let M = L 1 (F , [0, 1]). Then M RV , and if (Ω, F , µ) is atomless then M ARV .

We now aim to prove the converse of Fact 2.2.

Lemma 2.3. Let M RV , a, b ∈ M . Then: (i) d(a, a -. b) = E(a ∧ b) ≤ E(b).
In particular, a -. 0 = a.

(ii) a -. a = 0. In particular, the meaning of 1 here agrees with Notation 1.3(ii).

(iii) a -. 1 2 a = 1 2 a, 1 2 a -. a = 0 and E( 1 2 a) = 1 2 E(a). (iv) Define by induction 2 0 = 1 (i.e., 2 0 = ¬0) and 2 -(n+1) = 1 2 2 -n . Then for all n ∈ N:

E(2 -n ) = 2 -n . (v) a = 0 ⇐⇒ ⊢ M a ⇐⇒ M a. (vi) a = b ⇐⇒ a ≡ M b.
Proof.

(i) From RV4 we have (a -. b) -. a = 0 and using RV3 we obtain d(a, a -. b) = E(a ∧ b). By RV1 E(a ∧ b) ≤ E(b). The rest follows.

(ii) This was already observed earlier, using Fact 1.6. (iii) That 1 2 a = a -. 1 2 a was observed above (RV5). It follows that a ∧ 1 2 a = 1 2 a, so 1 2 a -. a = 0 by RV1 (with x = 1 2 a, y = a). Again by RV1 (now with x = a, y = 1 2 a) we obtain E(a) = 2E 1 2 a . (iv) Immediate from the previous item. (v) Assume that ⊢ M a. Then by RV1 (which implies Modus Ponens) and RV4.1-6 we have a = 0.

Thus a = 0 ⇐⇒ ⊢ M a. The implication ⊢ M a =⇒ M a is by soundness. Finally assume that M a. Then for all n we have ⊢ M a -. 2 -n , whereby a -.

2 -n = 0. Thus E(a) = E(a ∧ 2 -n ) ≤ E(2 -n ) = 2 -n ,

2.3

Let M be the Stone space of M, viewed as a continuous propositional logic, and let θ M : M → C( M, [0, 1]) be as in Proposition 1.14. Recall the notation â = θ M (a). By Lemma 2.3(vi) and Proposition 1.14, θ M is injective.

The space C( M, [0, 1]) is naturally equipped with the supremum metric, denoted fg ∞ . We aim to show now that d M is an L 1 distance, i.e., that for an appropriate measure we have d M (a, b) = â-b 1 , which need not be equal to â-b ∞ . Nonetheless, we can relate the two metrics as follows (we essentially say that L ∞ -convergence of random variables implies L 1 -convergence).

Lemma 2.4. Assume that {a n } n∈N ⊆ M is such that {â n } n∈N ⊆ C( M, [0, 1]
) is a Cauchy sequence in the supremum metric. Then {a n } n∈N converges in M and lim ân = lim a n . Proof. By assumption, for every k < ω there is N k such that for all ânâm ∞ ≤ 2 -k for all n, m < N k . Therefore (â n -. âm ) -. 2 -k = 0, and since θ M is injective:

a n -. a m -. 2 -k = 0. Thus E(a n -. a m ) = E((a n -. a m ) ∧ 2 -k ) ≤ E(2 -k ) = 2 -k . Similarly E(a m -. a n ) ≤ 2 -k , whereby d(a n , a m ) ≤ 2 -k+1
. Since M is a (complete) L-structure, it contains a limit a. Now fix n ≥ N k and let m → ∞. Then a m → a, and therefore a m -. a n -. 2 -k → a -. a n -. 2 -k . Thus a -. a n -. 2 -k = 0, and by a similar argument a n -. a -. 2 -k = 0. We have thus shown that ân → â uniformly as desired.

2.4

Corollary 2.5. The map θ M : M → C( M, [0, 1]) is bijective.

Proof. We already know it is injective, and by Proposition 1.14 its image is dense. By the previous lemma its image is complete, so it is onto.

2.5

We shall identify M with C( M, [0, 1]).

Lemma 2.6. For all a, b ∈ M and r ∈ R + :

(i) If a + b ∈ M (i.e., a + b ∞ ≤ 1) then E(a + b) = E(a) + E(b). (ii) If ra ∈ M (i.e., r a ∞ ≤ 1) then E(ra) = rE(a).
Proof.

(i) Let c = a + b. Then c -. b = a and b -. c = 0, whereby:

E(c) = E(c -. b) + E(b -. (b -. c)) = E(a) + E(b -. 0) = E(a) + E(b).
(ii) For integer r this follows from the previous item, and the rational case follows. If r n → r then r n a → ra in C( M, [0, 1]) and a fortiori in M, so the general case follows by continuity of E.

2.6

Theorem 2.7. Let M RV , M its Stone space and θ M : M → C( M, [0, 1]) as in Proposition 1.14.

(i) As a topological space, M is compact and Hausdorff.

(ii) The map θ M : M → C( M, [0, 1]) is bijective and respects the operations ¬, 1 2 and -. (i.e., it is an isomorphism of continuous propositional logics).

(iii) There exists a regular Borel probability measure µ on M such that the natural map

ρ µ : C( M, [0, 1]) → L 1 (µ, [0, 1]
) is bijective as well, and the composition

ρ µ • θ M : M → L 1 (µ, [0, 1]) is an isomorphism of L RV -structures.
Moreover, these properties characterise ( M, µ, θ M ) up to a unique measure preserving homeomorphism.

Proof. The first two properties are already known. By Lemma 2.6 we can extend E by linearity from C( M, [0, 1]) to C( M, R), yielding a positive linear functional. By the Riesz Representation Theorem [Rud66, Theorem 2.14] there exists a unique regular Borel measure µ on M such that

E(f ) = f dµ. Since E(1) = 1, µ is a probability measure. The map M → L 1 (µ, [0, 1]
) is isometric and in particular injective. Its image is dense (continuous functions are always dense in the L 1 space of a regular Borel measure). Moreover, since M is a complete metric space the image must be all of L 1 (µ, [0, 1]), whence the last item.

The uniqueness of M as a topological space verifying the first two properties follows from Proposition 1.14 and Lemma 2.3.(vi). The Riesz Representation Theorem then yields the uniqueness of µ.

2.7

We may refer to ( M, µ) (viewed as a topological space equipped with a Borel measure) as the Stone space of M or say that M is based on ( M, µ).

Corollary 2.8. Let M be an L RV -structure. Then:

(i) The structure M is a model of RV if and only if it is isomorphic to some L 1 (F , [0, 1]). (ii) A structure of the form L 1 (F , [0, 1]) is a model of ARV if and only if (Ω, F , µ) is an atomless probability space.
Corollary 2.9. Let M RV be based on ( M, µ). Then every Borel function M → [0, 1] is equal almost everywhere to a unique continuous function.

2.2.

Interpreting random variables in events and vice versa. In the previous section we attached to every probability space (Ω, F , µ) the space L 1 (F , [0, 1]) of [0, 1]-valued random variables and axiomatised the class of metric structures arising in this manner. While we cannot quite recover the original space Ω from L 1 (F , [0, 1]) we do consider that L 1 (F , [0, 1]) retains all the pertinent information An alternative approach to coding a probability space in a metric structure goes through its probability algebra, namely the space of {0, 1}-valued random variables. It can be constructed directly as the Boolean algebra quotient F = F /F 0 where F 0 is the ideal of null measure sets. In addition to the Boolean algebra structure, it is equipped with the induced measure function µ : F → [0, 1] and the metric d(a, b) = µ(a△b) (in fact, the measure µ is superfluous and can be recovered as µ(x) = d(x, 0)). The metric is always complete, so a probability algebra is a structure in the language L P r = {0, 1, ∩, ∪, • c , µ}.

Let us define the theory P r to consist of the following axioms, quantified universally:

The theory of Boolean algebras:

(x ∩ y) c = x c ∪ y c , . . . (Bool) µ(1) = 1 (Pr1) µ(x) + µ(y) = µ(x ∪ y) + µ(x ∩ y) (Pr2) d(x, y) = µ(x△y). (Pr3)
The theory AP r (atomless probability algebras) consists of P A 0 along with:

sup x inf y µ(y ∧ x) - µ(x) 2 = 0 (APr)
Fact 2.10. The class of probability algebras is elementary, axiomatised by P r. The class of atomless probability algebras is elementary as well, axiomatised by AP r.

Moreover, the theory AP r eliminates quantifiers (it is the model completion of P r). It is ℵ 0 -categorical (there is a unique complete separable atomless probability algebra), and admits no compact model, whereby it is complete. It is ℵ 0 -stable and its notion of independence coincides with probabilistic independence. All types over sets (in the real sort) are stationary.

Proof. Most of this is shown in [START_REF]Continuous first order logic and local stability[END_REF]Example 4.3]. The fact regarding stability and independence were shown in [START_REF]Schrödinger's cat[END_REF] in the setting of compact abstract theories. The arguments carry nonetheless to models of AP r in continuous logic.

2.10

We wish to show that these two ways of coding a probability space in a metric structure are equivalent. Specifically we shall show that for any probability space (Ω, F , µ), the probability algebra F and the space L 1 (F , [0, 1]) of [0, 1]-valued random variables are (uniformly) interpretable in one another.

Proposition 2.11. Let M be a model of RV , say M = L 1 (F , [0, 1]). Then the L P r -structure F is quantifier-free definable in M in a manner which does not depend on Ω. More precisely:

(i) We may identify an event a ∈ F with its characteristic function 1 a ∈ M . This identifies F with the subset L 1 (F , {0, 1}) ⊆ M consisting of all {0, 1}-valued random variables over (Ω, F , µ). (ii) Under the identification of the previous item, F is a quantifier-free definable subset of M, that is, the predicate d(x, F ) is quantifier-free definable in M. Moreover, the Boolean algebra operations of F are definable by terms in M, and the predicates of F (measure and distance) are quantifier-free definable in M. (See the first section of [START_REF]Definability of groups in ℵ 0 -stable metric structures[END_REF] for facts regarding definable sets in continuous logic.)

Proof. The first item is a standard fact. For the second item, let g ∈ L 1 (F , [0, 1]), and let a = {g ≥ 1 2 } (i.e., a = {ω : g(ω) ≥ 1 2 }). Then:

d(g, F ) = d(g, 1 a ) = E(g ∧ ¬g).
Given a, b ∈ F we have 1 a c = ¬1 a and 1 a b = 1 a -. 1 b , from which the rest of the Boolean algebra structure can be recovered. In addition

d F (a, b) = d M (1 a , 1 b ) and µ(a) = E(1 a ).

2.11

Since F is (uniformly) definable we may quantify over it. Thus, modulo the theory RV , axiom ARV can be written more elegantly as:

inf y∈ F E(y ∧ x) -E(x) 2 = 0. (ARV ′ )
The converse is a little more technical, since the interpretation of L 1 (F , [0, 1]) in the structure F will necessarily be in an imaginary sort. A similar interpretation of the space of [0, ∞]-valued random variables in a hyper imaginary sort has already been discussed in [Ben06, Section 3]. The result we prove here is a little stronger and easier to work with, using the notion of an imaginary sort in a metric structure, introduced in [BU10, Section 5].

Let D = {k/2 n : n ∈ N, 0 < k < 2 n } denote the set of all dyadic fractions in ]0, 1[, D ′ = D ∪ {0, 1}. For r ∈ D ′ , let n(r) be the least n such that 2 n r is an integer (so n(0) = 0, and for r = 0, n = n(r) is unique such that 2 n r is an odd integer). We shall now construct by induction on n(r) a family of L P r -terms (τ r ) r∈D ′ in a sequence of distinct variables X = (x r ) r∈D . We start with τ 0 = 1 and τ 1 = 0. If n(r) = m > 0 then n(r ± 2 -m ) < m and we define:

τ r = x r ∪ τ r-2 -m ∩ τ r+2 -m .
We may write such a term as τ r (X), where it is understood that only a finite subset of X appears in τ r . Let F be a probability algebra. Let (a s ) s∈D ⊆ F be any sequence of events, and let b r = τ r (a s ) s∈D . Then the sequence (b r ) r∈D is necessarily decreasing, and if the original sequence (a s ) s∈D is decreasing then the two sequences coincide.

Let us also define:

ϕ n (y, X) = k<2 n 2 -n µ(y ∩ τ k/2 n ), ϕ = lim n ϕ n .
Since 0 ≤ ϕ nϕ n+1 ≤ 2 -n-1 , the limit exists uniformly and ϕ is an L P r -definable predicate.

Proposition 2.12. Let (Ω, F , µ) be a probability space, M = L 1 (F , [0, 1]). Let Fϕ be the sort of canonical parameters for instances ϕ(y, X) over F . For each random variable f ∈ M , let f r = {f ≤ r} for r ∈ D and let f ∈ Fϕ be the canonical parameter of ϕ(y, f r ) r∈D .

(i) For every event c ∈ F :

ϕ(c, f ) = ϕ(c, f r ) r∈D = c f . (ii)
The map f → f is a bijection between M and Fϕ . (iii) Identifying M with F in this manner, the L RV -structure on M is definable in F in a manner which does not depend on Ω. Moreover, if we compose this interpretation of L 1 (F , [0, 1]) in F with the definition of F in L 1 (F , [0, 1]) discussed in Proposition 2.11 above in either order, there is a definable bijection between the original structure and its interpreted copy in a manner which is uniform in Ω.

Proof. For the first item, the sequence (f r ) r∈D is decreasing so τ

r (f s ) s∈D = f r . It follows that |ϕ n (c, f r ) r∈D -c f | < 2 -n and ϕ(x, f r ) r∈D = c f .
We now show the second item. To see that f → f is injective assume that f = g. By the previous item this means that c f = c g for every c ∈ F , whereby f = g. To see it is surjective let ϕ(x, A) be any instance of ϕ. Define:

b r = τ r (A) ∈ F r ∈ D, f n = k<2 n 2 -n 1 b k/2 n ∈ M n ∈ N.
One readily checks that d(f n , f m ) < 2 -min(n,m) , so the sequence f n converges to a limit g ∈ M with d(f n , g) ≤ 2 -n . For every event c ∈ F we have

ϕ n (c, A) = c f n . It follows that |ϕ n (c, A) -c g| ≤ 2 -n
and therefore ϕ(c, A) = c g. In other words, g is a canonical parameter for ϕ(x, A).

Let us now prove the third item. In order to prove that ( f , g) → f -. g is definable it is enough to show that we can define the predicate ϕ x, f -. g uniformly from f and g. Indeed:

ϕ x, f -. g = x (f -. g) = sup y x∩y f -. x∩y g = sup y ϕ(x ∩ y, f ) -. ϕ(x ∩ y, g) .
Similarly:

x 0 = 0, x ¬f = ¬ x f, x 1 2 f = 1 2 x f.
It follows that all the connectives which one can construct from these primitives are definable, and in particular (x, y) → |x -y|. Thus the distance d(f, g) = ϕ 1, |f -g| is definable.

We leave the moreover part to the reader.

2.12

The intrinsic distance on the imaginary sort Fϕ is by definition:

d ϕ (f, g) = sup b∈ F b (f -g) = max f -. g 1 , g -. f 1 .
The distance d ϕ is easily verified to be uniformly equivalent to the L 1 metric on the space of [0, 1]-valued random variables. This is a special case of the general fact that any two definable distance functions on a sort are uniformly equivalent. At the cost of additional technical complexity we could have arranged to recover L 1 (F , [0, 1]) on an imaginary sort in which the intrinsic distance is already the one coming from L 1 . Indeed, we could have defined a formula ψ(y, z, x r ) r∈D such that ψ(b, c, f r ) r∈D = b f + c b ¬f , obtaining further down the road:

d ψ (f, g) = sup b,c∈ F b (f -g) + c b (g -f ) = f -g 1 .
2.3. Additional properties of RV and ARV . Models of RV admits quantifier-free definable continuous functional calculus.

Lemma 2.13.

If θ : [0, 1] ℓ → [0, 1] is a continuous function, then the function f → θ • ( f )
is uniformly quantifier-free definable in models of RV . By "quantifier-free definable" we mean that for every definable predicate P (ȳ, z), the definable predicate P (ȳ, θ • (x)) is definable with the same quantifier complexity. Specifically, d(y, θ • (x)) is quantifier-free definable.

Proof. We can uniformly approximate θ by a sequence of terms τ n (x) in ¬, 1 2 , -. , in which case P (ȳ, θ • (x)) = lim P (ȳ, τ n (x)) uniformly.

2.13

For example, the predicates E(x p ) or E(|x -y| p ) are definable for every p ∈ [1, ∞[, and thus the L p distance xy p = E(|x -y| p ) 1/p is definable as well, all the definitions being quantifier-free and uniform.

For A ⊆ L 1 (F , [0, 1]), let σ(A) ⊆ F denote the minimal σ-sub-algebra by which every member of A is measurable, i.e., such that A ⊆ L 1 (σ(A), [0, 1]) (For this to be entirely well-defined we may require σ(A) to contain the null measure ideal of F .) Lemma 2.14. Let M be a model of RV , say M = L 1 (F , [0, 1]). Then for every σ-sub-algebra F 1 ⊆ F , the space L 1 (F ′ , [0, 1]) is a sub-structure of M. Conversely, every sub-structure N ⊆ M arises in this manner as L 1 (σ(N ), [0, 1]).

Proof. The first assertion is clear, so we prove the converse. It is also clear that N ⊆ L 1 (σ(N ), [0, 1]).

Let f ∈ N , and define ṁf = f ∔ . . . ∔ f (m times). Then ṁf ∈ N , and as m → ∞ we have ṁf → 1 {f >0} in L 1 , so 1 {f >0} ∈ N . Since N is complete and closed under ¬ and -. , it follows that 1 A ∈ N for every A ∈ σ(N ). Considering finite sums of the form

( 1 2 ) k 1 A0 ∔ • • • ∔ ( 1 2 ) k 1
An-1 we see that every simple function in L 1 (σ(N ), [0, 1]) whose range consists solely of dyadic fractions belongs to N . Using the completeness of N one last time we may conclude that L 1 (σ(N ), [0, 1]) ⊆ N .

2.14

Lemma 2.15. Let M and N be two models of RV , say

M = L 1 (F , [0, 1]), N = L 1 (Ω ′ , [0, 1]).
Then two ℓ-tuples f ∈ M ℓ and ḡ ∈ N ℓ have the same quantifier-free type in L RV if and only if they have the same joint distribution as random variables.

Proof. Assume that f ≡ qf ḡ. By the previous Lemma we have

E(θ • ( f )) = E(θ • (ḡ)) for every continuous function θ : [0, 1] ℓ → [0, 1],
which is enough in order to conclude that f and ḡ have the same joint distribution. Conversely, assume that f and ḡ have the same joint distribution. Then E(τ ( f )) = E(τ (ḡ)) for every term τ (x). It follows that f ≡ qf ḡ.

2.15

Let Fa denote the set of atoms in F , which we may enumerate as {A i : i ∈ I}. Then I is necessarily countable and every f ∈ L 1 (F , [0, 1]) can be written uniquely as f 0 + i∈I α i 1 Ai , where f 0 is over the atomless part and

α i ∈ [0, 1]. Lemma 2.16. The set Fa ∪ {0} is uniformly definable in F . In L 1 (F , [0, 1]), both the sets Fa ∪ {0} (i.e., {1 A : A ∈ Fa } ∪ {0}) and {α1 A : α ∈ [0, 1], A ∈ Fa } are uniformly definable.
Proof. For the first assertion let ϕ(x) be the L P r -formula sup y µ(x ∩ y) ∧ µ(x y) . If A is an atom or zero then clearly ϕ(A) = 0. If A is an event which is not an atom then the nearest atom to A is the biggest atom in A (or any of them if there are several of largest measure, or 0 if A contains no atoms). Let us construct a partition of A into two events A 1 and A 2 by assigning the atoms in A (if any) sequentially to A 1 or to A 2 , whichever has so far the lesser measure, and by splitting the atomless part of A equally between A 1 and A 2 . If B ⊆ A is an atom of greatest measure (or zero if there are none) then |µ(A 1 )µ(A 2 )| ≤ µ(B) and:

ϕ(A) ≥ µ(A 1 ) ∧ µ(A 2 ) ≥ 1 2 µ(A) -1 2 µ(B) = 1 2 µ(A B) = 1 2 d A, Fa ∪ {0} . Thus Fa ∪ {0} is definable.
For the second assertion, Fa ∪{0} is relatively definable in F which is in turn definable in L 1 (F , [0, 1]), so Fa ∪ {0} is definable in L 1 (F , [0, 1]). We may therefore quantify over Fa ∪ {0}, and define:

ψ n (x) = inf A∈ Fa∪{0} k≤2 n d x, k 2 n 1 A .
Then lim ψ n defines the distance to the last set.

2.16

If follows that for each n, the set of events which can be written as the union of at most n atoms is definable, as is the set of all finite sums i<n α1 Ai where each A i is an atom (or zero). These definitions cannot be uniform in n, though. Indeed, an easy ultra-product argument shows that the set of all atomic events (i.e., which are unions of atoms) cannot be definable or even type-definable, and similarly for the set of all random variables whose support is atomic.

The atoms of a probability space always belong to the algebraic closure of the empty set (to the definable closure if no other atom has the same measure). They are therefore rather uninteresting from a model theoretic point of view, and we shall mostly consider atomless probability spaces.

Theorem 2.17.

(i) The theory ARV is complete and ℵ 0 -categorical. (ii) The theory ARV eliminates quantifiers. (iii) The universal part of ARV is RV , and ARV is the model completion of RV .

(iv) If M = L 1 (F , [0, 1]) ARV and A ⊆ M then dcl(A) = acl(A) = L 1 (σ(A), [0, 1]) ⊆ M .
(v) Two tuples f and ḡ have the same type over a set A (all in a model of ARV ) if and only if they have the same joint conditional distribution over σ(A).

(vi) The theory ARV is ℵ 0 -stable, independence coinciding with probabilistic independence, i.e.:

A | ⌣B C ⇐⇒ σ(A) | ⌣σ(B) σ(C).
Moreover, types over any sets in the home sort (i.e., not over imaginary elements) are stationary.

Proof. Categoricity and completeness of ARV follow from the analogous properties for AP r.

Assume that f and ḡ are two ℓ-tuples in models of ARV , f = qf ḡ. By Lemma 2.15 they have the same joint distribution. For every (r, i) ∈ D × ℓ define events a f,i = {f i ≤ r}, b r,i = {g i ≤ r}. The joint distribution implies that (a r,i ) (r,i)∈D×ℓ ≡ qf (b r,i ) (r,i)∈D×ℓ , and since AP r eliminates quantifiers: (a r,i ) (r,i)∈D×ℓ ≡ (b r,i ) (r,i)∈D×ℓ . Under the interpretation of Proposition 2.12 we have f i ∈ dcl (a r,i ) r∈D , g i ∈ dcl (b r,i ) r∈D , so f ≡ ḡ. In other words, the quantifier-free type of a type determines its type, whence quantifier elimination.

The theory RV is universal and all its models embed in models of ARV , whereby RV = ARV ∀ . Since ARV eliminates quantifiers it is the model completion of its universal part.

Let now M = L 1 (F , [0, 1]) ARV , and let A ⊆ M . By Lemma 2.14, A (the sub-structure generated by A in M) is L 1 (σ(A), [0, 1]). Identifying F with its definable copy in M we obtain A = σ(A) = L 1 (σ(A), [0, 1]) and dcl(A) = dcl(σ(A)) ⊇ L 1 (σ(A), [0, 1]). On the other hand, σ(A) is a complete sub-algebra of F AP r and therefore definably and even algebraically closed there. By our biïnterpretability result, σ(A) is relatively algebraically closed in the definable copy of F in M. Therefore, if g ∈ acl(A) = acl(σ(A)) then σ(g) ⊆ σ(A), i.e., g ∈ L 1 (σ(A), [0, 1]).

Let us identify F with its definable copy in M, and let A = σ(A). By the previous item we have tp( f /A) ≡ tp( f /A ). When A = {a 0 , . . . , a m-1 } is finite sub-algebra, it is easy to verify that the joint conditional distribution of f over A is the same as the joint distribution of the (n + m)-tuple f , 1 ā. The result for types over infinite algebras follows.

Stability and the characterisation of independence for ARV follow from the analogous properties for AP r via biïnterpretability.

2.17

Keisler randomisation

In this section we use earlier results to extends H. Jerome Keisler's notion of a randomisation of a classical structure, or of a classical theory, to continuous ones. For the original constructions we refer the reader to [START_REF]Randomizing a model[END_REF][START_REF] Ben | Randomizations of models as metric structures[END_REF]. Throughout, we work with a fixed continuous signature L. For the sake of simplicity we shall assume that L is single-sorted, but everything we do can be carried out in a multi sorted setting.

3.1. Randomisation. We shall want to consider some notion of probability integration of functions on a space Ω, which is going to be additive, although not always σ-additive (i.e., possibly failing the Monotone Convergence Theorem and its consequences). We do this by replacing the usual measure space apparatus with an abstract integration functional. Definition 3.1. A finitely additive probability integration space, or simply an integration space, is a triplet (Ω, A , E) where Ω is any set, A ⊆ [0, 1] Ω is non empty and closed under the connectives ¬, 1 2 and -. , and

E : A → [0, 1] satisfies E(1) = 1 and E(X + Y ) = E(X) + E(Y ) whenever X, Y and X + Y are all in A .
In this case we also say that E is a finitely additive probability integration functional, or simply an integration functional, on A . Fact 3.2. Let (Ω, F , µ) be a probability space. Let A ⊆ [0, 1] Ω consist of all F -measurable functions and let E : A → [0, 1] be integration dµ. Then (Ω, A , E) is an integration space.

Similarly if F is a mere Boolean algebra, µ is additive, and A consists of all simple F -measurable functions.

Lemma 3.3. Let (Ω, A , E) be an integration space. Equip A with the distance d(X, Y

) = E(|X -Y |). Then E(X) = d(X, 0) for all X ∈ A and (A , 0, ¬, 1 2 , -. , d) is a pre-model of RV . Proof. Indeed, d(X, 0) = E(|X|) = E(X)
. Now RV1,2 follows from the hypothesis and the fact that X = (X -. Y ) + (X ∧ Y ). RV3 holds by definition. It follows from the hypothesis that E(0) = 2E(0) = 0, whence RV4.

3.3

In this situation we shall say that (A , E) is a pre-model of RV , or that E renders A a pre-model of RV . If E renders A a pre-model of ARV then we say that (Ω, A , E) is atomless.

Let Ω be an arbitrary set and let M = M Ω = {M ω } ω∈Ω be a family of L-structures. The product M = ω∈Ω M ω consists of all functions a : Ω → M ω which satisfy a(ω) ∈ M ω for all ω ∈ Ω. Function symbols and terms of L are interpreted naturally on M . For an L-formula ϕ(x) we define

ϕ(ā) ∈ Ω [0,1] , ϕ(ā) : ω → ϕ Mω (ā(ω)). Definition 3.4. Let Ω be a set, M Ω = {M ω } ω∈Ω a family of L-structures. Let also M ⊆ M , A ⊆ [0, 1] Ω and E : A → [0, 1]. We say that (M, A , E) is a randomisation based on M Ω if (i)
The triplet (Ω, A , E) is an integration space.

(ii) The subset M ⊆ M is non empty, closed under function symbols, and P (ā) ∈ A for every n-ary predicate symbol P ∈ L and ā ∈ M n . We equip M with the pseudo-metric d(a, b) = E d(a, b) and A with the

L 1 pseudo-metric d(X, Y ) = E |X -Y | .
We may choose to consider E as part of the structure on A , in which case the randomisation is denoted by the pair (M, A ) alone.

If (Ω, F , µ) is a probability space, every X ∈ A is F -measurable and E[X] = X dµ then we say that (M, A ) is based on the random family M (Ω,F ,µ) (and then we almost always omit E from the notation).

The randomisation signature L R is defined as follows:

• The sorts of L R include the sorts of L, referred to as main sorts, plus a new auxiliary sort.

• Every function symbol of L is present in L R , between the corresponding main sorts. It is equipped with the same uniform continuity moduli as in L. • For every predicate symbol P of L, L R contains a function symbol P from the corresponding main sorts into the auxiliary sort. It is equipped with the same uniform continuity moduli as P in L. • The auxiliary sort is equipped with the signature L RV . A randomisation (M, A ) admits a natural interpretation as an L R -pre-structure (M, A ). The corresponding structure will be denoted ( M, A ), and the canonical map [•] : (M, A ) → ( M, A ). We also say that the randomisation (M, A ) is a representation of the structure ( M, A ).

Example 3.5. A special case of a randomisation is when M = M (i.e., the set of all sections from Ω into M Ω ), A = [0, 1] Ω , U is an ultra-filter on Ω, and E U : [0, 1] Ω → [0, 1] is the integration functional corresponding to limits modulo U, i.e., E U (X) = lim ω→U X(ω). In this case A = [0, 1] and M can be identified with the ultra-product U M . Definition 3.6. We say that a randomisation (M, A ) is full if for every a, b ∈ M and X ∈ A , there is a function c ∈ M satisfying:

c(ω) =      a(ω) X(ω) = 1, b(ω) X(ω) = 0, anything otherwise.
We shall sometimes write c = X, a, b , even though there is no uniqueness here.

We say that (M, A ) is atomless if A is a pre-model of ARV (i.e., if (Ω, A , E) is atomless).

Example 3.7 (Randomisation of a single structure). Let M be a structure, (Ω, F , µ) an atomless probability space. Let M c ⊆ M Ω consist of all functions a : Ω → M which take at most countably many values in M , each on a measurable set. Define A c ⊆ [0, 1] Ω similarly, equipping it with integration with respect to µ. Then (M c , A c ) is a full atomless randomisation. Assume now that (Ω, F , µ) is merely a finitely additive probability space, namely that F is a mere Boolean algebra and µ is finitely additive. Let M f ⊆ M Ω and A f ⊆ [0, 1] Ω consist of functions which take at most finitely many values, each on a measurable set. Again, (M f , A f ) is an atomless, full randomisation.

If (Ω, F , µ) is a true (i.e., σ-additive) probability space then both constructions are possible and

(M f , A f ) ⊆ (M c , A c ). It is not difficult to check that they have the same completion ( M f , A f ) = ( M c , A c ). In particular, A f = A c = L 1 (F , [0, 1]).
Moreover, the resulting structure only depends on A = L 1 (F , [0, 1]), and we denote it by (M A , A ) (or just M A ).

3.2. The randomisation theory. Our first task is to axiomatise the class of L R -structures which can be obtained from full atomless randomisations (and in particular show that it is elementary). We shall use x, y, . . . to denote variables of L, x, y, . . . to denote the corresponding variables in the main sort of L R and U, V, . . . to denote variables in the auxiliary sort of L R . For simplicity of notation, an L R -structure (M, A ) may be denoted by M alone. In this case, the auxiliary sort will be denoted by A M and we may write somewhat informally M = (M, A M ). When A M RV we shall refer to the probability algebra of A M as F M (so

A M = L 1 (F M , [0, 1])).
The "base theory" for randomisation, which will be denoted by T Ra 0 , consists of the theory RV for the auxiliary sort along with the following additional axioms (we recall that a -. b -. c = (a -. b) -. c):

δ f,i (ε) -. d(x, y) ∧ d(f (x ′ , x, ȳ′ ), f (x ′ , y, ȳ′ )) -. ε = 0 (R1 f ) δ P,i (ε) -. d(x, y) ∧ P (x ′ , x, ȳ′ ) -. P (x ′ , y, ȳ′ ) -. ε = 0 (R1 P ) d(x, y) = E d(x, y) (R2) sup U∈F inf z E d(x, z) ∧ U ∨ d(y, z) ∧ ¬U (R3)
In axiom R1, δ s,i denotes the uniform continuity modulus of the symbol s with respect to its ith argument, with |x ′ | = i and |ȳ ′ | = n si -1. In axiom R3, F denotes the probability algebra of the auxiliary sort, over which, modulo RV , we may quantify.

The role of axiom R1 is to ensure that the values of P (ā) (ω), f (ā)(ω) only depends on ā(ω) and respect the uniform continuity moduli prescribed by L. Axiom R2 is straightforward, requiring the distance in the main sort of be the expectation of the random variable associated to L-distance. Axiom R3 is a gluing property, corresponding to fullness of a randomisation. It can be informally stated as

(∀xy)(∀U ∈ F )(∃z) d(x, z) ∧ U = d(y, z) ∧ ¬U = 0 , (R3')
where the existential quantifier is understood to hold in the approximate sense. We prove in Lemma 3.10 below that it actually holds in the precise sense.

Lemma 3.8. Let (M, A ) be a randomisation. Then (M, A ) is a pre-model of RV (in the auxiliary sort) and of R1,2.

If (M, A ) is full then (M, A ) is a pre-model of T Ra 0 .
Proof. All we have to show is that if (M, A ) is full then (M, A ) verifies R3, or equivalently, ( M, A ) does. However, we chose to write R3 using a quantifier over a definable set, a construct which need not have the apparent semantics in a pre-structure such as (M, A ), and we find ourselves forced to work with ( M, A ). (Indeed, since A is a mere pre-model of RV , the algebra of characteristic functions in A may well be trivial.) Let F denote the probability algebra of A and let A ∈ F , a, b ∈ M. First, choose X ∈ A and a ′ , b ′ ∈ M such that [a ′ ] and [b ′ ] are very close to 1 A , a and b, respectively. Define (recalling that for t ∈ [0, 1] and n ∈ N, ṅt = (nt) ∧ 1):

Y = 2(X -. 1/4) ∈ A , c = Y, a ′ , b ′ ∈ M (by fullness), W = d(a ′ , c) ∧ Y ∨ d(b ′ , c) ∧ ¬Y ∈ A . For every ω ∈ Ω we have Y (ω) ∈ {0, 1} =⇒ W (ω) = 0, or in other words, W (ω) = 0 =⇒ 0 < Y (ω) < 1 =⇒ 1/4 < X(ω) < 3/4. Thus W ≤ ( 4X)∧( 4¬X).
Having chosen our approximations good enough (we allow ourselves to skip the detailed epsilon chase here), we see that

[W ] ≤ ( 4[X]) ∧ ( 4¬[X]) is arbitrarily close to 0 and [Y ] close to 1 A . We conclude that d(a, [c]) ∧ A ∨ d(b, [c]
) ∧ ¬A can be arbitrarily close to 0 in A , which is what we needed to prove.

3.8

In order to prove a converse we need to construct, for every model M T Ra 0 , a corresponding randomisation.

Definition 3.9. Assume (M, A ) T Ra 0 . Let (Ω, µ) = (Ω M , µ M ) be the Stone space of A as per Theorem 2.7. Then we say that (M, A ) is based on (Ω, µ).

We recall that Ω is a compact Hausdorff topological space, µ is a regular Borel probability measure and we may identify A = C(Ω, [0, 1]) = L 1 (µ, [0, 1]). Under this identification Ω X dµ = E(X) for all X ∈ A .

For each ω ∈ Ω we define an L-pre-structure M 0,ω . Its underlying set is M 0,ω = M and the interpretations of the symbols are inherited naturally from M:

f M0,ω = f M : M n → M, P M0,ω (ā) = P (ā) (ω) ∈ [0, 1].
Notice that axiom R1 d implies that d(x, y) -. d(x, z) ≤ d(y, z) and axiom R2 implies d(x, x) = 0. Symmetry of d(x, y) and the usual form of the triangle inequality follow, so d M0,ω is a pseudo-metric for every ω. Other instances of axiom R1 imply that M 0,ω respects uniform continuity moduli prescribed by L. Thus M 0,ω is indeed an L-pre-structure. The structure associated to M 0,ω will be denoted M ω . Let M denote the family {M ω } ω∈Ω and let a ω denote the image of a in M ω . Assume that a, b ∈ M are distinct. Then E d(a, b) > 0, whereby d(a, b) (ω) > 0 for some ω ∈ Ω. Thus a ω = b ω and the maps ω → a ω , ω → b ω are distinct. In other words, we may identify a ∈ M with the map a : ω → a ω . Viewed in this manner we have M ⊆ M . By construction, if f ∈ L is a function symbol then its coordinate-wise action on M as a subset of M coincides with f M . Similarly, if P ∈ L is a predicate symbol then P (ā) = ω → P Mω (ā(ω)) = P (ā) ∈ A . We have thus identified (M, A ) with a randomisation base on (Ω, µ). This randomisation is called the canonical representation of (M, A ).

d(a, c) ∧ A = d(b, c) ∧ ¬A = 0.
Identifying (M, A M ) with its canonical representation based on Ω, A is identified with a (unique) clopen set A ⊆ Ω and we have:

c(ω) = a(ω) ω ∈ A, b(ω) ω / ∈ A.
Proof. By axiom R3, for every ε > 0, there is c ε such that:

E d(a, c ε ) ∧ A ∨ d(b, c ε ) ∧ ¬A < ε.
Passing to the canonical representation it is easy to check that d(c ε , c ε ′ ) < ε + ε ′ for any ε, ε ′ > 0. Thus (c ε ) ε→0 + is a Cauchy sequence whose limit c = A, a, b is as desired. Uniqueness is clear.

3.10

Theorem 3.11. An L R -structure is a model of T Ra 0 if and only if it has a full representation, i.e., if and only if it is isomorphic to a structure ( M, A ) associated to a full randomisation (M, A ).

Moreover, let (M, A ) be a model of T Ra 0 . Then the canonical representation of (M, A ) is full, and as an L R -pre-structure it is isomorphic to (M, A ). In particular, the L R -pre-structure associated to the canonical representation is already a structure.

Proof. One direction is Lemma 3.8, so it is enough to prove the moreover part. It is clear that the identity map is an isomorphism between the structure (M, A ) and the pre-structure associated to the canonical representation, so all that is left to show is that the latter is full.

Let a, b ∈ M, X ∈ A . The set {X ≤ 1 2 } ⊆ Ω is Borel and therefore equal outside a null measure set to some clopen set U ⊆ Ω. We now have

X -. 1 {X≥1/2} ≤ 1 2 =⇒ X -. 1 U ≤ 1 2 , =⇒ U ⊇ {X = 1}, 1 {X≥1/2} -. X ≤ 1 2 =⇒ 1 U -. X ≤ 1 2 , =⇒ U ∩ {X = 0} = ∅. Thus c = U,
a, b will do as X, a, b .

3.11

From now on we shall identify a model of T Ra 0 with its canonical representation whenever that is convenient and without further mention.

Quantifiers. It is a classical fact that

A = L 1 (F , [0, 1]
) is a complete lattice. More precisely, let A ⊆ A be any subset. We may assume that A is closed under ∧. Let r = inf{E(X) : X ∈ A} and let

(X n ) n∈N ⊆ A satisfy E(X n ) → r. By hypothesis E(X n ∧ X m ) ≥ r whereby d(X n , X m ) ≤ |E(X n ) -r| + |E(X m ) -r|.
The sequence (X n ) n∈N is therefore Cauchy and its limit is inf A.

Let now (M, A ) be a model of T Ra 0 , Definition 3.12. Let (M, A ) T Ra 0 , t : M n → A a function. We say that t is local if it is always true that: t(. . . , A, a, b , . . .) = t(. . . , a, . . .) ∧ A + t(. . . , b, . . .) ∧ ¬A.

For a function t : M n+1 → A we define inf y t(x, y) : M n → A by

inf y t(ā, y) = inf{t(ā, b) : b ∈ M} ∈ A .
Lemma 3.13. Let t(x, y) be a uniformly definable local function in models of T Ra 0 from the main sort into the auxiliary sort. Then the function s(x) = inf y t(x, y) is uniformly definable and local as well, and T Ra 0 implies that:

inf z d inf y t(x, y), t(x, z) = 0.
Moreover, for every ā in a model of T Ra 0 and ε > 0 there is b such that:

t(ā, b) ≤ inf y t(ā, y) + ε (Similarly for sup y t.)
Proof. It follows directly from the definition that if t is local then so is inf y t (no definability is needed here).

We start by proving the moreover part. Let (M, A ) T Ra 0 , ā ∈ M n . Following the discussion of the completeness of the lattice structure on A there is a sequence {c n } n∈N such that inf y t(ā, y) = inf n t(ā, c n ). Let us define a sequence {b n } by:

b 0 = c 0 , b n+1 = {t(ā, b n ) -t(ā, c n+1 ) > ε}, c n+1 , b n .
In other words, when passing from b n to b n+1 we use c n+1 only where this means a decrease of more than ε, and elsewhere keep b n .

Clearly

n µ{t(ā, b n ) -t(ā, c n+1 ) > ε} ≤ 1/ε. By construction, d(b n , b n+1 ) ≤ µ{t(ā, b n ) - t(ā, c n+1 ) > ε}, so the sequence {b n } converges to some b. Since t is local, we have t(ā, b) ≤ t(ā, c n ) + ε, whence t(ā, b) ≤ inf y t(ā, y) + ε, as desired.
We can now prove the first assertion. Indeed, it follows from the moreover part that the graph of inf y t is uniformly definable as:

X = inf y t(ā, y) ⇐⇒ sup z E X -. t(ā, z) = 0, inf z E t(ā, z) -. X = 0.
Once we know that inf y f is definable, the sentence in the second assertion is expressible, and holds true by the moreover part.

3.13

We now proceed to define by induction, for every L-formula ϕ(x), a T Ra 0 -definable local function ϕ(x) to the auxiliary sort, in the following natural manner:

• Atomic formulae: P (τ ) = P • (τ ) is a term, the composition of the function symbol P with the L-terms τ , which are also L R -terms. These are local by Theorem 3.11. • Connectives: ϕ -. ψ = ϕ -. ψ , and so on. Locality is clear.

• Quantifiers: inf y ϕ(x, y) = inf y ϕ(x, y) , sup y ϕ(x, y) = sup y ϕ(x, y) . Locality follows from Lemma 3.13.

Our somewhat minimalist approach differs from that of Keisler, who introduces a function symbol ϕ(x) for every L-formula ϕ (see [START_REF]Randomizing a model[END_REF][START_REF] Ben | Randomizations of models as metric structures[END_REF]). Keisler's Boolean Axioms and Fullness Axiom are valid in our setting by definition of ϕ (using Lemma 3.13 for fullness). Keisler's Distance Axiom for the main sort is our R2. While not entirely equivalent, Keisler's Event Axiom corresponds to our axiom R3. (More precisely, Keisler's Event Axiom is equivalent to R3 plus sup x,y d(x, y) = 1. We do not find it necessary or desirable to assume the latter.) Other axioms related to the auxiliary sort, with the exception of atomlessness, are coded in RV . We shall add atomlessness later on, when it is needed for Theorem 3.32. We are left with the Validity Axioms which we also claim follow from T Ra 0 .

Theorem 3.14. Let (M, A ) be a model of T Ra 0 which we identify as usual with its canonical representation, based on (Ω, µ). Then for every formula ϕ(x) and tuple ā of the appropriate length we have ϕ(ā) = ϕ(ā) as functions on Ω (and not merely up to a null measure set).

Proof. We prove by induction on ϕ. If ϕ is atomic this is known by construction and the induction step for connectives is immediate. We are left with the case of a formula inf x ϕ(x, ȳ). First of all, by construction, we have:

inf x ϕ(x, ā) = inf s ϕ(b, ā) : b ∈ M , inf x ϕ(x, ā) = inf x ϕ(x, ā) = inf L 1 ϕ(b, ā) : b ∈ M .
Here inf s means the simple, or point-wise, infimum of functions on Ω. By definition inf x ϕ(x, ā) ≤ ϕ(b, ā) for all b, and by the induction hypothesis for ϕ we have inf x ϕ(x, ā) ≤ ϕ(b, ā) . It follows that inf x ϕ(x, ā) ≤ inf x ϕ(x, ā) . Conversely, by Lemma 3.13, for every ε > 0 there exists b such that inf x ϕ(x, ā) + ε ≥ ϕ(b, ā) . Using the induction hypothesis again we obtain:

inf x ϕ(x, ā) + ε ≥ ϕ(b, ā) ≥ inf x ϕ(x, ā) .
Equality follows.

3.14

Corollary 3.15. Let M T Ra 0 and assume its canonical representation is based on the family M = {M ω } ω∈Ω . Then for every L-sentence ϕ:

M ϕ = 0 ⇐⇒ M ω ϕ for all ω ∈ Ω.
Proof. Immediate from the fact that ϕ = ϕ on Ω.

3.15

Definition 3.16. Let T be a set of L-sentences. We define its randomisation T Ra to be the L R -theory consisting of the base theory along with the translation of T (Keisler's Transfer Axioms):

T Ra = T Ra 0 ∪ { ϕ = 0} ϕ∈T .
Corollary 3.17. Let T be arbitrary set of sentences, ϕ a sentence. Then T ⊢ ϕ ⇐⇒ T Ra ⊢ ϕ = 0.

Proof. Immediate.

3.17 Then (M, A ) is full and for every formula ϕ(x) and every ā ∈ M n :

ϕ(ā) = ϕ([ā]) .
Proof. Fullness is immediate. We claim that inf y ϕ(ā, y) = inf b∈M ϕ(ā, b) for every formula ϕ(x, y) and every ā ∈ M n , where the infimum on the right hand side is in the sense of the lattice A . Indeed, the inequality ≤ is immediate. For ≥ observe that using the Axiom of Choice, for every ε > 0 we can find b ∈ M such that inf y ϕ(ā, y) + ε ≥ ϕ(ā, b) , whereby inf y ϕ(ā, y) + ε ≥ ϕ(ā, b) . We now prove the main assertion. First of all, we may replace ϕ with an equivalent formula ψ. Indeed, on the left hand side we have immediately ϕ(ā) = ψ(ā) . For the right hand side, we have | ϕψ | = |ϕ-ψ| , whereby T Ra 0 ⊢ ϕ = ψ . We may therefore assume that ϕ is in prenex form. We now proceed by induction on the number of quantifiers. If ϕ is quantifier-free then ϕ(ā) = ϕ([ā]) by construction. For the induction step, recall that

inf y ϕ([ā], y) = inf y ϕ([ā], y) = inf b∈ M ϕ([ā], b) = inf b∈M ϕ([ā], [b]) .
We conclude using the claim and the induction hypothesis.

3.19

Let us go back to the ultra-product example (Example 3.5), where

M = M and M = U M . By construction E inf y ϕ([ā], y) = inf b∈M E ϕ([ā], [b]) . One also always has E ¬ϕ([ā]) = ¬E ϕ([ā]) , E 1 2 ϕ([ā]) = 1 2 E ϕ([ā]
) . Since E = E U is given by an ultra-filter, we have moreover

E ϕ([ā])-. ψ([ā]) = E ϕ([ā]) -. E ψ([ā]
) . Thus the truth value of ϕ([ā]) in the ultra-product is precisely E ϕ([ā]) in the sense of the randomised structure. Now the last item of Theorem 3.19 yields the classical version of Łoś's Theorem:

ϕ([ā]) = E U ϕ(ā) = lim U ϕ(a(ω)).
Let us pursue a little further this analogy with classical ultra-products. Classical ultra-product constructions consist of fixing a family M Ω and a filter F on Ω with certain desired properties, then extending this filter to an ultra-filter and taking the ultra-product. A filter on Ω can be viewed as a partial 0/1 measure: some sets have measure zero, some measure one, and for some the measure is not known. The [0, 1]-valued analogue is a partial integration functional on [0, 1] Ω . Definition 3.20. A partial integration space is a triplet (Ω, A 0 , E 0 ) where Ω is a set, A 0 ⊆ [0, 1] Ω is any subset, and E 0 : A 0 → [0, 1] is a functional satisfying that for every finite sequence {(X i , m i )} i<ℓ ⊆ A 0 ×Z and k ∈ Z:

m i X i ≥ k =⇒ m i E 0 (X i ) ≥ k.
In this case we say that E 0 is a partial integration functional.

Clearly every integration functional is a partial integration functional. Conversely, Fact 3.21. Let (Ω, A 0 , E 0 ) be a partial integration space. Then E 0 can be extended to a total integration functional E on A = [0, 1] Ω , rendering (Ω, A , E) a (total) integration space. Moreover, if (Ω, A 0 , E 0 ) is an integration space, and atomless as such, then (Ω, A , E) is atomless as well.

Proof. See [BK09, Section 5].

3.21

Definition 3.22. A partial randomisation based on a family M Ω is a triplet (M, A 0 , E 0 ) satisfying all the properties of an ordinary (total) randomisation, with the exception that we do not require that P (ā) ∈ A 0 . We say that a partial randomisation is atomless if (A 0 , E 0 ) ARV .

By Fact 3.21 we may extend E 0 to an integration functional E on A = [0, 1] Ω . We say that the (full) randomisation (M, A ) = (M, A , E) is a totalisation of (M, A 0 , E 0 ) and that the associated structure ( M, A ) is a structure associated to (M, A 0 , E 0 ). (It is an associated structure rather than the associated structure because of the arbitrary choices involved.) Definition 3.23. We recall that a random family of structures M (Ω,F ,µ) consists of a family of structures M Ω = {M ω } ω∈Ω indexed by a probability space (Ω, F , µ). To every such random family we associate a natural partial randomisation (M, A 0 , E 0 ) where M = M and (Ω, A 0 , E 0 ) is the integration space of F -measurable functions on Ω. It is atomless if and only if (Ω, F , µ) is an atomless probability space.

If ( M, A ) is a structure associated to (M, A 0 , E 0 ) then we also say that it is a structure associated to the random family M (Ω,F ,µ) .

Corollary 3.24. Let M (Ω,F ,µ) be a random family of structures and let (M, A ) be an associated structure. Then for every ā in M and every formula ϕ

(x), if ϕ(ā) ∈ [0, 1] Ω is F -measurable then E ϕ([ā]) M = Ω ϕ(ā) dµ
Proof. Immediate from Theorem 3.19 and the construction.

3.24

This can be improved to construct extensions containing elements with desired properties. Definition 3.25. An embedding σ : (M, A ) → (M 1 , A 1 ) will be called a • -embedding if σ ϕ(ā) M = ϕ(σā) M1 for every ā ∈ M n and formula ϕ(x). Definition 3.26. A morphism of integration spaces π :

(Ω ′ , A ′ , E ′ ) → (Ω, A , E) is a projection π : Ω ′ ։ Ω such that X • π ∈ A ′ and E ′ (X • π) = E(X) for all X ∈ A . Corollary 3.27. Let (M, A ) T Ra 0 with canonical representation (M, A ) based on M (Ω,F ,µ) , so in particular A = C(Ω, [0, 1]). Let π : (Ω ′ , A ′ 0 , E ′ 0 ) → (Ω, A , E
) be a morphism of integration spaces and let

M ′ Ω ′ = {M ′ ω ′ } ω ′ ∈Ω ′ be a family of elementary extensions M πω ′ M ′ ω ′ . Set M ′ = M ′ Ω ′ , A ′ = [0, 1] Ω ′ , and for a ∈ M and X ∈ A define σa = a • π = (ω ′ → a(πω ′ )) ∈ M ′ , σX = X • π ∈ A ′ .
Let ( M ′ , A ′ ) be an associated structure to the partial randomisation (M ′ , A ′ 0 , E ′ 0 ), and let

[σ] : (M, A ) → ( M ′ , A ′ ) be the map a → [σa], X → [σX]. Then (i) The map [σ] is a • -embedding.
(ii) For every ā in M ′ and every ϕ

(x), if ϕ(ā) ∈ A ′ 0 then E ϕ([ā]) M ′ = E ′ 0 ϕ(ā) . Proof.
For the first item it is easy to check that [σ] is indeed an embedding. In order to see that [σ] is a • -embedding let ā ∈ M n and let ϕ(x) be a formula. Then ϕ(ā) = ϕ(ā) ∈ A ⊆ [0, 1] Ω by Theorem 3.14, so

σ ϕ(ā) = σ ϕ(ā) = ϕ(σā) = ϕ([σā]) .
The second item is an immediate consequence of Theorem 3.19.

3.27 3.5. Quantifier elimination and types. Let T R 0 consist of T Ra 0 along with the atomlessness axiom ARV. In other words, T R 0 consists of the theory ARV for the auxiliary sort plus axioms R1-3. Similarly, we define T R = T Ra + ARV = T R 0 ∪ { ϕ = 0} ϕ∈T . Example 3.28. Let M T and let (Ω, F , µ) be any atomless probability space. Let (M, A ) be an associated structure to the constant random family M (Ω,F ,µ) = {M} ω∈Ω . Then (M, A )

T Ra by Corollary 3.24 and A is atomless, whereby

(M, A ) T R . Lemma 3.29. Every model (M, A ) T Ra admits a • -embedding σ : (M, A ) → (M 1 , A 1 ) T R .
In particular, T Ra and T R are companions (which, as in classical logic, means that every model of one embeds in a model of the other, or equivalently, that the two theories have the same universal consequences sup x ϕ for quantifier-free ϕ).

Proof. Let ([0, 1], B, λ) denote the Lebesgue measure on [0, 1]. Apply Corollary 3.27 to (Ω ′ , F ′ , µ ′ ) = (Ω, F , µ) × ([0, 1], B, λ) and M ′ ω,r = M ω . The resulting embedding σ : (M, A ) → (M 1 , A 1 ) is a • -embedding and A 1 is atomless. If ϕ ∈ T is a sentence then ϕ M 1 = σ ϕ M = σ0 = 0. Thus (M 1 , A 1 ) T R , as desired.

3.29

Let us now fix an L-theory T . As usual, S n (T ) (or sometimes S x(T )) denotes the space of n-types of T . Similarly, S n (T R ) (or S x(T R )) denotes the space of n-types of the L R -theory T R .

Let us fix some additional notation. For a compact Hausdorff space X, let R(X) denote the space of regular Borel probability measures on X. For ϕ ∈ C(X, C) and µ ∈ R(X) let ϕ, µ = ϕ dµ and equip R(X) with the weak topology, namely µ s → µ if ϕ, µ s → ϕ, µ for all ϕ. It is a classical (and easy) fact that this renders R(X) a compact Hausdorff space as well.

Let p(x) ∈ S n (T R ). It is not difficult to verify (e.g., using the Riesz Representation Theorem) that there exists a unique regular Borel probability measure ν p ∈ R(S n (T )) characterised by the identity E ϕ(x) p = ϕ, ν p for every L-formula ϕ(x). The map p → ν p is continuous by definition of the topology on R(S n (T )).

We next claim that p → ν p is surjective. Indeed, let µ ∈ R(S n (T )). For each p ∈ S n (T ) choose a model M p and a realisation āp ∈ M n p of p (we do not assume that T is complete so M p may have to vary with p). Let (M, A ) be a structure associated to the random family M = M (Sn(T ),µ) = {M p } p∈Sn(T ) . Let ā ∈ M be given by ā(p) = āp . By Corollary 3.24, for every formula ϕ(x):

E ϕ([ā]) = E[ ϕ(ā) ] = ϕ, µ .
In particular, if ϕ ∈ T is a sentence then E ϕ = 0, so (M, A ) T Ra . By Lemma 3.29 we can embed (M, A ) in a model (M 1 , A 1 ) T R , and if p = tp M 1 (ā) then ν p = µ. We argued above for types in finitely many variables, but in exactly the same manner we associate to each p ∈ S I (T R ) a regular Borel probability measure ν p ∈ R(S I (T )) and this map is surjective, for an arbitrary index set I.

For quantifier elimination we shall require the following fact from [START_REF] Bollobás | Varopoulos, Representation of systems of measurable sets[END_REF].

Fact 3.30. Let S be any set, (Ω, F , µ) an atomless probability space. For each x ∈ S let us be given a weight w x ≥ 0 and an event C x ∈ F . For T ⊆ S let w T = x∈T w x , C T = x∈T C x . Then the following are equivalent: (i) For all T ⊆ S: µ(C T ) ≥ w T .

(ii) There exists a disjoint family {D x } x∈S such that D x ⊆ C x and µ(D x ) = w x . If w S = 1 then {D x } x∈S is a partition of Ω (up to null measure).

Lemma 3.31. Let (M, A ) T R 0 be ℵ 0 -saturated, ā ∈ M n , and let ν ā be an abbreviation for ν tp(ā) . Let θ : S n+1 (L) → S n (L) be the restriction to the first n variables. Then:

(i) For every b ∈ M, ν ā is the image measure of ν ā,b under θ.

(ii) Conversely, let η ∈ R(S n+1 (L)) by such that its image measure under θ is ν ā. Then there is b ∈ M such that η = ν ā,b .

Proof. The first item is immediate. For the second, it is enough to show that for every finite family ϕ i (x, y), i < ℓ, and for every ε > 0, there is b ∈ M such that ϕ i , η -E ϕ i (ā, b) < ε for i < ℓ.

Let S = {s j } j<k be a partition of [0, 1] ℓ into finitely many Borel subsets, diam(s i ) < ε. For j < k let w j = η{ φ ∈ s j }. Choose also tj ∈ s j and let ψ j = i<ℓ |ϕ it j,i |. Notice that

ϕ i , η - j<k w j t j,i ≤ j<k w j diam(s j ) < ε.
Let C j ∈ F be the event inf y ψ j (ā, y) < ε}. Following the notations of Fact 3.30, we claim that µ(C T ) ≥ w T for all T ⊆ k. Indeed, notice that { φ ∈ s j } ⊆ θ -1 {ψ j < ε}, whereby:

w T = j∈T η{ φ ∈ s j } = η   j∈T { φ ∈ s j }   ≤ η   j∈T θ -1 {ψ j < ε}   = ν ā   j∈T {ψ j < ε}   = µ(C T ).
By Fact 3.30 there are events D j ⊆ C j such that w T = µ(D T ) for all T ⊆ k. Since the total weight is one, {D j } j<k is a partition. By Lemma 3.13 and saturation of M there are b j ∈ M such that inf y ψ j (ā, y) = ψ j (ā, b j ) . Notice that:

|ϕ i (ā, b j ) -t j,i | 1 Dj ≤ inf y ψ j (ā, y) 1 Cj < ε. Let b = D 0 , b 0 , D 1 , b 1 , . . . , i.e., b(ω) = b j (ω) when ω ∈ D j . Now: j<k w j t j,i -E ϕ i (ā, b) ≤ j<k w j t j,i -E ϕ i (ā, b) 1 Dj = j<k E t j,i -ϕ i (ā, b j ) 1 Dj ≤ E   j<k t j,i -ϕ i (ā, b j ) 1 Dj   < ε.
Thus ϕ i , η -E ϕ i (ā, b) < 2ε, which is good enough.

3.31

Theorem 3.32.

(i) The theories of the form T R (and in particular T R 0 ) eliminate quantifiers in the main sort down to formulae of the form E ϕ(x) . (ii) The map p → ν p defined by ϕ, ν p = E ϕ p induces a homeomorphism S x(T R ) ≃ R(S x(T )). (iii) Let f : n → m be any map. Let f * : S m (T ) → S n (T ) be the map tp(a 0 , . . . , a m-1 ) → tp(a f (0) , . . . , a f (n-1) ) and similarly

f * ,R : S m (T R ) → S n (T R ). Let f * : R(S m (T )) → R(S n (T ))
be the image measure map corresponding to f * . Then the following diagram commutes:

S m (T R ) S n (T R ) R(S m (T ))

∼ =

(iv) The completions of T R are in bijection with regular Borel probability measures on the space of completions of T . In particular, if T is complete then so is T R .

Proof. The first item follows from Lemma 3.31 via a standard back-and-forth argument. For the second item, we have already seen that the map p → ν p is continuous and surjective. From the first item it follows that it is injective. Since both spaces are compact and Hausdorff, it is a homeomorphism. The third item is easily verified. The last item is a special case of the second item for 0-types.

3.32

Corollary 3.33. Assume that T eliminates quantifiers. Then so does T R , and it is the model completion of T Ra . If T is merely model complete then T R is model complete as well, and is the model companion of T Ra .

Proof. The case where T eliminates quantifiers is easy. The case where T is model complete requires a bit more attention to details which we leave to the reader (see [START_REF]Modular functionals and perturbations of Nakano spaces[END_REF]Appendix A] for basic facts regarding model completeness in continuous logic).

3.33

We have described formulae and types on the main sort. In order to handle the auxiliary sort, add to L a sort S [0,1] for the set [0, 1], equipped with the tautological predicate id : S [0,1] → [0, 1] and with the usual distance d(r, s) = | id(r)id(s)|. This is a compact structure and therefore the unique model of its theory, and adding it to models of T as a new sort does not add any structure on the original sorts. Call the resulting signature L + and the corresponding theory T + . It is easy to check that T + eliminates quantifiers if T does. Passing to T R + , id is an isometric bijection between the main sort S R [0,1] of T R + and the auxiliary sort, so questions about types and definability in the auxiliary sort can be settled by applying Theorem 3.32 to the sort S R [0,1] .

Corollary 3.34. Every L R -definable predicate on the auxiliary sort of T R , possibly with parameters ā from the main sorts, is equivalent to one in the pure language of the auxiliary sort and with parameters in

σ(ā) = σ ϕ(ā) ϕ(x)∈Lω,ω ⊆ F .
Consequently, the auxiliary sort is stable and stably embedded in models of T R , and if X is a tuple in the auxiliary sort then tp( X/ā) ≡ tp( X/σ(ā)).

Proof. We may assume that T eliminates quantifiers, in which case so does T + and therefore T R + . It is therefore enough to show that for a tuple of variables r in the sort S R [0,1] and for any possible additional parameters ā, any atomic formula in r and ā is equivalent to a formula entirely in S R [0,1] , possibly using parameters in id -1 (σ(ā)). Given the minimalistic structure we put on S [0,1] , such an atomic formula can either involve precisely one free variable r i or some of the parameters but no free variable. In the first case we have id(r i ) which is as desired. In the second we have ϕ(ā) where ϕ(x) is an atomic L-formula. In this case let X = id -1 • ϕ(ā) ∈ S R [0,1] , so ϕ(ā) = id(X) , and the latter is again as desired.

3.34 3.6. Types in T R when T is incomplete. Theorem 3.32 provides us with a complete description of types in T R , whether T is complete or not. In various situations we shall encounter later on, this description turns out to be much more useful when T is complete. What follows here is a brief discussion of the general case and a reduction of sorts to the special case of a complete theory.

Let T be an incomplete theory and let p ∈ S n (T R ). By Theorem 3.32 we may identify p with a regular Borel probability measure ν p ∈ R(S n (T )). Let A p = L 1 (S n (T ), ν p ), [0, 1] and let (Ω p , µ p ) be its Stone space. We have a natural identification of C(Ω p , [0, 1]) with A p , so in particular every n-ary L-formula ϕ(x) gives rise to a continuous function ϕ : S n (T ) → [0, 1] with image ϕ p ∈ A p = C(Ω p , [0, 1]). Thus for every ω ∈ Ω p we may define a complete type π p ω ∈ S n (T ) by ϕ πpω = ϕ p (ω). We obtain a map π p : (Ω p , µ p ) → (S n (T ), ν p ) which is continuous and sends µ p to ν p (as an image measure). It follows that the image of π p is precisely the support of ν p there, i.e., the smallest closed measure one set. This discussion holds in particular when n = 0, i.e., when T = p ∈ S 0 (T R ) is a completion of T R .

Let now T be a completion of T R and p(x) ∈ S n (T). There is a natural L RV -inclusion A T ⊆ A p giving rise to a projection (Ω p , µ p ) → (Ω T , µ T ) where µ T is the image of µ p . As in [BK09, Section 5] this projection gives rise to a conditional expectation map E[•|T] : A p → A T . In particular, to every formula ϕ(x) we associated ϕ p which in turn gets sent to

E[ϕ p |T] ∈ A T = C(Ω T , [0, 1]). Let us fix ω ∈ Ω T . It is not difficult to check that ϕ → E[ϕ p |T](ω
) is an integration functional on S n (T ). Therefore there exists a unique type p ω ∈ S n (T R ) verifying for all ϕ(x):

E ϕ pω = ϕ, ν pω = E[ϕ p |T](ω).
The map ω → p ω has the following properties:

(i) It is determined by p (in particular, the completion T is determined by p).

(ii) Conversely, it determines p as follows:

E ϕ p = ΩT E ϕ pω dµ T (ω).
(iii) Let π T : Ω T → S 0 (T ) be as in the previous paragraph, associating to each ω ∈ Ω T a completion π T ω of T . Then p ω ∈ S n (π T ω) R . (iv) The map ω → p ω is continuous in the appropriate weak topology. Specifically, for every formula ϕ(x) the map ω → ϕ, ν pω is continuous on Ω T . We therefore write p = ΩT p ω dµ T (ω), saying this is an integral of a continuous family. (Conversely, every integral of a continuous or even measurable family of T R -types gives rise to a T R -type.)

A special case of this situation is a type over parameters. Let (M, A ) T R , A ⊆ M and p ∈ S n (A). Let us enumerate A = {a α } α∈I . Let A = {a α } α∈I be a set of new constant symbols and let L A = L ∪ A. Even if T is a complete L-theory it is incomplete as an L A -theory. We view (M, A ) as an L R A -structure naming A by A. It is then the model of a complete L R A -theory T and p ∈ S n (T). Each ω ∈ Ω T gives rise to an L A -completion π T ω of T . In other words, each ω determines, so to speak, the L-type of the constants A. Let A ω be an actual set in a model of T realising this type. Then p ω ∈ R S n π T ω = R(S n (A ω )).

Preservation and non-preservation results

4.1. Categoricity. The theory ARV is ℵ 0 -categorical but not uncountably categorical, so this is the most we can hope for from T R . We shall use the following criterion for ℵ 0 -categoricity. Fact 4.1 (Ryll-Nardzewski Theorem for metric structures). A complete countable theory T is ℵ 0categorical if and only if S n (T ) is metrically compact for all n, if and only if the logic topology on S n (T ) coincides with the metric for all n.

Proof. This was originally stated and proved by C. Ward Henson for Banach space structures. For the proof in continuous logic see [START_REF] Ben | On d-finiteness in continuous structures[END_REF]Fact 1.14]. Notice that it is customary to exclude the case of a complete theory with a compact model (which is its unique model) from the definition of ℵ 0 -categoricity, as well as from the statement of this theorem, but the theorem holds as stated if we do not.

4.1

Theorem 4.2. Assume T is a complete ℵ 0 -categorical theory in a countable language. Then so it T R .

Proof. It is enough to show that S n (T R ) is totally bounded, i.e., that it can be covered by finitely many ε-balls for every ε > 0. Let us therefore fix ε > 0. By assumption we can cover S n (T ) with finitely many ε-balls, say S n (T ) = i<k B(p i , ε). Fix N > k ε , and let R = { m ∈ N k : m i = N }. Then R is finite, and for every m ∈ R we may define p m = mi N p i ∈ S n (T R ). Let also C i = B(p i , ε) j<i B(p j , ε), so S n (T ) = i C i is a partition of S n (T ) into a finite disjoint union of Borel sets of diameter ≤ ε. Now let q ∈ S n (T R ) be any type. Find a tuple m ∈ R such that E = m/N -(ν q (C i )) i<k 1 is minimal. We can do this so that at each coördinate the difference is at most 1 N , so E < k N < ε. We claim that d(q, p m) < 2ε, which will conclude the proof.

Let a ∈ M realise q, and as usual let us identify M with its canonical representation, based on M (Ω,µ) . Let D i = {ω ∈ Ω : tp(a(ω)) ∈ C i }, so µ(D i ) = ν q (C i ), and Ω = D i is a partition of Ω into disjoint Borel sets. We can now choose another such partition Ω = D ′ i such that each

D ′ i is comparable with D i (i.e., either D i ⊆ D ′ i or D ′ i ⊆ D i ) and µ(D ′ i ) = mi N , so µ(D i △D ′ i ) = | mi N -ν q (C i )|. For each ω ∈ D ′ i choose M ′ ω M ω and b(ω) ∈ M ′ ω realising p i . If ω ∈ D i ∩ D ′ i then

4.2

Corollary 4.3. Assume T is a countable theory, possibly incomplete, with countably many completions, all of which are ℵ 0 -categorical. Then every completion of T R is ℵ 0 -categorical.

Proof. Let {T n } n∈α , denote the set of completions of T , where α ≤ ℵ 0 . The completions of T are in bijection with measures on α, namely with sequences λ ∈ [0, 1] α such that λ n = 1. Every model M of such a completion can be identified with a combination λ n M n where M n (T n ) R , and is uniquely determined by M except where λ n = 0. If M is separable then so is M n (when λ n > 0), whence the uniqueness of M.

Of course, in this case T R may admit continuum many completions, and yet it is not too difficult to see that every completion of (T R ) R is still ℵ 0 -categorical. On the other hand, the are theories T with uncountably many completions, all of which are ℵ 0 -categorical, such that T R admits a non ℵ 0categorical completion. Indeed, let T be the classical theory saying that there exist precisely 2 elements, in a language with constants a and b n for n ∈ N. Using a as reference, a completion of T is determined by whether b n = a or not for each n, so the space of completions of T is homeomorphic to 2 N . Let T be the completion of T R saying that b n = a are independent events all of measure 1 2 . Let p n ∈ S 1 (T) be the type x = b n . Then d(p n , p m ) = 1 2 for all n = m and S 1 (T) is not metrically compact.

4.2. Stability. For all facts regarding stability in continuous logic, and in particular local stability, we refer the reader to [START_REF]Continuous first order logic and local stability[END_REF]. For topometric Cantor-Bendixson ranks see [START_REF]Topometric spaces and perturbations of metric structures[END_REF].

When proving the preservation of stability in [START_REF] Ben | Randomizations of models as metric structures[END_REF] we considered ϕ-types over arbitrary sets in models of T and of T R , calculating averages over the finite set of non forking extensions of such types. In doing so we proved not only that the randomisation of a stable theory is stable, but also that in such a randomised theory all types over sets (in sorts of the original theory) were stationary.

In continuous logic the situation is, at least on the surface, much more complicated. Assume A ⊆ M , p ∈ S ϕ (A), and let P ⊆ S ϕ (M ) be the set of non forking extensions of p. Rather than being a finite set, as in classical logic, P is merely known to be a transitive compact metric space (in the standard metric on S ϕ (M ), namely d(q, q ′ ) = sup |ϕ(x, b) qϕ(x, b) q ′ | : b ∈ M ). By transitive we mean that the action of the isometry group of P is transitive, which leads to the existence of a canonical probability measure on P and thus to a canonical notion of an average value of a function on P . With this notion of average we could, in principle, translate the entire argument of [START_REF] Ben | Randomizations of models as metric structures[END_REF] to the case where T is continuous. However, calculating averages over a transitive compact metric space is significantly more involved than merely averaging over a finite set, rendering the translated argument quite difficult to follow.

We therefore choose to split the argument in two, and at a first time restrict our attention to types over models, in which case the non forking extension is unique and no averaging is required. In Section 5 we prove quite independently that for any theory T (stable or not), types in T R coincide with Lascar types. It follows that if T is stable then all types in T R are stationary.

As in [START_REF] Ben | Randomizations of models as metric structures[END_REF] we shall use Shelah ranks, this time adapted to continuous logic. Let us fix for the time being a monster model M containing all the parameters under consideration. We define the (k, ϕ)-rank of a partial type π(x), denoted R k (π, ϕ), and its multiplicity at rank s, denoted M k (π, ϕ, s):

(i) If π is consistent then R k (π, ϕ) ≥ 0.
(ii) Having defined when R k (π, ϕ) ≥ s we define M k (π, ϕ, s). We say that M k (π, ϕ, s) ≥ M if there are types π(x) ⊆ π n (x) for n < M such that for every n < m < M there exists b nm for which

π n (x) ∪ π m (x ′ ) ⊢ |ϕ(x, b nm ) -ϕ(x ′ , b nm )| ≥ 2 -k , and in addition R k (π n , ϕ) ≥ s for all i < M . (iii) If M k (π, ϕ, s) = ∞ then R k (π, ϕ) ≥ s + 1. It is not difficult to see that if [π] ϕ denotes the closed set π defines in S ϕ (M), then: R k (π, ϕ) = CB f,2 -k ([π] ϕ ) = CB b,2 -k ([π] ϕ ),
where CB f,ε and CB b,ε are the topometric Cantor-Bendixson ranks defined in [Ben08, Section 3]. (Or almost: these are the ranks we would obtain if we replaced there "≤ ε" with "< ε" and "> ε" with "≥ ε". Since we consider ranks for all ε > 0 this makes no difference.)

Let W denote a possibly infinite tuple of variables, π(x, W ) a partial type and k, s ∈ N. Then R k (π(x, W ), ϕ) ≥ s is a property of W , holding for A (of the appropriate size) if R k (π(x, A), ϕ) ≥ s. We may think of R k (•, ϕ(x, y)) as a quantifier binding the variable x. Let also R k (x/W, ϕ) ≥ s be the property of xW which holds for aA if R k (tp(a/A), ϕ) ≥ s. Proof. Both are shown using a standard "there exists a tree such that. . . " argument. The second can be deduced from the first since it may be re-written as R k (x ′ ≡ W x, ϕ(x ′ , y)) ≥ s where x ′ is the bound variable and xW the parameter variables.

4.4

For α ≤ ω let R <α (π, α) denote the (finite or infinite) sequence R k (π, ϕ) k<α . Given a sequence σ ∈ N α and a partial type π(x) let

S ϕ (M) (σ) = q ∈ S ϕ (M) : R <α (q, ϕ) ≥ σ = q ∈ S ϕ (M) : R k (q, ϕ) ≥ σ(k) for all k < α , [π] (σ) ϕ = [π] ϕ ∩ S ϕ (M) (σ) = q ∈ S ϕ (M) : R <α (q ∪ π, ϕ) ≥ σ .
We observe that S ϕ (M) (σ) and therefore [π]

(σ)

ϕ are closed sets (either directly or using properties of the topometric Cantor-Bendixson ranks).

Before going further let us recall (e.g., from Bourbaki [Bou66, Chapter IV.6]) that for a topological space X, a map f : X → R is upper (respectively, lower) semi-continuous if inf f (A) = inf f (A) (respectively, sup f (A) = sup f (A)) for every non empty A ⊆ X. We shall require the following easy classical result (see for example Katětov [Kat51]).

Fact 4.5. Let X be a compact Hausdorff space.

(i) A function f : X → R is lower semi-continuous if and only if it can be written as the point-wise supremum of a family of continuous functions on X. (ii) Assume that f : X → R is lower semi-continuous, g : X → R is upper semi-continuous, and g < f . Then there is a continuous function h : X → R such that g < h < f .

At this point let us fix ε > 0. For a finite sequence σ ∈ N <ω we define Ξ σ to be the set of all formulae ξ(x, w) such that for any ā ∈ M the diameter of [ξ(x, ā) < 1] (σ) ⊆ S ϕ (M ) is smaller than ε (analogous to Ξ s,2 as defined in [START_REF] Ben | Randomizations of models as metric structures[END_REF]).

Lemma 4.6. Let σ ∈ N k , ξ(x, w) ∈ Ξ σ . Then there exists a formula ξσ (y, w) such that:

{ξ(x, w) ≤ 1 2 } ∪ {R <k (x/ wy, ϕ) ≥ σ} ⊢ | ξσ (y, w) -ϕ(x, y)| < ε. Proof. Let Y ⊆ S x,
y, w(T ) consist of all types q(x, y, w) for which the left hand side holds. Let X ⊆ S x, w(T ) consist of all types verifying ξ(x, w) ≤ 1 2 and R <k (x/ w, ϕ) ≥ σ. The restriction map π : Y → X is surjective.

For p(x, z) ∈ X let a, c p and define f (p) = max ϕ(x, y) q : q ∈ π -1 (p) , f (p) = min ϕ(x, y) q : q ∈ π -1 (p) .

Let us make a few remarks regarding this definition. Since π is surjective the set π -1 (p) is non empty and compact. The maximum and minimum are therefore attained and f (p) ≤ f (q). Moreover, there are types (not necessarily uniquely determined) p(x), p(x) ∈ [p(x, c)] (σ) such that ϕ(x, b) p = f (p) and ϕ(x, b) p = f (p). By hypothesis ξ(x, z) p ≤ 1 2 , so d(p, p) < ε and thus f (p) < f (p) + ε. Letting p vary over X it is easy to check that f (p) is upper semi-continuous and similarly f is lower semi-continuous. Thus there is a continuous function h : X → [0, 1] verifying f < h < f + ε. By Tietze's Extension Theorem there exists a continuous function h : S x, w(T ) → [0, 1] extending h and we may identify h with a definable predicate ξσ (x, w) (or, if we insist on having an actual formula, we take ξσ (x, w) to be a formula close enough to h so that f < ξσ (x, w) < f + ε on X).

It is left to show that ξσ (y, w) is as desired. Indeed, assume that a, b, c q ∈ Y . Then f (q↾ x, w) ≤ ϕ(a, b) ≤ f (q↾ x, w ), whereby ϕ(a, b) ≤ f (q↾ x, w) < ξσ (a, c) < f (q↾ x, w) + ε ≤ ϕ(a, b) + ε.

4.6

We now turn to showing that members of Ξ σ are, in a sense, plenty enough. We have shown that the predicate b → E ϕ(x, b) p is arbitrarily well approximated on M 0 , and therefore on M 0 , by an M 0 -definable predicate. It follows that p admits an E ϕ -definition. Since this holds for every type p over a model the formula E ϕ(x, y) is stable.

The second assertion follows from the first using quantifier elimination down to formulae of the form E ϕ (Theorem 3.32), since continuous combinations of stable formulae are stable.

4.9 4.3. Dependence. Recall that a formula ϕ(x, ȳ) is ε-independent in a theory T for some ε > 0 one can find in some model of T an indiscernible sequence ( bn ) n∈N and ā such that: The formula ϕ is independent if it independent for some ε > 0. The theory T is dependent if every formula is dependent, i.e., if every formula is ε-dependent for every ε > 0.

Theorem 4.10. A theory T is dependent if and only if its randomisation T R is.

Proof. It is immediate to check that if ϕ(x, ȳ) is ε-independent in T then E ϕ(x, ȳ) is ε-independent in T R . The converse is [Ben09a, Theorem 5.3].

4.10

For the converse, let us extend the so-called T P 2 to continuous logic: Definition 4.11. We say that a theory T has the tree property of the second kind, or T P 2 , if there exists a formula ϕ(x, ȳ), and in a model of T an array ( bn,m ) n,m∈N , such that:

(i) The sequences I n = (b n,m ) m∈N are mutually indiscernible, i.e., each is indiscernible over the others. (ii) The sequence of sequences (I n ) n∈N is indiscernible. (iii) The set of conditions {ϕ(x, bn,m ) = 0} m∈N is inconsistent for one, or equivalently all, n. (iv) The set of conditions {ϕ(x, bn,f(n) ) = 0} n∈N is consistent for one, or equivalently every, map f : N → N.

Let us also recall that a theory is simple (Shelah [START_REF] Shelah | Simple unstable theories[END_REF]) if every complete type over a set A does not divide over a subset A 0 ⊆ A with |A 0 | ≤ |T |. Shelah [She90, Chapter III.7] proves that T P 2 implies both independence and non simplicity (and more), via the study of the relations between associated cardinal invariants. Since this is proved for classical logic, let us give a quick argument why the same is true in continuous logic (since there is no treatment of simplicity in continuous logic as such, we refer the reader to [START_REF]Simplicity in compact abstract theories[END_REF] for a treatment of simplicity in the even larger context of compact abstract theories). Proposition 4.12. Assume T has T P 2 . Then T is neither simple nor dependent.

Proof. By compactness we may extend the indiscernible sequence of lines to length κ = |T | + , and find ā such that ϕ(ā, bi,0 ) = 0 for all i < κ. Then tp(ā/ b<κ,0 ) divides over every subset of size ≤ |T |, so T is not simple. By compactness, there exists ε > 0 such that {ϕ(x, bn,m ) ≤ ε} m∈N is inconsistent for all n ∈ N. Let cn = bn,0 for even n, and for odd n let cn = bn,m such that ϕ(ā, bn,m ) > ε. Then J = (c n ) is indiscernible, and along with ā witnesses that T is independent.

4.12

Theorem 4.13. Assume T is independent. Then T R has the tree property of the second kind, and is in particular neither dependent nor simple.

Proof. After a few standard manipulations of the independent formula ϕ, we may assume that there is a model M T and in there an indiscernible sequence (b m ) as well as a such that ϕ(a, b 2m ) = 0 and ϕ(a, b 2m+1 ) = 1. Assuming M to be saturated enough, it follows that for every w ⊆ N there exists a w ∈ M such that ϕ(a w , b m ) = 0 if m ∈ w and = 1 otherwise. Let A ARV and M = M A T R , and let us identify members of M with constant random variables in M. In A we may find an array (A n,m ) of independent events of measure Consider now the formula ψ(x, yU ) = d ϕ(x, y) , U . For n ∈ N and w n let B w,n = i<n A i∈w , where A ⊤ = A and A ⊥ = ¬A. By fullness we may construct a n such that for each w ⊆ n, a n = a w on B w,n , and observe that ψ(a n , b i A i,0 ) = 0 for all i < n. In a saturated elementary extension we may therefore find a such that ψ(a, b n A n,0 ) = 0 for all n. On the other hand, if ψ(a ′ , b 0 A 0,0 ) = 0 then ψ(a ′ , b 0 A 0,1 ) = 1 2 . Thus T R has T P 2 .

4.13

Question 4.14. Say that a continuous theory T has the strict order property (SOP) if there exists a formula ϕ(x, ȳ) which defines a continuous pre-ordering with infinite ε-chains for some ε > 0, i.e., satisfies:

• Reflexivity: ϕ(ā, ā) = 0.

• Transitivity: ϕ(ā, c) ≤ ϕ(ā, b) + ϕ( b, c).

• Infinite ε-chain: There exists ε > 0 and a sequence (ā n ) n∈N in a model of T such that: n<m ϕ(ā n , ām ) + ε < n>m ϕ(ā n , ām ).

One can show that T is unstable if and only if it is independent or has the strict order property. Indeed, a straightforward translation of the proof for classical first order theories, as can be found in Poizat [START_REF] Poizat | Cours de théorie des modèles, Nur al-Mantiq wal-Ma'rifah[END_REF], would work, keeping in mind that every formula of the form ϕ(x, x ′ ) = sup y ψ(x, y) -. ψ(x ′ , y) defines a continuous pre-ordering, in analogy with formulae of the form ∀y ψ(x, y) → ψ(x ′ , y) in classical logic.

(i) Assume T is independent. Does T R has the strict order property? (ii) Alternatively, is it true that if T does not have the strict order property then neither does T R ?

Corollary 4.15. Randomisation cannot produce simple unstable theories: if T R is simple then it is in fact stable.

Proof. As in classical logic, the strict order property implies non simplicity, so a simple dependent theory is stable. The following is by now essentially folklore, and in any case quite easy. Definition 5.3. Let (M, A ) T R . An A -type in (M, A ) is a complete type over a subset of A which has a unique extension to a type over A . We define the A -type of ā ∈ M n to be tp A (ā) = tp(ā/σ(ā)).

  e., ζ(x) ∈ U . This concludes the proof.

  Lemma 2.1. Let M be a model of RV1. Then for every a, b ∈ M : E(a) -E(b) ≤ E(a -. b) ≤ E(a). In particular M respects Modus Ponens: if b = 0 and a -. b = 0 then a = 0. Proof. Axiom RV1 implies first that E(a) ≥ E(a-. b). But then E(b) ≥ E(b -. (b -. a)) = E(b ∧a) whereby E(a) -E(b) ≤ E(a) -E(b ∧ a) = E(a -. b). Modus Ponens follows.

  for arbitrary n. It follows that E(a) = 0, i.e., that a = 0. (vi) Assume that a ≡ M b, i.e., that M a -. b and M b -. a. Be the previous item a -. b = b -. a = 0 whereby a = b.

  Lemma 3.10. Let M T Ra 0 , a, b ∈ M and A ∈ F M . Then there exists (a unique) c = A, a, b ∈ M which is equal to a over A and to b elsewhere:

Corollary 3 .

 3 18 (Keisler's Validity Axiom). Assume ϕ is a valid L-sentence. Then T Ra 0 ⊢ ϕ = 0. 3.4. A variant of Łoś's Theorem. Theorem 3.19 (Łoś's Theorem for randomisation). Let M Ω be a family of structures, M = M , and let E be an integration functional on A = [0, 1] Ω . Let ( M, A ) denote the structure associated to the randomisation (M, A ).

R

  (S n (T )) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . f * ,R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  we arrange that in addition d b(ω), a(ω)) < ε. Apply Corollary 3.27 to obtain an elementary extension M ′ M and b ∈ M ′ such that tp(b) = p m and d(b, a) ≤ ε(1 -E) + E < 2ε, as desired.

Fact 4. 4 .

 4 The properties R k (π(x, W ), ϕ) ≥ s and R k (x/W, ϕ) ≥ s are type-definable (in W and in xW , respectively).

Lemma 4. 7 .

 7 Let M be a model of T , p ∈ S x (M ) a type, and let η = R <ω (p, ϕ).(i) Let M M be a very homogeneous and saturated extension and let [p] (η) ⊆ S ϕ (M) be defined as above. Then [p] (η) = {q} where q is the unique non forking ϕ-extension of p. (ii) There are k ∈ N, ξ(x, w) ∈ Ξ η↾ k and c ∈ M such that ξ(x, c) ∈ p. Moreover, for any dense subset M 0 ⊆ M we may arrange our choices so that c ⊆ M 0 .For m ∈ N let D m = B σ m ,ξ m ,c m k<m B σ k ,ξ k ,c k . Then {D m } m∈N is a family of disjoint Borel sets and µ ( D m ) = µ(Ω 0 ) = 1. In addition, for all ω ∈ D m ⊆ B σ m ,ξ m ,c m and b ∈ M we have | ξm σ m (b(ω), cm (ω))ϕ(a(ω), b(ω))| < ε. For each m let X m = P[D m |F M ] ∈ A M and let ψ(y) = m E X m ξm σ m (y, cm ) .Since X m = 1 this infinite sum converges uniformly to an M-definable predicate. We now claim that ψ is ε-close to a E ϕ -definition for p. Indeed, for b ∈ M we have ξm σ m (y, cm ) ∈ A M , whereby ψ(b) = m Dm ξm σ m (b, cm ) dµ. We obtain ψ(b) -E ϕ(a, b) ≤ m Dm | ξm σ m (b, cm )ϕ(a, b)| dµ < ε.

  n ϕ(ā, b2n ) + ε < n ϕ(ā, b2n+1 ).

  1 2 , which in fact forms an indiscernible set, and by Corollary 3.34 it is an indiscernible set over M (the constants). Let us consider the array (b n A n,m ) n,m in M, in which b n occurs repeatedly throughout the nth line I n = (b n A n,m ) m . Then the lines are mutually indiscernible, and form an indiscernible sequence (I n ) n .

  Let a and b be two tuples, possibly infinite, in a structure M. We say that d L (a, b) ≤ 1 if in some (every) sufficiently saturated elementary extension N M there exists an elementary substructure N 0 N such that a ≡ N0 b. We say that d L (a, b) ≤ n if in some (every) sufficiently saturated elementary extension there exist a 0 = a, a 1 , . . . ,a n = b such that d L (a k , a k+1 ) ≤ 1 for k < n. If d L (a, b) < ∞, i.e., if d L (a, b)≤ n for some n, then we say that a and b have the same Lascar type, in symbols a ≡ L b.

Fact

  For every n, the relation d L (x, y) ≤ n is a reflexive, symmetric type-definable relation. (ii) The relation ≡ L is the transitive closure of d L (x, y) ≤ n for any n > 0. It is the finest bounded automorphism-invariant equivalence relation on the sort in question. (iii) If d L (a, b) ≤ n in some sufficiently saturated structure M then for every other tuple a ′ there exists b ′ such that d L (a ′ a, b ′ b) ≤ n.

Research supported by ANR chaire d'excellence junior THEMODMET (ANR-06-CEXC-007) and by Marie Curie research network ModNet.

The author wishes to thank the referee for many helpful remarks regarding the structure of the articles and references.

Proof. The argument for the first item essentially appears in [START_REF]Continuous first order logic and local stability[END_REF], although the Cantor-Bendixson ranks used there are different. It goes through the following steps. The set [p] (η) is topologically and therefore metrically closed. By construction it is non empty and totally bounded, and therefore metrically compact. Clearly it is also M -invariant, and it follows that every q ∈ [p] (η) is definable over acl eq (M ) = M . We conclude there is a unique such q which follows the definition of p.

For the second item consider the following partial type over M : p(x) ∪ p(x ′ ) ∪ {|ϕ(x, y)ϕ(x ′ , y)| ≥ ε} ∪ {R <ω (x/M y, ϕ) ≥ η} ∪ {R <ω (x ′ /M y, ϕ) ≥ η}.

By the first item this type is contradictory. Let us re-write p(x) as p(x, M ) where p(x, W ) ∈ S x,W (T ) is a complete type. Then the following is inconsistent:

Thus by compactness there are k ∈ N and ξ 0 (x, w) ∈ p(x, W ) such that the following is inconsistent: For the moreover part first notice that p is equivalent to its restriction to M 0 (where M 0 ⊆ M is any dense subset), so the argument above holds just as well with M 0 in place of M .

4.7

Lemma 4.8. Let T be any theory in a countable language. Let M T R be a model based on (Ω, µ) and let M 0 M be a countable elementary pre-sub-structure. For ω ∈ Ω let M 0 (ω) = {a(ω)} a∈M0 ⊆ M(ω). Then M 0 (ω) M(ω) as L-pre-structures for all ω outside a null measure set.

Proof. Let us fix a formula ϕ(x, w) and b ∈ M 0 . By Theorem 3.14 we have sup

On the other hand we have

Thus we have outside a null measure set

There are countably many formulae ϕ(x, b) to be considered, so outside a null measure set the Tarski-Vaught Criterion holds and M 0 (ω) M(ω).

4.8

Theorem 4.9. Let ϕ(x, y) be a stable formula for a theory T . Then the formula E ϕ(x, y) is stable for T R . If T is stable the so is T R .

Proof. We may assume that the language of T is countable (for if not, we may restrict to a sub-language containing just the symbols appearing in ϕ). It will therefore be enough to show that for every separable model M T R , every type p ∈ S x (M) is E ϕ -definable. For this purpose let a ∈ M ′ M realise p. Let also M 0 = {c n } n∈N ⊆ M be a dense pre-sub-structure. By Lemma 4.8 there is a measure one set

Let Υ consist of all triplets (σ, ξ, c) where σ ∈ N <ω , ξ(x, w) ∈ Ξ σ and c ∈ M 0 with | w| = |c|. For (σ, ξ, c) ∈ Υ define subsets of Ω as follows:

The set A σ is closed and each B σ,ξ,c is relatively open in A σ , so in particular Borel. Moreover, by Lemma 4.7 every ω ∈ Ω 0 belongs to some B σ,ξ,c . Given all our countability assumptions we may enumerate Υ = {(σ m , ξ m , cm )} m∈N . Let us also write ξ m explicitly as ξ m (x, wm ). By Lemma 4.6 there is a formula ξm σ m (y, wm ) such that {ξ m (x, wm )

Lemma 5.4. A type p(x) over a subset of A is an A -type if and only if it is equivalent to tp A (ā) for some ā, if and only if it determines ϕ(ā) for every formula ϕ(x). It is then axiomatised by the set of all conditions of the form ϕ(x) = ϕ(ā) . Moreover, tp A (ā) = tp A ( b) if and only if, in the canonical representation, ā(ω) ≡ b(ω) for all ω.

Proof. Easy, using Corollary 3.34.

5.4

We may therefore write ā ≡ A b to say that ā and b have the same A -type. Similarly, if p(x) is an A -type we may write ϕ(x) p ∈ A for the value of ϕ(x) as determined by p. Proof. Let A 0 ⊆ A be the sub-structure generated by ϕ where ϕ varies over all sentences. Then A 0 ⊆ dcl(∅) in (M, A ). Let Φ be the collection of all formulae ϕ(x) with the appropriate variable. For ϕ ∈ Φ let X ϕ = ϕ(a) and let X = (X ϕ ) ϕ∈Φ . Define Ȳ = (Y ϕ ) ϕ∈Φ = ( ϕ(b) ) ϕ∈Φ similarly. Then by assumption X ≡ Ȳ in (M, A ), whereby X ≡ A0 Ȳ .

Let (M 1 , A 1 ) (M, A ) be a small elementary sub-structure. Then necessarily A 0 ⊆ A 1 . By our saturation assumption we may find A 2 ⊆ A such that A 2 ≡ A0 A 1 and A 2 | ⌣A 0 X, Ȳ , both in the sense of A (as a model of ARV ). By Corollary 3.34 we have A 2 ≡ A 1 in the structure (M, A ) so again by saturation there is M 2 ⊆ M such that (M 2 , A 2 ) ≡ (M 1 , A 1 ), and in particular (M 2 , A 2 ) (M, A ). By construction we have X ≡ A2 Ȳ in the sense of A and applying Corollary 3.34 again we obtain X ≡ (M2,A2) Ȳ . Thus d L ( X, Ȳ ) ≤ 1. By Fact 5.2 there is c such that d L (a X, c Ȳ ) ≤ 1. In particular a X ≡ c Ȳ whereby Y ϕ = ϕ(c) for all ϕ(x). Thus c ≡ A b as desired.

5.5

We now turn to consider the case where a ≡ A b. We shall require an additional technical result.

Lemma 5.6. Let Ω be a set, τ : Ω → Ω a bijection. Then there exists an integration functional E on

Proof. This is a special case of a general fact that if an amenable group G (in our case, (Z, +)) acts on a space Ω then Ω admits a G-invariant probability integration functional. Proof. Let (M, A ) be the canonical representation of (M, A ), based on M = {M ω } ω∈Ω . Then for every ω ∈ Ω we have a(ω) ≡ b(ω) in M ω , so there exists an elementary extension

Let Ω ′ = Ω × Ḡ, and let π : Ω ′ → Ω be the projection on the first coördinate. By Fact 3.21 there exists an integration functional E 1 on A 1 = [0, 1] Ω which extends integration of Borel functions. The left action of h on Ḡ is bijective, so [0, 1] Ḡ admits an integration functional E G which is invariant under the left action of h.

which we may also write as

. Then E ′ is easily checked to be an integration functional.

, which is another elementary embedding. With M ′ = M ′ Ω ′ , we obtain two maps σ, η : M → M ′ , given by

We are now in the situation described in Corollary 3.27. In particular, the triplet (M ′ , A ′ , E ′ ) is a randomisation, and we obtain two • -embeddings,

We claim that [σa] ≡ [ηM]

[σb]. Indeed, let c ∈ M, ϕ(x, ȳ) any formula, and let X = ϕ(σa, ηc) and Y = ϕ(σb, ηc) , both members of [0, 1] Ω ′ . Fix ω ∈ Ω, and let ḡ ∈ Ḡ vary freely. Then:

Since E G was chosen invariant under the left action of h on Ḡ we obtain that E

5.7

Theorem 5.8. Let T be any theory, (M, A ) T R , a, b ∈ M, and let A ⊆ M be any set of parameters. Then the following are equivalent:

First of all we may name A in the language (at no point did we assume that T was complete), so we may assume that A = ∅. For the implication (ii) =⇒ (iii), just apply Lemma 5.5 followed by Lemma 5.7. The implications (iii) =⇒ (i) =⇒ (ii) are standard and holds in arbitrary structures.

5.8

Corollary 5.9. Let M T R , A ⊆ M. Let dcl eq,R denote the definable closure in the sense of (T R ) eq , and similarly for acl eq,R . Then dcl eq,R (A) = acl eq,R (A) in M.

Notice that even though dcl eq,R (A) and acl eq,R (A) may contain imaginary elements in the sense T R , the set A is required to consist of real elements, i.e., elements coming from sorts of T .

Corollary 5.10. For every theory T , the theory T R is G-compact, which means that for every set of parameters A and for every tuple length α, the relation ā ≡ L A b between tuples of length α is type-definable over A.

Proof. Since the relation d L

A (x, ȳ) ≤ 2 is type-definable.

5.10