# Category theory
---
1. ???
- Object
- Morphism
- Category
- Functor


Many objects in mathematics may have 'similar' behaviour in some specific sense, or in special cases, 'equal up to an isomorphism' (they have identical behaviour). Category theory studies these types of relationships between mathematical objects in the most abstract, fundamental setting possible.

\begin{definition}
An \emph{object} in category theory is a mathematial object
\end{definition}

\begin{definition}
A \emph{morphism} in category theory is an ordered relation of 2 objects. 
\end{definition}

\begin{definition}
A \emph{category} $\mathcal{C}$ is a 3-tuple $(\text{ob}(\mathcal{C}), \text{hom}(\mathcal{C}), \circ)$ of a class of objects, clas of morphisms on these objects, and a binary morphism composition operator.
\begin{itemize}
	\item $\mathrm{ob}(\mathcal{C})$ is a class of objects
	\item $\mathrm{hom}(\mathcal{C})$ is a class of morphisms on objects of $\mathrm{ob}(\mathcal{C})$ (if $X,Y \in \mathrm{ob}(\mathcal{C})$, then $\mathrm{hom}_{\mathcal{C}}(X,Y)$ are the morphisms from domain $X$ to codomain $Y$)
	\item $\circ$ is the binary morphosm composition operator
\end{itemize}
$\circ$ has the following properties:
\begin{itemize}
	\item $h \circ (g \circ f) = (h \circ g) \circ f$
	\item For any  $f \in \mathrm{hom}_{\mathcal{C}}(X,Y)$, there exist $1_X , 1_Y$ such that $f \circ 1_X = 1_Y \circ f = f$
\end{itemize}

\[ h \circ (g \circ f) = (h \circ g) \circ f\) (associativity of compositions) \]
	\[ \forall X \in \mathrm{ob}(\mathcal{C}) \exists 1_{X} : X \to X \in \mathrm{hom}(\mathcal{C}) [ \forall f : X \to Y \in \mathrm{hom}(\mathcal{C}) [ f \circ 1_{X} = f ] ] \]

\end{definition}


A class is a collection of sets that satisfy a property (or predicate). This is done to acknowledge the fact that we may run into paradoxes if we naiively treat such 'classes' as a formal set theory. If we used sets instead of categories, the category of sets $\mathbf{Set}$ would have $\mathrm{ob}(\mathbf{Set})$ as the universal set, which leads to paradoxes.


\begin{definition}
A \emph{functor} is a function between categories.
			<p>A mapping \(F : \mathcal{C} \to \mathcal{D}\) such that:</p>
			<ul>
				<li>\( \forall X \in \text{ob}(\mathcal{C}), \exists F(X) \in \text{ob} (\mathcal{D}) \)</li>
				<li>\( \forall f : X \to Y \in text{hom}(\mathcal{C}), \exists F(f) : F(X) \to F(Y) : \)
					<ul>
						<li>\(\forall X \in \text{ob}(\mathcal{C}), F(1_X) = 1_{F(X)} \)</li>
						<li>\(\forall f : X \to Y, \forall g : Y \to Z, F(g \circ f) = F(g) \circ F(f) \)</li>
					</ul>
				</li>
			</ul>
\end{definition}

\begin{definition}
A pair of objects $X,Y$ are \emph{isomorphic} iff there are $f \in \mathrm{hom}_{\mathcal{C}}(X,Y), f^{-1} \in \mathrm{hom}_{\mathcal{C}}(Y,X)$ such that $f \circ f^{-1} =1_Y$ and $f^{-1} \circ f = 1_X$.
Such an $f$ is called an \emph{isomorphism}.
	\[f \in \mathrm{hom}_{\mathcal{C}}(X,Y) \text{ is a categorical isomorphism } \iff X \cong Y \iff \exists $f \in \mathrm{hom}_{\mathcal{C}}(X,Y), f^{-1} \in \mathrm{hom}_{\mathcal{C}}(Y,X) [ f \circ f^{-1} =1_Y \land f^{-1} \circ f = 1_X ]\]
\end{definition}


\begin{definition}
	\[ f \in \mathrm{hom}_{\mathcal{C}}(X,Y) \text{ is a categorical monomorphism } \iff \forall U \in \mathrm{ob}(\mathcal{C}) [ \forall g_1 , g_2 \in \mathrm{hom}_{\mathcal{C}}(U,X) (f \circ g_1 = f \circ g_2 \implies g_1 = g_2 )  ] \]
\end{definition}



\chapter{Examples of categories}
- Category of sets and functions
- Category of groups and group homomorphisms
- Category of rings and ring homomorphisms
- Category of topological spaces and homeomorphisms
- Category of smooth manifolds and diffeomorphisms
