## Functor

### Collection

 context ${\bf C},{\bf D}$ … category definiendum $F$ in ${\bf C}\longrightarrow{\bf D}$ rule ${\large\frac{ A\ :\ {\bf C} }{ FA\ :\ {\bf D} }}$ rule ${\large\frac{ f\ :\ {\bf C}[A,\,B] }{ F(f)\ :\ {\bf D}[FA,\,FB] }}$ postulate $F\,1_A=1_{FA}$ postulate $F(f\circ g)=F(f)\circ F(g)$

#### Discussion

A function $f:C\to D$ maps a set of things $C=\{a,b,c,\dots\}$ into another set of things $D=\{f(a),f(b),f(c),\dots,\dots\}$ (remark: some of the listed elements in $D$ might be equal and $D$ might also be larger as the range of $f$). Let's write $C$ as $\{1_a,1_b,1_c,\dots\}$, which is just a formal relabeling.

A category ${\bf C}$ is richer than a set $C$:

1. There is not only a collection of special elements $1_a,1_b,1_c,\dots$, but also, for each ordered pair of those (such as $\langle 1_a,1_c\rangle$) there is a whole new collection of elements that's also in ${\bf C}$.

2. Each element knows of two other elements. I.e. there is a domain and codomain function and these assignments should be obvious form the construction above.

3. There is a “non-total monoid” $\circ$, with the special elements as it's units. It's like a monoid, except it's generally only partially defined, where the domain and codomain function tell you which concatenations make sense (e.g. $1_a\circ 1_b$ only has a value if $a=b$).

A functor is a function that respects $\circ$ in the sense of a monoid-homomorphism.

(Point of view of universal constructions: If the graph given by the objects and arrows in the domain category is thought of as “a concept”, then the image of a functor is the realization of that concepts within the codomain category.)

#### Definitions

Note that functors can be composed to obtain new functors:

$(F\circ G)A:=F(GA)$,

$(F\circ G)(f):=F(G(f))$.

#### Plebsplaination

If you have a set $S$ and some maps id : S → S f : S → S g : S → S h : S → S on it, i.e. $id \in S^S$ $f \in S^S$ $g \in S^S$ $h \in S^S$ then they form a monoid where the multiplication is function concatenation $\circ$ :

$g \circ f \in S^S$ $h \circ g \in S^S$ $f \circ id = f$ etc.

A set valued functor $F$ acting on those maps is a homomorphism in that the concatenation $\circ'$ of the new maps $F(id), F(f), F(g), F(h), …$ on the set (which may call $FS$) are given by the old concatenation

F(f) : FS → FS

and

$F(f) \circ' F(g) := F(f \circ g)$

A general functor of sets is now exactly this, except we don't necessarily require that we only deal with a single set S but instead the domain and codomain of the maps may be different.

If f : X → Y g : Y → Z then $g \circ f : X \to Z$ and a functor is still able to map them

$Ff : FX \to FY$ $Fg : FY \to FZ$ $F(g \circ f) : FX \to FZ$ where $F(g \circ f) = F(g) \circ' F(f)$

Form a topos perspective, the most important functor may be the hom functor for a set T which takes domains/codomains S to the set of function $S^T$ and which maps maps $f : X \to Y$ to maps $F(f) : FX \to FY$ i.e. $F(f) : X^T \to Y^T$ which work as follows:

If you have two functions $x : T \to X$, $y : T \to Y$, i.e. $x \in X^T$, $y \in Y^T$ and if $f : X \to Y$ note $f \circ x : T \to Y$ and then $F(f) : X^T \to Y^T$ given by $F(f)(x) := f \circ x$

The point is that you make functions f between sets into function F(f) between function spaces. Those are morally better objects because properties like „homomorphism“ and „continuous“ (which algebra and topology is really about) is not a property of the elements of sets, but of functions between set.

Algebraic topology and many cohomology theories are about using such a homomorphism F (of a non-total monoid, i.e. of a cateogry) to pass from a world of topological spaces to a world of algebraic objects.

Topos theory is about realizing this insight and defining topology (and even stuff like differential geometry) in an algebraic way in the first place.

I feel there is no simple and comprehensive into, if you're a mathematican maybe it comes naturally after ring theory (not my thing)

here are some directions

Categories_for_the_Working_Mathematician, Mac Lane (abstract algebra)

Simmons - Introduction to Category Theory (algebra, strange but with pictures)

Awodey - Category_theory-Oxford_University_Press,_USA (Comp-Sci, more modern)

Robert_Goldblatt - Topoi_The_Categorial_Analysis (logic, the simplest intro do categories, but it introduces functor very late and beyond page 150 it's higher order logic)

Sheaves_in_geometry_and_logic - Saunders_MacLane, Ieke_Moerdijk (topos theory, not a good starting point)