nLab Trimble on ETCS II

Context

Foundations

This is Part II of an exposition by Todd Trimble on ETCS.

Editing help wanted

Starting with the raw Wordpress text, I first replaced ”$latex” with ”$”, which fixed >300 instances. The next big fix is to replace ”<blockquote>” with ”$” and ”</blockquote>” with ”$”. That puts it into pretty good shape.

Replace “\mbox” with “:\text”

Some remaining issues:

• Need a replacement for \cong

Jon Awbrey: Maybe this is an old note, but I’m reading \cong okay. Otherwise, I think I used to use an underlined \asymp or something, can’t recall, will check.

• Etc.

The easy thing to do is to Edit this page, copy the text to your favorite editor, find/replace, paste text back here.

• Jon Awbrey: I think I took care of all the remaining formatting issues, but a 2nd or 3rd pair of eyes would be good.

• Jon Phillips: I’m a 2nd pair of eyes - corrected a couple of minor things (hopefully my changes will come out as I expect)

ETCS : Internalizing the logic

This post is a continuation of the discussion of “the elementary theory of the category of sets” ETCS which we had begun last time, here and in the comments which followed. My thanks go to all who commented, for some useful feedback and thought-provoking questions.

Today I’ll describe some of the set-theoretic operations and “internal logic” of ETCS. I have a feeling that some people are going to love this, and some are going to hate it. My main worry is that it will leave some readers bewildered or exasperated, thinking that category theory has an amazing ability to make easy things difficult.

• An aside: has anyone out there seen the book Mathematics Made Difficult? It’s probably out of print by now, but I recommend checking it out if you ever run into it — it’s a kind of extended in-joke which pokes fun at category theory and abstract methods generally. Some category theorists I know take a dim view of this book; I for my part found certain passages hilarious, in some cases making me laugh out loud for five minutes straight. There are category-theory-based books and articles out there which cry out for parody!

In an attempt to nip my concerns in the bud, let me remind my readers that there are major differences between the way that standard set theories like ZFC treat membership and the way ETCS treats membership, and that differences at such a fundamental level are bound to propagate throughout the theoretical development, and impart a somewhat different character or feel between the theories. The differences may be summarized as follows:

• Membership in ZFC is a global relation between objects of the same type (sets).

• Membership in ETCS is a local relation between objects of different types (“generalized” elements or functions, and sets).

Part of what we meant by “local” is that an element per se is always considered relative to a particular set to which it belongs; strictly speaking, as per the discussion last time, the same element is never considered as belonging to two different sets. That is, in ETCS, an (ordinary) element of a set $A$ is defined to be a morphism $x:1\to A$; since the codomain is fixed, the same morphism cannot be an element $1\to B$ of a different set $B$. This implies in particular that in ETCS, there is no meaningful global intersection operation on sets, which in ZFC is defined by:

$A\cap B=\left\{x:\left(x\in A\right)\phantom{\rule{mediummathspace}{0ex}}\wedge \phantom{\rule{mediummathspace}{0ex}}\left(x\in B\right)\right\}$A \cap B = \{ x : (x \in A) \:\wedge\: (x \in B) \}

Instead, in ETCS, what we have is a local intersection operation on subsets $A↪X,B↪X$ of a set. But even the word “subset” requires care, because of how we are now treating membership. So let’s back up, and lay out some simple but fundamental definitions of terms as we are now using them.

Given two monomorphisms $i:A\to X,j:B\to X$, we write $i\subseteq j$ ($A\subseteq B$ if the monos are understood, or $A{\subseteq }_{X}B$ if we wish to emphasize this is local to $X$) if there is a morphism $k:A\to B$ such that $i=jk$. Since $j$ is monic, there can be at most one such morphism $k$; since $i$ is monic, such $k$ must be monic as well. We say $i,j$ define the same subset if this $k$ is an isomorphism. So: subsets of $X$ are defined to be isomorphism classes of monomorphisms into $X$. As a simple exercise, one may show that monos $i,j$ into $X$ define the same subset if and only if $i\subseteq j$ and $j\subseteq i$. The (reflexive, transitive) relation ${\subseteq }_{X}$ on monomorphisms thus induces a reflexive, transitive, antisymmetric relation, i.e., a partial order on subsets of $X$.

Taking some notational liberties, we write $A\subseteq X$ to indicate a subset of $X$ (as isomorphism class of monos). If $x:U\to X$ is a generalized element, let us say $x$ is in a subset $A\subseteq X$ if it factors (evidently uniquely) through any representative mono $i:A\to X$, i.e., if there exists $x\prime :U\to A$ such that $x=ix\prime$. Now the intersection of two subsets $A\subseteq X$ and $B\subseteq X$ is defined to be the subset $A\cap B\subseteq X$ defined by the pullback of any two representative monos $i:A\to X,j:B\to X$. Following the “Yoneda principle”, it may equivalently be defined up to isomorphism by specifying its generalized elements:

$A\phantom{\rule{mediummathspace}{0ex}}\cap \phantom{\rule{mediummathspace}{0ex}}B:{=}_{i}\left\{x\in X:\left(x\mathrm{is}\mathrm{in}A\right)\phantom{\rule{mediummathspace}{0ex}}\wedge \phantom{\rule{mediummathspace}{0ex}}\left(x\mathrm{is}\mathrm{in}B\right)\right\}.$A \:\cap\: B :=_i \{ x \in X : (x is in A) \:\wedge\: (x is in B) \}.

Thus, intersection works essentially the same way as in ZFC, only it’s local to subsets of a given set.

While we’re at it, let’s reformulate the power set axiom in this language: it says simply that for each set $B$ there is a set $P\left(B\right)$ and a subset ${\in }_{B}\subseteq B×P\left(B\right)$, such that for any relation $R\subseteq B×A$, there is a unique “classifying map” ${\chi }_{R}:A\to P\left(B\right)$ whereby, under ${1}_{B}×{\chi }_{R}:B×A\to B×P\left(B\right)$, we have

$R=\left({1}_{B}×{\chi }_{R}{\right)}^{-1}\left({\in }_{B}\right).$R = (1_B \times \chi_R)^{-1} (\in_B).

The equality is an equality between subsets, and the inverse image on the right is defined by a pullback. In categorical set theory notation,

$R=\left\{⟨b,a⟩\in B×A:b{\in }_{B}{\chi }_{R}\left(a\right)\right\}.$R = \{ \langle b, a \rangle \in B \times A : b \in_B \chi_R(a) \}.

Hence, there are natural bijections

$\frac{R\subseteq B×A}{A\to P\left(B\right)}\phantom{\rule{2em}{0ex}}\frac{R\subseteq B×A}{B\to P\left(A\right)}$\displaystyle \frac{R \subseteq B \times A}{A \to P(B)} \qquad \frac{R \subseteq B \times A}{B \to P(A)}

between subsets and classifying maps. The subset corresponding to $\varphi :A\to P\left(B\right)$ is denoted $\left[\varphi \right]\subseteq B×A$ or $\left[\varphi \right]\subseteq A×B$, and is called the extension of $\varphi$.

The set $P\left(1\right)$ plays a particularly important role; it is called the “subset classifier” because subsets $A\subseteq X$ are in natural bijection with functions $\chi :X\to P\left(1\right)$. Cf. classifying spaces in the theory of fiber bundles.

In ordinary set theory, the role of $P\left(1\right)$ is played by the 2-element set $\left\{f,t\right\}$. Here subsets $A\subseteq X$ are classified by their characteristic functions ${\chi }_{A}:X\to \left\{f,t\right\}$, defined by ${\chi }_{A}\left(x\right):=t$ iff $x\in A$. We thus have $A={\chi }_{A}^{-1}\left(t\right)$; the elementhood relation ${\in }_{1}↪1×P\left(1\right)$ boils down to $t:1\to P\left(1\right)$. Something similar happens in ETCS set theory:

Lemma 1. The domain of elementhood ${\in }_{1}\to 1×P\left(1\right)\cong P\left(1\right)$ is terminal.

Proof. A map $X\to {\in }_{1}$, that is, a map $\chi :X\to P\left(1\right)$ which is in ${\in }_{1}\subseteq P\left(1\right)$, corresponds exactly to a subset ${\chi }^{-1}\left({\in }_{1}\right)\subseteq X$ which contains all of $X$ (_i.e._, the subobject ${1}_{X}:X\subseteq X$). Since the only such subset is ${1}_{X}$, there is exactly one map $X\to {\in }_{1}$. $\square$

Hence elementhood ${\in }_{1}\subseteq 1×P\left(1\right)$ is given by an element $t:1\to P\left(1\right)$. The power set axiom says that a subset $A\subseteq X$ is retrieved from its classifying map ${\chi }_{A}:X\to P\left(1\right)$ as the pullback ${\chi }_{A}^{-1}\left(t\right)\subseteq X$.

Part of the power of, well, power sets is in a certain dialectic between external operations on subsets and internal operations on $P\left(1\right)$; one can do some rather amazing things with this. The intuitive (and pre-axiomatic) point is that if $C$ has finite products, equalizers, and power objects, then $P\left(1\right)$ is a representing object for the functor

$\mathrm{Sub}:{C}^{\mathrm{op}}\to \mathrm{Set}$Sub : C^{op} \to Set

which maps an object $X$ to the collection of subobjects of $X$, and which maps a morphism (“function”) $f:X\to Y$ to the “inverse image” function ${f}^{-1}:\mathrm{Sub}\left(Y\right)\to \mathrm{Sub}\left(X\right)$, that sends a subset $j:B\subseteq Y$ to the subset ${f}^{-1}\left(B\right)\subseteq X$ given by the pullback of the arrows $f:X\to Y$, $j:B\subseteq Y$. By the Yoneda lemma, this representability means that external natural operations on the $\mathrm{Sub}\left(X\right)$ correspond to internal operations on the object $P\left(1\right)$. As we will see, one can play off the external and internal points of view against each other to build up a considerable amount of logical structure, enough for just about any mathematical purpose.

• Remark. A category satisfying just the first three axioms of ETCS, namely existence of finite products, equalizers, and power objects, is called an (elementary) topos. Most or perhaps all of this post will use just those axioms, so we are really doing some elementary topos theory. As I was just saying, we can build up a tremendous amount of logic internally within a topos, but there’s a catch: this logic will be in general intuitionistic. One gets classical logic (including law of the excluded middle) if one assumes strong extensionality where we get the definition of a well-pointed topos. Topos theory has a somewhat fearsome reputation, unfortunately; I’m hoping these notes will help alleviate some of the sting.

To continue this train of thought: by the Yoneda lemma, the representing isomorphism

$\theta :\mathrm{hom}\left(-,P\left(1\right)\right)\stackrel{\sim }{\to }\mathrm{Sub}\left(-\right)$\displaystyle \theta : \hom(-, P(1)) \stackrel{\sim}{\to} Sub(-)

is determined by a universal element ${\theta }_{P\left(1\right)}\left({1}_{P\left(1\right)}\right)$, i.e., a subset of $P\left(1\right)$, namely the mono $t:1\to P\left(1\right)$. In that sense, $t:1\to P\left(1\right)$ plays the role of a universal subset. The Yoneda lemma implies that external natural operations on general posets $\mathrm{Sub}\left(X\right)$ are completely determined by how they work on the universal subset.

Internal Meets

To illustrate these ideas, let us consider intersection. Externally, the intersection operation is a natural transformation

${\cap }_{X}:\mathrm{Sub}\left(X\right)×\mathrm{Sub}\left(X\right)\to \mathrm{Sub}\left(X\right).$\cap_X : Sub(X) \times Sub(X) \to Sub(X).

This corresponds to a natural transformation

$\mathrm{hom}\left(X,P\left(1\right)\right)×\mathrm{hom}\left(X,P\left(1\right)\right)\to \mathrm{hom}\left(X,P\left(1\right)\right)$\hom(X, P(1)) \times \hom(X, P(1)) \to \hom(X, P(1))

which (by Yoneda) is given by a function $\wedge :P\left(1\right)×P\left(1\right)\to P\left(1\right)$. Working through the details, this function is obtained by putting $X=P\left(1\right)×P\left(1\right)$ and chasing

$⟨{\pi }_{1},{\pi }_{2}⟩\in \mathrm{hom}\left(P\left(1\right)×P\left(1\right),P\left(1\right)\right)×\mathrm{hom}\left(P\left(1\right)×P\left(1\right),P\left(1\right)\right)$\langle \pi_1, \pi_2 \rangle \in \hom(P(1) \times P(1), P(1)) \times \hom(P(1) \times P(1), P(1))

through the composite

$\mathrm{hom}\left(X,P\left(1\right)\right)×\mathrm{hom}\left(X,P\left(1\right)\right)\stackrel{\sim }{\to }\mathrm{Sub}\left(X\right)×\mathrm{Sub}\left(X\right)\stackrel{\cap }{\to }\mathrm{Sub}\left(X\right)\stackrel{\sim }{\to }\mathrm{hom}\left(X,P\left(1\right)\right).$\hom(X, P(1)) \times \hom(X, P(1)) \stackrel{\sim}{\to} Sub(X) \times Sub(X) \stackrel{\cap}{\to} Sub(X) \stackrel{\sim}{\to} \hom(X, P(1)).

Let’s analyze this bit by bit. The subset $\left[{\pi }_{1}\right]={\pi }_{1}^{-1}\left(t\right)\subseteq P\left(1\right)×P\left(1\right)$ is given by

$t×\mathrm{id}:1×P\left(1\right)\to P\left(1\right)×P\left(1\right),$t \times id : 1 \times P(1) \to P(1) \times P(1),

and the subset $\left[{\pi }_{2}\right]={\pi }_{2}^{-1}\left(t\right)\subseteq P\left(1\right)×P\left(1\right)$ is given by

$\mathrm{id}×t:P\left(1\right)×1\to P\left(1\right)×P\left(1\right).$id \times t : P(1) \times 1 \to P(1) \times P(1).

Hence $\left[{\pi }_{1}\right]\cap \left[{\pi }_{2}\right]\subseteq P\left(1\right)×P\left(1\right)$ is given by the pullback of the functions $t×\mathrm{id}$ and $\mathrm{id}×t$, which is just

$t×t:1×1\to P\left(1\right)×P\left(1\right).$t \times t : 1 \times 1 \to P(1) \times P(1).

The map $\wedge :P\left(1\right)×P\left(1\right)\to P\left(1\right)$ is thus defined to be the classifying map of $t×t:1×1\subseteq P\left(1\right)×P\left(1\right)$.

To go from the internal meet $\wedge :P\left(1\right)×P\left(1\right)\to P\left(1\right)$ back to the external intersection operation, let $A\subseteq X,B\subseteq X$ be two subsets, with classifying maps ${\chi }_{A},{\chi }_{B}:X\to P\left(1\right)$. By the definition of $\wedge$, we have that for all generalized elements $x\in X$

${\chi }_{A}\left(x\right)\phantom{\rule{mediummathspace}{0ex}}\wedge \phantom{\rule{mediummathspace}{0ex}}{\chi }_{B}\left(x\right)=t\phantom{\rule{1em}{0ex}}\mathrm{if}\mathrm{and}\mathrm{only}\mathrm{if}\phantom{\rule{1em}{0ex}}⟨{\chi }_{A}\left(x\right),{\chi }_{B}\left(x\right)⟩=⟨t,t⟩$\chi_A(x) \:\wedge\: \chi_B(x) = t \quad if and only if \quad \langle \chi_A(x), \chi_B(x) \rangle = \langle t, t \rangle

(where the equality signs are interpreted with the help of equalizers). This holds true iff $x$ is in the subset $A\subseteq X$ and is in the subset $B\subseteq X$, i.e., if and only if $x$ is in the subset $A\cap B\subseteq X$. Thus ${\chi }_{A}\wedge {\chi }_{B}$ is indeed the classifying map of $A\cap B\subseteq X$. In other words, ${\chi }_{A\cap B}={\chi }_{A}\wedge {\chi }_{B}$.

A by-product of the interplay between the internal and external is that the internal intersection operator

$\wedge :P\left(1\right)×P\left(1\right)\to P\left(1\right)$\wedge : P(1) \times P(1) \to P(1)

is the meet operator of an internal meet-semilattice structure on $P\left(1\right)$: it is commutative, associative, and idempotent (because that is true of external intersection). The identity element for $\wedge$ is the element $t:1\to P\left(1\right)$. In particular, $P\left(1\right)$ carries an internal poset structure: given generalized elements $u,v:A\to P\left(1\right)$, we may define

$u\le v\phantom{\rule{1em}{0ex}}\mathrm{if}\mathrm{and}\mathrm{only}\mathrm{if}\phantom{\rule{1em}{0ex}}u=u\wedge v$u \leq v \quad if and only if \quad u = u \wedge v

and this defines a reflexive, symmetric, antisymmetric relation $\left[\le \right]\subseteq P\left(1\right)×P\left(1\right)$:

$\left[\le \right]:{=}_{i}\left\{⟨u,v⟩\in P\left(1\right)×P\left(1\right):u=u\wedge v\right\},$\left[\leq\right] :=_i \{ \langle u, v \rangle \in P(1) \times P(1) : u = u \wedge v\},

equivalently described as the equalizer

$\left[\le \right]\to P\left(1\right)×P\left(1\right)\stackrel{\to }{\to }P\left(1\right)$\left[\leq\right] \to P(1) \times P(1) \stackrel{\to}{\to} P(1)

of the maps ${\pi }_{1}:P\left(1\right)×P\left(1\right)\to P\left(1\right)$ and $\wedge :P\left(1\right)×P\left(1\right)\to P\left(1\right)$. We have that $u\le v$ if and only if $\left[u\right]\subseteq \left[v\right]$.

Internal Implication

Here we begin to see some of the amazing power of the interplay between internal and external logical operations. We will prove that $P\left(1\right)$ carries an internal Heyting algebra structure (ignoring joins for the time being).

Let’s recall the notion of Heyting algebra in ordinary naive set-theoretic terms: it’s a lattice $P$ that has a material implication operator “$⇒$” such that, for all $x,y,z\in P$,

$x\wedge y\le z\phantom{\rule{1em}{0ex}}\mathrm{if}\mathrm{and}\mathrm{only}\phantom{\rule{1em}{0ex}}\mathrm{if}x\le y⇒z.$x \wedge y \leq z \quad if and only \quad if x \leq y \Rightarrow z.

Now: by the universal property of $P\left(1\right)$, a putative implication operation $⇒:P\left(1\right)×P\left(1\right)\to P\left(1\right)$ is uniquely determined as the classifying map of its inverse image $\left(⇒{\right)}^{-1}\left(t\right)\subseteq P\left(1\right)×P\left(1\right)$, whose collection of generalized elements is

$\left\{⟨u,v⟩\in P\left(1\right)×P\left(1\right):\left(u⇒v\right)=t\right\}$\{ \langle u, v \rangle \in P(1) \times P(1) : (u \Rightarrow v) = t\}

Given $⟨u,v⟩:A\to P\left(1\right)×P\left(1\right)$, the equality here is equivalent to

$t\le u⇒v$t \leq u \Rightarrow v

(because $t:1\to P\left(1\right)$ is maximal), which in turn is equivalent to

$t\wedge u=u\le v$t \wedge u = u \leq v

This means we should define $⇒:P\left(1\right)×P\left(1\right)\to P\left(1\right)$ to be the classifying map of the subset

$\left[\le \right]\subseteq P\left(1\right)×P\left(1\right).$\left[\leq\right] \subseteq P(1) \times P(1).

Theorem 1. $P\left(1\right)$ admits internal implication.

Proof. We must check that for any three generalized elements $u,v,w:A\to P\left(1\right)$, we have

$w\le u⇒v\phantom{\rule{1em}{0ex}}\mathrm{if}\mathrm{and}\mathrm{only}\phantom{\rule{1em}{0ex}}\mathrm{if}w\wedge u\le v.$w \leq u \Rightarrow v \quad if and only \quad if w \wedge u \leq v.

Passing to the external picture, let $\left[u\right],\left[v\right],\left[w\right]$ be the corresponding subsets of $A$. Now: according to how we defined $⇒,$ a generalized element $e\in A$ is in $\left[u⇒v\right]$ if and only if $u\left(e\right)\le v\left(e\right)$. This applies in particular to any monomorphism $e:\left[w\right]\to A$ that represents the subset $\left[w\right]\subseteq A$.

Lemma 2. The composite

$u\left(e\right)=\left(\left[w\right]\stackrel{e}{\to }A\stackrel{u}{\to }P\left(1\right)\right)$\displaystyle u(e) = (\left[w\right] \stackrel{e}{\to} A \stackrel{u}{\to} P(1))

is the classifying map of the subset $\left[w\right]\cap \left[u\right]\subseteq \left[w\right]$.

Proof. As subsets of $\left[w\right]$,

$\left(ue{\right)}^{-1}\left(t\right)={e}^{-1}{u}^{-1}\left(t\right)={e}^{-1}\left(\left[u\right]\right)=\left[w\right]\cap \left[u\right]$(u e)^{-1}(t) = e^{-1} u^{-1}(t) = e^{-1}(\left[u\right]) = \left[w\right] \cap \left[u\right]

where the last equation holds because both sides are the subsets defined as the pullback of two representative monos $e:\left[w\right]\to A$, $i:\left[u\right]\to A$. $\square$

Continuing the proof of Theorem 1, we see by Lemma 2 that the condition $u\left(e\right)\le v\left(e\right)$ corresponds externally to the condition

$\left[w\right]\cap \left[u\right]\subseteq \left[w\right]\cap \left[v\right]$\left[w\right] \cap \left[u\right] \subseteq \left[w\right] \cap \left[v\right]

and this condition is equivalent to $\left[w\right]\cap \left[u\right]\subseteq \left[v\right]$.

Passing back to the internal picture, this is equivalent to $w\wedge u\le v$, and the proof of Theorem 1 is complete. $\square$

Cartesian Closed Structure

Next we address a comment made by “James”, that a category satisfying the ETCS axioms is cartesian closed. As everything else in this article, this uses only the fact that such a category is a topos: has finite products, equalizers, and “power sets”.

Proposition 1. If $A,B$ are “sets”, then $P\left(A×B\right)$ represents an exponential $P\left(B{\right)}^{A}.$

Proof. By the power set axiom, there is a bijection between maps into the power set and relations:

$\frac{\varphi :X\to P\left(A×B\right)}{R\subseteq X×\left(A×B\right)}$\displaystyle \frac{\phi : X \to P(A \times B)}{R \subseteq X \times (A \times B)}

which is natural in $X$. By the same token, there is a natural bijection

$\frac{R\subseteq \left(X×A\right)×B}{\varphi \prime :X×A\to P\left(B\right)}.$\displaystyle \frac{R \subseteq (X \times A) \times B}{\phi' : X \times A \to P(B)}.

Putting these together, we have a natural isomorphism $\mathrm{hom}\left(-,P\left(A×B\right)\right)\cong \mathrm{hom}\left(-×A,P\left(B\right)\right)$

and this representability means precisely that $P\left(A×B\right)$ plays the role of an exponential $P\left(B{\right)}^{A}$. $\square$

Corollary 1. $P\left(A\right)\cong P\left(1{\right)}^{A}$. $\square$

The universal element of this representation is an evaluation map $A×P\left(A\right)\to P\left(1\right)$, which is just the classifying map of the subset ${\in }_{A}\subseteq A×P\left(A\right)$.

Thus, $P\left(B{\right)}^{A}\cong P\left(A×B\right)$ represents the set of all functions $\varphi :A\to P\left(B\right)$ (that is, relations from $A$ to $B$). This is all we need to continue the discussion of internal logic in this post, but let’s also sketch how we get full cartesian closure. Warning: for those who are not comfortable with categorical reasoning, this sketch could be rough going in places.

As per our discussion, we want to internalize the set of such relations which are graphs of functions, i.e., maps $\varphi$ where each $\varphi \left(a\right)\subseteq B$ is a singleton, in other words which factor as

$A\to B\stackrel{\sigma }{\to }P\left(B\right)$\displaystyle A \to B \stackrel{\sigma}{\to} P(B)

where $\sigma :B\to P\left(B\right)$ is the singleton mapping:

$b↦\left\{b\right\}=\left\{c\in B:b=c\right\}.$b \mapsto \{ b \} = \{ c \in B: b = c \}.

We see from this set-theoretic description that $\sigma :B\to P\left(B\right)$ classifies the equality relation

$\left\{⟨b,c⟩\in B×B:b=c\right\}\subseteq B×B$\{ \langle b, c \rangle \in B \times B: b = c \} \subseteq B \times B

which we can think of as either the equalizer of the pair of maps ${\pi }_{1},{\pi }_{2}:B×B\to B$ or, what is the same, the diagonal map ${\delta }_{B}=⟨{1}_{B},{1}_{B}⟩:B\to B×B$.

Thus, we put $\sigma ={\chi }_{\delta }:B\to P\left(B\right)$, and it is not too hard to show that the singleton mapping $\sigma$ is a monomorphism. As usual, we get this monomorphism as the pullback ${\chi }_{\sigma }^{-1}\left(t\right)$ of $t:1\to P\left(1\right)$ along its classifying map ${\chi }_{\sigma }:P\left(B\right)\to P\left(1\right)$.

Now: a right adjoint such as $\left(-{\right)}^{A}$ preserves all limits, and in particular pullbacks, so we ought then to have a pullback

$\begin{array}{ccc}{B}^{A}& ⟶& {1}^{A}\\ {\sigma }^{A}↓& & ↓{t}^{A}\\ P\left(B{\right)}^{A}& \underset{{\chi }_{\sigma }^{A}}{⟶}& P\left(1{\right)}^{A}\end{array}$\begin{matrix} B^{\mathrlap{A}} & \longrightarrow & 1^{\mathrlap{A}} \\ \mathllap{\scriptsize{\sigma^A}}\downarrow & & \downarrow\mathrlap{\scriptsize{t^\A}} \\ P(B)^{\mathrlap{A}} & \underset{\chi_\sigma^A}{\longrightarrow} & P(1)^{\mathrlap{A}} \end{matrix}

Of course, we don’t even have ${B}^{A}$ yet, but this should give us an idea: define ${\sigma }^{A}$, and in particular its domain ${B}^{A}$, by taking the pullback of the right-hand map along the bottom map. In case there is doubt, the map on the bottom is defined Yoneda-wise, applying the isomorphism

$\mathrm{hom}\left(P\left(B{\right)}^{A}×A,P\left(1\right)\right)\cong \mathrm{hom}\left(P\left(B{\right)}^{A},P\left(1{\right)}^{A}\right)$\hom(P(B)^A \times A, P(1)) \cong \hom(P(B)^A, P(1)^A)

to the element in the hom-set (on the left) given by the composite

$P\left(B{\right)}^{A}×A\stackrel{\mathrm{ev}}{\to }P\left(B\right)\stackrel{{\chi }_{\sigma }}{\to }P\left(1\right).$\displaystyle P(B)^A \times A \stackrel{ev}{\to} P(B) \stackrel{\chi_\sigma}{\to} P(1).

The map on the right of the pullback is defined similarly. That this recipe really gives a construction of ${B}^{A}$ will be left as an exercise for the reader.

Universal Quantification

As further evidence of the power of the internal-external dialectic, we show how to internalize universal quantification.

As we are dealing here now with predicate logic, let’s begin by defining some terms as to be used in ETCS and topos theory:

• An ordinary predicate of type $A$ is a function $\varphi :A\to P\left(1\right)$. Alternatively, it is an ordinary element $\varphi \prime :1\to P\left(1{\right)}^{A}\cong P\left(A\right)$. It corresponds (naturally and bijectively) to a subset $\left[\varphi \right]:S\subseteq A$.

• A generalized predicate of type $A$ is a function $\varphi \prime :X\to P\left(A\right)\cong P\left(1{\right)}^{A}$. It may be identified with (corresponds naturally and bijectively to) a function $\varphi :X×A\to P\left(1\right)$, or to a subset $\left[\varphi \right]:S\subseteq X×A$.

We are trying to define an operator ${\forall }_{A}$ which will take a predicate of the form $\varphi :X×A\to P\left(1\right)$ conventionally written $\varphi \left(x,a\right)$ to a predicate ${\forall }_{A}\varphi :X\to P\left(1\right)$ conventionally written ${\forall }_{a\in A}\varphi \left(x,a\right)$. Externally, this corresponds to a natural operation which takes subsets of $X×A$ to subsets of $X$. Internally, it corresponds to an operation of the form:

${\forall }_{A}:P\left(A\right)\cong P\left(1{\right)}^{A}\to P\left(1\right).$\forall_A : P(A) \cong P(1)^A \to P(1).

This function is determined by the subset $\left({\forall }_{A}{\right)}^{-1}\left(t\right)\subseteq P\left(1{\right)}^{A}$, defined elementwise by

$\left\{\varphi \in P\left(1{\right)}^{A}:{\forall }_{A}\varphi =t\right\}.$\{ \phi \in P(1)^A : \forall_A \phi = t\}.

Now, in ordinary logic, ${\forall }_{a\in A}\varphi \left(a\right)$ is true if and only if $\varphi \left(a\right)$ is true for all $a\in A$, or, in slightly different words, if $\varphi :A\to P\left(1\right)$ is constantly true over all of $A$:

$\varphi =\left(A\stackrel{!}{\to }1\stackrel{t}{\to }P\left(1\right)\right).$\displaystyle \phi = (A \stackrel{!}{\to} 1 \stackrel{t}{\to} P(1)).

The expression on the right (global truth over $A$) corresponds to a function ${t}_{A}:1\to P\left(1{\right)}^{A}$, indeed a monomorphism since any function with domain $1$ is monic. Thus we are led to define the desired quantification operator ${\forall }_{A}:P\left(1{\right)}^{A}\to P\left(1\right)$ as the classifying map of ${t}_{A}:1\subseteq P\left(1{\right)}^{A}$.

Let’s check how this works externally. Let $\varphi :X\to P\left(1{\right)}^{A}$ be a generalized predicate of type $A$. Then according to how ${\forall }_{A}$ has just been defined, ${\forall }_{A}\varphi :X\to P\left(1\right)$ classifies the subset

$\left\{x\in X:\varphi \left(x,-\right)={t}_{A}:A\to P\left(1\right)\right)\right\}\subseteq X$\displaystyle \{ x \in X: \phi(x, -) = t_A : A \to P(1)) \} \subseteq X

There is an interesting adjoint relationship between universal quantification and substitution (aka “pulling back”). By “substitution”, we mean that given any predicate $\psi :X\to P\left(1\right)$ on $X$, we can always pull back to a predicate on $X×A$ (substituting in a dummy variable $a$ of type $A$, forming e.g. $\psi \left(x\right)\wedge \left[a=a\right]$) by composing with the projection $\pi :X×A\to X$. In terms of subsets, substitution along $A$ is the natural external operation

$\left(\left[\psi \right]\subseteq X\right)↦\left(\left[\psi \right]×A\subseteq X×A\right).$(\left[\psi\right] \subseteq X) \mapsto (\left[\psi\right]\times A \subseteq X \times A).

Then, for any predicate $\varphi :X×A\to P\left(1\right)$, we have the adjoint relationship

$\left[\psi \right]×A\subseteq \varphi \phantom{\rule{1em}{0ex}}\mathrm{if}\mathrm{and}\mathrm{only}\mathrm{if}\phantom{\rule{1em}{0ex}}\left[\psi \right]\subseteq {\forall }_{A}\varphi$\left[\psi\right] \times A \subseteq \phi \quad if and only if \quad \left[\psi\right] \subseteq \forall_A \phi

so that substitution along $A$ is left adjoint to universal quantification along $A$. This is easy to check; I’ll leave that to the reader.

Internal Intersection Operators

Now we put all of the above together, to define an internal intersection operator

$\bigcap :\mathrm{PPX}\to \mathrm{PX}$\bigcap : PPX \to PX

which intuitively takes an element $1\to \mathrm{PPX}$ (a family $F$ of subsets of $X$) to its intersection $1\to \mathrm{PX}$, as a subset $\bigcap F\subseteq X$.

Let’s first write out a logical formula which expresses intersection:

$x\in \bigcap F\phantom{\rule{1em}{0ex}}\mathrm{if}\mathrm{and}\mathrm{only}\mathrm{if}\phantom{\rule{1em}{0ex}}{\forall }_{S\in \mathrm{PX}}\left(S\in F\right)⇒\left(x\in S\right).$x \in \bigcap F \quad if and only if \quad \forall_{S \in PX} (S \in F) \Rightarrow (x \in S).

Jon Awbrey: There seemed to be an orphan right bracket in the above line, also on your blog.

We have all the ingredients to deal with the logical formula on the right: we have an implication operator “$⇒$” as part of the internal Heyting algebra structure on $P\left(1\right)$, and we have the quantification operator “${\forall }_{\mathrm{PX}}$”. The atomic expressions $\left(S\in F\right)$ and $\left(x\in S\right)$ refer to internal elementhood: $\left(x\in S\right)$ means $⟨x,S⟩\in X×\mathrm{PX}$ is in ${\in }_{X}\subseteq X×\mathrm{PX}$, and $\left(S\in F\right)$ means $⟨S,F⟩\in \mathrm{PX}×\mathrm{PPX}$ is in ${\in }_{\mathrm{PX}}\subseteq \mathrm{PX}×\mathrm{PPX}$.

Jon Awbrey: I didn’t know what to do with the extra slashes in the above paragraph that weren’t parsing, so I deleted them.

There is a slight catch, in that the predicates “$\left(S{\in }_{\mathrm{PX}}F\right)$” and “$\left(x{\in }_{X}S\right)$” (as generalized predicates over $\mathrm{PX}$, where $S$ lives) are taken over different domains. The first is of the form ${\varphi }_{1}:\mathrm{PPX}\to P\left(1{\right)}^{\mathrm{PX}}$, and the second is of the form ${\varphi }_{2}:X\to P\left(1{\right)}^{\mathrm{PX}}$. No matter: we just substitute in some dummy variables. That is, we just pull these maps back to a common domain $\mathrm{PPX}×X$, forming the composites

${\psi }_{1}=\left(\mathrm{PPX}×X\stackrel{{\pi }_{1}}{\to }\mathrm{PPX}\stackrel{{\varphi }_{1}}{\to }P\left(1{\right)}^{\mathrm{PX}}\right)$\displaystyle \psi_1 = (PPX \times X \stackrel{\pi_1}{\to} PPX \stackrel{\phi_1}{\to} P(1)^{PX})

and

${\psi }_{2}=\left(\mathrm{PPX}×X\stackrel{{\pi }_{2}}{\to }X\stackrel{{\varphi }_{2}}{\to }P\left(1{\right)}^{\mathrm{PX}}\right).$\displaystyle \psi_2 = (PPX \times X \stackrel{\pi_2}{\to} X \stackrel{\phi_2}{\to} P(1)^{PX}).

Putting all this together, we form the composite

$\mathrm{PPX}×X\stackrel{⟨{\psi }_{1},{\psi }_{2}⟩}{\to }P\left(1{\right)}^{\mathrm{PX}}×P\left(1{\right)}^{\mathrm{PX}}$\displaystyle PPX \times X \stackrel{\langle \psi_1, \psi_2 \rangle}{\to} P(1)^{PX} \times P(1)^{PX}
$\cong \left(P\left(1\right)×P\left(1\right){\right)}^{\mathrm{PX}}\stackrel{\left(⇒{\right)}^{\mathrm{PX}}}{\to }P\left(1{\right)}^{\mathrm{PX}}\stackrel{{\forall }_{\mathrm{PX}}}{\to }P\left(1\right)$\displaystyle \cong (P(1) \times P(1))^{PX} \stackrel{(\Rightarrow)^{PX}}{\to} P(1)^{PX} \stackrel{\forall_{PX}}{\to} P(1)

This composite directly expresses the definition of the internal predicate $\left(x\in \bigcap F\right)$ given above. By cartesian closure, this map $\mathrm{PPX}×X\to P\left(1\right)$ induces the desired internal intersection operator, $\bigcap :\mathrm{PPX}\to \mathrm{PX}$.

This construction provides an important bridge to getting the rest of the internal logic of ETCS. Since we can can construct the intersection of arbitrary definable families of subsets, the power sets $\mathrm{PX}$ are internal inf-lattices. But inf-lattices are sup-lattices as well; on this basis we will be able to construct the colimits ( e.g., finite sums, coequalizers) that we need. Similarly, the intersection operators easily allow us to construct image factorizations: any function $f:X\to Y$ can be factored (in an essentially unique way) as an epi or surjection $X\to I$ to the image, followed by a mono or injection $I\to Y$. The trick is to define the image as the smallest subset of $Y$ through which $f$ factors, by taking the intersection of all such subsets. Image factorization leads in turn to the construction of existential quantification.

As remarked above, the internal logic of a topos is generally intuitionistic (the law of excluded middle is not satisfied). But, if we add in the axiom of strong extensionality of ETCS, then we’re back to ordinary classical logic, where the law of excluded middle is satisfied, and where we just have the two truth values “true” and “false”. This means we will be able to reason in ETCS set theory just as we do in ordinary mathematics, taking just a bit of care with how we treat membership. The foregoing discussion gives indication that logical operations in categorical set theory work in ways familiar from naive set theory, and that basic set-theoretic constructions like intersection are well-grounded in ETCS.