# Topos theory and higher-order logic

This is a question about the relationship between higher-order logic and topoi. It's well-known that every topos gives a model of higher-order logic, in which the type in which sentences inhabit is taken to be the subobject classifier $\Omega$.

As far as I can see $\Omega$, qua interpretation of higher-order logic, is playing two distinct roles and I can't see why they're being identitified:

1. $\Omega$ plays a special role in turning subobjects into elements of a power object in the topos. $Sub(-)\cong Hom(-,\Omega)$
2. $\Omega$ plays the role of being the truth values of sentences.

There is, for example, another natural choice for the second role, namely: $2$ (the coproduct of the terminal object with itself). Given a choice of arrow $true: 1\to 2$ we can interpret higher-order logic within a topos in an analogous way.

I'd like to know if there's any reason not to split these two roles. Is there a principle of higher-order logic that forces these two roles to coincide? A natural candidate would be the schema:

• $\forall f(\forall xy(fx=fy \to x=y) \to \exists G \forall z(Gz \leftrightarrow \exists xfx=z))$

where $f:A\to B$, $x,y: A$, $z:B$ and $G:B\to \Omega$. This schema is schematic in the types $A$ and $B$. Does this sentence fail if I use $2$ in a topos instead of $\Omega$? Or does $\forall xy(fx=fy \to x=y)$ fail to express the fact that $f$ is mono? Or does $\forall z(Gz \leftrightarrow \exists xfx=z)$ fail to express the fact that $G$ is a characteristic function of $f$. Or what?

Lastly, just to clarify where I'm coming from: I'm mainly interested in topos theory as an interpretation of higher-order logic. I realise there are lots of interesting differences between topoi that lead to the same sentences of higher-order logic being true, but these aren't the sorts of differences I'm interested in (at least for these purposes).

• I'm a bit confused. Even in first order logic, surely you want to be able to cut out subobjects of a given object satisfying a sentence. Feb 24 '17 at 8:12
• Are (1) and (2) different? If you interpret $\operatorname{Sub}(X)$ as giving the lattice of predicates on $X$ and $\mathcal{V}$ as a type of truth values, then the claim "predicates on $X$ are $\mathcal{V}$-valued morphisms" is almost literally the same thing as the claim "$\mathcal{V}$ represents the functor $\operatorname{Sub}(-)$"
– user14972
Feb 25 '17 at 0:11
• I don't know enough to commit to an answer, but while predicates-as-subobjects (more generally objects in fibers of a fibration) correspond to the proof-theoretic analysis of logic, the predicates-as-morphisms-to-truth-values-object view seems to correspond to the model-theoretic analysis of logic. For example in continuous model theory, truth values are non-negative real numbers, so predicates are "uniformly continuous" presheaves on metric spaces considered as small categories enriched in the $[0,\infty]$ equipped with its monoidal structure of addition. Feb 25 '17 at 3:02
• If you take the machinery of continuous model theory and replace $[0,\infty]$ with $\{0,1\}$, the subobject classifier of set, the models end up being not sets, but set-oids, since a small category enriched in $\{0,1\}$ is nothing other than a a set equipped with an equivalence relation. The fact that the categories of sets and setoids are essentially the same then seems to be saying that higher-order logic, interpreted syntactically as subsets in set theory, is also amenable to a model-theoretic formulation. I don't know if this extends to arbitrary topoi, but one can dream. Feb 25 '17 at 3:05
• No one seems to have yet answered your question whether the schema $\forall f(\forall xy(fx=fy\to x=y)\to\exists G\forall z(Gz\leftrightarrow\exists x\ fx=z))$ fails if you take $G:B\to2$ instead of $G:B\to\Omega$. The answer is yes, this modified schema fails in all non-Boolean topoi. Specifically, it fails when $A=1$ and $B=\Omega$. The left side is true when $f:1\to\Omega$ is "true",but there is no $G:\Omega\to2$ (not even an internal, variable $G$) verifying the right side. Jul 7 at 23:09

Before focusing on the specific question, I'd like to provide some context. First, every (non-trivial) topos has a Boolean subtopos. This is essentially what you say, and it roughly corresponds to the double negation interpretation of classical logic into intuitionistic logic. However, one of the things that makes toposes interesting is that many things are toposes, but relatively few things are Boolean toposes. Similarly, (part of) what makes intuitionistic type theory interesting is that it's the internal language of a topos. Restricting to a classical theory discards many relevant examples. For example, as the name "topos" suggests, a significant application is to topology with a topological space giving rise to a topos. Restricting to Boolean toposes is like only considering Stone spaces which largely defeats the purpose of topology. (One could say this paragraph is an [partial] argument for why the law of excluded middle is not a "good principle", though it is certainly convenient when it holds.)

The way predicates are interpreted in categorical logic for an arbitrary category is as subobjects. A predicate $P$ on "individuals" of sort $A$ is viewed as a subobject of the object $A$ in a category, i.e. as a(n equivalence class of) monomorphism(s) $P \hookrightarrow A$. A subobject classifier allows us to reify these subobjects as terms. That is, the formula $a:A\vdash P(a)$ becomes the term $a:A \vdash \chi_P(a):\Omega$. We can then recover the formula as $a:A\vdash P(a)\Leftrightarrow \chi_P(a)=_\Omega\top$. In fact, this equivalence is the heart of what a subobject classifier is. Characteristic functions $\chi_P$ that factor through $\mathbf{2}$ correspond to decidable predicates, i.e. predicates for which the law of excluded middle holds. As a formula $a:A\vdash P(a)\lor\neg P(a)$ or via a characteristic function $a:A\vdash (\chi_P(a)\lor\neg\chi_P(a))=_\Omega\top$. The former states that $P$ is a complemented or decidable subobject of $A$. In the latter, $\lor$ and $\neg$ are operations on $\Omega$ rather than logical connectives.

A topos where $\Omega \ncong \mathbf{2}$ is one whose internal logic has some propositions that are not decidable in the above sense. If you restrict yourself to Boolean-valued characteristic functions, then you are restricting yourself to only the decidable propositions in your internal logic. This is a completely coherent thing to do, but it means there are formulas you can state which will have no Boolean-valued characteristic function. They will, however, always have an $\Omega$-valued characteristic function. If you identify predicates with Boolean-valued characteristic functions, then what you are doing is equivalent to interpreting into a Boolean subtopos of whatever topos you started with.

• Is provability really what we want here, in the sense of a completeness theorem? I may just be misunderstanding, but I'm not sure why we would describe a predicate which, say, is sometimes only true on the left point of a sheaf on a two-point discrete space as undecidable. I can very cleanly decide the truth values of this predicate, namely as true, false, left, or right. Indeed, this is an example of a Boolean topos, whereas it seems you may be conflating Boolean with 2-valued in your answer, unless you mean "essentially" in a very loose sense. Feb 24 '17 at 18:13
• "it means there are formulas you can state which will have no Boolean-valued characteristic function" Thanks, this is helpful. But I'm still having trouble seeing how you would get an explicit sentence of higher-order logic that this would correspond to. Here is how you would capture the idea that every mono has a characteristic function: $\forall f(\forall xy(fx = fy \to x=y)\to\exists G\forall z(Gz \leftrightarrow \exists x fx=z))$ where $f$ has type $A\to B$, $x,y$ type $A$ and $z$ has type $B$. But this is also true if we interpret higher-order logic using $2$ as the type of sentences. Feb 24 '17 at 18:35
• @KevinCarlson I see what you're saying. What I said does strongly imply Boolean and two-valued. What I want is just the straight-up law of excluded middle, i.e. $a:A \vdash (\chi_P(a)\lor\neg\chi_P(a)) =_\Omega \top$ or $a:A\vdash P(a)\lor\neg P(a)$ which will work even when neither $P$ nor $\neg P$ factor through $\top$. I may keep this Boolean, two-valued case as it's clearer to see how things start to go "wrong", and then talk about the general Boolean case. Feb 24 '17 at 18:58
• @AndrewBacon What it comes down to is what "interpreting HOL into a topos" means. For consistency with the rest of categorical logic, predicates get interpreted as subobjects. If we want to treat predicates as first-class terms, we need a type of predicates in correspondence with subobjects. You could say you only want to consider complemented subobjects. This would just be a non-standard definition of "interpreting HOL into a topos" that happens to be equivalent to the standard definition of interpreting classical HOL into a Boolean topos for a Boolean subtopos of the topos you started with. Feb 24 '17 at 19:36

The main idea connecting logic to set theory is the idea that propositions are subsets.

On the one hand, if you are interpreting propositional logic in some (set-theoretic) domain $D$ of discourse, then each proposition gets interpreted as a subset of $D$, and connectives are operations on subsets.

On the other hand, given any set $D$, we can make $\mathcal{P}(D)$ into a Boolean lattice in which we can compute with propositional logic.

And this all extends fairly naturally to predicates and quantifiers and such.

When connecting logic to category theory we use basically the same idea, except instead that propositions are subobjects rather than subsets.

The posets $\operatorname{Sub}(X)$ of subobjects of $X$ are of crucial importance to doing propositional logic, and more generally we are interested in the maps back and forth between $\operatorname{Sub}(X)$ and $\operatorname{Sub}(Y)$ that may be induced by a map $X \to Y$.

So, for internal first-order logic, classifying subobjects really is the thing we want. Even better, in a topos, $\operatorname{Sub}$ is a representable functor

$$\operatorname{Sub}(-) \cong \hom(-, \Omega)$$

So, while $\operatorname{Sub}(-)$ is a relatively complicated object, in a topos the whole thing effectively collapses down to being a single object $\Omega$, thus allowing the internal logic to be treated in a more elementary way.

• Thanks. I'm primarily seeing this through the lense of higher-order logic: the claim that $Sub(\cdot) \iso hom(\cdot, \Omega)$ is stated in the language of category theory. But what internal sentence does this correspond to? Feb 24 '17 at 18:49
• @Andrew: It's not that it corresponds to an internal sentence -- it's more of an external fact -- but provides a translation between two ways of expressing things. And for higher order logic especially, it's the gateway to considering the internal hom $\Omega^X$ as being the internal version of the type of subtypes of $X$.
– user14972
Feb 24 '17 at 19:24
• Also, $\Omega$ is just an object of the category under study which, in some sense, makes it a far more elementary object than $\operatorname{Sub}$.
– user14972
Feb 24 '17 at 19:32
• Thanks: I've edited the question to try and make it a little clearer what I'm looking for. Is there a sentence of HOL that forces the role of classifying subobjects to coincide with the role of truth values for sentences. It looks to me like there isn't, but it could be that the relevant sentences don't say what they're supposed to when we define the quantifiers in terms of $2$ instead of $\Omega$. Feb 24 '17 at 19:34
• @AndrewBacon In some sense every sentence that uses terms representing predicates forces this identification. Assume you had a proposition like $\forall P.P a$. You'd like to be able to instantiate this to any formula that you can write, e.g. $a:A\vdash a =_\mathbb{R} \pi$. But if $P$ in the above means an arrow $\mathbb{R}\to\mathbf{2}$ and $=_\mathbb{R}$ isn't decidable then this instantiation isn't valid. Oppositely, if $P$ is $\Omega$-valued but you only consider decidable formulas, then $=_\Omega$ isn't (necessarily) decidable and thus formulas using it aren't necessarily well-formed. Feb 24 '17 at 20:28