Definition 2.2.1.
A category \(\mathcal{C}\) consists of a collection of objects \(\mathrm{Ob}\,\mathcal{C}\) and a collection of morphisms \(\mathrm{Mor}\,\mathcal{C}\) along with assignments \(s,t:\mathrm{Mor}\,\mathcal{C}\to \mathrm{Ob}\,\mathcal{C}\) (called the source and target maps). Let \(\mathcal{C}(x,y)\subseteq \mathrm{Mor}\,\mathcal{C}\) denote the collection of morphisms with source \(x\in \mathrm{Ob}\,\mathcal{C}\) and target \(y\in \mathrm{Ob}\,\mathcal{C}\text{.}\) Then for each \(x,y,z\in \mathrm{Ob}\,\mathcal{C}\text{,}\) \(\mathcal{C}\) is also equipped with a composition
\begin{align*}
\circ\colon \mathcal{C}(y,z)\times \mathcal{C}(x,y) \amp \longrightarrow \mathcal{C}(x,z)\\
(g,f) \amp \longmapsto g\circ f.
\end{align*}
Additionally, for each \(x\in \mathrm{Ob}\,\mathcal{C}\) there is an identity morphism \(\operatorname{id}_x\in \mathcal{C}(x,x)\text{.}\) This data must satisfy the following properties:
- Associativity:
- For objects \(x,y,z,w\) and morphisms \(f\in \mathcal{C}(x,y)\text{,}\) \(g\in \mathcal{C}(y,z)\text{,}\) and \(h\in \mathcal{C}(z,w)\text{,}\) we have\begin{equation*} h\circ(g\circ f) = (h\circ g)\circ f. \end{equation*}
- Identity:
- For each \(x,y\in \mathrm{Ob}\,\mathcal{C}\text{,}\) \(f\in \mathcal{C}(x,y)\text{,}\) and \(g\in \mathcal{C}(y,x)\text{,}\) we have\begin{equation*} f\circ \operatorname{id}_x = f\qquad\text{and}\qquad \operatorname{id}_x\circ g = g. \end{equation*}
