Trimble n-category

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Higher category theory
+--{: .hide}
[[!include higher category theory - contents]]
=--
=--
=--

#Content#
* automatic table of contents goes here
{:toc}

[[Todd Trimble]]'s definition of weak $n$-[[n-category|category]] is an example of a notion of weak $n$-category which is based on using an [[operad]] induced by all the possible compositions of an [[interval object]] with itself for describing weak composition of 1-morphisms. The higher cells and their composition are then obtained iteratively.

Trimble originally called these *flabby* $n$-categories, which was intended to distinguish them from "weak" $n$-categories (since at the time he wasn't convinced that they were truly weak enough, owing to the fact that we use strict maps of algebras along the way), and also to recall the word "flab" as used by [[Frank Adams]] in his Infinite Loop Spaces book (since there is rather a lot of topological flab in the definition).

## Basic idea

An [[morphism|arrow]] looks like an  [[interval object|interval]]. So, the [[category theory|theory of categories]] and even [[higher category theory|n-categories]] should have a lot to do with the [[interval object|interval]] — especially when it comes to applications to [[topology]]!

In a [[category]] we can glue [[morphism|arrows]] together, 'composing' them. But an [[interval object|interval]] can be chopped apart or 'decomposed' into a bunch of intervals. So, there should be a [[cocategory]] or something like that lurking around here.

In fact the closed unit interval gives an [[A-infinity category|A-infinity]]-[[cocategory]]: a [[cocategory]] where the laws hold up to [[homotopy]], where the homotopies satisfy nice laws up to homotopy, [[homotopy coherent category theory|ad infinitum]].

The space of maps out of an $A_\infty$-cocategory into something should form an [[A-infinity category]]. So, the space of maps out of an interval into a space forms an $A_\infty$-category. And this is an important first step in how [[Todd Trimble]] constructs the [[fundamental infinity-groupoid|fundamental n-groupoid ]] of a space!

But the really cool part is how this construction goes hand in hand with his definition of $n$-categories, in an inductive kind of way.

## History

In 1999, [[Todd Trimble]] introduced a definition of weak $n$-category in a lecture at Cambridge University. This definition was introduced in order to give an algebraic notion of fundamental $n$-groupoid, and has since been taken up in a number of directions by [[Tom Leinster]] and [[Eugenia Cheng]], who compare it with globular approaches (e.g., [[Michael Batanin|Batanin]]'s) and give a weak $\omega$-category extension.

Trimble never published this material himself (in effect leaving it to others present at the Cambridge lecture to develop their own accounts, which has been a good thing), but it may be of at least historical interest to have Trimble's original account available. We will then pick out the highlights and streamline the approach, following subsequent work by Leinster and Cheng.

## The original idea

The original idea was to use an $A_\infty$-[[A-infinity-cocategory|cocategory]] structure on the topological [[interval object|interval]] $I$, in the form of an [[Top|topological]] [[operad]] $T$ which is used to control all ways of weakly composing arrows. Then one proceeds to define [[n-category|weak n-categories]] by induction, defining at each stage a [[fundamental groupoid|fundamental]] [[n-groupoid]] [[functor]]

$$\Pi_n: Top \to n Cat$$

and then defining an $(n+1)$-category as a category "weakly [[enriched category|enriched]]" in $nCat$, meaning roughly speaking a structure of $\Pi_n(T)$-[[algebra over an operad|algebra]] in the category of $n Cat$-[[graph]]s.

It will be helpful to review the [[fundamental groupoid|fundamental (1-)groupoid]] of a space first, doing it in such a way that we will see how to inductively define the fundamental $n$-groupoid.

Let $X$ be a [[topological space]], and let $X_0$ denote its underlying set, viewed as a [[discrete category]]. If $V$ is a category, then a _$V$-graph_ over $X_0$ is just a functor

$$X_0 \times X_0 \to V$$

(which here amounts to a function $X_0 \times X_0 \to Ob(V)$).There is an obvious category of $V$-graphs over $X_0$.

* We can also consider a more general category **$V$-Graph**, where a morphism $(C_0, C(-, -)) \to (D_0, D(-, -))$ consists of a function $f_0: C_0 \to D_0$ together with a collection $C(c, c') \to D(f_0 c, f_0 c')$ of morphisms in $D$.

A basic example of $V$-graph for our purposes is the "graph of paths" for a space $X$: define

\[\label{Trimble1}
X^\sim : X_0 \times X_0 \to Top
\]

by letting $X^\sim(x, y)$ be the [[topological space|space]] of paths from $x$ to $y$. Two paths from $x$ to $y$ are homotopic if they lie in the same connected component of $X^\sim(x, y)$, so by applying the connected components functor,

$$X_0 \times X_0 \stackrel{X^\sim}{\to} Top \stackrel{\Pi_0}{\to} Set$$

we get the graph of [[homotopy (as a transformation)|homotopy classes]] of paths. What we want is to put a category structure on this $Set$-graph, so as to obtain the [[fundamental groupoid]] $\Pi_1(X)$.

The $Top$-graph (eq:Trimble1) can also be thought of as a topological [[span]] from the discrete space $X_0$ to itself, and this is obviously closely related to the span

\[\label{Trimble2}
X^1 \stackrel{X^{i_0}}{\leftarrow} X^I \stackrel{X^{i_1}}{\to} X^1
\]

where $i_0, i_1: 1 \to I$ are the endpoint inclusions. Indeed, we get (eq:Trimble1) from (eq:Trimble2) by first precomposing with a span from $X_0$ to $X$,

$$X_0 \leftarrow X_0 \to X,$$

(both arrows being identity functions), followed by postcomposing with the opposite span. This pre- and post-composition gives a functor

\[\label{Trimble3}
TopSpan(X, X) \to TopSpan(X_0, X_0) = TopGraph_{X_0}
\]

to which we return later, but for the time being we work with the span (eq:Trimble2).

As a functor in $X$, the span (eq:Trimble2) is obtained by homming out of the _interval cospan_

$$1 \stackrel{i_0}{\to} I \stackrel{i_1}{\leftarrow} 1$$

and the fundamental groupoid structure on the span (eq:Trimble1) ultimately comes about by homming out of an H-cogroupoid structure on the interval cospan, just as the [[fundamental group]] of a based space is obtained by homming out of the pointed circle, seen as an H-[[cogroup]].

Let us describe the H-[[cocategory]] structure on the interval [[cospan]]. A cospan from a point to itself is a bi[[pointed object|pointed]] space, and the composite of two such cospans $X$, $Y$ is obtained by identifying the second point of $X$ with the first point of $Y$, resulting in a new bipointed space we denote by $X \vee Y$. In particular,

$$I \vee I = [0, 1] \vee [0, 1] \cong [0, 2]$$

and the co-composition for the H-cocategory structure on $I$, which is a cospan map $I \to I \vee I$, is essentially just multiplication by 2:

$$[0, 1] \to [0, 2]$$

This co-operation $I \to I \vee I$ is not strictly coassociative, but is coassociative up to [[homotopy (as a transformation)|homotopy]]. As a matter of fact, it follows straight away from the _[[convex space|convexity]]_ of the $n$-fold cospan composite $I^{\vee n} \cong [0, n]$ that the space of cospan maps $\hom(I, I^{\vee n})$ is _contractible_: the convexity actually gives a way of defining coherent homotopies (the pentagon, etc.) all the way up the "$A_{\infty}$-ladder". In other words, the cospan $I$ carries an $A_{\infty}$-cocategory structure.

But we don't actually need the $A_{\infty}$-jargon: all we will need are two basic facts:

* There is a 'tautological' topological operad $T$ where the component $T_n$ is the space $\hom(I, I^{\vee n})$ of cospan maps;

* Each component $T_n$ is contractible.

The operad structure on $T$ is derived from pure abstract nonsense: if $A$ is an object in a monoidal category, then the objects $\hom(A, A^{\otimes n})$ are the components of an operad, just as are the objects $\hom(A^{\otimes n}, A)$ the components of the familiar tautological endomorphism operad. This applies in particular to the cospan $I$, seen as an object in the monoidal category of cospans from a point to itself; in analogy, we call $T$ 'tautological' as well.

Now we just hom out of the cospan co-operations encapsulated in the operad $T$ to get span operations on the topological span above. That is, we use the facts that

* $\hom(-, X)$ takes the $n$-fold cospan composite $I^{\vee n}$ to the $n$-fold span composite of $X \leftarrow X^I \to X$, so

* Each cospan co-operation $\theta \in T_n = \hom(I, I^{\vee n})$ induces a span operation
$$\hom(\theta, X): \hom(I^{\vee n}, X) \to \hom(I, X)$$
from the $n$-fold span composite to the span itself.

Again, we could express this by saying we derive an $A_\infty$-[[A-infinity-category|category]] structure on the topological span (eq:Trimble2), but in less fancy terms, the composition map

$$\hom(I, I^{\vee n}) \times \hom(I^{\vee n}, X) \to \hom(I, X)$$

gives a $T$-algebra structure on the topological span:

\[\label{Trimble4}
T_n \times (X \leftarrow X^I \to X)^{\otimes n} \to (X \leftarrow X^I \to X)
\]

where $\otimes$ indicates span composite.

* **Remark**: $T$ is an operad in $Top$, not in the monoidal category $TopSpan(X, X)$. But we can make it an operad there by applying an evident change-of-base $Top \to TopSpan(X, X)$, sending a space $Y$ in $Top$ to the span
$$X \stackrel{\pi}{\leftarrow} X \times Y \stackrel{\pi}{\to} X$$
This change of base is (strong) monoidal. As a matter of fact, this change of base factors through the center of the monoidal category $TopSpan$, which we actually need because one needs symmetries in order to express the notion of even a nonpermutative operad internal to a monoidal category.

We get a similar $T$-algebra structure on the $Top$-graph $X^\sim: X_0 \times X_0 \to Top$ we started with. Indeed, the functor

\[\label{Trimble3}
TopSpan(X, X) \to TopSpan(X_0, X_0) \cong TopGraph_{X_0}
\]

is a lax monoidal functor, and hence takes $T$-algebras in $TopSpan(X, X)$ (as in (eq:Trimble4)) to $T$-algebras in $TopGraph_{X_0}$. This gives a $T$-algebra structure

\[\label{Trimble5}
T_n \times (X^\sim)^{\otimes n} \to X^\sim
\]

in the monoidal category of $Top$-graphs. Considered geometrically, this is almost pure tautology, but **(eq:Trimble5) is the crucial topological input in Trimble's machine**.

Let us make this more explicit. In general, if $V$ is a monoidal category with coproducts, such that the tensor $u \otimes v$ preserves coproducts in each of its separate arguments $u$ and $v$, then the category of $V$-graphs also carries a monoidal structure, where for two $V$-graphs $G, H$ we define

$$(G \otimes H)(x, z) = \sum_y G(x, y) \otimes H(y, z)$$

Hence, in the case $V = Top$, (eq:Trimble5) takes the more explicit form

\[\label{Trimble6}
T_n \times \sum_{y_1, \ldots, y_{n-1}} X^\sim(x, y_1) \times X^\sim(y_1, y_2) \times \ldots \times X^\sim(y_{n-1}, z) \to X^{\sim}(x, z)
\]

Now apply the functor $\Pi_0: Top \to Set$ (which preserves products and incidentally sums as well) to (eq:Trimble6). This makes the $Set$-graph $\Pi_0 X^\sim$ an algebra over the operad $\Pi_0 T$. But a $Set$-graph equipped with a $\Pi_0 T$-algebra structure is just a category, since $\Pi_0 T_n$ consists of just a point, i.e., is the [[associative operad]]  whose algebras are monoids, and a category is a monoid in a category of graphs.

This category is precisely the fundamental groupoid $\Pi_1(X)$. It is pretty clear from this description that $\Pi_1(X)$ is functorial in $X$. Indeed, if $f: X \to Y$ is a continuous map, we can pull back the $Top$-graph $Y^\sim$ over $Y_0$ to a $Top$-graph over $X_0$,

$$X_0 \times X_0 \stackrel{f_0 \times f_0}{\to} Y_0 \times Y_0 \stackrel{Y^\sim}{\to} Top,$$

which we call $f_0^{-1} Y^\sim$. The continuous map $f: X \to Y$ induces a comparison map of $T$-algebras in $TopGraph_{X_0}$,

$$ f^*: X^\sim \to f_0^{-1} Y^\sim: X_0 \times X_0 \to Top $$

and again by composing with $\Pi_0: Top \to Set$, we get a map $ \Pi_0 f^*: \Pi_1(X) \to \Pi_1(Y) $, i.e., a functor between the fundamental groupoids.

Thus, after a series of small tautological steps, we have bootstrapped our way up from $\Pi_0$ to $\Pi_1$. This same procedure suggests a way to bootstrap from $\Pi_1$ to a definition of $\Pi_2$, and so on up an $n$-categorical ladder. Here are the general inductive definitions:

* A (Trimble) 0-category is a set. The fundamental 0-groupoid $Top \to 0 Cat$ is the connected components functor $\Pi_0: Top \to Set$.

* For $n \geq 0$, a **Trimble $(n+1)$-category** consists of a set $X_0$ and a $n Cat$-graph
$$X: X_0 \times X_0 \to n Cat$$
equipped with a structure of algebra over the operad $\Pi_n T$ (a priori an operad in the cartesian monoidal category $n Cat$, but made into an operad in $n Cat Graph_{X_0}$ by an obvious change of base; cf. the remark above).

* A **morphism** of Trimble $(n+1)$-categories $(X_0, X) \to (Y_0, Y)$ consists of of a function $f_0: X_0 \to Y_0$ together with a _strict_ $\Pi_n T$-algebra map $f: X \to f_0^{-1} Y$. The category $(n+1)Cat$ admits finite products and arbitrary sums over which products distribute.

* The **fundamental $(n+1)$-groupoid functor**
$$\Pi_{n+1}: Top \to (n+1)Cat$$
sends a space $X$ to the pair $(X_0, \Pi_n X^\sim)$, seen as a $\Pi_n T$-algebra by applying the product-preserving functor $\Pi_n$ to the tautological $T$-algebra $X^\sim$.

* **Theorem**: $\Pi_{n+1}$ preserves finite products and arbitrary coproducts. (This theorem is needed to push the induction through.)

And that's it. Notice this approach is in essence globular, that is we have an underlying functor

$$U_n: n Cat \to (n)GlobularSet$$

to $n$-globular sets. This is defined by induction: the underlying $(n+1)$-globular set of an $(n+1)$-category $(X_0, X)$ is given by

$$X_0 \times X_0 \to (n)Cat \stackrel{U_n}{\to} (n)GlobularSet$$

using the fact that an $(n+1)$-globular set is naturally an $n$-globular graph over its set of 0-cells. In fact, Cheng has shown that Trimble $n$-categories (and related structures; see the next section) are the algebras of a Batanin operad, that is a globular operad satisfying a contractibility condition.

As Cheng put it, Trimble's inductive definition is disarmingly straightforward, and yet it codes up all the essential structure one expects to see in weak $n$-categories. For example, an associator for 2-categories is coded up as a 1-cell in $\Pi_1 T_3$, i.e., as a homotopy class of paths between two points in $\hom(I, I \vee I \vee I)$:

$$(\delta \vee 1)\delta, (1 \vee \delta)\delta: [0, 1] \to [0, 3]$$

where $\delta: [0, 1] \to [0, 2]$ is a co-composition. The pentagonator is similarly coded up as a 2-cell in $\Pi_2 T_4$. And so on.

To be continued...

## Comparison to classical notions of $n$-category in low degree

A Trimble $n$-category has composition and unit which are associative and unital up to $n-1$-equivalence, but the notion of a morphism of Trimble $n$-categories is strict; for example, a morphism of bicategories regarded as Trimble 2-categories is precisely a strict pseudofunctor (one whose lax composition constraint and lax unit constraint are identity 2-cells).

In comparison with classical concrete definitions of higher category, a bicategory is precisely a Trimble 2-category, but a Trimble 3-category is a tricategory satisfying a strict interchange law for composition. Not every tricategory is equivalent to one with a strict interchange law for composition; in fact, the fundamental coherence theorem for tricategories is equivalent to the statement that every tricategory is equivalent to a [[Gray-category|Gray category]], which is a tricategory strict in every respect *except* for the interchange law.

## Iterative operadic enrichment

The account above was given in a traditional language of operads, but subsequent analysis by Leinster and Cheng led to the following notion, involving a hybrid between algebras over an [[operad]] and [[enriched category theory|enriched categories]].

Fix a symmetric monoidal category $V$, and let $P$ be an operad valued in $V$. A **$(V, P)$-category** consists of

* A set of objects $X_0$,

* A $V$-graph $X(-, -): X_0 \times X_0 \to V$;

* Maps $P_n \otimes X(x_0, x_1) \otimes \ldots X(x_{n-1}, x_n) \to X(x_0, x_n)$ parametrized over all choices $x_0, x_1, \ldots, x_n$

subject to axioms similar to the usual axioms for algebras over an operad.

* Example: For $V = (Top, \times)$ and $P$ the operad $T = \{\hom_{cospan}(I, I^{\vee n})\}$ discussed above, we constructed a $(V, P)$-category $(X_0, X^\sim)$ out of any space $X$.

Trimble's definition above amounts to an inductive definition of weak $n$-Cat (call it $V_n$) where

* 0-Cat = Set;

* $V_{n+1} = (V_n, P_n)$-Cat

for some series of operads $P_n$ valued in $V_n$. The operads $P_n$ in his definition came from one master operad $T$, by applying a product-preserving functor

$$\Pi_n: Top \to V_n$$

to $T$. But other operads are possible.  For the purposes of $n$-category theory, we should choose operads that are contractible in some sense (which the $\Pi_n(T)$ should be), but even in the realm of contractible operads there are many possible choices which may be convenient for different purposes.

## Extension to $\infty$-categories {#InftyCats}

Using some theory of terminal coalgebras, Leinster and Cheng described a viable notion of Trimble $\infty$-category.

* [Terminal coalgebras](http://www-lmpa.univ-littoral.fr/CT08/slides/Cheng.pdf)

There are several equivalent ways to describe this construction.

### As an inverse limit

This approach starts from the observation that the category $Str \infty Cat$ of strict $\infty$-categories is the inverse limit in $CAT$ of the sequence

$$\dots \to Str3Cat \to Str2Cat \to Cat \to Set$$

where each functor is "truncation," i.e. discard all top-dimensional cells.  We would like to imitate this, but the problem is that if we discard the $(n+1)$-cells in a (Trimble) weak $(n+1)$-category, we don't get a weak $n$-category; for that we would have to also *identify* $n$-cells that are connected by some $(n+1)$-cell.

We can see this going on at the operad level as well.  Consider the basic shape of the fundamental $n$-groupoid $\Pi_n(X)$ as a globular set: in dimensions $j \lt n$, the $j$-cells are just continuous maps $D^j \to X$, but the dimension $j = n$ is exceptional: the putative $\infty$-groupoid $\Pi_\omega(X)$ is "truncated" to a fundamental $n$-groupoid $\Pi_n(X)$ by forcing all $j$-cells in dimensions $j \gt n$ to be identity cells, that is by taking the quotient of the set of $n$-cells $D^n \to X$ with respect to homotopy-equivalence rel boundary $\partial D^n$.  Thinking of homotopy-equivalence classes in terms of applying a path-components functor $\Pi_0$ to a suitable function space, one sees after some reflection that this globular "truncation", which is a sort of enforcement of coherence at the level of top-dimensional cells, is really the result of beginning the iterative enrichment with the path-components functor

$$\Pi_0: Top \to Set$$

in the first place.

In slightly different words: this form of "truncation" from a higher-dimensional category to a lower one is iterated "decategorification", going from isomorphisms between $n$-cells to isomorphism classes of $n$-cells: again the effect of applying a connected components functor $\Pi_0$. To take weak $\omega$-categories seriously is to eliminate all vestiges of such decategorification: there are no coherence _equations_ to impose at the top level; there are only higher and higher coherence data all the way up the dimensional chain, which one could elect to chop off past a certain point (instead of modding out by).

So in order to perform the inverse limit construction successfully, we should *not* perform any identifications at all, merely truncation.  Precisely, if instead of starting out the iterative enrichment with $\Pi_0$, one could start by replacing it with the *underlying set functor*

$$U: Top \to Set$$

and again set the machine in motion.  In this way we obtain an "incoherent Trimble 1-category" as a graph equipped with a structure of algebra over the operad $D_0 = U T$, an "incoherent Trimble 2-category" as a graph enriched in incoherent 1-categories and with a structure of algebra over the operad $D_1 = D_0 T$, and so on. Again, one proves that $D_n$ preserves coproducts and finite products by induction, starting with the base observation that the underlying set functor $U$ preserves coproducts and finite products.  Thus by induction we have a category of incoherent $n$-categories, $n iCat$.

As a result, we have actual truncation functors

$$\ldots (n+1)iCat \to n iCat \to \ldots ... \to Set$$

where one just saws off the $(n+1)$-cells at each step, and one may define the category of Trimble $\omega$-categories as the inverse limit of this sequence.

### As a terminal coalgebra

This approach begins with the observation of Simpson that $Str$-$\omega$-$Cat$ is a fixed point of the ordinary enrichment process

$$E: V \mapsto V-Cat$$

taking a (complete, cocomplete) closed symmetric monoidal $V$ to the (complete, cocomplete) closed symmetric monoidal category of small $V$-categories.  In fact, it is more than a fixed point; it is a [[terminal coalgebra]] for the functor $E$.  This is the same as the previous observation that $Str \omega Cat$ is the inverse limit of the sequence

$$\ldots \to Strict(n+1)Cat \overset{E^n !}{\to} Strict(n)Cat \to \ldots Set \overset{!}{\to} 1$$

because of Adamek's theorem that the limit

$$ \dots \to E^n 1 \to \dots \to E^2 1 \to E 1 \to 1 $$

always produces a terminal $E$-coalgebra whenever the functor $E$ preserves limits of sequences of this form.   In our case, $E^n !$ works out to be the usual globular truncation from $(n+1)$-categories to $n$-categories.  We now observe that the same principle applies to the weak enrichment process, as long as we carry along the information of the fundamental $n$-groupoid functor, i.e. we consider the functor

$$E: \langle V, \Pi \rangle \mapsto \langle (V, \Pi)-Cat, \Pi^+ \rangle$$

where $\Pi: Top \to V$ preserves finite products (and coproducts), where $(V, \Pi)$-$Cat$ is the category of $(V,\Pi(T))$-categories, and where $\Pi^+$ takes a space $X$ to $\Pi(X^\sim)$ as a $(V,\Pi(T))$-category.
This time $E^n !$ works out to be precisely the globular truncation

$$Dec(n+1)Cat \to Dec(n)Cat$$

and so the terminal $E$-coalgebra is the category $Trimble(\omega)Cat$ as described above, equipped with the fundamental $\omega$-groupoid functor

$$\Pi_\omega: Top \to Trimble(\omega)Cat$$

### As a coinductive definition {#Coinductive}

It is often convenient to reason about terminal coalgebras using [[coinduction]] and [[corecursion]].  In this spirit, it is possible to reformulate the definition of Trimble $\omega$-categories coinductively.  Namely, we define a category $\omega Cat = Trimble \omega Cat$ and a functor $\Pi\colon Top \to \omega Cat$, which preserves coproducts and finite products, by mutual coinduction, as follows.

* An object of $\omega Cat$ (that is, a Trimble $\omega$-category) is an $(\omega Cat,\Pi(T))$-category, i.e. an $\omega Cat$-enriched graph $X$ with composition operations $\Pi(T)_n \times X(x_0, x_1) \times \ldots X(x_{n-1}, x_n) \to X(x_0, x_n)$ satisfying the evident axioms.
* Similarly, a morphism in $\omega Cat$ is a (strict) $(\omega Cat,\Pi(T))$-functor, i.e. a map of $\omega Cat$-enriched graphs which respects the $\Pi(T)$-structure.
* The functor $\Pi$ takes a space $X$ to the $\omega$-category $\Pi(X^\sim)$, whose objects are the points of $X$, whose hom-$\omega$-category from $x$ to $y$ is $\Pi(X^\sim(x,y))$, and whose $\Pi(T)$-structure is given by composing paths.

This sort of coinductive definition is that used in the [[calculus of coinductive constructions]], which when rephrased in terms of a terminal coalgebra reduces to the definitions given above.

## Category theory for Trimble $n$-categories {#CatTheory}

+-- {: .query}

[[Urs Schreiber|Urs]]:

suppose I wanted to serious apply the Trimble $n$-category tool to some class of problems. It would be helpful to have an idea about some of the following points.

The main reason why [[quasi-category|quasi-categories]]
and other models for
[[(infinity,1)-category|(infinity,1)-categories]]
are popular is that Joyal and Lurie showed that beyond
just having a definition, one can _do category theory_
with them. I would like to understand to which extent
we know how to "do category theory" with Trimble $n$-categories.

I understand that much of this will remain to be worked out, but probably in particular [[Todd Trimble|Todd]] has many ideas about how one should go about approaching this. I'd be interested in whatever idea or tentative suggestion there is.

So:

What can be said about

* [[universal construction]]s

  * definition of [[weak limit]]/weak colimit, of [[adjunction]]s and [[Kan extension]]
43
in Trimble $n$-catgeories?

For instance for what I am doing
I'd need in particular weak pullbacks and the resulting
[[fibration sequence]]s in a Trimble $n$-category.
What are the chances to get hold of these notions in this context?

What is known about the reflection of Trimble $n$-categories on themselves

* Is there a definition of Trimble $(n+1)$-categorry of all Trimble $n$-categories?

* A Trimble $\infty$-category of all Trimble $\infty$-categories?

What is the relation to

* [[simplicial model for weak omega-categories|simplicial models for weak omega categories]],

  * do we have a notion of [[nerve]] of a Trimble $n$-category?

  * can we characterize the nerves of Trimble $n$-categories?

Probably we want to define the cosimplicial Trimble $\infty$-category that sends $[n]$ to the fundamental Trimble $\infty$-path category of the topological $n$-simplex and induce a notion of nerve of that. But the naive version of that will give just $\infty$-groupoidal nerve. What is generally needed is probably a notion of [[directed space|directed]] Trimble path $n$-category.

What can be said about [[(n,r)-category]]-cases of Trimble $n$-categories. How do we say "Trimble $n$-groupoid"?

What about monoidal structures? Is there a good guess for what it would mean to have a

* monoidal Trimble $n$-category

* symmetric (i.e. stably) monoidal Trimble $n$-category?

=--

## References

The first appearance in print of the definition was in

* [[Tom Leinster]], _A Survey of Definitions of $n$-Category_ ([arXiv](http://arxiv.org/abs/math.CT/0107188)), [p. 54](http://arxiv.org/PS_cache/math/pdf/0107/0107188v1.pdf#page=54)

Later the definition was applied tentatively for the construction of weak $n$-cateories of cobordisms in

* [[Eugenia Cheng]] and [[Nick Gurski]], _Towards an $n$-category of cobordisms_, Theory and Applications of Categories, Vol. 18, 2007, No. 10, pp 274-302. ([tac](http://www.tac.mta.ca/tac/volumes/18/10/18-10abs.html))

This article first reviews the original definition

* section 2, _Trimble's definition_ recalls the original definition,

and then generalizes it

* section 4 _Generalised Trimble definition_ proposes a generalization

A comparison of Trimble's definition with that of a [[Batanin omega-category]] is in

* [[Eugenia Cheng]], _Comparing operadic theories of $n$-category_ ([arXiv](http://arxiv.org/abs/0809.2070))

Weak ω-category construction via terminal coalgebras

* [[Eugenia Cheng]] and [[Tom Leinster]], _Weak ω-categories via terminal coalgebras_ ([arXiv](https://arxiv.org/abs/1212.5853)), published as _Weak $\infty$-categories via terminal coalgebras_, Theory and Applications of Categories,  Vol. 34, 2019, No. 34, pp 1073-1133. ([tac](http://www.tac.mta.ca/tac/volumes/34/34/34-34abs.html))

[[!redirects Trimble's notion of weak n-category]]
[[!redirects Trimble's notion of weak n-category]]
[[!redirects flabby n-category]]
[[!redirects flabby n-categories]]

[[!redirects Trimble omega-category]]
[[!redirects Trimble ∞-category]]
[[!redirects Trimble omega-catgeories]]
[[!redirects Trimble ∞-categories]]


Trimble on ETCS I

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Foundations
+-- {: .hide}
[[!include foundations - contents]]
=--
=--
=--

_This is Part I of an exposition by [[Todd Trimble]] on [[ETCS]]_.

See also

* Part II, [[Trimble on ETCS II|ETCS: Internalizing the logic]]

* Part III, [[Trimble on ETCS III|ETCS: Building joins and coproducts]]

***

# Contents
* tic
{: toc}

## ZFC and ETCS: Elementary Theory of the Category of Sets

This is a post on "[[foundations]] of mathematics" (eek!). I was motivated to write it while I've been struggling to understand better certain applications of ultrafilters -- namely the theory of *measurable cardinals* -- from a point of view and language that I feel comfortable with. My original intent was to blog about *that*, as a kind of off-shoot of the general discussion of [ultrafilters](http://topologicalmusings.wordpress.com/2008/07/18/ultrafilter-convergence-compactness-and-the-spectrum-of-a-boolean-algebra/) I started in connection with the series on [Stone duality](http://topologicalmusings.wordpress.com/2008/04/02/toward-stone-duality-posets-and-meets/), and because it seems kind of cool. And I will. But this got finished first, and I thought that it would be of interest to some who have been following my [category](http://topologicalmusings.wordpress.com/2008/06/22/basic-category-theory-i/) [theory](http://topologicalmusings.wordpress.com/2008/06/29/basic-category-theory-ii/) [posts](http://topologicalmusings.wordpress.com/2008/07/12/basic-category-theory-iii-representability-adjoints-and-the-yoneda-lemma/).

A lot of confusion seems to reign around "the [[category theory|categorical]] approach to [[foundations]]" and what it might entail; some seem to think it involves a "doing-away with elements" that we all know and love, or doing away with [[set|sets]] and supplanting them with [[category|categories]], or something like that. That's an unfortunate misunderstanding. My own attitude is pragmatic: I'm all in favor of mathematicians using ordinary "[naive](http://topologicalmusings.wordpress.com/2007/12/13/naive-set-theory-paul-halmos/)" (pre-axiomatic) set theory to express their thoughts if that's the familiar and appropriate conveyance -- I mean, obviously I do it myself. It's our common heritage, learned through years of undergraduate and graduate school experience and beyond. I'm not proposing for a moment to "overthrow" it.

What I *do* propose to discuss is a formalized set theory which embodies this rich tradition, but which takes advantage of categorical insights honed over the decades, and which I would argue is 'natural' in its ease to accept formulas in naive set theory and give them a foundation true to mathematical practice; I also argue it addresses certain criticisms which I feel could be put to that hallowed foundational theory, ZFC. I should own up that this theory is not immune to criticism, a main one being that a certain amount of preface and commentary is required to make it accessible (and I don't think category theorists have done a particularly hot job doing that, frankly).

Let's start by putting down what we want in very simple, pragmatic terms:

* A (formalized) 'set theory' worthy of the name ought to realize a conception of sets as "completed collections", and allow for the existence of enough sets and relations to fulfill the needs of working mathematicians.

This is intentionally vague.
The "needs of working mathematicians" fluctuate over time and place and person. Some of the core needs would include the existence of the sets of natural numbers and real numbers, for instance. On the other hand, in the field of set theory one will have other needs than in, say, complex analysis. For now I'll ignore some of the deeper needs of set theorists, and try to focus on the basic stuff you'd need to formalize what goes on in your average graduate school text (to put it vaguely, again).

We will discuss two formalizations of set theory: [ZFC](http://en.wikipedia.org/wiki/Zermelo-Fraenkel_set_theory), and Lawvere's Elementary Theory of the Category of Sets [[ETCS]]. The first "needs no introduction", as they say. The second is an autonomous category-based theory, described in detail below, and proposed by Saunders Mac Lane as an alternative approach to "foundations of mathematics" (see his [book with Moerdijk](http://www.amazon.com/Sheaves-Geometry-Logic-Universitext-Saunders/dp/3540977104)). Either formalization provides fully adequate infrastructure to support the naive set theory of working mathematicians, but there are significant conceptual differences between them, centering precisely on how the notion of **membership** is handled. I'll start with the more familiar ZFC.

As everyone knows, ZFC formalizes a conception of "set" as collection extensionally determined by the members it contains, and the ZFC axioms ensure a rich supply of ways in which to construct new sets from old (pairings, unions, power sets, etc.). Considering how old and well-developed this theory is, and the plenitude of available accounts, I won't say much here on its inner development. Instead, I want to pose a question and answer to highlight a key ZFC conception, and which we use to focus our discussion:

> **Question**: "What are the members of sets?"
>
> **Answer: "Other sets."

This may seem innocent enough, but the consequences are quite far-reaching. It says that "membership" is a relation $\in$ from the collection $V$ of all "sets" to itself. (Speaking at a pre-axiomatic level, a *relation* from a set $X$ to a set $Y$ is a subset $R \subseteq X \times Y$. So a structure for ZFC set theory consists of a "universe of discourse" $V$, together with a collection $\in \subseteq V \times V$ of pairs of elements of $V$, called the membership relation.)

Why is this a big deal? A reasonable analogue might be [dynamical systems](http://en.wikipedia.org/wiki/Dynamical_system). If $X$ and $ Y$ are manifolds, say, then you can study the properties of a given smooth map $f: X \to Y$ and maybe say interesting things of course, but in the case $X = Y$, you get the extra bonus that outputs can be fed back in as inputs, and infinite processes are born: you can study periodic orbits, long-term behaviors, and so on, and this leads to some very intricate mathematics, even when $ X$ is a simple manifold like a 2-sphere.

My point is that something analogous is happening in ZFC: we have a (binary) relation $ \in$ from $ V$ to itself, and we get a rich "dynamics" and feedback by iterative relational composition of $ \in$ with itself, or by composing other derived binary relations from $ V$ to itself. (Perhaps I should recall here, again at a pre-axiomatic level, that the composite $ S \circ R$ of a relation $ R \subseteq X \times Y$ and $ S \subseteq Y \times Z$ is the subset

$$
\{(x, z): \exists_{y \in Y} (x, y) \in R \wedge (y, z) \in S\} \subseteq X \times Z
$$

A "behavior" then would correspond to an iterated membership chain

$$
 (x \in y) \wedge (y \in z) \wedge (z \in w) \wedge \ldots
$$

and there are certain constraints on behavior provided by things like the axiom of foundation (no infinitely long backward evolutions). The deep meaning of the extensionality axiom is that a "set" $ s$ is uniquely specified by the abstract structure of the tree of possible backward evolutions or behaviors starting from the "root set" $ s$. This gives some intuitive but honest idea of the world of sets according to the ZFC picture: sets are tree-like constructions. The ZFC axioms are very rich, having to do with incredibly powerful operations on trees, and the combinatorial results are *extremely* complicated.

There are other formulations of ZFC. One is by posets: given any relation $ R \subseteq V \times V$ (never mind one satisfying the ZFC axioms), one can create a reflexive and transitive relation $ \leq$, defined by the first-order formula

$$
 a \leq b \text{ if and only if }  \forall_{x \in V} (x, a) \in R \Rightarrow (x, b) \in R
$$

The "extensionality axiom" for $ R$ can then be formulated as the condition that $ \leq$ also be antisymmetric, so that it is a partial ordering on $ V$. If $ R = \in$ is the membership relation for a model of ZFC, then this $ \leq$ is of course just the usual "subset relation" between elements of $ V$.

Then, by adding in a suitable "singleton" operator $ s: V \to V$ so that

$$
  x \in y \text{ if and only if }  s(x) = \{x\} \leq y
$$

the rest of the ZFC axioms can be equivalently recast as conditions on the augmented poset structure $ (V, \leq, s)$. In fact, Joyal and Moerdijk wrote a slim volume, [Algebraic Set Theory](http://books.google.com/books?id=E0Xhn32xzZAC&dq=%22algebraic+set+theory%22&pg=PP1&ots=DvTjZP030_&sig=IX1kWLQ2rzsmw5gsdJ_0ow8vJEQ&hl=en&sa=X&oi=book_result&resnum=1&ct=result), which gives a precise (and for a categorist, attractive) sense in which models of axiomatic frameworks like ZF can be expressed as certain initial algebras [of structure type $ (V, \leq, s)$] within an ambient category of classes, effectively capturing the "cumulative hierarchy" conception underlying ZFC in categorical fashion.

The structure of a ZFC poset $ (V, \leq)$ is rich and interesting, of course, but in some ways a little odd or inconvenient: e.g., it has a bottom element of course (the "empty set"), but no top (which would run straight into Russell's paradox). Categorically, there *are* some cute things to point out about this poset, usually left unsaid; for example, taking "unions" is left adjoint to taking "power sets":

$$
  \bigcup F \leq X  \text{if and only if}   F \leq P X.
$$

In summary: ZFC is an axiomatic theory (in the language of first-order logic with equality), with one basic type $ V$ and one basic predicate $ \in$ of binary type $ V \times V$, satisfying a number of axioms. The key philosophic point is that there is no typed distinction between "elements" and "sets": both are of type $ V$, and there is a consequent very complicated dynamical "mixing" which results just on the basis of a short list of axioms: enough in principle to found all of present-day mathematics! I think the fact that one gets such great power, so economically, from apparently such slender initial data, is a source of great pride and pleasure among those who uphold the ZFC conception (or that of close kin like NBG) as a gold standard in foundations.

My own reaction is that ZFC is perhaps *way* too powerful! For example, the fact that $ \in$ is an endo-relation makes possible the kind of feedback which can result in things like Russell's paradox, if one is not careful. Even if one is free from the paradoxes, though, the point remains that ZFC pumps out not only all of mathematics, but all sorts of dross and weird by-products that are of no conceivable interest or relevance to mathematics. One might think, for example, that to understand a model of ZFC, we have to be able to understand which definable pairs $ (a, b)$ satisfy $ a \in b$. So, in principle, we can ask ourselves such otherwise meaningless gibberish as "what in our model and implementation is the set-theoretic intersection of the real number $ \pi$ and Cantor space?" and expect to get a well-defined answer. When you get right down to it, the idea that *everything* in mathematics (like say the number $ e$) is a "set" is just plain bizarre, and actually very far removed from the way mathematicians normally think. And yet this is how we are encouraged to think, if we are asked to take ZFC seriously as a foundations.

One might argue that all expressions and theorems of normal mathematics are interpretable or realizable in the single theory ZFC, and that's really all we ever asked for -- the details of the actual implementation (like, 'what is an ordered pair?') being generally of little genuine interest to mathematicians (which is why the mathematician in the street who says ZFC is so great usually can't say with much specificity what ZFC is). But this would seem to demote ZFC foundations, for most mathematicians, to a security blanket -- nice to know it's there, maybe, but otherwise fairly irrelevant to their concerns. But if there really is such a disconnect between how a mathematician thinks of her materials *at a fundamental level* and how it specifically gets coded up as trees in ZFC, with such huge wads of uninteresting or irrelevant stuff in its midst, we might re-examine just how appropriate ZFC is as "foundations" of our subject, or at least ask ourselves how much of it we usefully retain and how we might eliminate the dross.

We turn now to consider a categorical approach, ETCS. This will require retooling the way we think of mathematical membership. There are three respects in which "membership" or "elementhood" differs here from the way it is handled in ZFC:

1. "Elements" and "sets" are entities of different types. (Meaning, elements are not themselves presupposed to be sets.)
2. When we say "element", we never mean an object considered in isolation; we always consider it relative to the specific "set" it is considered to be a member of. (That is, strictly speaking, the same object is never thought of as "belonging to" two distinct sets -- use of such language must be carefully circumscribed.)
3. We consider not just "elements" in the usual sense, but what are sometimes called "generalized elements". Civilians call them "functions". Thus, an element of type $X$ over a domain of variation $ U$ is fancy terminology for a function $f: U \to X$. We will call them functions or "generalized elements", depending on the intuition we have in mind. A function $x: 1 \to X$ corresponds to an ordinary element of $X$.

Each of these corresponds to some aspect of normal practice, but taken together they are sufficiently different in how they treat "membership" that they might need some getting used to. The first corresponds to a decision to treat elements of a "set" like $ \mathbb{R}$ as 'urelements': they are not considered to have elements themselves and are not considered as having any internal structure; they are just atoms. What counts in a mathematical structure then is not what the constituents are 'like' themselves, but only how they are interrelated among themselves qua the structure they are considered being part of.

This brings us right to the second point. It corresponds e.g. to a decision never to consider a number like '3' in isolation or as some Platonic essence, but always with respect to an ambient system to which it is bound, as in '3 *qua* natural number', '3 *qua* rational number', etc. It is a firm resolve to always honor context-dependence. Naturally, we *can* in a sense transport '3' from one context to another via a specified function like $ \mathbb{N} \to \mathbb{Q}$, but strictly speaking we've then changed the element. This raises interesting questions, like "what if anything plays the role of extensionality?", or "what does it mean to take the intersection of sets?". (Globally speaking, in ETCS we don't -- but we can, with a bit of care, speak of the intersection of two "subsets" of a given set. For any real mathematical purpose, this is good enough.)

My own sense is that it may be this second precept which takes the most getting used to -- it certainly gives the lie to sometimes-heard accusations that categorical set theory is just a "[slavish translation](http://www.cs.nyu.edu/pipermail/fom/1998-January/000994.html) of ZFC into categorical terms". Clearly, we are witnessing here *radical* departure from how membership is treated in ZFC. Such unbending commitment to the principle of context-dependence might even be felt to be overkill, a perhaps pedantic exercise in austerity or purity, or that it robs us of some freedom in how we want to manipulate sets. A few quick answers: no, we don't lose any essential freedoms. Yes, the *formal* language may seem *slightly* awkward or stilted at certain points, but the bridges between the naive and formal are mercifully fairly obvious and easily navigated. Lastly, by treating membership not as a global endo-relation on sets, but as local and relative, we effectively eliminate all the extraneous dreck and driftwood which one rightly ignores when examining the mathematics of ZFC.

The third precept is familiar from the way category theorists and logicians have used generalized elements to extend set-theoretic notation, e.g., to chase diagrams in abelian categories, or to describe sheaf semantics of intuitionistic set theory, or to flesh out the Curry-Howard isomorphism. It is a technical move in some sense, but one which is easy to grow accustomed to, and very convenient. In ETCS, there is a strong "extensionality principle" (technically, the requirement that the terminal object is a generator) which guarantees enough "ordinary" elements $ x: 1 \to X$ to make any distinctions that can sensibly be made, but experience with topos theory suggests that for many applications, it is often convenient to drop or significantly modify that principle. If anything in [[ETCS]] is a nod to traditional set theory, it is such a strong extensionality principle. [The [Yoneda principle](http://topologicalmusings.wordpress.com/2008/06/29/basic-category-theory-ii/), which deals with generalized elements, is also an extensionality principle: it says that a set is determined uniquely (to within uniquely specified isomorphism) by its generalized elements.]

Okay, it is probably time to lay out the axioms of [[ETCS]]. The basic data are just those of a category; here, we are going to think of objects as "sets", and morphisms $ x: a \to b$ as functions or equivalently as "elements of a set $ b$ over a domain of variation $ a$". The latter is a mouthful, and it is sometimes convenient to suppress explicit mention of the domain $ a$, so that "$ x \in b$" just means some morphism $ x$ with codomain $ b$. More on this below. The axioms of ETCS are the axioms of [[category theory]], plus existence axioms which guarantee enough structure to express and support naive [[set theory]] (under the strictures imposed by precepts 1-3 above). For those who speak the lingo, the axioms below are those of a [[well-pointed topos]] with [[natural numbers object]] and [[axiom of choice]]. (This can be augmented later with a replacement axiom, so as to achieve bi-interpretability with full ZFC.)

>**Remark**: As ETCS breaks the "dynamical" aspects of ZFC, and additionally treats issues of membership in a perhaps unaccustomed manner, its axioms do take longer to state. This should come as no surprise. Actually, we've discussed some of them already in [other posts on category theory](http://topologicalmusings.wordpress.com/2008/06/29/basic-category-theory-ii/); we will repeat ourselves but make some minor adjustments to reflect normal notational practice of naive set theory, and build bridges between the naive and formal.

**Axiom of products**. For any two sets $ a, b$, there is a set $ c$ and functions $ p_1: c \to a$, $ p_2: c \to b$, such that given two elements $ x \in a, y \in b$ over the same domain, there exists a unique element $ \langle x, y \rangle \in c$ over that domain for which

$$ p_1\langle x, y \rangle = x \qquad p_2\langle x, y \rangle = y$$

A choice of product $ c$ is usually denoted $ a \times b$. To make a bridge with naive set-theory notation, we suggestively write

$$ a \times b :=_i \{\langle x, y \rangle: x \in a, y \in b\}$$

where the funny equality sign and bracketing notation on the right simply mean that the cartesian product is uniquely defined up to isomorphism by its collection of (generalized) elements, which correspond to pairs of elements, in accordance with the Yoneda principle as explained in the discussion [here](http://topologicalmusings.wordpress.com/2008/06/29/basic-category-theory-ii/).

We also assume the existence of an "empty product" or terminal object 1: this is a set with a unique element $ x \in 1$ over any domain.

**Axiom of equalizers**. For any two functions $ \displaystyle f, g: a \rightrightarrows b$, there exists a function $ i: e \to a$ such that

1. $ f i = g i$,
2. Given $ x \in a$ over some domain such that $ f x = g x$, there exists a unique $ x' \in e$ over the same domain such that $ i x' = x$.

An equalizer $ i: e \to a$ is again defined up to isomorphism by its collection of generalized elements, denoted $ e :=_i \{x \in a: f(x) = g(x)\} \hookrightarrow a$, again in accordance with the Yoneda principle.
Using the last two axioms, we can form pullbacks: given functions $ f: a \to c, g: b \to c$, we can form the set denoted

$$
\{\langle x, y \rangle \in a \times b: f x = g y\}
$$

using the product and equalizer indicated by this notation.

Before stating the next axiom, a few important remarks. We recall that a function $ i: a \to b$ is *injective* if for every $ x, y \in a$ over the same domain, $ i x = i y$ implies $ x = y$. In that case we think of $ i: a \to b$ as defining a "subset" $ a$ of $ b$, whose (generalized) elements correspond to those elements $ z \in b$ which factor (evidently uniquely) through $ i$. It is in *that* sense that we say $ z \in b$ also "belongs to" a subset $ a$ (cf. precept 2). A *relation* from $ a$ to $ b$ is an injective function or subset $ r \hookrightarrow a \times b$.

 **Axiom of power sets**. For every set $ b$ there is a choice of power set $ P(b)$ and a relation $ \in_b \hookrightarrow b \times P(b)$, so that for every relation $ r \hookrightarrow a \times b$, there exists a unique function $ \chi_r: a \to P(b)$ such that $ r$ is obtained up to isomorphism as the pullback

$$
\{\langle x, y \rangle \in a \times b: y \in_b \chi_r(x)\}
$$

In other words, $ \langle x, y \rangle$ belongs to $ r$ if and only if $ \langle y, \chi_r(x) \rangle$ belongs to $ \in_b$.

**Axiom of strong extensionality**. For functions

$$ f, g: a \to b,$$

we have $ f = g$ if and only if $ f x = g x$ for all "ordinary" elements $ x: 1 \to a$.

**Axiom of natural number object**. There is a set $ \mathbf{N}$, together with an element $ 0: 1 \to \mathbf{N}$ and a function $ s: \mathbf{N} \to \mathbf{N}$, which is initial among sets equipped with such data. That is, given a set $ a$ together with an element $ x: 1 \to a$ and a function $ f: a \to a$, there exists a unique function $ h: \mathbf{N} \to a$ such that

$$
h(0) = x; \qquad h s = f h
$$

Or, in elementwise notation, $ h(n+1) = f h(n)$ for every (generalized) element $ n \in \mathbf{N}$, where $ n+1$ means $ s(n)$. Under strong extensionality, we may drop the qualifier "generalized".

Before stating the last axiom, we formulate a notion of "surjective" function: $ f: a \to b$ is *surjective* if for any two functions $ g, h: b \to c$, we have $ g = h$ if and only if $ g f = h f$. This is dual to the notion of being injective, and under the axiom of strong extensionality, is equivalent to the familiar notion: that $ f$ is surjective if for every element $ y: 1 \to b$, there exists an element $ x: 1 \to a$ such that $ f x = y$.

**[[axiom of choice|Axiom of choice]]**. Every surjective function $ s: a \to b$ admits a section, i.e., a function $ i: b \to a$ such that $ s i = 1_b$, the identity function.

This completes the list of axioms for [[ETCS]]. I have been at pains to try to describe them in notation which is natural from the standpoint of naive set theory, with the clear implication that any formula of naive set theory is readily translated into the theory [[ETCS]] (provided we pay appropriate attention to our precepts governing membership), and that this theory provides a rigorous foundation for mainstream mathematics.

To make good on this claim, further discussion is called for. First, I have not discussed how classical first-order logic is internalized in this setting (which we would need to do justice to a [[axiom of separation|comprehension or separation scheme]]), nor have I discussed the existence or construction of colimits. I plan to take this up later, provided I have the energy for it. Again, the plan would be to stick as closely as possible to naive set-theoretic reasoning. (This might actually be useful: the categorical treatments found in many texts tend to be technical, often involving things like monad theory and Beck's theorem, which makes it hard for those not expert in category theory to get into. I want to show this need not be the case.)

Also, some sort of justification for the claim that [[ETCS]] "founds" mainstream mathematics is called for. Minimally, one should sketch how the reals are constructed, for instance, and one should include enough "definability theory" to make it plausible that almost all constructions in ordinary mathematics find a natural home in ETCS \[which can be a definition of [[ordinary mathematics]] ---ed\]. What is excluded? Mainly certain parts of set theory, and parts of category theory (ha!) which involve certain parts of set theory, but this is handled by strengthening the theory with more axioms; I particularly have in mind a discussion of the replacement axiom, and perhaps large cardinal axioms. More to come!

* For those who care, we intend to create a page on [[fully formal ETCS]].


Trimble on ETCS II

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Foundations
+--{: .hide}
[[!include foundations - contents]]
=--
=--
=--

_This is Part II of an exposition by [[Todd Trimble]] on [[ETCS]]_.

See also

* Part I, [[Trimble on ETCS I|ZFC and ETCS]]

* Part III, [[Trimble on ETCS III|ETCS: Building joins and coproducts]]

***

## 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](http://topologicalmusings.wordpress.com/2008/09/01/zfc-and-etcs-elementary-theory-of-the-category-of-sets/) 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 = \{ x : (x \in A) \:\wedge\: (x \in B) \}$$

Instead, in ETCS, what we have is a _local_ intersection operation on _subsets_ $A \hookrightarrow X, B \hookrightarrow 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 = j k$.  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' : U \to A$ such that $x = i x'$.  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 \:\cap\: B {\coloneqq}_i \{ x \in X : (x \:\text{is in}\: A) \:\wedge\: (x \:\text{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(B)$ and a subset $\in_B \subseteq B \times P(B)$, such that for any relation $R \subseteq B \times A$, there is a unique "classifying map" $\chi_R : A \to P(B)$ whereby, under $1_B \times \chi_R : B \times A \to B \times P(B)$, we have

$$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 = \{ \langle b, a \rangle \in B \times A : b \in_B \chi_R(a) \}.$$

Hence, there are natural bijections

$$\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 $\phi : A \to P(B)$ is denoted $\left[\phi\right] \subseteq B \times A$ or $\left[\phi\right] \subseteq A \times B$, and is called the _extension_ of $\phi$.

The set $P(1)$ 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(1)$.  [_Cf._ classifying spaces in the theory of fiber bundles.]

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

__Lemma 1.__  The domain of elementhood $\in_1 \to 1 \times P(1) \cong P(1)$ is terminal.

__Proof.__  A map $X \to \in_1$, that is, a map $\chi : X \to P(1)$ which is in $\in_1 \subseteq P(1)$, corresponds exactly to a subset $\chi^{-1}(\in_1) \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$.  $\Box$

Hence elementhood $\in_1 \subseteq 1 \times P(1)$ is given by an element $t : 1 \to P(1)$.  The power set axiom says that a subset $A \subseteq X$ is retrieved from its classifying map $\chi_A : X \to P(1)$ as the pullback $\chi^{-1}_A (t) \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(1)$;  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(1)$ is a [representing
object](http://topologicalmusings.wordpress.com/2008/07/12/basic-category-theory-iii-representability-adjoints-and-the-yoneda-lemma) for the functor

$$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} : Sub(Y) \to Sub(X)$, that sends a subset $j : B \subseteq Y$ to the subset $f^{-1}(B) \subseteq X$ given by the pullback of the arrows $f : X \to Y$, $ j : B \subseteq Y$.  By the [Yoneda
lemma](http://topologicalmusings.wordpress.com/2008/07/12/basic-category-theory-iii-representability-adjoints-and-the-yoneda-lemma), this representability means that _external_ natural operations on the $Sub(X)$ correspond to _internal_ operations on the object $P(1)$.  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

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

is determined by a universal element $\theta_{P(1)}(1_{P(1)})$, _i.e._, a subset of $P(1)$, namely the mono $t : 1 \to P(1)$.  In that sense, $t : 1 \to P(1)$ plays the role of a _universal subset_.  The Yoneda lemma implies that external natural operations on general posets $Sub(X)$ 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 : Sub(X) \times Sub(X) \to Sub(X).$$

This corresponds to a natural transformation

$$\hom(X, P(1)) \times \hom(X, P(1)) \to \hom(X, P(1))$$

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

$$\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

$$\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}(t) \subseteq P(1) \times P(1)$ is given by

$$t \times id : 1 \times P(1) \to P(1) \times P(1),$$

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

$$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(1) \times P(1)$ is given by the pullback of the functions $t \times id$ and $id \times t$, which is just

$$t \times t : 1 \times 1 \to P(1) \times P(1).$$

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

To go from the internal meet $\wedge : P(1) \times P(1) \to P(1)$ 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(1)$.  By the definition of $\wedge$, we have that for all generalized elements $x \in X$

$$\chi_A(x) \:\wedge\: \chi_B(x) = t \;\text{if and only if}\; \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(1) \times P(1) \to P(1)$$

is the meet operator of an internal [meet-semilattice](http://topologicalmusings.wordpress.com/2008/04/02/toward-stone-duality-posets-and-meets) structure on $P(1)$:  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(1)$.  In particular, $P(1)$ carries an internal poset structure:  given generalized elements $u, v : A \to P(1)$, we may define

$$u \leq v \;\text{if and only if}\; u = u \wedge v$$

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

$$\left[\leq\right] {\coloneqq}_i \{ \langle u, v \rangle \in P(1) \times P(1) : u = u \wedge v\},$$

equivalently described as the equalizer

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

of the maps $\pi_1 : P(1) \times P(1) \to P(1)$ and $\wedge : P(1) \times P(1) \to P(1)$.  We have that $u \leq 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(1)$ carries an internal Heyting algebra structure (ignoring joins for the time being).

Let's recall the notion of [Heyting
algebra](http://topologicalmusings.wordpress.com/2008/04/08/distributivity-topology-and-heyting-algebras) in ordinary naive set-theoretic terms:  it's a lattice $P$ that has a material implication operator "$\Rightarrow$" such that, for all $x, y, z \in P$,

$$x \wedge y \leq z \;\text{if and only if}\; x \leq y \Rightarrow z.$$

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

$$\{ \langle u, v \rangle \in P(1) \times P(1) : (u \Rightarrow v) = t\}$$

Given $\langle u, v \rangle : A \to P(1) \times P(1)$, the equality here is equivalent to

$$t \leq u \Rightarrow v$$

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

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

This means we should define $\Rightarrow : P(1) \times P(1) \to P(1)$ to be the classifying map of the subset

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

__Theorem 1.__  $P(1)$ admits internal implication.

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

$$w \leq u \Rightarrow v \;\text{if and only 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 $\Rightarrow,$ a generalized element $e \in A$ is in $\left[u \Rightarrow v\right]$ if and only if $u(e) \leq v(e)$.  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

$$\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]$,

$$(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$.  $\Box$

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

$$\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 \leq v$, and the proof of Theorem 1 is complete.  $\Box$

### Cartesian Closed Structure ###

Next we address a [comment](http://topologicalmusings.wordpress.com/2008/09/01/zfc-and-etcs-elementary-theory-of-the-category-of-sets/#comment-469) made by "James", that a category satisfying the ETCS axioms is [cartesian
closed](http://topologicalmusings.wordpress.com/2008/06/29/basic-category-theory-ii).  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(A \times B)$ represents an exponential $P(B)^A.$

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

$$\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

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

Putting these together, we have a natural isomorphism $\hom(-, P(A \times B)) \cong \hom(- \times A, P(B))$

and this representability means precisely that $P(A \times B)$ plays the role of an exponential $P(B)^A$.  $\Box$

__Corollary 1.__  $P(A) \cong P(1)^A$.  $\Box$

The [universal
element](http://topologicalmusings.wordpress.com/2008/07/12/basic-category-theory-iii-representability-adjoints-and-the-yoneda-lemma/) of this representation is an evaluation map $A \times P(A) \to P(1)$, which is just the classifying map of the subset $\in_A \subseteq A \times P(A)$.

Thus, $P(B)^A \cong P(A \times B)$ represents the set of all functions $\phi : A \to P(B)$ (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](http://topologicalmusings.wordpress.com/2008/09/01/zfc-and-etcs-elementary-theory-of-the-category-of-sets/#comment-469) [discussion](http://topologicalmusings.wordpress.com/2008/09/01/zfc-and-etcs-elementary-theory-of-the-category-of-sets/#comment-470), we want to internalize the set of such relations which are graphs of functions, _i.e._, maps $\phi$ where each $\phi(a) \subseteq B$ is a singleton, in other words which factor as

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

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

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

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

$$\{ \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 \times B \to B$ or, what is the same, the diagonal map $\delta_B = \langle 1_B, 1_B \rangle : B \to B \times B$.

Thus, we put $\sigma = \chi_{\delta} : B \to P(B)$, 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}(t)$ of $t : 1 \to P(1)$ along _its_ classifying map $\chi_{\sigma} : P(B) \to P(1)$.

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

$$
\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

$$\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

$$\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 $\phi : A \to P(1)$.  Alternatively, it is an ordinary element $\phi' : 1 \to P(1)^A \cong P(A)$.  It corresponds (naturally and bijectively) to a subset $\left[\phi\right]: S \subseteq A$.

* A _generalized predicate_ of type $A$ is a function $\phi' : X \to P(A) \cong P(1)^A$.  It may be identified with (corresponds naturally and bijectively to) a function $\phi : X \times A \to P(1)$, or to a subset $\left[\phi\right] : S \subseteq X \times A$.

We are trying to define an operator $\forall_A$ which will take a predicate of the form $\phi : X \times A \to P(1)$ [conventionally written $\phi(x, a)$] to a predicate $\forall_A \phi : X \to P(1)$ [conventionally written $ \forall_{a \in A} \phi(x, a)$].  Externally, this corresponds to a natural operation which takes subsets of $X \times A$ to subsets of $X$. _Internally_, it corresponds to an operation of the form:

$$\forall_A : P(A) \cong P(1)^A \to P(1).$$

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

$$\{ \phi \in P(1)^A : \forall_A \phi = t\}.$$

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

$$\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(1)^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(1)^A \to P(1)$ as the classifying map of $t_A : 1 \subseteq P(1)^A$.

Let's check how this works externally.  Let $\phi : X \to P(1)^A$ be a generalized predicate of type $A$.  Then according to how $\forall_A$ has just been defined, $\forall_A \phi : X \to P(1)$ classifies the subset

$$\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(1)$ on $X$, we can always pull back to a predicate on $X \times A$ (substituting in a dummy variable $a$ of type $A$, forming _e.g._ $\psi(x) \wedge \left[a=a\right]$) by composing with the projection $\pi : X \times A \to X$.  In terms of subsets, substitution along $A$ is the natural external operation

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

Then, for any predicate $\phi : X \times A \to P(1)$, we have the adjoint relationship

$$\left[\psi\right] \times A \subseteq \phi \;\text{if and only if}\; \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 : PPX \to PX$$

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

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

$$x \in \bigcap F \;\text{if and only if}\; \forall_{S \in PX} (S \in F) \Rightarrow (x \in S).$$

We have all the ingredients to deal with the logical formula on the right:  we have an implication operator "$\Rightarrow$" as part of the internal Heyting algebra structure on $P(1)$, and we have the quantification operator "$\forall_{PX}$".  The atomic expressions $(S \in F)$ and $(x \in S)$ refer to internal elementhood:  $(x \in S)$ means $\langle x, S \rangle \in X \times PX$ is in $\in_{X} \subseteq X \times PX$, and $(S \in F)$ means $\langle S, F \rangle \in PX \times PPX$ is in $\in_{PX} \subseteq PX \times PPX$.

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

$$\displaystyle \psi_1 = (PPX \times X \stackrel{\pi_1}{\to} PPX \stackrel{\phi_1}{\to} P(1)^{PX})$$

and

$$\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

$$\displaystyle PPX \times X \stackrel{\langle \psi_1, \psi_2 \rangle}{\to} P(1)^{PX} \times P(1)^{PX}$$

$$\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 $(x \in \bigcap F)$ given above.  By cartesian closure, this map $PPX \times X \to P(1)$ induces the desired internal intersection operator, $\bigcap : PPX \to 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 $PX$ are internal inf-lattices. But [inf-lattices are sup-lattices](http://topologicalmusings.wordpress.com/2008/04/04/lattices-and-duality) 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.