Category Theory
Zulip Server
Archive

You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.


Stream: learning: questions

Topic: Classical model theory in the language of hyperdoctrines


view this post on Zulip James Hanson (Feb 18 2024 at 17:53):

I'm trying to understand the hyperdoctrinal approach to logic partially by relating various ideas back to things that I already understand in classical model theory. To be precise I'm going to try to use nLab's definition of Boolean hyperdoctrine, which says that it's a certain kind of contravariant functor from a category CC to the category of Boolean algebras satisfying certain coherence conditions relating to the behavior of quantifiers.

My understanding (and let me know if I'm misunderstanding something) is that one of the conceptual achievements of the concept of hyperdoctrines is putting theories and models on the same conceptual footing, analogously to the idea in model theory of sort of identifying a structure with its elementary diagram. The objects in CC are like contexts (i.e., collections of free variables) and also correspond to what model theorists call 'imaginary sorts' (i.e., sorts in the many-sorted theory TeqT^{\mathrm{eq}} associated to a first-order theory TT). And functors between hyperdoctrines are like interpretations.

Assuming I've got those things right, how would one recover various basic notions in model theory? For instance how do you identify which hyperdoctrines are actually the elementary diagram of a model? The 'syntactic' characterization of this is that the theory is complete and 'term-complete' (i.e., has explicit terms witnessing existential statements). Obviously it's possible to translate this characterization verbatim, but is there a more natural way to say it?

How would you talk about elementary embeddings between models of the same theory? An elementary embedding is a special kind of interpretation. Elementary maps from MM to NN (models of TT) are interpretations of the elementary diagram of MM in the elementary diagram of NN that satisfy a certain commutative diagram involving the canonical interpretation of TT (i.e., the interpretation of TT in eldiag(N)\mathrm{eldiag}(N) is the same as the interpretation of TT in eldiag(M)\mathrm{eldiag}(M) composed with the interpretation of eldiag(M)\mathrm{eldiag}(M) in eldiag(N)\mathrm{eldiag}(N)), but these are also fairly special interpretations as they are required to preserve sorts (in that they are reduct maps where you're throwing away symbols in the language).

Also, how would you talk about non-elementary maps between structures? While these aren't as central as elementary maps, they are actually pretty important both historically and in the modern practice of model theory. A lot of big results in early model theory are about preservation theories, i.e., syntactically characterizing sentences and formulas that are preserved under various non-elementary operations on structures. In modern model theory, they still show up in talking about model companions of theories, which are often pretty important in getting any kind of reasonable quantifier elimination result. Again, I can clearly see that it is possible to state these things in terms of the translation back into classical first-order logic, but is there a more natural way to work with these ideas in the language of hyperdoctrines?

view this post on Zulip John Baez (Feb 18 2024 at 18:10):

I was fascinated by these questions and wrote a bunch of blog articles as a warmup to more serious work, but I got distracted before making real progress:

One problem was that I don't know enough model theory to make this easy for me. If anyone has tackled any of the questions you raise, I'd love to hear about it!

My understanding (and let me know if I'm misunderstanding something) is that one of the conceptual achievements of the concept of hyperdoctrines is putting theories and models on the same conceptual footing,

That sounds right - at least that's what excites me about hyperdoctrines.

analogously to the idea in model theory of sort of identifying a structure with its elementary diagram.

Alas, I don't even know what an "elementary diagram" is. :cry:

view this post on Zulip James Hanson (Feb 18 2024 at 18:19):

John Baez said:

Alas, I don't even know what an "elementary diagram" is. :cry:

Let MM be an LL-structure. Let LML_M be LL extended with new constant symbols corresponding to each element of MM. We interpret MM as an LML_M-structure in the obvious way (with each new constant symbol interpreted as the corresponding element of MM). The elementary diagram of MM is the theory of MM as an LML_M-structure, i.e., the set of all LML_M-sentences satisfied by MM.

view this post on Zulip Evan Washington (Feb 18 2024 at 21:40):

James Hanson said:

The objects in CC are like contexts (i.e., collections of free variables) and also correspond to what model theorists call 'imaginary sorts' (i.e., sorts in the many-sorted theory TeqT^{\mathrm{eq}} associated to a first-order theory TT). And functors between hyperdoctrines are like interpretations.

Objects in the category of contexts CC do not correspond to imaginaries in general. You can think of TeqT^\mathrm{eq} as the (many-sorted) theory you get by closing the basic sorts under (definable) products, subobjects, and quotients (and coproducts if the theory proves some sort has at least two objects). The objects of the category of contexts, on the other hand, are just products of sorts (and the morphisms are tuples of terms). I believe it will be true, though, if the theory eliminates imaginaries (i.e. is already equivalent to its pretopos completion/TeqT^\mathrm{eq}).

view this post on Zulip Evan Washington (Feb 18 2024 at 22:35):

I don't know how to answer your other questions right away, so I'd also really like to see all these details written down explicitly (maybe that means I should try to do it sometime?). But I can say that one viewpoint that has made hyperdoctrines "click" for me is viewing their main benefit as "algebraicizing" first-order logic.

Theories of propositional logic can be presented algebraically as boolean algebras. Models of a propositional theory are boolean algebra homomorphisms to 22. Via the Grothendieck construction, (syntactic) hyperdoctrines are certain fibrations T:BCT: B \to C where each fiber (over a tuple of sorts) is a boolean algebra: the boolean algebra of definable sets (in that tuple of sorts). (Classical) TT-models should be maps of fibrations from TT to the subobject fibration over Set\mathsf{Set}.

Then the trick would be figuring out which flavors of morphism between functors of fibered boolean algebras correspond to which flavors of model-theoretic homomorphism. I wonder which the usual notion corresponds to (are these elementary or not?)

view this post on Zulip John Baez (Feb 18 2024 at 22:54):

James Hanson said:

John Baez said:

Alas, I don't even know what an "elementary diagram" is. :cry:

Let MM be an LL-structure. Let LML_M be LL extended with new constant symbols corresponding to each element of MM. We interpret MM as an LML_M-structure in the obvious way (with each new constant symbol interpreted as the corresponding element of MM). The elementary diagram of MM is the theory of MM as an LML_M-structure, i.e., the set of all LML_M-sentences satisfied by MM.

Thanks! This should be a very natural concept in hyperdoctrine theory. Since you were talking about Boolean hyperdoctrines let's assume our hyperdoctrines are Boolean. I'll think of a Boolean hyperdoctrine as a functor H:FinSetBoolAlgH: \mathrm{FinSet} \to \mathrm{BoolAlg} obeying some properties. Heuristically, HH of an nn-element set can be thought of as a Boolean algebra of nn-ary predicates, or formulae with nn free variables.

view this post on Zulip John Baez (Feb 18 2024 at 22:57):

Here are my guesses:

1) Any language LL of the sort you're talking about should give a hyperdoctrine H(L)H(L) where the elements of H(L)(n)H(L)(n) are formulae in the language LL having nn free variables x1,,xnx_1, \dots, x_n.

2) any set VV should give a hyperdoctrine B(V)B(V) where the elements of B(V)(n)B(V)(n) are subsets of VnV^n.

3) Any LL-structure MM with universe VV should give a map of hyperdoctrines which I'll call

α:H(L)B(V)\alpha: H(L) \to B(V)

This takes formula with nn free variables in the language LL to the subsets of VnV^n for which those formulae hold in the structure MM.

view this post on Zulip John Baez (Feb 18 2024 at 23:03):

4) Given an LL-structure MM with universe VV we can define a new language LML_M which is LL together with new constant symbols for each element of MM. By 1) this language gives a new hyperdoctrine H(LM)H(L_M).

view this post on Zulip John Baez (Feb 18 2024 at 23:04):

In this situation there is a natural map of hyperdoctrines i:H(L)H(LM)i: H(L) \to H(L_M) and the map α\alpha extends to a map of hyperdoctrines

α~:H(LM)B(V)\tilde{\alpha} : H(L_M) \to B(V)

where "extends" means

α~i=α\tilde{\alpha} \circ i = \alpha

view this post on Zulip John Baez (Feb 18 2024 at 23:15):

5) Now, to form the "elementary diagram hyperdoctrine" of MM, we want to create for each nn a Boolean algebra X(n)X(n), together with the appropriate maps between these. To do this we start with H(LM)(n)H(L_M)(n), the Boolean algebra consisting of formulae PP with free variables x1,,xnx_1, \dots, x_n in the language LL supplemented by constant symbols for each element of VV. But then we take the image of this Boolean algebra under α~\tilde{\alpha}. This will be a Boolean subalgebra

X(n)B(V)(n)X(n) \subseteq B(V)(n)

and that gives our desired "elementary diagram hyperdoctrine".

view this post on Zulip John Baez (Feb 18 2024 at 23:15):

Does that sound right?

view this post on Zulip John Baez (Feb 18 2024 at 23:17):

Thinking about this, I feel I should be setting up some basic constructions on hyperdoctrines before diving into this special case. For example in 5) I want to say that if you have a map of Boolean hyperdoctrines it has an "image" which is a Boolean hyperdoctrine.

view this post on Zulip James Hanson (Feb 18 2024 at 23:28):

John Baez said:

Does that sound right?

Yes that sounds reasonable to me. B(V)B(V) also should correspond to a concept in some older model theory literature. Occasionally the idea of adding a predicate for every subset of every VnV^n shows up, and it's sometimes called the 'complete expansion' or something. In Chang and Keisler section 6.4 they just call it the 'completion' of the structure.

This idea doesn't show up so much anymore though because the theory of such a structure is quite combinatorially wild, so modern model theory doesn't have much to say about it.

view this post on Zulip John Baez (Feb 18 2024 at 23:41):

Thanks! I don't know the model theory literature, but this 'completion' idea is necessary if we want to treat syntax and semantics on an equal footing, even if the idea of adding an n-ary predicate for every subset of the universe to the nth power sounds sort of insanely grandiose from a syntactic viewpoint.

view this post on Zulip John Baez (Feb 18 2024 at 23:42):

The idea of treating semantics as syntax lets you do lots of fun tricks in categorical logic, e.g. you can take something like the category of sets and ask "what is this the theory of?"

view this post on Zulip John Baez (Feb 18 2024 at 23:44):

But basically, hyperdoctrines will fall on the 'syntax' end of the spectrum if it's easier to describe maps out of them, and on the 'semantics' end if it's easier to describe in maps into them.

view this post on Zulip John Onstead (Feb 19 2024 at 00:00):

As someone learning hyperdoctrines this has been helpful!
I do wonder something: there's an equivalence of categories between that of first order theories and hyperdoctrines, meaning every hyperdoctrine corresponds to some first order theory and vice versa. In addition, there is a functor from the category of categories to that of hyperdoctrines that sends a category to its subobject hyperdoctrine. That is, the hyperdoctrine Sub(-) that assigns every object c of that category to the poset corresponding to that object's subobject poset Sub(c), and is meant to represent the internal logic of that category phrased in terms of hyperdoctrines. I'm wondering if this functor also constitutes an equivalence of categories. Just as it's true that every category has this canonical hyperdoctrine associated to it, is it also true that every hyperdoctrine has some corresponding category?

view this post on Zulip Spencer Breiner (Feb 19 2024 at 15:19):

I believe that a model of the elementary diagram on MM is an elementary embedding out of MM into some other model MM'. That suggests your αˉ\bar{\alpha} might be a left Kan extension.

view this post on Zulip James Hanson (Feb 20 2024 at 23:47):

Spencer Breiner said:

I believe that a model of the elementary diagram on $M$ is an elementary embedding out of $M$ into some other model $M'$. That suggests your $\bar{\alpha}$ might be a left Kan extension.

Yes, models of the elementary diagram of MM are elementary extensions of MM.

What would be the significance of that map being a Kan extension? I've seen the term but I don't really understand what they are.

view this post on Zulip John Baez (Feb 21 2024 at 00:27):

Basically it means the thing I called α~\tilde{\alpha} is the "obvious" or "canonical" way to extend α\alpha to the hyperdoctrine having a constant for each element of the universe of MM.

view this post on Zulip John Baez (Feb 21 2024 at 00:33):

It's a good thing, to be sure! It's a "universal property", sort of like that of a colimit. I bet it means

models of the elementary diagram of MM are elementary extensions of MM

but I'd have to think harder to be sure.

view this post on Zulip Morgan Rogers (he/him) (Feb 21 2024 at 21:51):

@Joshua Wrigley defended his thesis last week which was partly on doctrinal presentations of classifying toposes; maybe he has something to add to this discussion?

view this post on Zulip Joshua Wrigley (Feb 22 2024 at 14:58):

John Onstead said:

As someone learning hyperdoctrines this has been helpful!
I do wonder something: there's an equivalence of categories between that of first order theories and hyperdoctrines, meaning every hyperdoctrine corresponds to some first order theory and vice versa. In addition, there is a functor from the category of categories to that of hyperdoctrines that sends a category to its subobject hyperdoctrine. That is, the hyperdoctrine Sub(-) that assigns every object c of that category to the poset corresponding to that object's subobject poset Sub(c), and is meant to represent the internal logic of that category phrased in terms of hyperdoctrines. I'm wondering if this functor also constitutes an equivalence of categories. Just as it's true that every category has this canonical hyperdoctrine associated to it, is it also true that every hyperdoctrine has some corresponding category?

The equivalence between hyperdoctrines and theories depends on what notion one takes for a morphism of theories, but yes - given the correct definitions, this can be turned into a 2-equivalence (see for instance here).

To answer your question, the embedding LexSubPrimDoc{\bf Lex} \xhookrightarrow{\rm Sub} {\bf PrimDoc} of left exact categories into what are called primary doctrines (doctrines that interpret the symbols ,\land, \top) is not essentially surjective. To immediately see why, there are special properties satisfied by SubC ⁣:CopMSLat{\rm Sub}_C \colon C^{op} \to {\bf MSLat} which are not satisfied by all doctrines. For example, note that, given a category CC, for each dSubC(c)d \in {\rm Sub}_C(c) there is an object in the base category (namely dCd \in C) for which SubC(d) ⁣dSubC(c){\rm Sub}_C(d) \cong \downarrow \! d \subseteq {\rm Sub}_C(c).

If I'm not mistaken, this gets called something like comprehension. Questions on that are best directed to people like @Jacopo Emmenegger.

Instead of forming an equivalence, there is an adjunction: the restricted embedding RegRegDoc{\bf Reg} \hookrightarrow {\bf RegDoc} of regular categories into regular doctrines has a left adjoint - this is just the syntactic category of the theory associated to the doctrine!

view this post on Zulip Joshua Wrigley (Feb 22 2024 at 15:36):

James Hanson said:

How would you talk about elementary embeddings between models of the same theory?

Also, how would you talk about non-elementary maps between structures?

Here's an idea, though not necessarily what you were searching for:

Just to recall some standard definitions: given two Boolean hyperdoctrines P ⁣:CopBoolP \colon C^{op} \to {\bf Bool} and Q ⁣:DopBoolQ \colon D^{op} \to {\bf Bool}, a homomorphism of Boolean hyperdoctrines is a left exact functor F ⁣:CDF \colon C \to D and a natural transformation a ⁣:PQFopa \colon P \to Q \circ F^{op} that also preserves the adjoints, i.e. the square

P(c)fP(d)acadQ(F(c))fQ(F(d))\begin{CD} P(c) @>{\exists_f}>> P(d) \\ @V{a_c}VV @V{a_d}VV\\ Q(F(c)) @>{\exists_f}>> Q(F(d)) \end{CD}

commutes (note that, in the Boolean case, it suffices to only show that aa respects the left adjoints because =¬¬\forall = \neg \exists \neg), while a transformation between a pair (F,a),(F,a)(F,a),(F',a') is a natural transformation α ⁣:FF\alpha \colon F \to F' and a modification aaa \to a', i.e. ac(x)Q(αc)(ad(x))a_c(x) \leqslant Q(\alpha_c)(a_d(x)) for all xP(c)x \in P(c).

The category of models of PP can now be recovered by simply taking Mod(P)BoolDoc(P,P){\bf Mod}(P) \simeq {\bf BoolDoc}(P,\mathcal{P}), where P ⁣:SetopBool\mathcal{P} \colon {\bf Set}^{op} \to {\bf Bool} is the powerset doctrine.

view this post on Zulip Joshua Wrigley (Feb 22 2024 at 15:37):

Note that every homomorphism MfNM \xrightarrow{f} N between two such models of a Boolean hyperdoctrine is elementary in the sense that

Mϕ(b)    Nϕ(f(b))M \vDash \phi(b) \iff N \vDash \phi(f(b))

(where Mϕ(b)M \vDash \phi(b) is read as bM(c)b \in M(c), ϕP(c)\phi \in P(c) and bM(ϕ)b \in M(\phi)). One direction Mϕ(b)    Nϕ(f(b))M \vDash \phi(b)\implies N \vDash \phi(f(b)) follows from the definition of a homomorphism of models. The other direction is because MM also preserves the interpretation of negation.

Non-elementary maps come into play if we instead consider coherent hyperdoctrines (i.e. valued in DLat{\bf DLat} and only requiring left adjoints). In this case, the above trick does not work and we are left with the implication that Mϕ(b)    Nϕ(f(b))M \vDash \phi(b)\implies N \vDash \phi(f(b)) and not the converse.

Of course, we can say that a homomorphism of models of a coherent hyperdoctrine is elementary if the square

M(ϕ)N(ϕ)M(c)fN(c)\begin{CD} M(\phi) @>>> N(\phi) \\ @VVV @VVV\\ M(c) @>{f}>> N(c) \end{CD}

is a pullback in Set{\bf Set} for each ϕM(c)\phi \in M(c).

It turns out that such homomorphisms of models can be expressed topos-theoretically (I haven't talked about the classifying topos theory for doctrines here, but you can imagine a definition) and have very interesting topological properties attached to them. I am currently working with Mark Kamsma on this very topic - so keep an eye out!

view this post on Zulip John Baez (Feb 22 2024 at 16:19):

Great stuff! By the way, what's MSLat\mathbf{MSLat}?

view this post on Zulip Frank Tsai (Feb 22 2024 at 17:39):

Suplattice with a top element I think

view this post on Zulip Joshua Wrigley (Feb 22 2024 at 17:59):

Meet-semilattices, so posets with all finite limits.