Category Theory

Definition

A category \(\mathcal{C}\) consists of:

With associativity and identity laws.

Functor

\(F: \mathcal{C} \to \mathcal{D}\):

Natural Transformation

For functors \(F,G:\mathcal C\to\mathcal D\), a natural transformation \(\eta:F\Rightarrow G\) assigns each object \(A\) a morphism \(\eta_A:F(A)\to G(A)\) such that for every \(f:A\to B\), \[G(f)\circ\eta_A=\eta_B\circ F(f).\]

Yoneda Lemma

For a locally small category \(\mathcal C\) and a covariant functor \(F:\mathcal C\to\mathbf{Set}\), \[\operatorname{Nat}(\operatorname{Hom}_{\mathcal C}(A,-),F)\cong F(A).\] The bijection sends \(\eta\) to \(\eta_A(\mathrm{id}_A)\); its inverse sends \(x\in F(A)\) to the transformation \(f:A\to X\mapsto F(f)(x)\).

Limits and Colimits

Adjoint Functors

For \(F:\mathcal C\to\mathcal D\) and \(G:\mathcal D\to\mathcal C\), \(F\dashv G\) means \[\operatorname{Hom}_{\mathcal D}(F(A),B)\cong\operatorname{Hom}_{\mathcal C}(A,G(B))\] naturally in \(A,B\). Example: the free-group functor is left adjoint to the forgetful functor from groups to sets.

Monad

A triple \((T,\mu,\eta)\) consists of an endofunctor \(T:\mathcal C\to\mathcal C\) and natural transformations \(\mu:T^2\Rightarrow T\), \(\eta:\mathrm{Id}_{\mathcal C}\Rightarrow T\). For every object \(A\), \[\mu_A\circ T(\mu_A)=\mu_A\circ\mu_{T(A)},\qquad \mu_A\circ T(\eta_A)=\mu_A\circ\eta_{T(A)}=\mathrm{id}_{T(A)}.\]