# A Topos Example Part 1

One of my colleagues remarked that sets are an example of a topos; in other words that set theory can be generalized. Another of my colleagues immediately asked for another example of a topos. Here is one.

A topos is a cartesian closed category with extra structure. Consider the category Sets. A subset S ⊆ X can be described equivalently by the injection $i : S \rightarrowtail X$ or as a characteristic function:

$\chi_S(x) = \left\{ \begin{array}{rl} 0 & x \in S \, \\ 1 & x \notin S. \end{array}\right.$

We can think of χS as taking values in the set of truth values, false and true, with 0 as false and 1 as true. We can also think of true as a morphism from the terminal object to the set of truth values:

${\rm true} : \{\star\} \rightarrow \{0, 1\}, \star \mapsto 1$

We can recover S as the pullback of χS and ${\rm true}$:

And given a monomorphism $i : S \rightarrowtail X$, there is a unique χS such that the above square is a pullback.

A subobject classifier is a morphism ${\rm true} : 1 \rightarrow \Omega$ such that every monomorphism $S \rightarrowtail X$ is the pullback of ${\rm true}$ along a unique morphism (the characteristic morphism) $X \xrightarrow{\chi_S} \Omega$.

A cartesian closed category is a topos if and only if it has finite limits and a subobject classifier.

Since Sets has all finite limits, is cartesian closed and, as we have just shown, has a subobject classifier then it is a topos.

If this were the only example of a topos then topoi would not be particularly interesting which prompted my colleague’s question. Let us now come up with another example. The example is going to be the category of sheaves.

Let X be a topological space regarded as a category with a morphism from an open set V to an open set U if and only if V ⊆ U. A presheaf is a contravariant functor from this category ${\cal O}(X)$ to the category of sets, Sets.