\section{Category Theory}
\label{sec:Category Theory}
Before we will introduce the two categories $\Ch{\Ab}$ and $\sAb$, let us begin by recalling some basic category theory. The reader who is already familiar with these concepts, is invited to skip this section. We will recall the notions of categories, functors, isomorphisms, natural transformations, equivalences, adjunctions and the Yoneda lemma.

We will briefly define categories and functors to fix the notation. We will not provide many examples or intuition in these concepts. For a more elaborated exposition one should have a read in \cite{awodey} or \cite{maclane}. The more complicated definitions will be discussed in a bit more detail.

\subsection{Categories}
\begin{definition}
	A \emph{category} $\cat{C}$ consists of a collection of \emph{objects}, a set of \emph{maps} $\Hom{\cat{C}}{A}{B}$ for each two objects $A, B \in \cat{C}$ and a binary operator \emph{composition} 
	$$-\circ-:\Hom{\cat{C}}{B}{C} \times \Hom{\cat{C}}{A}{B}$$
	such that
	\begin{itemize}
		\item composition is associative, i.e. $h \circ (g \circ f) = (h \circ g) \circ f$ and
		\item there exists an neutral element $\id_A \in \Hom{\cat{C}}{A}{A}$ for all $A$ in $\cat{C}$, i.e.
		$$ \id_B \circ f = f = f \circ \id_A. $$
	\end{itemize}
\end{definition}

Instead of writing $f \in \Hom{\cat{C}}{A}{B}$ we write $f: A \to B$, as many categories have functions as maps. For brevity we sometimes write $gf$ instead of $g \circ f$. We will need the category $\Set$ of sets with functions, the category $\Ab$ of abelian groups with group homomorphisms and the category $\Top$ of topological spaces and continuous maps.

\begin{definition}
	A \emph{functor} $F$ from a category $\cat{C}$ to a category $\cat{D}$ consists of a function $F_0$ from the objects of $\cat{C}$ to the objects of $\cat{D}$ and a function $F_1$ from maps in $\cat{C}$ to maps in $\cat{D}$, such that
	\begin{itemize}
		\item for $f: A \to B$, we have $F_1(f): F_0(A) \to F_0(B)$,
		\item $F_1(\id_A) = \id_{F_0(A)}$ and
		\item $F_1(g \circ f) = F_1(g) \circ F_1(f)$.
	\end{itemize}
	We normally do not write the index of $F_0$ or $F_1$, instead we write $F$ for both functions.
\end{definition}

For a category $\cat{C}$ we denote the \emph{opposite} category by $\cat{C}^{op}$. The opposite category consists of the same objects, but the maps and composition are reversed. A \emph{contravariant functor} $F$ from $\cat{C}$ to $\cat{D}$ is a functor $F: \cat{C}^{op} \to \cat{D}$.

Note that the composition of two functors is again a functor, and that we always have an identity functor, sending each object to itself and each map to itself. This gives rise to a category $\cat{Cat}$ of \emph{small} categories. Note that we need some kind of \emph{smallness} to avoid set-theoretical issues. However we will not be interested in these set-theoretical issues, and hence skip the definition of small.

\subsection{Isomorphisms}
Given a category $\cat{C}$ and two objects $A, B \in \cat{C}$ we would like to know when those objects are regarded as the same, according to the category. This will be the case when there is an isomorphism between the two.

\begin{definition}
	A map $f: A \to B$ in a category $\cat{C}$ is an \emph{isomorphism} if there is a map $g: B \to A$ such that
	$$ f \circ g = \id_B \quad\text{and}\quad g \circ f = \id_A.$$
\end{definition}

Isomorphisms in $\Ab$ are exactly the isomorphisms which we know, i.e. the group homomorphisms which are both injective and surjective.
For example the cyclic group $\Z_4$ and the Klein four-group $V_4$ are not isomorphic in $\Ab$, but if we regard only the sets $\Z_4$ and $V_4$, then they are (because there is a bijection). So it is good to note that whether two objects are isomorphic  really depends on the category we are working in.

Note that an isomorphism between two categories is now also defined. Two categories $\cat{C}$ and $\cat{D}$ are isomorphic if there are functors $F$ and $G$ such that $ FG = \id_\cat{D}$ and $GF = \id_\cat{C}$.

\subsection{Natural transformations}

\begin{definition}
	Given two functors $F, G: \cat{C} \to \cat{D}$, a \emph{natural transformation} $\phi$ from $F$ to $G$, is a family of maps $\phi_c : F(c) \to G(c)$ for $c \in \cat{C}$, such that
	\begin{center}
	\begin{tikzpicture}
		\matrix (m) [matrix of math nodes]{
			F(c)  & G(c)  \\
			F(c') & G(c')  \\
		};
		\path[->]
		(m-1-1) edge node[auto] {$ \phi_c $} (m-1-2)
		(m-2-1) edge node[auto] {$ \phi_{c'} $} (m-2-2)
		(m-1-1) edge node[auto] {$ F(f) $} (m-2-1)
		(m-1-2) edge node[auto] {$ G(f) $} (m-2-2);
	\end{tikzpicture}
	\end{center}
	commutes for any map $f: c \to c'$ and any objects $c, c' \in \cat{C}$.
\end{definition}

For any two categories $\cat{C}$ and $\cat{D}$ we can form a category with functors $F: \cat{C} \to \cat{D}$ as objects and natural transformations as maps. This category is called the \emph{functor category} and is denoted by $\cat{D}^\cat{C}$.

This now also gives a notion of isomorphisms between functors. It can be easily seen that an isomorphism between two functors is a natural transformation which is an isomorphism pointwise. Such a natural transformation is called a \emph{natural isomorphism}.

For any category $\cat{C}$ we can define the $\mathbf{Hom}$-functor. It assigns to two objects in $\cat{C}$ the set of maps between them, i.e.
$$ \Hom{\cat{C}}{-}{-}: \cat{C}^{op} \times \cat{C} \to \Set. $$
We will show that it indeed defines a functor in the first argument, a similar proof works for the second argument. Let $f: A' \to A$ be a map in $\cat{C}$ and $g \in \Hom{\cat{C}}{A}{B}$, then $g \circ f \in \Hom{\cat{C}}{A'}{B}$. Hence the assignment $g \mapsto g \circ f$ is a map from $\Hom{\cat{C}}{A}{B}$ to $\Hom{\cat{C}}{A'}{B}$. Note that the direction of the map if reversed. Using associativity and identity it is easily checked that this assignment is functorial.

\subsection{Equivalence}
Recall that an \emph{isomorphism} between categories $\cat{C}$ and $\cat{D}$ consists of two functors $F:\cat{C} \to \cat{D}$ and $G: \cat{D} \to \cat{C}$ such that
$$ FG = \id_\cat{D} \quad\text{and}\quad \id_\cat{C} = GF. $$
With the notion of isomorphisms between functors we can generalize this, and only require a natural isomorphism instead of equality.

\begin{definition}
	An \emph{equivalence} between two categories $\cat{C}$ and $\cat{D}$ consists of two functors $F:\cat{C} \to \cat{D}$ and $G: \cat{D} \to \cat{C}$ such that there are natural isomorphisms:
	$$ FG \iso \id_\cat{D} \quad\text{and}\quad \id_\cat{C} \iso GF. $$
	This is denoted by $\cat{C} \simeq \cat{D}$.
\end{definition}

\begin{example}
	The category $\cat{Set_{fin}}$ of finite sets is equivalent to the category $\cat{Ord_{fin}}$ of finite ordinals (with all functions). The former is uncountable and the latter is countable, hence they clearly cannot be isomorphic. However, from a categorical point of view these categories are very alike, which is precisely expressed by the equivalence.
\end{example}

\subsection{Adjunctions}
\begin{definition}
	An \emph{adjunction} between two categories $\cat{C}$ and $\cat{D}$ consists of two functors $F:\cat{C} \to \cat{D}$ and $G: \cat{D} \to \cat{C}$ together with a natural bijection
	$$ \Hom{\cat{D}}{FX}{Y} \iso \Hom{\cat{C}}{X}{GY}, $$
	for any $X \in \cat{C}$ and $Y \in \cat{D}$. The functor $F$ is called the \emph{left adjoint} and $G$ the \emph{right adjoint}.
\end{definition}

There are different equivalent descriptions of adjunctions. A particular nice one will be recalled. For a proof of equivalence to the above definition we refer to books on category theory such as the one of Mac Lane \cite{maclane} or Awodey \cite{awodey}.

\begin{lemma}
	Given functors $F:\cat{C} \to \cat{D}$, $G: \cat{D} \to \cat{C}$ then $F$ is a left adjoint and $G$ a right adjoint if and only if there exists a natural transformation, called the \emph{unit}
	$$ \eta : \id_\cat{C} \to GF. $$
	such that for any map $f: S \to G(A)$ (in $\cat{C}$), there is a unique map $\overline{f}: F(S) \to A$ (in $\cat{D}$) such that $G(\overline{f}) \circ \eta = f$. I.e.:
\begin{center}
	\begin{tikzpicture}
		\matrix (m) [matrix of math nodes]{
			S & GF(S) & F(S) \\
			  & G(A)  & A \\
		};
		\path[->]
		(m-1-1) edge node[auto] {$ \eta $} (m-1-2)
		(m-1-2) edge node[auto] {$ G(\overline{f}) $} (m-2-2)
		(m-1-1) edge node[auto] {$ f $} (m-2-2);
		\path[->]
		(m-1-3) edge node[auto] {$ \overline{f} $} (m-2-3);
	\end{tikzpicture}
\end{center}
\end{lemma}

Note that by considering the identity map $\id : G(A) \to G(A)$ in $\cat{C}$, we get a uniquely determined map $\overline{\id}:FG(A) \to A$. This map $FG(A) \to A$ is in fact natural in $A$, this natural transformation is called the \emph{co-unit}
$$ \eps: FG \to \id. $$

It can be shown that an equivalence $F: \cat{C} \tot{\simeq} \cat{D}$ is both a left and right adjoint. We sketch the proof of $F$ being a left adjoint. Clearly we already have the natural transformation $\eta: \id_\cat{C} \to GF$. To construct $\overline{f}$ from $f: S \to G(A)$ we can apply the functor $F$, to get $F(S) \to FG(A)$, using the other natural isomorphism we get $F(S) \to FG(A) \to A$. We leave the details to the reader.

The first definition of adjunction is useful when dealing with maps, since it gives an bijection between the $\mathbf{Hom}$-sets. However the second definition is useful when proving a certain construction is part of an adjunction, as shown in the following example.

\begin{example}
	\emph{(Free abelian groups)} There is an obvious functor $U: \Ab \to \Set$, which sends an abelian group to its underlying set, forgetting the additional structure. It is hence called a \emph{forgetful functor}. This functor has a left adjoint $\Z[-]: \Set \to \Ab$  given by the \emph{free abelian group functor}. For a set $S$ define
	$$ \Z[S] = \{ \phi: S \to \Z \I \text{supp}(\phi) \text{ is finite}\}, $$
	where $\text{supp}(\phi) = \{ s \in S \I \phi(s) \neq 0 \}$. The group structure on $\Z[S]$ is given by pointwise addition. We can define a generator $e_s \in \Z[S]$ for every element $s \in S$ as
	$$ e_s(t) =
	\begin{cases}
		1 \text{ if } s = t \\
		0 \text{ otherwise}
	\end{cases}. $$
	One can think of elements of this abelian group as formal sums, namely by writing $\phi \in \Z[S]$ as $\phi = \sum_{x \in \text{supp}(\phi)}\phi(x) e_x$. In other words $\Z[S]$ consists of linear combinations of elements in $S$. The functor $\Z[-]$ is defined on functions as follows. Let $f: S \to T$ be a function, then define
	$$ \Z[f](\phi) = \sum_{x \in \text{supp}(\phi)} \phi(x) e_{f(x)} \quad\text{for all } \phi \in \Z[S]. $$
	It is left for the reader to check that this indeed gives a group homomorphism and that the functor laws hold. There is a map $\eta: S \to U\Z[S]$ given by
	$$ \eta(s) = e_s. $$
	And given any map $f: S \to U(A)$ for any abelian group $A$, we can define
	$$ \overline{f}(\phi) = \sum_{x \in \text{supp}(\phi)} \phi(x) \cdot e_{f(x)}. $$
	It is clear that $U(\overline{f}) \circ \eta = f$. We will leave the other details (naturality of $\eta$, $\overline{f}$ being a group homomorphism, and uniqueness w.r.t.~$U(\overline{f}) \circ \eta = f$) to the reader.

	By the other description of adjunctions we have $\Hom{\Ab}{\Z[S]}{A} \iso \Hom{\Set}{S}{U(A)}$, which exactly tells us that we can define a group homomorphism from $\Z[S]$ to $A$ by only specifying it on the generators $e_s, s \in S$. This fact is used throughout this thesis.
\end{example}

\subsection{The Yoneda lemma}
So far we have only encountered definitions from category theory. However there is a very important lemma by Yoneda. This lemma gives a nice way to construct certain natural transformations.

\begin{definition}
	For any category $\cat{C}$, we define a functor $y:\cat{C} \to \Set^{\cat{C}^{op}}$ as follows
	$$ y(X) = \Hom{\cat{C}}{-}{X}. $$
	The functor $y$ is called the \emph{Yoneda embedding}.
\end{definition}

We will denote the set of natural transformation between two functors $F, G: \cat{C} \to \cat{D}$ as
$$ \mathbf{Nat}(F, G) = \Hom{\cat{D}^\cat{C}}{F}{G}. $$

\begin{lemma}\emph{(The Yoneda lemma)}
	Given a functor $F: \cat{C} \to \Set$ and any object $C \in \cat{C}$ there is a bijection
	$$ \mathbf{Nat}(y(C), F) \iso F(C), $$
	which is natural in both $F$ and $C$.
\end{lemma}

We will not provide a proof of this lemma, but we will give the function which can be proven to be a natural bijection. Given a natural transformation $\phi \in \mathbf{Nat}(y(C), F)$, we can consider the map $\phi_C : y(C)(C) \to F(C)$. Note that the codomain already is the right set, we only have to apply $\phi_C$ to the right object. The bijection is given by
$$ \phi \mapsto \phi_C(\id_C). $$

We will use this lemma when we discuss simplicial abelian groups.