\documentclass{article}
\input{packages}
\input{def}

\newcommand{\C}{\mathbb{C}}
\newcommand{\app}{\mathop{\cdot}}
\newcommand{\xequals}[1]{\stackrel{#1}{\approx}}

\lecture{Topoi}

\begin{document}
\maketitle

\begin{definition}[Subobject Classifier for a Category~$\cat{C}$]
An object~$\Omega$ and a morphism $\mathbf{true} : \top \mto \Omega$ with the property that, for every monomorphism $\mo{m} : \ob{S} \mono \ob{C}$ in $\cat{C}$, there exists a unique morphism $\chi_\mo{m} : \ob{C} \mto \Omega$, called the characteristic morphism of~$\mo{m}$, with the property that the following is a pullback square:
\begin{center}
\begin{tikzpicture}[scale=.5]
\node(s) at (-1,1) {$\ob{S}$};
\node(c) at (1,1) {$\ob{C}$};
\node(t) at (-1,-1) {$\top$};
\node(o) at (1,-1) {$\Omega$};
\draw[->] (s) -- node[above]{$\mo{m}$} (c);
\draw[->] (s) -- node[left]{$\langle \rangle$} (t);
\draw[->] (c) -- node[right]{$\chi_\mo{m}$} (o);
\draw[->] (t) -- node[below]{$\mathbf{true}$} (o);
\end{tikzpicture}
\end{center}
\end{definition}

\begin{example}
$\B$ with $\mathbf{true}$ is the subobject classifier for $\cat{Set}$.
Given an injection $m : S \to C$, then $\chi_m$ is the function $\lambda c.\; \exists s : S.\; m(s) = c$.
\end{example}

\begin{definition}[Topos]
A finitely complete category with exponentials (with respect to products, denoted $\expto$) and a subobject classifier.
\end{definition}

\begin{example}
The category $\cat{Set}$ and its full subcategory $\cat{Fin}$ of finite sets are both topoi.
\end{example}

\begin{remark}
Every morphism from $\top$ is a monomorphism (in any category with a terminal object, not just in topoi).
\end{remark}

\begin{theorem}
One can implement $\wedge : \Omega \with \Omega \mto \Omega$ as the characteristic morphism of $\langle \mathbf{true}, \mathbf{true} \rangle : \top \mono \Omega \with \Omega$.
One can implement $\imply : \Omega \with \Omega \mto \Omega$ as the characteristic morphism of the equalizer of $\pi_1$ and $\wedge$ from $\Omega \with \Omega$ to $\Omega$ (which works because $\phi \imply \psi$ holds if and only if $\phi \Leftrightarrow \phi \wedge \psi$ holds).
\end{theorem}

\begin{notation}
Given a morphism $\mo{f} : \ob{A} \with \ob{B} \mto \ob{C}$, we denote the corresponding morphism from $\ob{B}$ to $\ob{A} \expto \ob{C}$ with $\lambda_\ob{A} \mo{f}$.
\end{notation}

\begin{theorem}
Given an object $\ob{C}$, one can implement $\forall_\ob{C} : (\ob{C} \expto \Omega) \mto \Omega$ as the characteristic morphism for $\lambda_\ob{C} (\pi_2 \cocomp \mathbf{true}) : \top \mono (\ob{C} \expto \Omega)$.
\end{theorem}

\begin{theorem}
One can implement $\mathbf{false} : \top \mto \Omega$ as the morphism $(\lambda_\Omega \pi_1) \cocomp \forall_\Omega$ (which represents the proposition $\forall \phi : \Prop.\; \phi$).
\end{theorem}

\begin{theorem}
The pullback of $\mathbf{true} : \top \mto \Omega$ and $\mathbf{false} : \top \mto \Omega$ is an initial object.
\end{theorem}

\begin{theorem}
One can use the above components to implement $\vee : \Omega \with \Omega \mto \Omega$ via the predicate $\forall p : \Omega.\; (\phi \imply p) \wedge (\psi \imply p) \imply p$.
Similarly, one can implement $\exists_\ob{C} : (\ob{C} \expto \Omega) \mto \Omega$ via the predicate $\forall p : \Omega.\; (\forall c : \ob{C}.\; \phi(c) \imply p) \imply p$.
\end{theorem}

\begin{theorem}
One can implement $=_\ob{C} : \ob{C} \with \ob{C} \mto \Omega$ as the characteristic morphism of $\langle \id_\ob{C}, \id_\ob{C} \rangle : \ob{C} \mono \ob{C} \with \ob{C}$.
\end{theorem}

\begin{definition}[Natural-Numbers Object of a Category $\cat{C}$]
An object $\ob{N}$ along with morphisms $\mo{z} : \top \mto \ob{N}$ and $\mo{s} : \ob{N} \mto \ob{N}$ with the property that, for every object $\ob{C}$ and morphisms $\mo{c}_z : \top \mto \ob{C}$ and $\mo{c}_s : \ob{C} \mto \ob{C}$, there exists a unique morphism $\mo{ind}(\mo{c}_z, \mo{c}_s) : \ob{N} \mto \ob{C}$ such that the following commutes:
\begin{center}
\begin{tikzpicture}[yscale=.5]
\node(t) at (0,0) {$\top$};
\node(nz) at (1,1) {$\ob{N}$};
\node(ns) at (3,1) {$\ob{N}$};
\node(cz) at (1,-1) {$\ob{C}$};
\node(cs) at (3,-1) {$\ob{C}$};
\draw[->] (t) -- node[above left]{$\mo{z}$} (nz);
\draw[->] (nz) -- node[above]{$\mo{s}$} (ns);
\draw[->] (t) -- node[below left]{$\mo{c}_z$} (cz);
\draw[->] (cz) -- node[below]{$\mo{c}_s$} (cs);
\draw[->,dashed] (nz) -- node[right]{$\mo{ind}(\mo{c}_z, \mo{c}_s)$} (cz);
\draw[->,dashed] (ns) -- node[right]{$\mo{ind}(\mo{c}_z, \mo{c}_s)$} (cs);
\end{tikzpicture}
\end{center}
\end{definition}

\begin{example}
$\N$ with $0$ and $\lambda n.\; n+1$ is a natural-numbers object of $\cat{Set}$.
$\cat{Fin}$ has no natural-numbers object.
\end{example}

\begin{theorem}
All topoi are finitely cocomplete.
\end{theorem}

\begin{definition}[Boolean Topos]
A topos with the property that $\top \xmto{\mathbf{true}} \Omega \xfrom{\mathbf{false}} \top$ is a coproduct.
\end{definition}

\begin{definition}[Two-Value Topos]
A topos with exactly two morphisms from $\top$ to $\Omega$ (necessarily $\mathbf{true}$ and $\mathbf{false}$).
\end{definition}

\begin{definition}[Well-Pointed]
The property that for all $\mo{f}, \mo{g} : \ob{C}_1 \mto \ob{C}_2$, $\forall \mo{e} : \top \mto \ob{C}_1.\; \mo{e} \cocomp \mo{f} = \mo{e} \cocomp \mo{g}$ implies $\mo{f}$ equals $\mo{g}$.'
\end{definition}

\begin{definition}[Topos admitting the Axiom of Choice]
A topos with the property that all epimorphisms are sections.
\end{definition}

\begin{theorem}
Every topos admitting the axiom of choice is Boolean.
Every well-pointed topos is two-value.
Every well-pointed topos is Boolean (using a classical metatheory).
\end{theorem}

\end{document}
