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

\lecture{Isomorphisms}

\begin{document}
\maketitle

\begin{definition}[Section/Retract Pair]
A pair of morphisms $\ob{C}_1 \xmto{\mo{s}} \ob{C}_2 \xmto{\mo{r}} \ob{C}_3$ such that $\mo{s} \cocomp \mo{r}$ equals $\id$.
\end{definition}

\begin{definition}[Section]
A morphism $\mo{s}$ such that there exists a morphism~$\mo{r}$ such that $\mo{s} \cocomp \mo{r}$ equals $\id$.
\end{definition}

\begin{definition}[Retract]
A morphism $\mo{r}$ such that there exists a morphism~$\mo{s}$ such that $\mo{s} \cocomp \mo{r}$ equals $\id$.
\end{definition}

\begin{definition}[Isomorphism]
A morphism $\mo{i}$ that is moth a section and a retract.
\end{definition}

\begin{exercise}
Prove that $\lambda i.\; -i$ is an isomorphism from $\Z$ to $\Z$ in~$\cat{Set}$, from $\Z_+$ to $\Z_+$ in~$\cat{Mon}_b$, and from $\Z_\leq$ to $\Z_\leq$ in~$\cat{Prost}$.
\end{exercise}

\begin{exercise}
Prove that a morphism $\mo{i}$ is an isomorphisms if and only if there exists a unique morphism~$\mo{j}$ such that $\mo{j} \cocomp \mo{i}$ equals $\id$ and $\mo{i} \cocomp \mo{j}$ equals $\id$.
\end{exercise}

\begin{definition}[Inverse]
$\mo{j}$ is the (necessarily unique if it exists) inverse of $\mo{i}$ when $\mo{j} \cocomp \mo{i}$ equals $\id$ and $\mo{i} \cocomp \mo{j}$ equals $\id$.
\end{definition}

\begin{notation}
$\mo{i}^\inv$ denotes the inverse of $\mo{i}$ if it exists.
\end{notation}

\begin{exercise}
Prove that, if $\mo{i}^\inv$ exists, then $(\mo{i}^\inv)^\inv$ exists and equals $\mo{i}$.
\end{exercise}

\begin{definition}[Isomorphic]
An object $\ob{C}_1$ is isomorphic to $\ob{C}_2$, or $\ob{C}_1$ and $\ob{C}_2$ are isomorphic, if there exists an isomorphism $\ob{C}_1 \xmto{\mo{i}} \ob{C}_2$.
\end{definition}

\begin{exercise}
Prove that ``is isomorphic to`` is an equivalence relation --- reflexive, symmetric, and transitive.
\end{exercise}

\begin{example}
The following are categories and isomorphic pairs therein:
\begin{description}
\item[$\cat{Set}$ and $\cat{Rel}$:] $\langle \N, \Z \rangle$, $\langle \N \times \N, \N \rangle$, $\langle \Set \N, \R \rangle$
\item[$\cat{Mon}_b$:] $\langle (\List \mathbb{1})_{\append}, \N_+ \rangle$, $\langle (\Multiset \mathbb{1})_+, \N_+ \rangle$, $\langle (\Finset \mathbb{1})_\cup, \B_\vee \rangle$, $\langle (\Set \mathbb{1})_\cup, \B_\vee \rangle$
\item[$\cat{CAT}$:] $\langle \cat{Mon}_b, \cat{Mon}_u \rangle$
\end{description}
\end{example}

\begin{remark}
There are some very important example of non-isomorphic pairs. For example, although $\N$ and $\Z$ are isomorphic sets, the monoids $\N_+$ and $\Z_+$ are not isomorphic. Furthermore, $\N_+$ is not isomorphic to $\N_*$, and $(\R \to \R)_{\cocomp}$ is not isomorphic to $(\R \to \R)_\circ$.
\end{remark}

\begin{exercise}
Prove that $\cat{Mon}_b$ and $\cat{Mon}_u$ are isomoprhic (in $\cat{CAT}$).
\end{exercise}

\begin{remark}
Because $\cat{Mon}_b$ and $\cat{Mon}_u$ are isomorphic, we will often informally refer to both as $\cat{Mon}$.
\end{remark}

\begin{exercise}
Prove that if $\langle \mo{s}, \mo{r} \rangle$ is a section/retract pair in $\cat{C}$ and $F$ is a functor from $\cat{C}$ to $\cat{D}$, then $\langle F(\mo{s}), F(\mo{r}) \rangle$ is a section/retract pair in $\cat{D}$.
\end{exercise}

\begin{remark}
This means functors \emph{preserve} sections, retracts, and isomorphisms.
In general, for something to \emph{preserve} structure means that if that if the inputs have that structure in the source then the outputs have that structure in the target.
In the other direction, for something to \emph{reflect} structure means that if the outputs have that structure in the target then the inputs have that structure in the source.
\end{remark}

\begin{exercise}
Prove that two monoids are isomorphic only if their underlying sets are isomorphic.
\end{exercise}

\begin{exercise}
Prove that functors do not in general reflect sections, retracts, or isomorphisms. That is, prove that $\langle F(\mo{s}), F(\mo{r}) \rangle$ can be a section/retract pair without $\langle \mo{s}, \mo{r} \rangle$ being a section/retract pair.
\end{exercise}

\end{document}
