Type space functors and interpretations in positive logic

We construct a 2-equivalence $\mathfrak{CohTheory}^\text{op} \simeq \mathfrak{TypeSpaceFunc}$. Here $\mathfrak{CohTheory}$ is the 2-category of positive theories and $\mathfrak{TypeSpaceFunc}$ is the 2-category of type space functors. We give a precise definition of interpretations for positive logic, which will be the 1-cells in $\mathfrak{CohTheory}$. The 2-cells are definable homomorphisms. The 2-equivalence restricts to a duality of categories, making precise the philosophy that a theory is `the same' as the collection of its type spaces (i.e. its type space functor). In characterising those functors that arise as type space functors, we find that they are specific instances of (coherent) hyperdoctrines. This connects two different schools of thought on the logical structure of a theory. The key ingredient, the Deligne completeness theorem, arises from topos theory, where positive theories have been studied under the name of coherent theories.


Introduction
For a first-order theory T , we can construct its Stone space S n (T ) of n-types. A function f : {1, . . . , n} → {1, . . . , m} then induces an open continuous function S m (T ) → S n (T ). These are standard constructions, and we can collect this data into a functor FinSet op → Stone. In positive logic we consider only positive existential formulas. We will consider types of positive existential formulas in all models of a positive theory. The resulting type spaces are then spectral spaces. This setting was studied by Haykazyan in [Hay19].
We should mention a semantically different approach, namely the one taken by Ben-Yaacov in [BY03a,BY03b]. In that approach, only maximal positive existential types are considered. Equivalently, those are the positive existential types realised in an existentially closed model. We discuss this distinction in semantics further in Remark 4.3.
The philosophy of type space functors is that they encode all information about a certain theory. Indeed, in [Hay19,Theorem 4.4] it is shown that T and T ′ are isomorphic (in the category that we call CohTheory, Definition 3.6) if and only if S(T ) and S(T ′ ) are naturally isomorphic. This result will actually be corollary to our main theorem, from which it follows that S(−) is an equivalence of categories.
Positive logic has also been studied in topos theory via classifying toposes (see section 8), where it is called coherent logic. It is in fact from this world, that we get the key ingredient for our main proof: the Deligne completeness theorem (see Fact 6.10). The definition of type space functors is semantical: a type is a set of (positive existential) formulas that is realised in some model (in the classical sense, so in Set). The characterisation we give is syntactical. The Deligne completeness theorem provides the link between these two.
The reader that is familiar with hyperdoctrines will recognise the characterisation of type space functors as specific (coherent) hyperdoctrines (see also Remark 5.8). Hyperdoctrines were introduced by Lawvere [Law06] and have been studied in categorical settings (e.g. [Cou12]). Of course, type spaces have long been studied by model theorists. This paper provides a precise proof that these two approaches are in fact the same. While the objects in both approaches are the same, the 1-cells and 2-cells in our 2-categories are based on model-theoretic ideas, and are different from the categorical treatments.
Main results. We define the 2-category CohTheory of coherent theories (i.e. positive theories), interpretations and definable homomorphisms. We also define the category CohTheory of coherent theories and strong interpretations (both in Definition 3.6). To this end we formulate precisely what an interpretation is in positive logic (Definition 3.1). This generalises the usual first-order definition. In CohTheory, two theories will be equivalent precisely when they are bi-interpretable. Isomorphisms correspond to essentially having the same Morleyisation.
We also define the 2-category TypeSpaceFunc and category TypeSpaceFunc of type space functors (Definition 4.25). These are specific functors FinSet op → Spec, where Spec denotes the category of spectral spaces (Definition 4.13).
The usual construction of a type space S n (T ) from a theory T extends to a 2functor between these 2-categories. This functor is part of a strict 2-equivalence, where the inverse 2-functor assigns a theory Th(F ) to a type space functor F . There is a well-known duality DLat op ≃ Spec, where DLat is the category of distributive lattices. So we can view type space functors FinSet op → Spec equivalently as functors FinSet → DLat, associating to n the Lindenbaum-Tarski algebra of formulas in n free variables. We call such functors Lindenbaum-Tarski Convention 2.2. Whenever we say "formula" or "theory", we mean "coherent formula" and "coherent theory" respectively. We allow empty models. All semantics refer to the classical semantics (i.e. in Set), unless explicitly stated otherwise.
We can encode any function symbol as its graph using a relation symbol. Having only relation symbols simplifies things, and we lose no expressive power.
Convention 2.3. Every signature we consider is purely relational.
Any first-order theory can be presented as a coherent theory. This is done through a process called Morleyisation, see just after Fact 2.7 in [Hay19]. We recall the following definition from there as well, giving a name to the coherent theories that are essentially first-order theories.
Definition 2.4. A coherent theory T is called positively model complete if for every formula ϕ(x) there is a formula ψ(x) such that T |= ∀x(¬ϕ(x) ↔ ψ(x)).
Recall that T |= ϕ means that ϕ is true in every model of T . We emphasise that we really are interested in all models of T , rather than just the existentially closed ones. We refer once more to Remark 4.3 for a discussion about the different semantics.
Definition 2.5. For a topological space X, write K o (X) for the partial order of compact open subsets. As such, we consider K o (X) as a category.
Definition 2.6. Let X be a topological space. A closed set A ⊆ X is called irreducible (sometimes also called hyperconnected ) if it cannot be written as the union of two proper closed subsets. We call X a sober space if every irreducible closed set is the closure of exactly one point.
Definition 2.7. A topological space X is called spectral if it is compact, T 0 , sober and such that K o (X) is closed under finite intersections and forms a basis of the topology. A continuous function f : X → Y of spectral spaces is called a spectral map if the preimage of a compact open set is compact open. We define Spec to be the category of spectral spaces and spectral maps.  Let L be a distributive lattice, then the space associated to it is Spec(L), the spectrum of L. Its points are prime filters on L, and the sets where a ∈ L, form a basis of compact open sets. A homomorphism f : L → L ′ of distributive lattices, induces a spectral map Spec(L ′ ) → Spec(L) by sending a prime filter F ′ on L ′ to f −1 (F ′ ).
Conversely, given a spectral space X, the corresponding distributive lattice is given by K o (X) and a spectral map f : X → X ′ induces a homomorphism of distributive lattices f −1 : 2.3. 2-categories. For an extensive treatment of 2-categories see [Joh02a, Section B1.1] or [JY20]. In this paper we will only be interested in strict 2-categories and strict 2-functors. Convention 2.9. We use the font Category for (strict) 2-categories, and Category for (normal) categories. We denote by Category op the 2-category where all 1-cells are reversed, but the direction of the 2-cells does not change.
In addition to objects (0-cells) and arrows (1-cells), a 2-category also has 2-cells, which are morphisms between 1-cells. This allows for the notion of equivalence in a 2-category: two objects A and B are equivalent if there are 1-cells f : A → B and g : B → A such that their compositions are isomorphic, via 2-cells, to the identity. So for example, bi-interpretability of theories is the same thing as being equivalent in the appropriate 2-category, see Remark 3.7.
Note that there are two different ways of composing 2-cells. The first, and most obvious, way is called vertical composition: given 1-cells f, g, h : A → B and 2-cells α : f ⇒ g and β : g ⇒ h we can form a 2-cell βα : f ⇒ h. Then there is also horizontal composition, which works as follows. Suppose we have a diagram as below: Then the horizontal composition of α and β yields a 2-cell β * α : gf ⇒ g ′ f ′ . Of course, these compositions are subject to certain axioms, but these are not relevant for this paper and so we will not go into them here. Throughout the paper we have simplified results to normal categories as well. This should help if the reader is less familiar with 2-categories.

Category of theories and interpretations
Definition 3.1. Let T and T ′ be theories in signatures L and L ′ respectively. An interpretation (Γ, k) : T → T ′ , where k ≥ 1, assigns to each n-ary relation symbol R in T (including the binary symbol for equality) an nk-ary L ′ -formula Γ(R). This can be extended uniquely to a function sending L-formulas to L ′ -formulas. We then also require for all L-formulas ϕ(x) and ψ(x) that precisely have free variablesx (i.e. they all appear in the formulas): An interpretation (Γ, 1) : T → T ′ that interprets equality as equality is called a strong interpretation, and we simplify the notation to Γ : T → T ′ .
What we call strong interpretation is just called "interpretation" in [Hay19, Definition 4.3]. The same name is also used in topos theory for something in between our notions of strong interpretation and interpretation, see Remark 8.2. However, the model-theoretic notion of interpretation for first-order logic already exists and does in fact coincide with our definition for positively model complete theories, see e.g. [Hod93, Chapter 5].  Remark 3.3. With the notation of Definition 3.1: given any L-formula ϕ(x), where not allx appear, we can easily make them appear by considering the equivalent formula ϕ(x) ∧x =x (wherex =x is short for a conjunction of equalities). The point of course is that Γ(ϕ) and Γ(ϕ ∧x =x) may not be equivalent, because Γ(x = x) may not be the entire domain.
. , x k , y 1 , . . . , y k ′ ) in the language of T ′ such that: ( for every formula ϕ(x 1 , . . . , x n ) in the language of T , we have: This simplifies to T ′ |= Γ(ϕ) → Γ ′ (ϕ) for formulas without free variables. Two morphisms of interpretations are considered to be equal if they are equivalent formulas, modulo the relevant theory.
Checking that CohTheory satisfies the axioms of a strict 2-category is lengthy, but straightforward and we omit the proof.

Category of type space functors
We start this section by recalling some definitions and facts. From Definition 4.13 on we make and treat new definitions.
Definition 4.1. Let T be a theory, let M be a model of T and letā ∈ M be a tuple of elements. The (coherent) type ofā is defined as: A type in free variablesx is a set of formulas p(x) such that p(x) = ctp M (ā) for some model M of T and someā ∈ M .
The category of all natural numbers together with all maps between them is a skeleton of the category of finite sets FinSet, so we can identify those categories.
Definition 4.2. We define the type space functor S(T ) : FinSet op → Spec of a theory T as follows.
Let n ≥ 0 be a natural number. Then we define S n (T ) to be the set of all types in n free variables. For a formula ϕ we write [ϕ] = {p ∈ S n (T ) : ϕ ∈ p}, and we topologise S n (T ) by taking these sets as basic opens. We call S n (T ) the type space of T in n free variables.
For a natural number n, we write n = {1, . . . , n}. For a function f : n → m, we define a function S f (T ) : S m (T ) → S n (T ) as follows: Semantically, for a realisationā ∈ M of p, we get S f (T )(p) = ctp M (a f (1) , . . . , a f (n) ).
The elements in n are indices of variables, for which we prefer to start at 1 rather than 0. The more common notation for n would be [n], but we do not want to confuse it with the notation [ϕ] for compact open set in a type space.
Remark 4.3. In [BY03a,BY03b] type space functors in positive logic are also studied, but for different semantics. They only consider existentially closed models. Recall that a model M of some theory T is called existentially closed (abbreviated as e.c.) if for anyā ∈ M and any formula ϕ(x) the following holds: whenever there is a homomorphism f : The types realised in e.c. models are exactly the maximal types. So in this approach the following set of types is considered: Note that we used a different notation from [BY03a,BY03b] to avoid clashes with our own notation (S n (T ) is used there too). This set M n (T ) is then also topologised differently, namely by taking the sets [ϕ] = {p ∈ M n (T ) : ϕ ∈ p} as a basis of closed sets, rather than open sets. This way we end up with a compact T 1 space, where the closed sets correspond to partial types (i.e. consistent sets of formulas). A lot of model theory has been succesfully developed in this setting (e.g. [BY03a, BY03b, BYP07, PY18]). However, as Haykazyan notes in [Hay19] this means that in the above setup there is no distinction between definable and type-definable sets.
Interestingly there is a link between the two approaches, as studied in the final two sections of [Hay19]. For example, an omitting types theorem is proved for e.c. models, using the spaces S n (T ) rather than M n (T ). , . Taking the direct image corresponds to introducing existential quantifiers and identifying variables. Taking the preimage corresponds to substitution of variables.
is an open continuous map. This gives rise to an adjoint pair of functors S For a logical formula, it does not matter if we first quantify and identify variables and then substitute, or the other way around. This can be expressed by what is called the Beck-Chevalley condition (see e.g. [MM94, Section IV.9]). We will give a simplified definition for our situation.
Definition 4.7. Suppose that we have a commuting square of open spectral maps as below on the left. Then we say that that square satisfies the Beck-Chevalley condition if the induced square on the right commutes.
In the notation of Definition 4.7 we have for every U ∈ K o (B) that Here we used the commutativity of the original square for the equality in the middle, because from that we immediately get f −1 h −1 = g −1 k −1 . We thus obtain the following fact.
Fact 4.8. In the notation of Definition 4.7, the Beck-Chevalley condition is equivalent to having Example 4.9. Let T be a theory. Let f : n → n + 1 be the inclusion. Let g : n → m be any function. Let f ′ : m → m + 1 and g ′ : n + 1 → m + 1 be the pushout of f and g. That is, f ′ is the inclusion and g ′ is the extension of g such that g ′ (n + 1) = m + 1. Then this induces a commutative square

Sg(T )
This square satisfies the Beck-Chevalley condition, which comes down to having for every formula ϕ(x 1 , . . . , x n+1 ). Indeed, this equality holds because the right side is just [∃x m+1 ϕ(x g(1) , . . . , x g(n) , x m+1 )] and m + 1 is not in the range of g.
Example 4.10. Let T be a theory. Let f : n + 1 → n be the identity on n and f (n + 1) = n. Let g : n + 1 → m be any function. Denote by f ′ : m → k and g ′ : n → k the pushout of f and g. Again, this pushout induces a commutative square like in Example 4.9, and again this square satisfies the Beck-Chevalley condition. In this case it comes down to the equality for every formula ϕ(x 1 , . . . , x n ). By Fact 4.8 we only have to check that the first formula implies the second. So we let x 1 , . . . , x m be such that ϕ(x g(1) , . . . , x g(n) ) and Proposition 4.11. Let T be a theory. Any pushout square in FinSet induces a commutative square under the image of S(T ), which satisfies the Beck-Chevalley condition.
Proof. In Example 4.9 and Example 4.10 we have verified this claim for specific functions f . Up to isomorphism, every function in FinSet decomposes as such functions. So by composing squares we conclude that the claim indeed holds for any pushout square.
We can now characterise those functors that arise as type space functors.
Convention 4.12. Let F : FinSet op → Spec be a functor, we denote by F n and F f the images of n and f : n → m respectively, to match the notation of S(T ).
The discussion below is interesting in its own right, but not relevant for the rest of the paper, so the reader may skip to after Example 4.15 if they so wish. In [BY03a, Definition 2.18] there is a condition called the "amalgamation property" which is related to the Beck-Chevalley condition. Recall that in their setup only maximal types are considered (see Remark 4.3). If we restrict our setup to consider theories where all types are maximal, we get precisely the theories whose type spaces are T 1 and hence Stone spaces (see Fact 2.8). In that case we get that the two conditions are equivalent. We provide a proof below and thank the anonymous referee for pointing out this equivalence. Afterwards, in Example 4.15, we show that the two conditions are generally not equivalent in our setting. Proof. We recall that Let B 0 and C 0 be as in the claim.
We set It then follows from the claim, together with the fact that K o (B) and K o (C) are closed under finite intersections, that U has the finite intersection property. That is, any finite collection of sets in U has nonempty intersection. Because we assumed the spaces involved to be Stone spaces, the sets in K o (A) are clopen. So U is nonempty and we find a ∈ U. By construction we then have that f (a) ∈ B 0 for every b ∈ B 0 ∈ K o (B). It then follows from the T 1 separation axiom (again, using that we are dealing with Stone spaces), together with the fact that K o (B) is a basis for the topology on B, that f (a) = b. Similarly we get g(a) = c. So u(a) = (b, c), and we conclude that u is indeed surjective.
In the above proof we used the assumption that the spaces are Stone spaces in two places. The first was to produce an element in U, which can in fact be done in any spectral space, see [DST19, Theorem 1.3.14]. The second use, namely of the T 1 separation axiom, is essential, as shown in the example below. Note that this also means that the direction (i) =⇒ (ii) goes through for any spectral spaces.
Example 4.15. We will show that the requirement of the spaces being Stone spaces cannot be dropped in Proposition 4.14. More precisely, we will construct a theory T and a pushout in FinSet such that the image of that pushout under S(T ) will not satisfy the surjectivity condition in Proposition 4.14(i). Recall that on the other hand that square will satisfy the Beck-Chevalley condition, as shown in Proposition 4.11.
Consider the language with three unary predicates P (x), Q(x) and R(x). Let T consist of just the h-inductive sentence ∀xy(P (x) ∧ Q(y) → R(x) ∨ R(y)).  There is a maximal zero-type, which is isolated by ∃x(P (x) ∧ Q(x) ∧ R(x)). So this is indeed the zero-type that is realised in M 1 and M 2 .
Consider the pushout of 1 ← 0 → 1, which is the disjoint union 1 + 1 = 2. We will show that the universal map u : S 2 (T ) → S 1 (T ) × S 0 (T ) S 1 (T ) is not surjective. Set p(x) = ctp M1 (a) and q(y) = ctp M2 (b). Then p(x), q(y) ∈ S 1 (T ) while their restrictions to the zero-type are the same, as we argued before. So (p(x), q(y)) ∈ S 1 (T ) × S0(T ) S 1 (T ). We claim that there can be no r(x, y) ∈ S 2 (T ) with u(r(x, y)) = (p(x), q(y)). Suppose that such an r(x, y) is realised by some and R(y) ∈ q(y). So r(x, y) cannot restrict to both p(x) and q(y). We have arrived at our contradiction and conclude that u is not surjective. Definition 4.17. Let F be a type space functor. For k ≥ 1, a cartesian family (of arity k) is a family Θ n ⊆ F nk of compact open sets, indexed by the natural numbers, such that the following holds. For 1 ≤ i ≤ n denote by j i,n : 1 ֒→ n the map with value i. For all n, we require: For n = 0 this is the empty intersection, that is Θ 0 = F 0 .
The name cartesian family is based on the idea that compact open sets correspond to definable sets (Fact 4.4(i)). Then Θ n corresponds to the cartesian product of n times Θ 1 . The entire cartesian family can clearly be recovered from Θ 1 .
Lemma 4.18. Let Θ n be a cartesian family of arity k for F and let f : n → m be any function. Then Θ m ⊆ F −1 f ×k (Θ n ) and if f is surjective we have equality. Proof. We have Definition 4.19. Let F, F ′ be type space functors. A partial natural transformation (of arity k) is a pair (β, k) : F F ′ where k ≥ 1 and β is a family of partial spectral maps β n : F nk F ′ n . Here n ranges over the natural numbers. The domains of β are required to form a cartesian family (of arity k). Furthermore, for each f : n → m we require the following to commute: This last requirement is well-defined, because Lemma 4.18 implies that we always have F f ×k (dom(β m )) ⊆ dom(β n ).
The partial natural transformations will correspond to interpretations, so we need to express that they preserve necessary logical properties. This is done using a weak version of the Beck-Chevalley condition. Example 4.27 illustrates why we have to consider this weaker version.
Definition 4.20. A partial natural transformation (β, k) : F → F ′ is said to satisfy the weak Beck-Chevalley condition if for any f : n → m the following commutes: We say that (β, k) satisfies the Beck-Chevalley condition if the above diagram commutes already without taking the intersection. That is β −1 n F ′ f = F f ×k β −1 m . Finally, we need something that corresponds to morphisms of interpretations. So these will be the 2-cells in the 2-category of type space functors. We will essentially let the equivalence in our main result (Theorem 1.1) induce this 2-category structure. Not much attention will be given afterwards to the 2-cells, so the reader is welcome to use this 'definition'. In practice we have to be careful about circularity, so formally we proceed as follows.
A morphism of interpretations is given by a formula. So this will correspond to a compact open set in a type space functor. We will then also need to code the conditions (1)-(5) from Definition 3.4. In Definition 6.2 we develop what we call the internal logic of a type space functor. This is a way to talk about the compact open sets in a type space functor as if they were formulas. Even though we have not treated the internal logic of a type space functor yet, the following should give an idea of how to apply it in the above definition. For example, the internal logic version of Definition 3.4(5) becomes: for all n and all U ∈ K o (F ′ n ).    Proof. This comes down to writing out definitions, where (i) is useful for (ii).
Definition 4.25. The 2-category of type space functors TypeSpaceFunc has as objects type space functors, as 1-cells partial natural transformations that satisfy weak Beck-Chevalley and as 2-cells morphisms of partial natural transformations.
The category of type space functors TypeSpaceFunc has as objects type space functors and as arrows natural transformations that satisfy Beck-Chevalley. For an interpretation (Γ, k) : T → T ′ , Lemma 4.24 implies that S(Γ, k) is indeed a partial natural transformation. By the same lemma, a strong interpretation will indeed correspond to an arrow in TypeSpaceFunc.
The requirements on a morphism of partial natural transformations just code those on a morphism of partial natural transformations. So the 2-functor is also well-defined on 2-cells.
Example 4.27. This example illustrates why for general interpretations we have to consider the weak Beck-Chevalley condition. Let T be the empty theory in the empty language. Let T ′ be the theory with one binary relation symbol E, expressing that E is an equivalence relation (possibly not defined everywhere). We define (Γ, 1) : T → T ′ by setting Γ(x = y) to be E(x, y). Let f : 2 → 1, then writing out definitions we have , and . Clearly these two are not the same. The first one is missing a conjunction with "x = y", which would precisely correspond to intersecting with the image of S f (T ′ ).

Hyperdoctrines and the Frobenius condition
In this section we connect type space functors with (coherent) hyperdoctrines. For this we recall one more property, the Frobenius condition, and we show that type space functors satisfy this condition (Definition 5.1 and Proposition 5.3). Besides that the contents of this section are not needed for the main theorem.
We always have that ψ(x 1 )∧∃x 2 ϕ(x 1 , x 2 ) is equivalent to ∃x 2 (ψ(x 1 )∧ϕ(x 1 , x 2 )). If we let f : 1 → 2, then this can be expressed as This property makes sense for arbitrary adjoints between categories with products, and is called the Frobenius condition (see e.g. [MM94, Section IV.9]). We will once more just be interested in the simpler case where the categories involved are distributive lattices.
Definition 5.1. Let A and B be distributive lattices, viewed as categories. Let F : A ⇄ B : G be functors, with F ⊣ G. Then this pair of adjoints is said to satisfy the Frobenius condition if for all A and B we have: In the notation of Definition 5.1 we have F (A∧G(B)) ≤ F (A) and F (A∧G(B)) ≤ F G(B) ≤ B. Combining this we arrive at the following fact. Proof. As before, taking the direct image is left adjoint to taking the preimage. By Fact 5.2 it is then enough to check Using the duality between Spec and DLat we may also view type space functors as functors FinSet → DLat, giving a more syntactic perspective. To characterise these functors from this perspective, we prove the converse of Proposition 5.3. First, we prove U ′ ⊆ V . We claim that for a prime filter F ⊆ B, we have that For a ∈ f −1 (F ) we have that f (a) ∈ F , so the unit of the adjunction gives hf (a) ≤ a and thus a ∈ ↑ h(F ). For the other inclusion, let a ∈ ↑ h(F ) and b ′ ∈ F such that h(b ′ ) ≤ a. The adjunction gives b ′ ≤ f (a), and thus f (a) ∈ F , so a ∈ f −1 (F ). Let F ∈ U , then b ∈ F , so h(b) ∈ ↑ h(F ) = f −1 (F ) using the claim. We thus conclude that indeed f −1 (F ) ∈ V .
It remains to prove that V ⊆ U ′ . So let G be a prime filter containing h(b). Then for any a ∈ G we have f (a) ∧ b = 0. Because if f (a) ∧ b = 0, then by Frobenius we So if we close f (G) ∪ {b} under finite meets and then take the upward closure, we get a filter F ′ . Consider for some a ∈ G}, then I is an ideal. Indeed, it is clearly non-empty and downwards closed. For b 1 ≤ f (a 1 ) and b 2 ≤ f (a 2 ) with a 1 , a 2 ∈ G, we have a 1 ∨ a 2 ∈ G since G is a prime filter, and indeed b 1 ∨ b 2 ≤ f (a 1 ) ∨ f (a 2 ) = f (a 1 ∨ a 2 ).
We claim that for some a ∈ G and a ′ ∈ G. So applying the adjunction and Frobenius we would have a ∧ h(b) = h(f (a) ∧ b) ≤ a ′ , which implies a ′ ∈ G and so we have a contradiction.
Using Zorn's lemma, we can then extend F ′ to a filter F that is maximal disjoint from I. In particular, such an F is a prime filter containing b. We finish our proof by showing that f −1 (F ) = G. We directly have G ⊆ f −1 (f (G)) ⊆ f −1 (F ). For the other inclusion we let a ∈ f −1 (F ), then f (a) ∈ F and thus f (a) ∈ I. So we must have a ∈ G, as required, because otherwise we would have f (a) ∈ I. If we take the perspective of S(T ) being a functor into DLat, then we get a functor that associates to each n the Lindenbaum-Tarski algebra of coherent formulas in n free variables.
Definition 5.6. We call a functor F : FinSet → DLat a Lindenbaum-Tarski functor if the following hold: (i) for every f : n → m the homomorphism F f : F n → F m has a left adjoint The latter means that given a pushout as on the left in the diagram below, the induced square on the right commutes. The 2-category of Lindenbaum-Tarski functors LTFunc has Lindenbaum-Tarski functors as objects, as 1-cells partial natural transformations that satisfy weak Beck-Chevalley and as 2-cells morphisms of partial natural transformations.
The category of Lindenbaum-Tarksi functors LTFunc has Lindenbaum-Tarksi functors as objects and the arrows are natural transformations that satisfy the Beck-Chevalley condition.
Remark 5.8. What we call a Lindenbaum-Tarski functor is a special case of the more general concept of a (coherent) hyperdoctrine (see [Law06] and [Cou12]). Hyperdoctrines are more general in the sense that they admit any C op as domain where C is finitely complete. Besides that the 1-cells and 2-cells in our setting are different from those in [Cou12].

Recovering a theory
The goal of this section is to construct a 2-functor Th(−) that will recover a theory from a type space functor. This 2-functor will turn out to be the inverse of S(−). In particular, Th(S(T )) will essentially be the Morleyisation of T .
The key ingredient in linking the theory we build to semantics is the Deligne completeness theorem (Fact 6.10). For this we need to introduce a deductionsystem, which we formulate as a sequent calculus. where ϕ and ψ are coherent formulas andx is a finite tuple of variables, such that the free variables in ϕ and ψ are inx.
A sequent ϕ ⊢x ψ corresponds to the h-inductive sentence ∀x(ϕ(x) → ψ(x)). So a theory is the same thing as a set of sequents.
Definition 6.2. Let F be a type space functor, we define the internal logic of F as follows. The signature L(F ) has an n-ary relation symbol R U for every U ∈ K o (F n ), for all n ≥ 0.
An n-ary L(F )-formula ϕ will be interpreted as some compact open ϕ ⊆ F n , defined by induction on the complexity of the formula: • ⊤ = F 0 and ⊥ = ∅ (⊥ is considered as an n-ary formula for all n); , for all f : n → m and U ∈ K o (F n ); • x i = x j = F e (F n ), where 1 ≤ i, j ≤ n and e : n → n sends i to j and is the identity everywhere else; Finally, we define the theory of F as follows: Remark 6.3. Because the compact open subsets of S n (T ) correspond to formulas in the language of T , every R U ∈ L(S(T )) is of the form R [ϕ(x)] for some ϕ(x). We may assume that all variables inx actually appear in ϕ(x).
The main result of this section is the following theorem.
Corollary 6.5. Let F be a type space functor, and let ϕ be an L(F )-formula. Then ϕ is equivalent to R ϕ , modulo Th(F ).
Proof. Straightforward induction on the complexity of ϕ, using Theorem 6.4.
Proof. The proof of (i) is writing out definitions, where Lemma 4.24(i) and Remark 6.3 are useful. The proof of (ii) is a straightforward induction argument, where each step is writing out definitions.
Corollary 6.8. The operations defined in Definition 6.2 and Definition 6.6 define a 2-functor Th : TypeSpaceFunc → CohTheory op , which restricts to a functor Th : Proof. From Lemma 6.7 and Theorem 6.4 it follows that Th(β, k) is indeed an interpretation. All that is left to check is that a natural transformation that satisfies the Beck-Chevalley condition does indeed yield a strong interpretation. So let β : F → F ′ be a natural transformation satisfying the Beck-Chevalley condition, and let e : 2 → 2 be given by e(2) = e(1) = 1, then: is R x=y , which by Corollary 6.5 is equivalent to x = y.
To prove Theorem 6.4 we need to introduce the deduction-system for coherent logic [Joh02b, Section D1.3]. For ease of reference, and to introduce notation, we recall the rules and axioms here.
It should be clear that the deduction-system for coherent logic is sound for classical semantics, in fact it is a subset of the usual classical deduction-system. It turns out that it is also complete, and we get the following fact, which appears as [MM94,Corollary IX.11.3].
Fact 6.10 (Deligne completeness theorem). Let T be a coherent theory. A sequent ϕ(x) ⊢x ψ(x) can be deduced from T in the deduction-system for coherent logic if and only if T |= ∀x(ϕ(x) → ψ(x)).
Lemma 6.11. Let F be a type space functor, and let ϕ be an n-ary formula in L(F ). Then for every f : n → m, we have . , x f (n) ) . Proof. By induction on the complexity of the formula. The non-trivial cases are the equality symbol and existential quantification. In both cases we use that F satisfies Beck-Chevalley, by constructing the pushout of either f and e : n → n or f and the inclusion n → n + 1.
Proposition 6.12. Let F be a type space functor, then Th(F ) is closed under deductions in the deduction-system for coherent logic. That is, if ϕ and ψ are L(F )-formulas, then we can deduce ϕ ⊢x ψ from Th(F ) precisely when ϕ ⊆ ψ .
Proof. By definition we have that ϕ ⊢x ψ is in Th(F ) if ϕ ⊆ ψ . For the converse, we prove that Th(F ) contains all the axioms mentioned in Definition 6.9 and that it is closed under all the rules mentioned in that definition.
For (∃-quantifier) and (Frobenius) we let f : n → n + 1 be the inclusion. Then the former is precisely the adjunction F f ⊣ F −1 f , and the latter follows from the fact that this adjunction satisfies the Frobenius condition (Proposition 5.3).

The 2-equivalence
We recall the statement of the main theorem. Note that both Corollary 1.2 and Corollary 1.3 follow directly, using Fact 4.4(ii) and Corollary 5.7 respectively. Proof. We construct 2-natural isomorphisms Th(S(T )) ∼ = T and S(Th(F )) ∼ = F . Since these isomorphisms will also live in CohTheory and TypeSpaceFunc respectively, this proves both equivalences at the same time. Throughout this proof, when we write ϕ(x) for some formula ϕ, we mean that all variables inx actually appear in ϕ.
The isomorphism Th(S(T )) ∼ = T . We start by defining a strong interpretation Γ T : Th(S(T )) → T as follows: for R [ϕ(x)] ∈ L(S(T )) we set Γ T (R [ϕ(x)] ) = ϕ(x). Note that by Remark 6.3 this covers all relation symbols in L(S(T )). For a formula ψ(x) in L(S(T )), we easily see by induction that [Γ T (ψ(x))] = ψ(x) . So by Theorem 6.4, we have So Γ T is indeed a strong interpretation, and in particular an isomorphism. Naturality in 1-cells for Γ T follows from Lemma 6.7. For (∆, k) : T → T ′ : Naturality in 2-cells amounts to writing down the relevant square and then writing out the definitions. The isomorphism S(Th(F )) ∼ = F . We define β F : S(Th(F )) → F as follows. Let n ≥ 0, and let p ∈ S n (Th(F )). We claim that is a prime filter on K o (F n ). Clearly ∅ ∈ U p , because p is consistent. For U ⊆ V , we have by definition of Th(F ) that Th(F ) |= ∀x(R U (x) → R V (x)). So if U ∈ U p , we also have V ∈ U p . Similarly, we have that R U∩V and R U∪V are equivalent to R U ∧ R V and R U ∨ R V respectively, modulo Th(F ). From which it quickly follows that U p is a prime filter.
By the Stone duality U p corresponds to an element in F n . With some abuse of notation we will identify this element with U p , and we set β F,n (p) = U p .
We check that β F,n is a homeomorphism, and that it is natural n. Since homeomorphisms are spectral maps, and natural isomorphisms always satisfy Beck-Chevalley, we then know that β F is indeed an isomorphism in TypeSpaceFunc and TypeSpaceFunc. To check that β is a 2-natural transformation, one only needs write out the definitions to see that the relevant diagrams commute, which we omit.
Homeomorphism. We first prove that β F,n is continuous. Let U be a compact open set in F n , then , and so we see that β F,n is indeed continuous. Next we define a map g : F n → S(Th(F n )) that will be the inverse of β F,n . Let q ∈ F n , and define the set of first-order formulas: We claim that P q is consistent. Clearly, Th(F ) is consistent, because otherwise F n would be empty. If P q would be inconsistent, then by compactness there would be U 1 , . . . , U k , V 1 , . . . , V m ∈ K o (F n ), such that which is equivalent to By Theorem 6.4, this would mean that U 1 ∩ . . . ∩ U k ⊆ V 1 ∪ . . . ∪ V k . However, by construction we have q ∈ U 1 ∩ . . . ∩ U k and q ∈ V 1 ∪ . . . ∪ V k . We thus arrive at a contradiction and conclude that P q must be consistent. Letā in some model M of Th(F ) realise P q , then we set g(q) = ctp M (ā). This is well-defined, because every n-ary formula in L(F ) is equivalent to an n-ary relation symbol (by Corollary 6.5), and for every n-ary relation symbol, P q contains that symbol or its negation. In particular, ctp M (a) is determined by {R U (x) : q ∈ U }, which is essentially the prime filter corresponding to q (under the Stone duality). So g is indeed the inverse function for β F,n . We are left to check that g is continuous. For this we let [R U ] be any compact open subset of S n (Th(F )) (by a combination of Fact 4.4(i) and Corollary 6.5, every compact open subset is of that form), then we have: So we have g −1 ([R U ]) = U , and we conclude that g is indeed continuous and thus that β F,n is a homeomorphism. Naturality in n. Let f : n → m be any function. We again abuse notation, and identify elements in the spectral spaces with their corresponding prime filters. Writing out definitions we obtain . , x f (n) ) , so by Theorem 6.4 these are equivalent formulas and hence F f (β F,m (p)) = β F,n (S f (Th(F ))(p)).

Classifying toposes
There is an obvious connection between CohTheory and the 2-category Topos of (Grothendieck) toposes, via classifying toposes. In this section we will briefly sketch this connection in terms of a pseudofunctor Set[−] : CohTheory op → Topos. It is beyond the scope of this paper to study this pseudofunctor any further. We do provide a quick example (Example 8.4) why it cannot be a biequivalence, even after restricting its codomain.
We briefly recall the definition of a classifying topos, for more information we refer to [Joh02b, Section D3] and [Car17]. The classifying topos of T is defined to be the topos Set[T ] such that there is a natural equivalence where T -Mod(E) is the category of models of T internal to E. It follows that there must be a generic model G T in Set[T ], corresponding to the identity morphism, such that for any geometric morphism f : E → Set[T ] the corresponding model is given by f * (G T ). Let θ : (Γ, k) → (Γ ′ , k ′ ) be a morphism of interpretations from T to T ′ . Carrying out the construction from Remark 3.5 internally in Set[T ′ ] we get an internal homomorphism f θ : Γ * (G T ′ ) → Γ ′ * (G T ′ ). Under the equivalence in (1), this corresponds to a natural transformation Set[θ] : Set[Γ, k] → Set[Γ ′ , k ′ ].
Remark 8.2. In the topos-theoretic setting an interpretation (of coherent theories) is often defined as a coherent functor between the syntactic categories, see e.g. [Car17,Definition 1.4.12]. This forces the equality symbol to be interpreted as the equality symbol on some definable set. This is thus weaker than our definition of interpretation, where it could be a definable equivalence relation in general. So the temptation to define Set[−] via syntactic categories must be resisted.
Even if we restrict codomain of Set[−] to coherent toposes (those toposes that classify a coherent theory), it cannot be a biequivalence. For those that are more familiar with model-theoretic constructs, there is another way of characterising Morita-equivalence. Recall that for a theory T the syntactic category C T has formulas as objects and definable functions as arrows. One can then form the so-called pretopos completion P (C T ) (see e.g. [Car17, Remark 1.3.18(a)]). Two theories T and T ′ are then Morita-equivalent if and only if the corresponding pretopos completions are equivalent as categories, so P (C T ) ≃ P (C T ′ ) (see e.g. [Tse15, Corollary 4.9]). Forming the pretopos completion amounts to adding disjoint unions and coequalizers of equivalence relations. So this is very similar to the (−) eq -construction in model theory (see e.g. [Hod93, page 151]), only in constructing P (C T ) we also add disjoint unions. This last difference will be precisely the obstacle, as we will see below.
It is well-known that Morita-equivalence is weaker than being bi-interpretable. We provide a basic counterexample. More elaborate examples can be found in [CR14,CR15].  ). So (∆Γ, kℓ) cannot be isomorphic to the identity interpretation, because that would mean that R U is equivalent to ∆Γ(R U ) = ∆Γ(R V ), and hence to R V .
If we restrict to a certain class of theories, these counterexamples go away.
From [Mce20, Proposition 5.11] we essentially get the following fact. The fact independently also appears in [Was18].
Fact 8.6. If T and T ′ are positively disjoint theories, then they are Morita equivalent if and only if they are bi-interpretable.
We make two remarks about this fact. The first is that they require that T |= ∃xy(x = y) and similar for T ′ , instead of being positively disjoint. The inequality symbol is a problem for positive logic, hence the notion of positively disjoint theories. Their proof is easily adjusted. The point is that we can encode so-called "coproduct sorts".
The second remark is that their notion of Morita equivalence is based on the syntactic definition from [BH16] and it is for first-order theories. In [Tse15] this is called T-Morita equivalence and they establish a connection with coherent theories and classifying toposes. That is, they prove that for coherent theories T-Morita equivalence coincides with having the same classifying topos (which they call J-Morita equivalence). They also prove that a first-order theory is T-Morita equivalent to its Morleyisation.