\chapter{Functors}


When we work in the categories of categories, what are our morphisms?

Although in that analysis, functors would be directed algebraic objects under composition, to descibe the actual behaviour of functors on categories we need a more concrete definition in terms of set theoretic (or perhaps class theoretic?) functions. Say what you will, but set theory doesn't go out of fashion so easily!


\begin{definition}[Functor]
A \emph{functor} $F : \mathcal{C} \to \mathcal{D}$ between categories  is a collection of the following
A function $F : \mathrm{ob}(\mathcal{C}) \to \mathrm{ob}(\mathcal{D})$
Functions $F : \mathrm{hom}_{\mathcal{C}}(X,Y) \to \mathrm{hom}_{\mathcal{D}}(F(X),F(Y))$ for each $X,Y$

%\[ \forall X \in \mathrm{ob}(\mathcal{C})[ \exists F(X) \in \mathrm{ob} (\mathcal{D}) ] \]
%\[ \forall f : X \to Y \in \mathrm{hom}(\mathcal{C}) [ \exists F(f) : F(X) \to F(Y) \]

\[ \forall X \in \mathbf{ob}(\mathcal{C}) [ F(1_X) = 1_{F(X)} ] \]
\[ \forall f \in \mathrm{hom}_{\mathcal{C}}(X,Y),  g \in \mathrm{hom}_{\mathcal{C}}(Y,Z)  [ F(g \circ f) = F(g) \circ F(f) ] ] \]
\end{definition}


Most spaces and structures are simply sets with some extra properties imposed. For instance, a topological space is a set with a topology, a measurable space is a set with a $\sigma$-algebra. Perhaps more familiar to us, a group is a set with an associative binary operation with an identity element and with all elements invertible.

We can form a functor from $\mathbf{Grp}$ to $\mathbf{Set}$ that 'forgets' the group structure, functors from $\mathbf{Ring}$ to $\mathbf{Ab}$ that 'forgets' the multiplication operation of its rings! Functors like this are called \emph{forgetful functors}; functors which translate objects and morphisms into a category with less structure.


Free group, free vector spaces, we can often generate spaces and structures 'freely' by considering a set, considering its elementa to be different objects with no relation, and using those elements to build the structure. F

\begin{definition}
	Forgetful functor is an informal term for a functor that 'forgets' information about the structures or spaces that are objects in the domain category. FOr instance grp to set forgets group operation, ring to ab forgets multiplication etc.
\end{definition}

\begin{definition}[Contravariant functor]
	functor from $\mathcal{C}$ to $\mathcal{D}$ is a functor $\mathcal{C}^{op} \to \mathcal{D}$
\end{definition}

\begin{definition}[Covariant functor]
	Functor that is not contravariant.
\end{definition}

Faithful functor
iff its morphism functor it is injective.


Full functor
iff its morphism functor is surjective.


Presheaf

Opposite functor
Bifunctor
multifunctor








\section{Diagram}

Formally a diagram is just a functor. Then why have a second terminology?



\section{Cones}






Rather than smoking cones, we can develop a caegorical concept in their name.

\begin{definition}[Cone]
Let $F : \mathcal{J} \to \mathcal{C}$ be a diagram (functor), a \emph{cone of $C \in \mathcal{C}$ to $F$} is a family of morphisms of the form $\phi_X : C \to F(X)$ that satisfies the following commutative diagram.
% https://q.uiver.app/#q=WzAsMyxbMSwwLCJDIl0sWzAsMSwiRihYKSJdLFsyLDEsIkYoWSkiXSxbMSwyLCJGKGYpIiwyXSxbMCwxLCJcXHBzaV9YIiwyXSxbMCwyLCJcXHBzaV9ZIl1d
\[\begin{tikzcd} & C & \\ {F(X)} && {F(Y)} \arrow["{\psi_X}"', from=1-2, to=2-1] \arrow["{\psi_Y}", from=1-2, to=2-3] \arrow["{F(f)}"', from=2-1, to=2-3] \end{tikzcd}\]
\end{definition}

The infinite commutative diagrams for each morphism in $\mathcal{D}$ would give a 3D commutative diagram that looks like a cone if one treats the $C$ as its apex.

The idea of cones is to characterize the situation where there is some 'cone element' $C$ where for any morphism to $F(X) \to F(Y)$, one can always find a composition to make a morphism $C \to F(Y)$.

There is also the notion of cocones.


\section{Limit}



\subsection{Pullback}
\subsection{Limit}

Limit the teminal object of a cone.


Also the notion of a colimit.


