Some semilattices of definable sets in continuous logic

In continuous first-order logic, the union of definable sets is definable but generally the intersection is not. This means that in any continuous theory, the collection of $\varnothing$-definable sets in one variable forms a join-semilattice under inclusion that may fail to be a lattice. We investigate the question of which semilattices arise as the collection of definable sets in a continuous theory. We show that for any non-trivial finite semilattice $L$ (or, equivalently, any finite lattice $L$), there is a superstable theory $T$ whose semilattice of definable sets is $L$. We then extend this construction to some infinite semilattices. In particular, we show that the following semilattices arise in continuous theories: $\alpha+1$ and $(\alpha+1)^\ast$ for any ordinal $\alpha$, a semilattice containing an exact pair above $\omega$, and the lattice of filters in $L$ for any countable meet-semilattice $L$. By previous work of the author, this establishes that these semilattices arise in stable theories. The first two are done in languages of cardinality $\aleph_0 + |\alpha|$, and the latter two are done in countable languages.


Introduction
Continuous first-order logic, introduced in its modern form in Ben Yaacov, Berenstein, Henson, and Usvyatsov [4], is a generalization of ordinary first-order logic that deals with structures comprising complete metric spaces and uniformly continuous predicates and functions, called metric structures.
In a metric structure M , a closed set D ⊆ M is definable if its distance predicate inf{d(x, y) : y ∈ D} is equivalent to a formula.(We take formulas to be closed under uniformly convergent limits.)These are precisely the sets that admit relative quantification in the sense that for any formula φ(x, y), there is a formula equivalent to inf y∈D φ(x, y).We will conflate a definable set D ⊆ M with the corresponding closed set of types {tp(a) : a ∈ D N , N ⪰ M} in S 1 (T), and we will abuse terminology by referring to such sets as definable as well.
1 Finite semilattices of definable sets First, we will recall the definition of the term 'topometric space.'Definition 1.1 A topometric space (X, τ, ∂) is a set X together with a topology τ and a metric ∂ such that the metric refines the topology and is lower semi-continuous (ie, has {(x, y) ∈ X 2 : ∂(x, y) ≤ ε} closed for every ε > 0).
The relevance of this concept to continuous logic is the fact that every type space S 1 (T) has a natural topometric space structure induced by the metric: The following facts will be useful to keep in mind during the construction.Topological operators such as the interior, int A, are always computed in the compact logic topology.We take superscript operators to bind more tightly than prefix and infix operators, so int A <ε is int(A <ε ), cl(A ∩ B) <ε is cl((A ∩ B) <ε ), and A ∩ B <ε is A ∩ (B <ε ).Fact 1.2 For any type space S 1 (T), a closed set D ⊆ S 1 (T) is definable if and only if D ⊆ int D <r for every r > 0.
For any topometric space X and set Q ⊆ X , the following are equivalent.
If the metric on X is adequate, then 1 and 2 are also equivalent to 3.
(3) Q <r is open for every r > 0.
Proof The statement regarding definable sets is equivalent to [4, Proposition 9.19].
(3) clearly implies (1) and (2), so assume the metric is adequate.For any x ∈ Q <r , let s = d(x, Q) < r.We now have that x ∈ Q <s ⊆ (int Q <r−s ) <s ⊆ Q <r by the triangle inequality.Since (int Q <r−s ) <s is open, x ∈ int Q <r .Since we can do this for every x ∈ Q <r , Q <r is open.
Given Fact 1.2, we will use the following definition.Definition 1.3 In any topometric space (X, τ, d), a closed set D ⊆ X is definable if D ⊆ int D <r for every r > 0.
In Section 2, we will use Definition 1.3 even when X is not compact.
Perhaps generalizing the term 'definable set' to arbitrary topometric spaces like this is ill-advised, but at the moment it doesn't seem that there are any applications of Definition 1.3 outside of the context of type spaces in continuous logic.

Circuitry
We will start our construction by building the type space S 1 (T) as an explicit topometric space.We will then argue that what we have built actually is S 1 (T) for some weakly minimal T with trivial geometry.The construction proceeds by building something reminiscent of a logical circuit consisting of 'wires' and 'gates.'Unfortunately the metaphor is somewhat backwards in that it will make sense to regard a wire as 'on' if it is disjoint from the definable set in question.Definition 1.4 Given a topometric space (X, τ, d), a set A ⊆ X is crisply embedded in X if d(a, x) = 1 for any a ∈ A and x ∈ X \ A. If {x} is crisply embedded in X , we may also say that the point x is crisply embedded.
A point a ∈ X is metrically ε-isolated if d(a, x) ≥ ε for any x ∈ X \ {a}.
Throughout the paper all metrics will be [0, 1]-valued.Note that a is crisply embedded if and only if it is metrically 1-isolated.Definition 1.5 Given topometric spaces X and Y , the coproduct of X and Y , written X ⊕ Y is the topometric space with underlying topological space X ⊔ Y where the metric is extended so that d(x, y) = 1 for any x ∈ X and y ∈ Y .
Given a topometric space X and two crisply embedded points x and y, the topometric space produced by soldering x and y together is the topometric space whose underlying topological space is X with x and y topologically glued and in which the metric is defined so that d(z, w) is unchanged for any z and w in X with {z, w} ̸ = {x, y}.Given a finite set of crisply embedded points X 0 ⊆ X , we define soldering together the points of X 0 similarly.Given two topometric spaces X and Y with crisply embedded x ∈ X and y ∈ Y , the topometric space produced by soldering x and y together is the topometric space produced by soldering x and y together in X ⊕ Y .
It is easy to verify that the objects described in Definition 1.5 are in fact topometric spaces.
A fact that we will frequently use implicitly is this: If X is a metric space and D, E ⊆ X , then for any r > 0, (D ∩ E) <r ∩ E = x∈D∩E B E <r (x), where B E <r (x) is the open ball of radius r around x in the metric space (E, d).In other words, (D ∩ E) <r ∩ E is (D ∩ E) <r 'computed in E.' Lemma 1.6 Let X and Y be topometric spaces. ( ) X ⊕ Y has an adequate metric if and only if X and Y have adequate metrics.
Let Z be topometric spaces, let z 0 and z 1 be crisply embedded points in Z , let W be Z with z 0 and z 1 soldered together, let w ∈ W be the point corresponding to z 0 and z 1 , and let π : Z → W be the quotient map.
W has an adequate metric if and only if Z has an adequate metric.
Proof (1) and ( 2) follow immediately from the fact that for any positive r ≤ 1 and any is definable as a subset of W \ {w}, which is open.Since π↾ Z \ {z 0 , z 1 } is an isometric homeomorphism, this is enough to establish that D is definable in Z \ {z 0 , z 1 } and therefore also in Z .Every step in this argument is reversible, so we also have that if For (4), if Z has an adequate metric, then for any U ⊆ W and any r > 0, we clearly have that <r is open.On the other hand, if W has an adequate metric, then for any U ⊆ Z \ {z 0 , z 1 } and any r > 0, we have that If U contains one of z 0 and z 1 , then for any positive r ≤ 1, we have that  1), τ is the subspace topology, and d is the unique metric satisfying: ) and ⟨z, w⟩ ̸ = ⟨x, y⟩ (see Figure 2), then d(⟨x, y⟩, ⟨z, w⟩) = 1; • if x ̸ = z, then d(⟨x, y⟩, ⟨z, w⟩) = 1; and • if ⟨x, y⟩ and ⟨z, w⟩ are both in the set {⟨x, ±x⟩ : Proof Fix a connected open set U and an ε > 0 such that every x ∈ U is metrically ε-isolated.Fix a definable set D. We have that The name of the AND gate space is justified by the following proposition.
Proposition 1.9 The only non-empty definable proper subsets of & are the union of ( 1) and ( 2), (4) the union of ( 1) and (0, 2] × {0}, and (5) the union of ( 2) and (0, 2] × {0}. In Since D is closed, it must contain the closure of any edge it contains.Now suppose that D contains one of the four points ⟨±1, ±1⟩.Call this point ⟨x, y⟩ Suppose that ⟨x, y⟩ / ∈ int D. We can then find an r > 0 small enough that for some open neighborhood V ∋ ⟨x, y⟩, D <r ∩ V = D ∩ V , which again is a contradiction.What we have established now is enough to show that D must be a (possibly empty) union of D 1 , D 2 (the definable set in (2)), and [0, 2] × {0}.If D is ∅ or & or is on the list in the statement of the proposition, then we are done.The only other possibility is that D = [0, 2] × {0}, but if this is the case then D < 1 2 = D ∪ {⟨z, ±z⟩ : 0 ≤ z < 1 2 }, which is not open.So D cannot be this set and we are done.The 'in particular' statement follows immediately.
So we see that & functions like an AND gate in the following sense: given a definable set D ⊆ &, we think of a vertex as being 'on' if it is not contained in the definable set in question.We then have by Proposition 1.9 that if the input vertices are on, the output vertex must be on as well, but there are no other restrictions on the configuration of the gate.
Strictly speaking, real-world AND gates usually don't have specified behavior for states analogous to (1), (2), or (3) in Proposition 1.9, since normally the output is meant to be thought of as a function of the inputs.This means that there are two ways to interpret what configurations should be possible.Here we have interpreted the operation of an AND gate in an 'if, then' manner, where the output is on if the inputs are both on.The other way would be to interpret it in an 'if and only if' manner, where the output is on if and only if the inputs are both on.It is actually easier to build a topometric space that accomplishes this, but in the end we would need to implement something that behaves like & and the resulting construction is ultimately more complicated.

Building type spaces
Now we will use & to build type spaces with arbitrary finite lattices as their semilattices of definable sets.Definition 1.10 For any bounded lattice L, write L − for the set L \ {1 L } (where 1 L is the top element of L).
For a finite lattice L, we write X(L) for the topometric space constructed in the following manner: For each triple (a, b, c) ∈ (L − ) 3 satisfying a ∧ b ≤ c, take a copy of & with the two input vertices labeled a and b and the output vertex labeled c.For each a ∈ L − , solder together all vertices labeled a. X(L) is the resulting space.We write x a for the point in X(L) corresponding to the vertices labeled a, and we write N(L) for {x a : a ∈ L − }.Note that Definition 1.10 will include many unnecessary copies of &, such as copies corresponding to triples of the form (a, a, a).It is only really necessary to include copies corresponding to some presentation of the lattice.N − 5 , for instance, has 42 ordered triples (a, b, c) satisfying a ∧ b ≤ c, but only 4 of these are needed to produce a topometric space whose semilattice of definable sets is isomorphic to N 5 , as depicted in Figure 4.
This example also establishes that even if a type space is 'planar' (as in, embeddable in R 2 ) and has finitely many definable sets, the lattice of definable sets might fail to be modular.
Lemma 1.11 Fix a finite lattice L and a definable set D.
For (3), given a non-empty filter F , let D ⊆ X(L) be the unique set satisfying This set is definable by Lemma 1.6 and Proposition 1.9.
Proposition 1.12 For any finite lattice L, the semilattice of definable sets in X(L) is isomorphic to L.
Finally, since L is finite, every non-empty filter is of the form F a , so we have that a → D a is a surjection and hence a lattice isomorphism.
Note that for each a ∈ L, D a is the unique maximal definable set not containing x a . 6n Figure 4, the left-hand element of N 5 maps to the definable set containing the two right-hand copies of & and the right-hand side of the center copy of &, for instance.

Weak minimality
At this point Hanson [7, Theorem 7.1] is enough to conclude that the topometric space given in Definition 1.10 is actually the type space of a stable theory,7 but given the special form of the type space involved, we can do better.
There is a common pattern among the example given here and many of the examples constructed in Hanson [6, Section C.1], which is that theory corresponding to the type space in question has the type space itself as a model in the following sense.Definition 1.13 For any compact topometric space (X, τ, d), we write L X for the metric language containing a predicate symbol P f for each continuous f : X → [0, 1], where the modulus of uniform continuity α P f of P f is chosen so that f is α P f -uniformly continuous on X .(Furthermore, if f is Lipschitz and r is the optimal Lipschitz constant for f , we take α P f (x) to be rx.) We write M X for the L X -structure whose underlying metric space is (X, d) and in which P Mx f (a) = f (a) for all P f ∈ L X and a ∈ M .We write T X for Th(M x ).
It follow from Ben Yaacov [2, Lemma 1.15, Proposition 1.17] that any continuous function from a compact topometric space to R is automatically uniformly continuous.
(See also [6, Proposition 2.1.2(v)]for a direct proof of the relevant special case.)Therefore L X is always well defined.
For any compact topometric space X , we have a natural projection map π X : S 1 (T X ) → X .(This follows from the fact that a point x in X is uniquely determined by the its quantifierfree 1-type in M X .)For most X , this will fail to be a homeomorphism, but in some special cases it is.
Definition 1.14 We say that a compact topometric space X is autological if π X : S 1 (T X ) → X is an isometric homeomorphism (ie, an isomorphism of topometric spaces).
Although we find autologicality quite amusing, it seems unlikely that it plays any broad role.
To complete our result, we will show that for any finite non-trivial lattice L, X(L) is autological and T X(L) is weakly minimal with trivial geometry (implying that it is superstable).
Proof If X is autological, then for any p ∈ S 1 (T X ), there is an x ∈ X such that tp(x) = p, which is precisely the required statement.
Conversely, suppose that every type in S 1 (T X ) is realized in M X .Since π X (tp(x)) = x, every type in S 1 (T X ) is realized by at most one element of M X .Since every type is realized, they must all be realized by precisely one element of M X .Therefore π X : S 1 (T X ) → X is a bijection.Since S 1 (T X ) and X are compact Hausdorff spaces, this implies that π X is a homeomorphism.
Proposition 1.16For any finite non-trivial lattice L, X(L) is autological.
Proof Find an ultrafilter U (on some index set I ) such that the ultrapower M U X(L) is |L X(L) | + -saturated.Identify M X(L) with its image under the diagonal embedding.In particular, M U X(L) realizes all types in S 1 (T X(L) ).Fix a ∈ M U X(L) .We need to argue that a ≡ π X(L) (tp(a)).
There are three kinds of points in X(L): • points x for which d(x, y) = 1 for all y ̸ = x; • points x for which there is precisely one y with 0 < d(x, y) < 1; and • points x for which there are precisely two points, y and z, such that 0 The set of points of the first kind is closed and the sets of points of the second two kinds are open.Clearly if a ∈ M U X(L) is a limit of points of the first kind, it will satisfy the same property in M U X(L) .Therefore the map that switches a and π X (tp(a)) is an automorphism of M U X(L) and we have that a ≡ π X (tp(a)).Suppose that a = (x i ) i∈I /U is some element of M U X(L) where x i is a point of the second kind for a U -large set of indices i ∈ I .The family (x i ) i∈I must eventually concentrate in a single copy of &, and in that copy it will be in the region {⟨x, ±x⟩ : −1 < x < 0}.For each i ∈ I for which x i is a point of the second kind, let y i be the unique point in X such that d(x i , y i ) < 1.Let b = (y i ) i∈I /U .There are three possibilities.Either lim i→U d(x i , y i ) = 0, lim i∈U d(x i , y i ) ∈ (0, 1), or lim i∈U d(x i , y i ) = 1.In the first and third case we have that π X (tp(a)) is a point of the first kind, and once again the map that switches a and π X (tp(a)) is an automorphism of M U X(L) .In the second case we similarly have that the map that switches a and π X (tp(a)) and switches b and π X (tp(b)) is an automorphism of M U X(L) .Therefore in any case we have that a ≡ π X (tp(a)).The argument when x i is a point of the third kind for a U -large set of indices is essentially the same, so we have that for all a ∈ M U X(L) , a ≡ π X(L) (tp(a)).Therefore all 1-types over ∅ are realized in M X and we have that X(L) is autological by Proposition 1.15.Theorem 1.17For any finite non-trivial lattice L, there is a weakly minimal theory T with trivial geometry such that the semilattice of definable subsets of S 1 (T) is isomorphic to L.
Proof By Proposition 1.12, we know that there is a topometric space X(L) whose semilattice of definable sets is isomorphic to L. By Proposition 1.16, we know that S 1 (T X ) is isometrically homeomorphic to X , so their semilattices of definable sets are isomorphic.
The proof of Proposition 1.16 makes it clear that a stable forking relation can be defined on models of T X by saying that B ̸ | ⌣A C if and only if there are b ∈ B and c ∈ C such that d(b, A) = 1, d(c, A) = 1, and d(b, c) < 1.Furthermore, whenever d(b, c) < 1, we have that b ∈ acl(c).Therefore the only way for a 1-type to fork is for it to become algebraic, which implies that the theory is weakly minimal.

Some infinite semilattices of definable sets
Using some of the technology from Section 1, we are able to realize some particular infinite lattices as the semilattice of definable subsets of a type space.The idea is to build an infinitely large circuit out of copies of & and then compactify in an appropriate way (eg Figure 5), possibly continuing the construction further (eg Figure 6).Since we use [7] the resulting theories are all stable, but superstability is unclear.The issue is that the resulting type spaces are not autological and so we cannot build the corresponding theory in the same way that we did in Theorem 1.17.This naturally leaves a question.Question 2.1 Are the type spaces constructed in Propositions 2.8 and 2.9 and Theorem 2.19 the type spaces of superstable theories?If not, are there superstable theories with the same semilattices of definable sets?
2.1 Crisp one-point compactifications Definition 2.2 Given a topometric space (X, τ, d), the crisp one-point compactification of X is the topometric space whose underlying topological space is the one-point compactification of X , X ∪ {∞}, and whose metric is d extended so that ∞ is crisply embedded (ie, d(∞, x) = 1 for all x ∈ X ).
(Recall that we are taking all metrics to be [0, 1]-valued.)Note that while the object described in Definition 2.2 always exists, it can in general fail to be a topometric space.For instance, an infinite discrete space with a discrete {0, 1 2 }-valued metric has no crisp one-point compactification.
Lemma 2.3 Fix a topometric space (X, τ, d).If X has an adequate metric and X * exists, then d * is adequate as well.
Proof Recall that a subset of the topological one-point compactification (X * , τ * ) is open if and only if it is an open subset of X or is the complement (in X * = X ∪ {∞}) of a closed compact subset of X .Since X is a topometric space, it is automatically Hausdorff and thus all compact subsets of it are closed.
If U ⊆ X is open, then for any r ≤ 1, we have that U <r ⊆ X and so U <r is an open set.For r > 1, U <r = X * is also an open set.
If U ⊆ X * is the complement of a compact subset F of X , then for any r ≤ 1, we have that U <r = (U ∩ X) <r ∪ {∞}, F \ U <r is therefore the same as F \ (U ∩ X) <r , which is a closed subset of a compact set and therefore compact itself.Thus U <r is the complement of a closed compact set and so is an open subset of X * .If r ≥ 1, then again U <r = X * .Proposition 2.4 Fix a topometric space (X, τ, d) such that X * exists.A closed set D ⊆ X * is definable if and only D ∩ X is definable in X and either Proof Assume that D ⊆ X * is definable.For any positive r ≤ 1, we have that ∈ D, then D must be compact, since D is a closed subset of X * not containing ∞ (and since X is a topometric space and therefore Hausdorff).
If ∞ ∈ D, then for every r > 0, we have that int τ * D <r is an open neighborhood of ∞.Therefore, by the definition of the topology on X * , int τ (D ∩ X) <r is co-compact in X .Now assume that D ∩ X is definable.If the first bullet point holds, then for any positive r ≤ 1, we have that If the second bullet point holds, then for any positive r ≤ 1 and x ∈ D, we either have that x ∈ X , in which case x ∈ int τ (D ∩ X) <r ⊆ int τ * D <r , or x = ∞, in which case {∞} ∪ int τ (D ∩ X) <r ⊆ D <r is an open neighborhood of ∞.So in either case, x ∈ int τ * D <r .Therefore D ⊆ int τ * D <r and since we can do this for any sufficiently small r > 0, D is definable in X * .

Directed systems of topometric spaces
We need the following definition and technical lemmas to deal with the fact that direct limits (also called directed colimits) seem to be rather delicate in the category of topometric spaces.Definition 2.5 Fix a directed set I , a family (X i , τ i , d i ) i∈I of topometric spaces, and isometric topological embeddings f ij : X i → X j for each pair i ≤ j ∈ I .Suppose that this data forms a directed system.Let (X I , τ I , d I ) be the direct limit of this system (in the sense that (X I , τ I ) = lim i∈I (X i , τ i ) and (X I , d I ) = lim i∈I (X i , d i )) and let f jI : X j → X I be the induced inclusion maps.
We say that the directed system of topometric spaces ((X i , τ i , (1) If D is definable in X I , then D ∩ X j is definable in X j for every j ∈ I .
(2) If d j is adequate and D ∩ X j is definable in X j for every j ∈ I , then D is definable in X I .
Proof We may assume without loss of generality that each X j is a subset of X I and f jI : X j → X I is the identity map.
For (1), fix r ∈ (0, 1] and consider D <r .Since each X j is crisply embedded in X I , we have that D <r ∩ X j = (D ∩ X j ) <r .Let U = int τ I D <r .By assumption, D ⊆ U .By the definition of the direct limit topology, U ∩ X j is τ j -open.Therefore whence D ∩ X j ⊆ int τ j (D ∩ X j ) <r .Since we can do this for any sufficiently small r > 0, D ∩ X j is definable in X j .
For (2), it's clear that for any r > 0, D <r = i∈I (D ∩ X j ) <r .Furthermore, just as before, we have that if r ≤ 1, then (D ∩ X j ) <r = D <r ∩ X j for every j ∈ I .Therefore, since each (D ∩ X j ) <r is τ j -open, we have that D <r is τ I -open.For r ≥ 1, D <r is either ∅ or X I , so D <r is open in every case, and D is definable in X I .
Lemma 2.7 Suppose that ((X i , τ i , d i ) i∈I , (f ij ) i≤j∈I ) is a crisp and eventually open directed system of topometric spaces.
(1) lim i∈I (X i , τ i , d i ) = (X I , τ I , d I ) is a topometric space.
(2) If d i is adequate for every i ∈ I , then d I is adequate.
(3) If X i is compact for every i ∈ I , then (X I , τ I , d I ) has a crisp one-point compactification.
Proof Without loss of generality we may identify each X i with its image f iI [X i ] ⊆ X I , so that the maps f ij and f iI are identity maps.It is immediate that X i is crisply embedded in X I for every i ∈ I .
Recall that a set U ⊆ X I is τ I -open if and only if U ∩ X i is τ i -open for every i ∈ I .Fix x ∈ X I and an open neighborhood U ∋ x.Find i ∈ I such that x ∈ X i .Find an ε > 0 with ε < 1 such that B <ε (x) ∩ X i ⊆ U ∩ X i (which exists since d i refines the topology τ i ).Since X i is crisply embedded in X I , we have that B <ε (x) ∩ X i = B <ε .Therefore B <ε (x) ⊆ U .Since we can do this for any x and U ∋ x, we have that d I refines τ I .
Fix x, y ∈ X I and r > 0 such that d I (x, y) > r.We may assume without loss of generality that r < 1. Find j ∈ I such that x and y are elements of int τ I X j .(We can do this because of the fact that if x ∈ int τ I X j and y ∈ int τ I x k , then for any ℓ ≥ j, k, {x, y} ⊆ int τ I X ℓ .)Since X j is a topometric space, there are neighborhoods U ∋ x and V ∋ y in X j such that for any x ′ ∈ U and y ′ ∈ V , d j (x ′ , y ′ ) > r.
We now have that U ∩ int τ I X j ∋ x and V ∩ int τ I X j ∋ y are neighborhoods in X I with the same property.Since we can do this for any x, y ∈ X I , we have that d I is lower semi-continuous and so (1) holds (ie, X I is a topometric space).
For (2), fix an open set U .For each x ∈ U , find a j(x) ∈ I such that x ∈ int τ I X j(x) and let V x = U ∩ int τ I X j(x) .We clearly have that U = x∈U V x .Fix r > 0. If r > 1, then U <r = X I is an open set, so assume that r ≤ 1.We have that U <r = x∈U V <r x .Since X j(x) is crisply embedded in X I , we have that V <r x ⊆ X j(x) .Furthermore, since d j(x) is adequate, V <r x is τ j(x) -open.We now need to argue that V <r x is open.Fix y ∈ V <r x .Find k ∈ I such that k ≥ j(x) and y ∈ int τ I X k .We now have that X j is crisply embedded in X k , so V <r x computed in X k is the same set as V <r x computed in X j .Since d j is adequate, we have that V <r x is open as a subset of X j .So now we have that is an open neighborhood in X I as well.Since we can do this for any y ∈ V <r x , we have that x is open for any x ∈ U , U <r is open as well.For (3), Since X I is a topometric space, it is Hausdorff and has that all of its compact sets are closed.As discussed after Definition 2.2, it is immediate that d * I refines τ * I , so all we need to verify is that d * I is lower semi-continuous.If x, y ∈ X I and d(x, y) > r > 0, then since X I is a topometric space, there are open sets U ∋ x and V ∋ y such that inf{d(x ′ , y ′ ) : x ′ ∈ U, y ′ ∈ V} > r.The only other case to check is x ∈ X I and ∞.Find j ∈ I such that x ∈ int τ I X j .Since X j is crisply embedded, we have that for any x ′ ∈ int τ I X j and any y ′ ∈ X * I \ X j , d(x ′ , y ′ ) = 1.Note that since X j is compact and X I is Hausdorff, X j is a closed compact set and so X * I \ X j is τ * I -open.Since we can do this for any x ∈ X I , we have that d(x, y) is lower semi-continuous and hence X I has a crisp one-point compactification.Lemma 2.7 is far from optimal, but it is unclear how far the techniques in this section can go, so we have not put much effort into sharpening it.
We now have the tools we need to build certain special lattices of definable sets.

Successor ordinals
Here we will build type spaces in which the semilattices of definable sets correspond to arbitrary successor ordinals.Proposition 2.8 For any ordinal α, there is a stable theory T in a language of cardinality ℵ 0 + |α| such that the semilattice of definable subsets of S 1 (T) is isomorphic to α + 1.Furthermore, the same is true of the reverse order (α + 1) * .
Proof Let & † be & with its input vertices soldered together.Refer to the soldered point as g ∈ & † .Let E be the unique non-empty definable proper subset of & † (ie, the set corresponding to {⟨x, y⟩ : Let (X 0 , τ 0 , d 0 ) be the one-point topometric space, and let x 0 be the unique element of X 0 .Let f 00 : X 0 → X 0 be the identity map.Note that d 0 is adequate.
For a limit ordinal λ, given (X β ) β<λ and (f βγ ) β≤γ<λ , we need to argue that this is a crisp and eventually open directed system of topometric spaces.Crispness is obvious from Definition 1.5.Furthermore, we clearly have that for any β ≤ γ < λ, f βγ [X β+1 \ {x β+1 }] is an open set containing X β , so the system is eventually open.Therefore by Lemma 2.7, lim β<λ (X β , τ β , d β ) is a topometric space with an adequate metric and a crisp one-point compactification.Let (X λ , τ λ , d λ ) be the crisp one-point compactification.By Lemma 2.3, d λ is an adequate metric.For any β < λ, let f βλ : X β → X λ be the natural inclusion map produced by composing the inclusion from X β into lim γ<λ X γ and the inclusion from lim γ<λ X γ into X λ .Now for any ordinal α, consider (X α , τ α , d α ).We have by induction that this is a compact topometric space with an adequate metric.(Note that if a directed system of topometric spaces has a last element, then it is trivially eventually open, so Lemma 2.7 applies even at successor stages.)We need to argue that the partial order of definable subsets of X α is order-isomorphic to α + 1.For β < α, we will regard X β as a subset of X α .For any β < α, consider the set is definable in X γ+1 by Lemma 1.6.For a limit λ > β + 1, we have that D β is definable in lim γ<λ X γ = γ<λ X γ by Lemma 2.6.Therefore D β is definable in X λ by Proposition 2.4.Therefore, by induction, we have that D ∈ {∅, X α } for every β < α.Therefore the family of definable sets {∅} ∪ {D β : β < α} ∪ {X α } has order type 1 Now finally, we just need to argue that these are the only definable subsets of X α .Let D ⊆ X α be a non-empty definable set that is not X α .Let β < α be the smallest such that & † β ̸ ⊆ D. By Lemmas 1.6 and 2.6, it must be the case that either β , so the first case cannot happen and it must be that D ∩ & † β = E β .Now, for the sake of contradictions, assume that there is a γ ∈ (β, α) Let γ be the least such.By Lemmas 1.5 and 2.6, it must be the case that x γ ∈ D. We know that x β+1 / ∈ D, so it must be the case that γ > β + 1.If γ is a successor ordinal, then we must have that D ∩ & † γ−1 ̸ = ∅, which is a contradiction.Therefore we must have that γ is a limit ordinal.But now D ∩ X γ contains x γ (the point at infinity in X γ ) as an isolated point, which is impossible by Proposition 2.4.Therefore no such γ can exist.Therefore D = D β .Since we can do this for every non-empty, proper definable subset D, we have that the semilattice of definable subsets of X α is order-isomorphic to α + 1.The result then follows by [7, Theorem 7.1].
For the reverse order, perform the above construction with the orientation of & † reversed.(See Figure 5.) We will write X * α , x * α , & † * α , and E * α for the corresponding objects in this construction.(In particular, note that for any α, x * α is the element of & † * α corresponding to the point ⟨2, 0⟩ in &.) Now, fix an α and for any β < α, write By essentially the same argument as before, we have that D * β is a definable subset of α for any β < α.Furthermore each D * β is neither empty nor all of X α and for any β < γ < α, D β ⊃ D γ , so we have that there is a family of definable sets of order type 1 β−1 would be non-empty).Suppose that β is a limit ordinal and that & † * β ∩ D ̸ = E * β .It must be the case that x * β ∈ D, but this implies that D ∩ X * β = {x * β }, which is not a definable subset of X * β .This contradicts Proposition 2.4.Therefore we must have that D ∩ & † * β = E * β .Now suppose for the sake of contradiction that there is a γ ∈ (β, α) such that & † * γ ̸ ⊆ D. Let γ be the least such.Since it is the least, we must have that x * γ ∈ D, but by Lemma 1.6 and Propositions 1.9 and 2.4, this implies that & † * γ ⊆ D, which is a contradiction.Therefore no such γ can exist and we have that D = D * β , as required.Since we can do this for any non-empty definable proper subset D ⊂ X * α , we have that the semilattice of definable sets in X * α is order-isomorphic to (α + 1) * .The result again follows by [7, Theorem 7.1].
To get the cardinality bound on the language of the theory T , note that a basic inductive argument shows that for any α, X α has a base of cardinality at most ℵ 0 + |α|.This implies that there is a reduct T 0 of T in a language of cardinality at most ℵ 0 + |α| such that S 1 (T 0 ) and S 1 (T) are isometrically homeomorphic.The argument for the reverse order case is the same.
It is possible to solder the type spaces in Figure 5 together in such a way that the resulting semilattice of definable sets is isomorphic to 1 + Z + 1.We will not write this out explicitly however, as we prove a more general statement in Section 2.5.
Journal of Logic & Analysis 16:3 (2024) Some semilattices of definable sets in continuous logic 21 2.4 A semilattice that is not a lattice In this section we will give an example of a type space in which the semilattice of definable sets is not a lattice, which, while an expected phenomenon, is seemingly a bit hard to come by.
Recall that in a semilattice L, an exact pair above an ideal I is a pair of elements a and b such that I = {x ∈ L : x ≤ a ∧ x ≤ b}.If I has no largest element, this state of affairs entails that {a, b} does not have a greatest lower bound.Let X ω and x ω be as in the proof of Proposition 2.8.Solder three copies of & to x ω in the configuration seen in Figure 7 and call the resulting space Y .It is straightforward to verify that the lattice of definable subsets of (Y \ X ω ) ∪ {x ω } is isomorphic to the two-element Boolean algebra.Let A and B be the two non-empty proper definable subsets of (Y \ X ω ) ∪ {x ω }.Proposition 2.9 The non-empty definable proper subsets of Y are precisely D α for α < ω (as defined in the proof of Proposition 2.8), X ω ∪ A, and X ω ∪ B. In particular, X ω ∪ A and X ω ∪ B form an exact pair above the ideal {∅} ∪ {D α : α < ω} and so have no meet.
Proof By the same reasoning as in the proof of Proposition 2.8, we can establish that D α is definable in Y for any α < ω .Furthermore, it follows from Lemma 1.6 that X ω ∪ A and X ω ∪ B are definable.
It follows from the proof of Proposition 2.8 that the only sets D ⊆ X ω that are definable in X ω are ∅, X ω , and the sets {D α : α < ω}.

It is straightforward to verify
Therefore, by Lemma 1.6, we have that the definable subsets of Y are precisely ∅, Y , {D α : α < ω}, X ω ∪ A, and X ω ∪ B, and the result follows.
We have included this proposition not because it resolves an outstanding question about stable theories in continuous logic,8 but more because it shows that the techniques presented here can be used to build semilattices that are not lattices.Note that every other semilattice of definable sets presented in this paper is actually a complete lattice.

Lattices of filters on countable meet-semilattices
Here we will show that for any countable meet-semilattice (L, ∧), there is a type space S 1 (T) whose join-semilattice of definable sets is isomorphic to the lattice of filters on L (ie, upwards-closed sets closed under meets).9This is in some sense an extension of Theorem 1.17 (and in particular Lemma 1.11 part (2)), but as with the rest of the results in this section, we are only able to build a stable theory.
The lattices of filters in countable meet-semilattices are the same thing as the complete lattices with countable meet-dense subsets. 10This includes any countable complete lattice, such as 1 + Z + 1 and the Rieger-Nishimura lattice (ie, the free Heyting algebra over one generator), and many partial orders familiar from analysis, such as ([0, 1], ≤) and the Boolean algebra of measurable subsets of [0, 1] modulo Lebesgue measure 0.
There are five steps to the construction.
(1) We will build a non-compact, locally compact topometric space Y 0 (L) (with an adequate metric) whose semilattice of definable sets is the required lattice.This space will be locally compact and have a continuous function ν to R ≥0 with the property that for every r > 0, ν −1 [[0, r]] is compact.Every element a of L will correspond to an open subset U a of Y 0 (L), which will satisfy a < b ⇒ U a ⊃ U b .This will be conceptually similar to the construction in Section 1, but we will need to stretch out the nodes corresponding to each element to avoid soldering infinitely many wires to a single point.A filter F will map to the definable set Y 0 (L) \ a∈F U a .

Ξ(0)
Ξ( 1) Ξ( 4) Ξ( 5) Figure 8: Y 0 (L) with some copies of & shown (2) We add two additional copies Y 1 (L) and Y 2 (L) of Y 0 (L) which take turns getting arbitrarily close to Y 0 (L) in the limit as ν(x) → ∞.While one copy is close to Y 0 (L), the other will retreat to a distance of 1, so that we can safely solder points together in it without spoiling adequacy of the metric.
(3) We periodically solder points together in each of the two extra copies of Y 0 (L) (in positions where they have retreated to a distance of 1) in order to 'short circuit' the behavior of definable sets in Y 1 (L) and Y 2 (L).In particular, for any definable set D and either i ∈ {1, 2}, either (4) We solder points in Y 1 (L) and Y 2 (L) to some point in Y 0 (L) corresponding to L's bottom, 0 L .This will ensure that any non-empty definable subset of the space contains all of Y 1 (L) and Y 2 (L).
(5) We take the crisp one-point compactification of the space, adding the point ∞.
Any non-empty definable set will necessarily contain ∞.We then argue that the semilattice of definable sets is unchanged.
In particular, we should note that this does not give us a general method of embedding a non-compact, locally compact topometric space into a compact topometric space while preserving the semilattice of definable sets, as our method will rely heavily on the special form of Y 0 (L).

Step 1:
The space Y 0 (L) Definition 2.10 We write Ξ for the set {⟨x, y⟩ ∈ R × N : x ≥ y}, which we regard as a topometric space with the induced topology and a discrete metric.
Let (L, ∧) be a countable meet-semilattice with a given enumeration (ℓ n ) n<ω .We will always assume that ℓ 0 = 0 L (ie, the bottom element of L).We write Y 0 (L) for the topometric space consisting of Ξ together with, for each triple ⟨a, b, c⟩ ∈ N 3 satisfying • for each triple ⟨a 0 , a 1 , a 2 ⟩ with ℓ a 0 ∧ ℓ a 1 ≤ ℓ a 2 , the unique subset of &(a 0 , a 1 , a 2 ) that is definable in &(a 0 , a 1 , a 2 ) and that, for each i < 3, contains the vertex soldered to Ξ(a i ) if and only if ℓ ai / ∈ F .
We write ν L for the function from Y 0 (L) to R ≥0 that takes each element ⟨x, y⟩ of Ξ to x and each element of each &(a, b, c) to max(a, b, c).
Definition 2.11 Given a topometric space X , a crisp slicing of X is a continuous function ν : X → R ≥0 such that for any x, y ∈ X , if ν(x) ̸ = ν(y), then d(x, y) = 1.
Lemma 2.12 Fix a countable meet-semilattice L.
(1) Y 0 (L) is well defined and is a topometric space with an adequate metric.
( Proof (1) follows from Lemmas 1.6 and 2.7, where we think of Y 0 (L) as the direct limit of the crisp directed system ( n<k Ξ(ℓ n ) ∪ {&(a, b, c) : a, b, c < k, ℓ a ∧ ℓ b ≤ ℓ c }) k<ω with the natural inclusion maps.
(2) follows from the fact that for any r ≥ 0 only finitely many Ξ(a)'s and copies of & have points x with ν(x) ≤ r.
For (3), we first need to verify that for each &(a, b, c), the prescribed definable-in-&(a, b, c) set actually exists.Fix ⟨a, b, c⟩ with ℓ a ∧ ℓ b ≤ ℓ c .By Proposition 1.9, the only restriction on definable subsets of &(a, b, c) is that if they do not contain the vertices corresponding to a and b, then they must not contain the vertex corresponding to c.So suppose that ℓ a ∈ F and ℓ b ∈ F (so that the vertices corresponding to a and b in &(a, b, c) need to be not contained in D 0 (F)).Then, since F is a filter, ℓ a ∧ ℓ b ∈ F and so ℓ c ∈ F as well.Therefore the vertex corresponding to c in &(a, b, c) is not contained in D 0 (F), and the required definable set exists.The resulting set is closed since it is a locally finite union of closed sets.
(4) and ( 5) are immediate.Proposition 2.13 For any countable meet-semilattice L and filter F ⊆ L, D 0 (F) is a definable subset of Y 0 (L).Furthermore, the map F → D 0 (F) is a complete lattice isomorphism from the lattice of filters in L (with join taken to be intersection) to the join-semilattice of definable subsets of Y 0 (L).
Furthermore, the join of any collection of definable subsets of Y 0 (L) is its set-theoretic union.
Proof Fix a filter F in L. Let (Y k ) k<ω be the directed system described in the proof of Lemma 2.12 (ie, Since this system is crisp, we just need to verify that D 0 (F) ∩ Y k is definable for each k < ω , but this is immediate from Lemma 1.6 and the fact that Ξ(a) is clopen in Ξ.
By definition, it is clear that F → D 0 (F) is order preserving and injective, so to establish that it is a complete lattice isomorphism, we just need to verify that it is surjective.The 'Furthermore' statement follows from the fact that clearly for any family (F i ) i∈I of filters in L, D 0 i∈I F i = i∈I D 0 (F i ).

Step 2: Taking turns
Now we will develop some machinery that we will use in this step of the construction.
Given any two sets A and B in a metric space (X, d), we'll write d inf (A, B) for the quantity inf{d(a, b) : a ∈ A, b ∈ B}.Recall that the lower semi-continuity condition in the definition of topometric space is equivalent to the following: For any x, y ∈ X with d(x, y) > r, there are open neighborhoods U ∋ x and V ∋ y such that d inf (U, V) > r.
Lemma 2.15 Let X be a topometric space with a crisp slicing ν and let f 1 , f 2 : R ≥0 → (0, 1] be continuous functions. (1) The metric d W is well defined.
(3) For both i ∈ {1, 2}, if x ∈ X × {i} and f i (ν(x)) = 1, then x is crisply embedded in X × {i} if and only if it is crisply embedded in W(X, ν, f 1 , f 2 ).(4) A closed subset D ⊆ W(X, ν, f 1 , f 2 ) is definable if and only if D ∩ (X × {i}) is definable in X × {i} for each i < 3. (5) d W is an adequate metric if and only if d is an adequate metric.
For (5), first note that adequacy passes to open subspaces, so if d W is an adequate metric, then d is an adequate metric.Now assume that d is an adequate metric.Fix an open set U ⊆ W(X, ν, f 1 , f 2 ) and an r > 0. Assume that (x, i) ∈ U <r .We need to show that x ∈ int U <r .This is trivial if r > 1, so assume that r ≤ 1.If there is a (y, i) ∈ U such that d(x, y) < r, then we are done by adequacy of d , so assume that there is no such (y, i) ∈ U .There must be a (y, j) ∈ U with j ̸ = i such that d W ((x, i), (y, j)) < r.Since r ≤ 1, this implies that ν(x) = ν(y).Let g(u) be defined as before.Note that by definition, we have that g(ν(x)) < r ≤ 1. Find an interval (s, t) ∋ ν(x) such that for any u ∈ (s, t), g(u) < r.Now we have that Fix two continuous functions h 1 , h 2 : R ≥0 → (0, 1] satisfying that • h 1 (0) = 1, • for every odd n ∈ N, h 1 (n) = 1, • for every even n ∈ N, h 2 (n) = 1, and • for every x with x ≥ 1, min(h 1 (x), h 2 (x)) = 1 x .It is clear that such functions exist.

OutFigure 1 :
Figure 1: &, the AND gate space Figure 2: Region with discrete metric and U ∩ D is open and therefore relatively clopen in U .Therefore either U ∩ D = ∅ or U ∩ D = U , as required.

Figure 4 :
Figure 4: X(N 5 ) (with unnecessary copies of & removed) Journal of Logic & Analysis 16:3 (2024) Some semilattices of definable sets in continuous logic 11 Proof For any a ∈ L, let F a = {b ∈ L : b ≥ a} and let D a be the corresponding definable set in X(L).Clearly D a = D b if and only

Figure 7 :
Figure 7: An exact pair above ω a copy of & with the input vertices soldered to ⟨max(a, b, c), a⟩ and ⟨max(a, b, c), b⟩ and the output vertex soldered to ⟨max(a, b, c), c⟩.We write Ξ(a) for the set {⟨x, a⟩ : x ≥ a}, and we write &(a, b, c) for the copy of & in Y 0 (L) corresponding to (a, b, c), provided that it exists.(See Figure 8.)For any filter F ⊆ L, we write D 0 (F) for the subset of Y 0 (L) that is the union of • Ξ(a) for each a with ℓ a / ∈ F and

Fix a definable
set D ⊆ Y 0 (L).Each Ξ(a) has a connected open neighborhood U such that each x ∈ U is crisply embedded.Therefore, by Lemma 1.8, we have that for each ℓ a ∈ L, either Ξ(a) ⊆ D or Ξ(a) ∩ D = ∅.Let F(D) = {ℓ a ∈ L : Ξ(a) ∩ D = ∅}.We just need to argue that F(D) is a filter and D = D 0 (F(D)).To see that F(D) is a filter, suppose that ℓ a and ℓ b are in F(D).For any ℓ c ∈ L with ℓ a ∧ ℓ b ≤ ℓ c , we must have that D ∩ &(a, b, c) contains neither of its input vertices.Therefore by Lemma 1.6 and Proposition 1.9, D ∩ &(a, b, c) = ∅, whereby D ∩ Ξ(c) = ∅ and ℓ c ∈ F(D).Since we can do this for any ℓ a , ℓ b ∈ L, we have that F(D) is a filter.It is also easy to see that D 0 (F(D)) = D.

x
∈ {(z, i) : (∃(w, j) ∈ U)d(z, w) < r} ∩ ν −1 [(s, t)] ⊆ U <r .The set {(z, i) : (∃(w, j) ∈ U)d(z, w) < r}is open by adequacy of d , and the set ν −1 [(s, t)] is open by continuity of ν .The fact that their intersection is a subset of U <r is immediate from the definition of d W , so x ∈ int U <r as required.

2. 5 . 3
Steps 3-5: Completing the construction Definition 2.17 We write Y(L) to represent Y 012 (L) with the following sets of points soldered together: The AND gate space is the topometric space (&, τ, d) where & is the subset of R 2 given by this set is always open.Furthermore, for any r > 1, we have U <r = Z .Therefore Z has an adequate metric.Note that Lemma 1.6 implies that if x is crisply embedded in X and y is crisply embedded in Y and W is the result of soldering x and y together, then • for any closed D ⊆ W , D is definable if and only if D ∩ X is definable in X and D ∩ Y is definable in Y ; and • W has an adequate metric if and only if X and Y have adequate metrics.
D 4 , which is also open.Therefore D 4 is definable.Now suppose that D ⊆ & is definable.& is a topological graph.By an edge of & we mean a maximal open subset homeomorphic to (0, 1).There are 9 edges in & corresponding to the graph theoretic edges.Each edge U of & can be written as a union n<ω U n of connected open sets such that any x ∈ U n is metrically 2 −n−1 -isolated.Therefore by Lemma 1.8 and since each U is connected, we have that either U ⊆ D or U