# Introduction to Category Theory/Products are Limits

## Cone over 2 objects

Cone category over (C1, C2).

Let ${\displaystyle C_{1},C_{2}}$ be any two objects in category ${\displaystyle {\mathcal {C}}}$. We define the cone category, ${\displaystyle {\mathcal {C}}one(C_{1},C_{2})}$, as follows

• Objects are 3-tuples ${\displaystyle (X,m_{1},m_{2})\;}$, where X is an object in ${\displaystyle {\mathcal {C}}}$, and ${\displaystyle m_{1}\;}$ is a morphism ${\displaystyle X\to C_{1}}$, and ${\displaystyle m_{2}\;}$ is a morphism ${\displaystyle X\to C_{2}}$.
• Arrows are morphisms ${\displaystyle f:(X_{p},p_{1},p_{2})\to (X_{q},q_{1},q_{2})}$ such that both triangles commute, in other word ${\displaystyle f:X_{p}\to X_{q}}$ is a morphism in ${\displaystyle {\mathcal {C}}}$ such that
${\displaystyle {\begin{cases}p_{1}=q_{1}\circ f\\p_{2}=q_{2}\circ f\end{cases}}}$

We must check that this is really a category:

• Identity morphism of object ${\displaystyle (X_{p},p_{1},p_{2})}$ in ${\displaystyle {\mathcal {C}}one(C_{1},C_{2})}$ is the identity morphism ${\displaystyle 1_{X_{p}}}$ in ${\displaystyle {\mathcal {C}}}$.
• Composition of ${\displaystyle f:(X_{p},p_{1},p_{2})\to (X_{q},q_{1},q_{2})}$ and ${\displaystyle g:(X_{q},q_{1},q_{2})\to (X_{r},r_{1},r_{2})}$ in ${\displaystyle {\mathcal {C}}one(C_{1},C_{2})}$ is the composition ${\displaystyle g\circ f}$ in ${\displaystyle {\mathcal {C}}}$. Commutativity of bigger triangles follows trivially from commutativity of smaller triangles. (Write equations if you want.)
• Composition is associative ${\displaystyle {\mathcal {C}}one(C_{1},C_{2})}$ since it's associative in ${\displaystyle {\mathcal {C}}}$.

### Terminal object in Cone

What is the terminal object in the category ${\displaystyle {\mathcal {C}}one(C_{1},C_{2})}$?

By the definition of terminal object it must be an object ${\displaystyle (X_{t},t_{1},t_{2})\;}$ such that

• for every object ${\displaystyle (X_{p},p_{1},p_{2})\;}$ in ${\displaystyle {\mathcal {C}}one(C_{1},C_{2})}$ there is exactly one morphism ${\displaystyle f:(X_{p},p_{1},p_{2})\to (X_{t},t_{1},t_{2})}$.

In other words

• for every 3-tuple ${\displaystyle (X_{p},p_{1},p_{2})\;}$ there is exactly one morphism ${\displaystyle f:X_{p}\to X_{t}}$ in ${\displaystyle {\mathcal {C}}}$ such that ${\displaystyle p_{1}=t_{1}\circ f}$ and ${\displaystyle p_{2}=t_{2}\circ f}$.

But this is exactly the universal property of the product ${\displaystyle C_{1}\times C_{2}}$. We conclude

• The terminal object in category ${\displaystyle {\mathcal {C}}one(C_{1},C_{2})}$, if it exists, is the object ${\displaystyle (C_{1}\times C_{2},\pi _{1},\pi _{1})}$.

By duality argument we also have

• The initial object in category ${\displaystyle {\mathcal {C}}ocone(C_{1},C_{2})}$, if it exists, is the object ${\displaystyle (C_{1}\coprod C_{2},\iota _{1},\iota _{1})}$.

## Functors

A category is, among other things, a kind of algebraic system, but so far we've left out one of the most important ingredients in algebra, homomorphisms, which are, essentially, mappings that 'preserve structure'. Functors are the structure-preserving mappings of category theory, although functors are more immediately complicated than homomorphisms. To begin with, they come in two flavors, covariant and contravariant, the former defined as follows:

### Definition of Covariant Functors

A (covariant) functor F from category ${\displaystyle {\mathcal {C}}}$ to category ${\displaystyle {\mathcal {D}}}$ satisfies

• F sends objects of ${\displaystyle {\mathcal {C}}}$ to objects of ${\displaystyle {\mathcal {D}}}$.
• F sends arrows of ${\displaystyle {\mathcal {C}}}$ to arrows of ${\displaystyle {\mathcal {D}}}$.
• If m is an arrow from A to B in ${\displaystyle {\mathcal {C}}}$, then ${\displaystyle F(m)\,}$ is an arrow from ${\displaystyle F(A)\,}$ to ${\displaystyle F(B)\,}$ in ${\displaystyle {\mathcal {D}}}$.
• F sends identity arrows to identity arrows: ${\displaystyle F(1_{A})=1_{F(A)}\;}$.
• F preserves compositions: ${\displaystyle F(g\circ f)=F(g)\circ F(f)}$.

Contravariant functors are similar, but the direction of the arrows gets reversed, we'll discuss them later.

### Examples

#### Monoid Functors

We've already seen that a monoid is a category with a single object. So suppose ${\displaystyle H\,}$ is a functor from the monoid ${\displaystyle {\mathcal {M}}}$ to the monoid ${\displaystyle {\mathcal {N}}}$. These monoids have a single object, which we can just call ${\displaystyle *\,}$, so ${\displaystyle H\,}$ will have to map ${\displaystyle \,*}$ in ${\displaystyle {\mathcal {M}}}$ onto ${\displaystyle *\,}$ in ${\displaystyle {\mathcal {N}}}$.

${\displaystyle H\,}$ will also take arrows of ${\displaystyle {\mathcal {M}}}$ onto arrows of ${\displaystyle N}$, and the third condition (on sources and targets of arrows) will hold automatically.

So what about the last two? Well the first says that the identity arrows are preserved, the second that composition is. But these are exactly the conditions characterizing a monoid homomorphism! So for monoids (viewed as categories), functors are homomorphisms (as conventionally defined in abstract algebra books). This applies automatically to groups as well, which are just monoids where every arrow has an inverse.

#### Hom Functors

Let ${\displaystyle {\mathcal {C}}}$ be a locally small category, and pick some object ${\displaystyle A\,}$ of ${\displaystyle {\mathcal {C}}}$. Now, for any object ${\displaystyle B\,}$ of ${\displaystyle {\mathcal {C}}\,}$, we have the set ${\displaystyle \operatorname {Hom} (A,B)}$ of arrows with domain ${\displaystyle A\,}$ and codomain ${\displaystyle B\,}$ (a set, because ${\displaystyle {\mathcal {C}}}$ is locally small). So the mapping

${\displaystyle B\mapsto \operatorname {Hom} (A,B)}$

looks like it might be the object part of a functor from ${\displaystyle {\mathcal {C}}}$ to ${\displaystyle {\mathcal {S}}et}$.

To get a functor, we need to do something with the arrows, specifically, an arrow ${\displaystyle f:B\to C}$ needs to become a function from ${\displaystyle \operatorname {Hom} (A,B)}$ to ${\displaystyle \operatorname {Hom} (A,C)}$. An evident way to produce such a function is to tack ${\displaystyle f\,}$ onto the end of the arrows in ${\displaystyle \operatorname {Hom} (A,B)}$:

${\displaystyle g\in \operatorname {Hom} (A,B)\mapsto f\circ g\in \operatorname {Hom} (A,C)}$

It is then a straightforward exercise to show that the result, standardly notated ${\displaystyle \operatorname {Hom} (A,-)}$, is a functor. A useful notation is that ${\displaystyle \operatorname {Hom} (A,-)(f)}$ is often written ${\displaystyle \operatorname {Hom} (A,f)}$.

The fact that any locally small category produces Hom-functors means that any such category has substantial manifestations in ${\displaystyle {\mathcal {S}}et}$, some of the important ones expressed by the famous Yoneda lemma.

## The Free Monoid Functor

A more complex example is the free monoid functor which takes any set onto the free monoid generated by that set. Suppose ${\displaystyle S\,}$ is an object of ${\displaystyle {\mathcal {S}}et}$. Then ${\displaystyle F(S)\,}$ is the monoid whose elements are strings of members of ${\displaystyle S}$, with concatenation as the binary operation, and the empty string serving as the identity (if you want to get very tedious, a string can be defined as a function whose domain is an initial segment of the natural numbers (e.g. ${\displaystyle 1,2,\ldots n}$ for some ${\displaystyle n\,}$, the case where ${\displaystyle n=0\,}$ constituting the empty string), and whose codomain in ${\displaystyle S}$).

To make this a bit more concrete, if ${\displaystyle S=\{o,d,g\}\,}$, then the members of ${\displaystyle F(S)\,}$ are ${\displaystyle d,o,g,do,dog,god,ogg,\ldots }$ (infinitely many), plus an empty string often symbolized as ${\displaystyle \emptyset \,}$ or ${\displaystyle \Lambda \,}$. Intuitively, 'free' means that the only identities that hold in this monoid are the ones required by the associative and identity laws, so that for example ${\displaystyle dog\,}$ and ${\displaystyle god\,}$ are distinct (but in the free commutative monoid, they'd be the same, but different from ${\displaystyle dogg\,}$ and ${\displaystyle ddog\,}$). So that's the object part of this functor: it takes sets of elements (which may be finite in number) onto the sets of all strings on those elements (which will always be infinite in size, unless the set is empty). A superscripted Kleene star ${\displaystyle ^{*}}$ is often used to represent the applying ${\displaystyle F\,}$ to a set, in fields such as mathematical linguistics, so that ${\displaystyle S^{*}\,}$ will be the set of strings made out of members of ${\displaystyle S\,}$.

Exercise: what does ${\displaystyle F(\emptyset )}$ look like?

Now to be a functor, ${\displaystyle F\,}$ also has to do something to arrows. An arrow ${\displaystyle f\,}$ of ${\displaystyle {\mathcal {S}}et}$ is just a function, say from ${\displaystyle S\,}$ to ${\displaystyle T\,}$, so what we do to compute the value ${\displaystyle F(f)}$ on ${\displaystyle F(S)\,}$ is replace each element of each string in ${\displaystyle F(S)\,}$ with its ${\displaystyle f\,}$-value. So if:

• ${\displaystyle f=\{d\mapsto m,o\mapsto u,g\mapsto \emptyset \}}$,

then

• ${\displaystyle F(f)(dog)=mu\,}$

For people who want to be very fussy, ${\displaystyle F(f)\,}$ can be defined by induction over the length of strings.

Exercise: proove that ${\displaystyle F\,}$ as defined above is really a functor.

This example will prove useful in defining the notion of 'adjunction', to come.

[SHOULD THE NEXT SECTION BE STUCK IN HERE AS ONE OF THE EXAMPLES? I'd rather keep multiple top levels, unless you add other top level sections.]

## Binary Product Functor

This next example takes a fair amount of space to explain, but is perhaps easier than the free monoid functor. The basic point is that if a category ${\displaystyle {\mathcal {C}}}$ has designated products, we can then construct a functor from the pair-category ${\displaystyle ({\mathcal {C}},{\mathcal {C}})}$ to ${\displaystyle {\mathcal {C}}}$.

### Product of Objects

For an object ${\displaystyle (A,B)\,}$ of ${\displaystyle ({\mathcal {C}},{\mathcal {C}})}$, define:

• ${\displaystyle F(A,B)=A\times B}$

(recall that 'has designated products means that there's some specific method for picking a particular product object for each pair ${\displaystyle (A,B)\,}$).

Well that wasn't too hard!

### Product of Morphisms

But to make a functor, we need to do something with the morphisms of ${\displaystyle ({\mathcal {C}},{\mathcal {C}})}$, which are pairs of morphisms of ${\displaystyle {\mathcal {C}}}$. Specifically, if ${\displaystyle f:C\rightarrow C'}$ and ${\displaystyle g:D\rightarrow D'}$ are arrows of ${\displaystyle {\mathcal {C}}}$, then ${\displaystyle (f,g)\,}$ is an arrow from ${\displaystyle (C,D)\,}$ to ${\displaystyle (C',D')\,}$. Just thinking notationally, we'd expect to write the output of ${\displaystyle F\,}$ on this as ${\displaystyle f\times g}$, but then we need to construct something in ${\displaystyle {\mathcal {C}}}$ from ${\displaystyle f\,}$ and ${\displaystyle g\,}$ in such a way that ${\displaystyle F\,}$ so-defined is a functor. This takes a bit of work.

The first step is to observe that If ${\displaystyle A,B,X\,}$ are objects in category ${\displaystyle {\mathcal {C}}}$ where ${\displaystyle A\times B}$ exists, and ${\displaystyle f_{1}:X\to A}$ and ${\displaystyle f_{2}:X\to B}$ are any morphisms, then we have ${\displaystyle \;}$, the unique morphism ${\displaystyle X\to A\times B}$ satisfying the universal property for products. If g is any morphism ${\displaystyle X\to A\times B}$, then

${\displaystyle <\pi _{A}\circ g,\pi _{B}\circ g>=g}$

by the universal property. [LINK TO DEDUCTION EXAMPLE, ???]

Product of morphisms f and g.

So now we move on to the defition. If ${\displaystyle A,B,X,Y\,}$ are objects in category ${\displaystyle {\mathcal {C}}}$ with designated prooducts, and ${\displaystyle f:X\to A}$ and ${\displaystyle g:Y\to B}$ are any morphisms, then the product of ${\displaystyle f\,}$ and ${\displaystyle g\,}$, denoted ${\displaystyle f\times g\;}$, is the morphism

${\displaystyle :X\times Y\to A\times B}$.

This can be hard to remember at first, but eventually you get to be able to see that it basically is just the obvious thing to do its job.

This morphism commutes with the projection morphisms

${\displaystyle \pi _{A}\circ (f\times g)=f\circ \pi _{X}}$
${\displaystyle \pi _{B}\circ (f\times g)=g\circ \pi _{Y}}$

If we also have morphisms ${\displaystyle h:A\to C}$ and ${\displaystyle i:B\to D}$, then

${\displaystyle \pi _{C}\circ (h\times i)\circ (f\times g)=h\circ \pi _{A}\circ (f\times g)=h\circ f\circ \pi _{X}}$
${\displaystyle \pi _{D}\circ (h\times i)\circ (f\times g)=i\circ \pi _{B}\circ (f\times g)=i\circ g\circ \pi _{Y}}$

and we get

${\displaystyle (h\times i)\circ (f\times g)=<\pi _{C}\circ (h\times i)\circ (f\times g),\pi _{D}\circ (h\times i)\circ (f\times g)>}$
${\displaystyle ==(h\circ f)\times (i\circ g)}$.

(Lots of Exercises here!!)

### Functoriality

For all this to define a functor, domains, codomains, associativity and identity elements must be preserved. So recall the definition of composition in a pair category:

${\displaystyle (f',g')\circ (f,g)=(f'\circ f,g'\circ g)}$

And identities:

${\displaystyle 1_{(A,B)}=(1_{A},1_{B})\,}$

So we have our Proposition. If category ${\displaystyle {\mathcal {C}}}$ has all products, then mapping

${\displaystyle F:{\mathcal {C}}^{\mathbf {2} }\to {\mathcal {C}}}$

defined by

${\displaystyle (C_{1},C_{2})\mapsto (C_{1}\times C_{2})}$
${\displaystyle (f_{1},f_{2})\mapsto (f_{1}\times f_{2})}$

is a functor.

Proof.

• If ${\displaystyle f:X\to A,g:Y\to B}$ are two morphisms, it is obvious that ${\displaystyle F((f,g))=f\times g\;}$ is a morphism from ${\displaystyle F((X,Y))\;}$ to ${\displaystyle F((A,B))\;}$.
• The identity morphism of ${\displaystyle (A,B)}$ is ${\displaystyle (1_{A},1_{B})\;}$ and it's image ${\displaystyle 1_{A}\times 1_{B}}$ is easily seen to be the identity morphism of ${\displaystyle A\times B}$.
• ${\displaystyle F((g_{1},g_{2})\circ (f_{1},f_{2}))=F(g_{1}\circ f_{1},g_{2}\circ f_{2})=(g_{1}\circ f_{1})\times (g_{2}\circ f_{2})=(g_{1}\times g_{2})\circ (f_{1}\times f_{2})=F(g_{1},g_{2})\circ F(f_{1},f_{2})}$

${\displaystyle \Box }$

## Unary Product Functor

Given what we've just done, this example should be easy, perhaps even too easy to be worth bothering with, but it's important in the development of later topics such as Exponentials.

### Unary Product on Object

Let ${\displaystyle {\mathcal {C}}}$ be a category with products and let A be any object in ${\displaystyle {\mathcal {C}}}$. We define a product functor

${\displaystyle A\times -:{\mathcal {C}}\to {\mathcal {C}}}$

by setting

${\displaystyle (A\times -)(B)=A\times B}$ for every object B in ${\displaystyle {\mathcal {C}}}$
${\displaystyle (A\times -)(f)=1_{A}\times f}$ for every morphism ${\displaystyle f:B\to C}$.

Let's verify this really is a functor.

• For every morphism ${\displaystyle f:B\to C}$, the morphism ${\displaystyle 1_{A}\times f}$ is a morphism from ${\displaystyle A\times B}$ to ${\displaystyle A\times C}$.
• Image of the identity arrow ${\displaystyle 1_{B}}$ is
${\displaystyle 1_{A}\times 1_{B}=<1_{A}\circ \pi _{1},1_{B}\circ \pi _{2}>=<\pi _{1},\pi _{2}>=<\pi _{1}\circ 1_{A\times B},\pi _{2}\circ 1_{A\times B}>=1_{A\times B}}$.
• For every morphisms ${\displaystyle f:B\to C}$ and ${\displaystyle g:C\to D}$ we have
${\displaystyle (1_{A}\times g)\circ (1_{A}\times f)=(1_{A}\circ 1_{A})\times (g\circ f)=1_{A}\times (g\circ f)}$.

### Unary Product on Arrow

Just like we define functor ${\displaystyle (A\times -)}$ for every object A, we can define similar mapping ${\displaystyle (f\times -)}$ for every morphism f. For reasons to be explained later we define this mapping as follows

${\displaystyle (f\times -):{\text{obj}}({\mathcal {C}})\to {\text{mor}}({\mathcal {C}})}$
${\displaystyle C\mapsto (f\times 1_{C})}$

In other words the domain of this mapping is the objects of ${\displaystyle {\mathcal {C}}}$ and the codomain is the arrows of ${\displaystyle {\mathcal {C}}}$. The image of object C is a product of f and the identity morphism of C.

Functor Ax- is natural.

This mapping has the following commutativity property:

Proposition. Let ${\displaystyle f:A\to B}$ be a morphism in category ${\displaystyle {\mathcal {C}}}$. The mapping ${\displaystyle (f\times -)}$ commutes with respect to functors ${\displaystyle (A\times -)}$ and ${\displaystyle (B\times -)}$. To be more specific, for every morphisms ${\displaystyle g:C\to C'}$ the following equation holds

${\displaystyle (f\times -)(C')\circ (A\times -)(g)=(B\times -)(g)\circ (f\times -)(C)}$.

Proof.

${\displaystyle (f\times 1_{C'})\circ (1_{A}\times g)=(f\circ 1_{A})\times (1_{C'}\circ g)=f\times g}$
${\displaystyle =(1_{B}\circ f)\times (g\circ 1_{C})=(1_{B}\times g)\circ (f\times 1_{C})}$ ${\displaystyle \Box }$

We will later see that a mapping with this kind of commutativity property is a natural transformation from one functor to another.

## Category of 2-Functors

Category ${\displaystyle \mathbf {2} }$ is a category with 2 objects (1 and 2) and no arrows other that the two identity arrows. We wish to define a category ${\displaystyle {\mathcal {F}}un(\mathbf {2} ,{\mathcal {C}})}$, whose objects are functors from the category ${\displaystyle \mathbf {2} }$ to category ${\displaystyle {\mathcal {C}}}$. In order to make this a category, we must answer the question: What is an arrow from one functor to another? Before we can answer this, we must have better understanding of functors in this category.

### Objects

What is a functor F from the category ${\displaystyle \mathbf {2} }$ to arbitrary category ${\displaystyle {\mathcal {C}}}$?

• Functor must map objects in ${\displaystyle \mathbf {2} }$ to objects in ${\displaystyle {\mathcal {C}}}$. So ${\displaystyle F(1)=C_{1}}$ and ${\displaystyle F(2)=C_{2}}$, for some objects ${\displaystyle C_{1},C_{2}}$ in ${\displaystyle {\mathcal {C}}}$.
• Functor must map arrows in ${\displaystyle \mathbf {2} }$ to arrows in ${\displaystyle {\mathcal {C}}}$. The only arrows in ${\displaystyle \mathbf {2} }$ are the identity arrows. So we must have ${\displaystyle F(1_{1})=1_{C_{1}}}$ and ${\displaystyle F(1_{2})=1_{C_{2}}}$.
• Only compositions of arrows in ${\displaystyle \mathbf {2} }$ are compositions of the identity arrow with itself. We easily verify ${\displaystyle F(1_{1}\circ 1_{1})=1_{C_{1}}\circ 1_{C_{1}}}$ and ${\displaystyle F(1_{2}\circ 1_{2})=1_{C_{2}}\circ 1_{C_{2}}}$.

Thus ${\displaystyle F=(C_{1},C_{2})\;}$ is a functor ${\displaystyle \mathbf {2} \to {\mathcal {C}}}$ that maps

• object 1 to object ${\displaystyle C_{1}}$ and
• object 2 to object ${\displaystyle C_{2}}$.

### Arrows

Arrows between functors are called natural transformations. What could natural transformations in this functor category look like?

Let ${\displaystyle C_{1},C_{2},D_{1},D_{2}\;}$ be objects in category ${\displaystyle {\mathcal {C}}}$. What could a natural transformation from functor ${\displaystyle (C_{1},C_{2})\;}$ to functor ${\displaystyle (D_{1},D_{2})\;}$ possibly be? Since all the functors consist of a pair of objects from ${\displaystyle {\mathcal {C}}}$, it seems reasonable to define natural transformations to be pairs of morphisms from ${\displaystyle {\mathcal {C}}}$. So for every morphisms ${\displaystyle f_{1}:C_{1}\to D_{1}}$ and ${\displaystyle f_{2}:C_{2}\to D_{2}}$ in ${\displaystyle {\mathcal {C}}}$, we define a natural transformation ${\displaystyle (f_{1},f_{2})\;}$ from functor ${\displaystyle (C_{1},C_{2})\;}$ to functor ${\displaystyle (D_{1},D_{2})\;}$ to be a mapping

${\displaystyle (f_{1},f_{2}):{\text{obj}}(\mathbf {2} )\to {\text{mor}}({\mathcal {C}})}$
${\displaystyle 1\mapsto f_{1},\;2\mapsto f_{2}}$.

We define composion of natural transformations pointwise, that is

${\displaystyle (g_{1},g_{2})\circ (f_{1},f_{2})=(g_{1}\circ f_{1},g_{2}\circ f_{2}).}$

### Summary

Category ${\displaystyle {\mathcal {F}}un(\mathbf {2} ,{\mathcal {C}})}$ consists of

• Functor ${\displaystyle (C_{1},C_{2}):\mathbf {2} \to {\mathcal {C}}}$ for every pair of objects ${\displaystyle C_{1},C_{2}}$ in ${\displaystyle {\mathcal {C}}}$.
• Natural transformation ${\displaystyle (f_{1},f_{2}):(C_{1},C_{2})\to (D_{1},D_{2})}$, for every pair of morphisms ${\displaystyle f_{1}:C_{1}\to D_{1},f_{2}:C_{2}\to D_{2}}$ in ${\displaystyle {\mathcal {C}}}$.

It is obvious that this category is isomorphic to the pair category ${\displaystyle ({\mathcal {C}},{\mathcal {C}})={\mathcal {C}}^{\mathbf {2} }}$.

### Preview: Limit functor

We now introduce the limit notation but defer the actual definition to a later lesson.

Let ${\displaystyle {\mathcal {C}}}$ be a category with all products. The limit of functor ${\displaystyle F=(C_{1},C_{2})\;}$ in the category ${\displaystyle {\mathcal {F}}un(\mathbf {2} ,{\mathcal {C}})}$, is the terminal object in the category ${\displaystyle {\mathcal {C}}one(F)={\mathcal {C}}one(C_{1},C_{2})}$.

${\displaystyle \varprojlim _{\mathbf {2} }F=\varprojlim F=\varprojlim (C_{1},C_{2})=(C_{1}\times C_{2},\pi _{1},\pi _{2})}$.

Projection morphisms are usually clear from the context, so we can drop them and simple write

${\displaystyle \varprojlim _{\mathbf {2} }F=\varprojlim (C_{1},C_{2})=C_{1}\times C_{2}}$.
Limit functor.

Proposition. If category ${\displaystyle {\mathcal {C}}}$ has all products, then mapping

${\displaystyle \varprojlim :{\mathcal {F}}un(\mathbf {2} ,{\mathcal {C}})\to {\mathcal {C}}}$

defined by

${\displaystyle (C_{1},C_{2})\mapsto (C_{1}\times C_{2})}$
${\displaystyle (f_{1},f_{2})\mapsto (f_{1}\times f_{2})}$

is a functor.

Proof. Since ${\displaystyle {\mathcal {F}}un(\mathbf {2} ,{\mathcal {C}})}$ is isomorphic to ${\displaystyle {\mathcal {C}}^{\mathbf {2} }}$, this follows from earlier result.

## OLD: Product is Limit

Category ${\displaystyle \mathbf {2} }$ is a category with 2 objects (1 and 2) and no arrows other that the two identity arrows.

What is a functor F from the category ${\displaystyle \mathbf {2} }$ to arbitrary category ${\displaystyle {\mathcal {C}}}$?

• Functor must map objects in ${\displaystyle \mathbf {2} }$ to objects in ${\displaystyle {\mathcal {C}}}$. So ${\displaystyle F(1)=C_{1}}$ and ${\displaystyle F(2)=C_{2}}$, for some objects ${\displaystyle C_{1},C_{2}}$ in ${\displaystyle {\mathcal {C}}}$.
• Functor must map arrows in ${\displaystyle \mathbf {2} }$ to arrows in ${\displaystyle {\mathcal {C}}}$. The only arrows in ${\displaystyle \mathbf {2} }$ are the identity arrows. So we must have ${\displaystyle F(1_{1})=1_{C_{1}}}$ and ${\displaystyle F(1_{2})=1_{C_{2}}}$.
• Only compositions of arrows in ${\displaystyle \mathbf {2} }$ are compositions of the identity arrow with itself. We easily verify ${\displaystyle F(1_{1}\circ 1_{1})=1_{C_{1}}\circ 1_{C_{1}}}$ and ${\displaystyle F(1_{2}\circ 1_{2})=1_{C_{2}}\circ 1_{C_{2}}}$.

Thus ${\displaystyle F=(C_{1},C_{2})\;}$ is a functor ${\displaystyle \mathbf {2} \to {\mathcal {C}}}$ that maps

• object 1 to object ${\displaystyle C_{1}}$ and
• object 2 to object ${\displaystyle C_{2}}$.

We now introduce the limit notation but defer the actual definition to a later lesson.

The limit of functor ${\displaystyle F=(C_{1},C_{2})\;}$, if it exists, is the terminal object in the category ${\displaystyle {\mathcal {C}}one(F)={\mathcal {C}}one(C_{1},C_{2})}$.

${\displaystyle \varprojlim _{\mathbf {2} }F=\varprojlim F=\varprojlim (C_{1},C_{2})=(C_{1}\times C_{2},\pi _{1},\pi _{2})}$.

Projection morphisms are usually trivial from the context, so we can drop them and simple write

${\displaystyle \varprojlim _{\mathbf {2} }F=\varprojlim (C_{1},C_{2})=C_{1}\times C_{2}}$.

The colimit of functor ${\displaystyle F=(C_{1},C_{2})\;}$, if it exists, is the initial object in the category ${\displaystyle {\mathcal {C}}ocone(F)={\mathcal {C}}ocone(C_{1},C_{2})}$.

${\displaystyle \varinjlim _{\mathbf {2} }F=\varinjlim F=\varinjlim (C_{1},C_{2})=C_{1}\coprod C_{2}}$.

## OLD: Product of Morphisms

If A, B, and X are objects in category ${\displaystyle {\mathcal {C}}}$ and ${\displaystyle f_{1}:X\to A}$ and ${\displaystyle f_{2}:X\to B}$ are any morphisms, we use notation ${\displaystyle \;}$ for the unique morphism ${\displaystyle X\to A\times B}$ given by the universal property. If g is any morphism ${\displaystyle X\to A\times B}$, then

${\displaystyle <\pi _{A}\circ g,\pi _{B}\circ g>=g}$

by the universal property.

Product of morphisms f and g.

If A, B, X and Y are objects in category ${\displaystyle {\mathcal {C}}}$ and ${\displaystyle f:X\to A}$ and ${\displaystyle g:Y\to B}$ are any morphisms, then the product of f and g, denoted ${\displaystyle f\times g\;}$, is the morphism

${\displaystyle :X\times Y\to A\times B}$.

This morphism commutes with the projection morphisms

${\displaystyle \pi _{A}\circ (f\times g)=f\circ \pi _{X}}$
${\displaystyle \pi _{B}\circ (f\times g)=g\circ \pi _{Y}}$

If we also have morphisms ${\displaystyle h:A\to C}$ and ${\displaystyle i:B\to D}$, then

${\displaystyle \pi _{C}\circ (h\times i)\circ (f\times g)=h\circ \pi _{A}\circ (f\times g)=h\circ f\circ \pi _{X}}$
${\displaystyle \pi _{D}\circ (h\times i)\circ (f\times g)=i\circ \pi _{B}\circ (f\times g)=i\circ g\circ \pi _{Y}}$

and we get

${\displaystyle (h\times i)\circ (f\times g)=<\pi _{C}\circ (h\times i)\circ (f\times g),\pi _{D}\circ (h\times i)\circ (f\times g)>}$
${\displaystyle ==(h\circ f)\times (i\circ g)}$.

## OLD: Product Functor

Let ${\displaystyle {\mathcal {C}}}$ be a category with products and let A be any object in ${\displaystyle {\mathcal {C}}}$. We define a product functor

${\displaystyle A\times -:{\mathcal {C}}\to {\mathcal {C}}}$

by setting

${\displaystyle (A\times -)(B)=A\times B}$ for every object B in ${\displaystyle {\mathcal {C}}}$
${\displaystyle (A\times -)(f)=1_{A}\times f}$ for every morphism ${\displaystyle f:B\to C}$.

Let's verify this really is a functor.

• For every morphism ${\displaystyle f:B\to C}$, the morphism ${\displaystyle 1_{A}\times f}$ is a morphism from ${\displaystyle A\times B}$ to ${\displaystyle A\times C}$.
• Image of the identity arrow ${\displaystyle 1_{B}}$ is
${\displaystyle 1_{A}\times 1_{B}=<1_{A}\circ \pi _{1},1_{B}\circ \pi _{2}>=<\pi _{1},\pi _{2}>=<\pi _{1}\circ 1_{A\times B},\pi _{2}\circ 1_{A\times B}>=1_{A\times B}}$.
• For every morphisms ${\displaystyle f:B\to C}$ and ${\displaystyle g:C\to D}$ we have
${\displaystyle (1_{A}\times g)\circ (1_{A}\times f)=(1_{A}\circ 1_{A})\times (g\circ f)=1_{A}\times (g\circ f)}$.
Functor Ax- is natural.

Proposition. Functor ${\displaystyle (A\times -)\;}$ is natural in A. This means that if ${\displaystyle f:A\to B}$ is any morphism, then there is natural transformation from functor ${\displaystyle (A\times -)\;}$ to functor ${\displaystyle (B\times -)\;}$. This in turn simply means that the diagram on the right commutes for all morphisms ${\displaystyle g:C\to C'}$. Mapping ${\displaystyle (f\times -)\;}$ is a natural transformation from functor ${\displaystyle (A\times -)\;}$ to functor ${\displaystyle (B\times -)\;}$.

Proof.

${\displaystyle (f\times 1_{C'})\circ (1_{A}\times g)=(f\circ 1_{A})\times (1_{C'}\circ g)=f\times g}$
${\displaystyle =(1_{B}\circ f)\times (g\circ 1_{C})=(1_{B}\times g)\circ (f\times 1_{C})}$ ${\displaystyle \Box }$

## OLD: Natural Transformation

If F and G are covariant functors between the categories ${\displaystyle {\mathcal {C}}}$ and ${\displaystyle {\mathcal {D}}}$, then a natural transformation ${\displaystyle \eta }$ from F to G associates to every object X in ${\displaystyle {\mathcal {C}}}$ a morphism ${\displaystyle \eta _{X}:F(X)\to G(X)}$ in ${\displaystyle {\mathcal {D}}}$ called the component of ${\displaystyle \eta }$ at X, such that for every morphism ${\displaystyle f:X\to Y}$ in ${\displaystyle {\mathcal {C}}}$ we have ${\displaystyle \eta _{Y}\circ F(f)=G(f)\circ \eta _{X}}$. This equation can conveniently be expressed by the commutative diagram

Natural transformations are usually far more natural than the definition above.

## OLD: Category of Functors

We wish to define a category ${\displaystyle {\mathcal {F}}un(\mathbf {2} ,{\mathcal {C}})}$, whose objects are functors from the category ${\displaystyle \mathbf {2} }$ to category ${\displaystyle {\mathcal {C}}}$. What could the arrows in this category be?

Let ${\displaystyle C_{1},C_{2},D_{1},D_{2}}$ be objects in category ${\displaystyle {\mathcal {C}}}$. What is a natural transformation from functor ${\displaystyle (C_{1},C_{2})\;}$ to functor ${\displaystyle (D_{1},D_{2})\;}$? To every object in category ${\displaystyle \mathbf {2} }$ we must associate a morphism in category ${\displaystyle {\mathcal {C}}}$ in such a way that for every morphism in ${\displaystyle \mathbf {2} }$ the corresponding diagram in ${\displaystyle {\mathcal {C}}}$ commutes. But there are no morphisms other than the identity morphisms in category ${\displaystyle \mathbf {2} }$, so the diagram commutes trivially. For every pair of morphisms ${\displaystyle f_{1}:C_{1}\to D_{1}}$ and ${\displaystyle f_{2}:C_{2}\to D_{2}}$ in ${\displaystyle {\mathcal {C}}}$, there is a natural transformation ${\displaystyle (f_{1},f_{2})\;}$ from functor ${\displaystyle (C_{1},C_{2})\;}$ to functor ${\displaystyle (D_{1},D_{2})\;}$.

Category ${\displaystyle {\mathcal {F}}un(\mathbf {2} ,{\mathcal {C}})}$ consists of

• Functor ${\displaystyle (C_{1},C_{2}):\mathbf {2} \to {\mathcal {C}}}$ for every pair of objects ${\displaystyle C_{1},C_{2}}$ in ${\displaystyle {\mathcal {C}}}$.
• Natural transformation ${\displaystyle (f_{1},f_{2}):(C_{1},C_{2})\to (D_{1},D_{2})}$, for every pair of morphisms ${\displaystyle f_{1}:C_{1}\to D_{1},f_{2}:C_{2}\to D_{2}}$ in ${\displaystyle {\mathcal {C}}}$.

It's trivial to verify that it really is a category. (What is the identity morphism of functor ${\displaystyle (C_{1},C_{2})}$? Why is the composition of natural transformations a natural transformation? Why is composition associative?)

## OLD: Limit is Functor

Limit functor.

We still won't give the general definition of limit, sorry. Instead we will prove that in the special case of category ${\displaystyle \mathbf {2} }$, the limit is a functor from category ${\displaystyle {\mathcal {F}}un(\mathbf {2} ,{\mathcal {C}})}$ to category ${\displaystyle {\mathcal {C}}}$.

Proposition. If category ${\displaystyle {\mathcal {C}}}$ has all products, then mapping

${\displaystyle \varprojlim :{\mathcal {F}}un(\mathbf {2} ,{\mathcal {C}})\to {\mathcal {C}}}$

defined by

${\displaystyle (C_{1},C_{2})\mapsto (C_{1}\times C_{2})}$
${\displaystyle (f_{1},f_{2})\mapsto (f_{1}\times f_{2})}$

is a functor.

Proof.

${\displaystyle \Box }$

## OLD: Hmmm

We end this lesson with two cryptic formulas...

${\displaystyle {\text{hom}}_{Fun(\mathbf {2} ,{\mathcal {C}})}(\Delta (C),(A,B))}$
${\displaystyle \cong {\text{hom}}_{Fun(\mathbf {2} ,{\mathcal {C}})}((C,C),(A,B))}$
${\displaystyle \cong {\text{hom}}_{\mathcal {C}}(C,A)\times {\text{hom}}_{\mathcal {C}}(C,B)}$
${\displaystyle \cong {\text{hom}}_{\mathcal {C}}(C,A\times B)}$
${\displaystyle \cong {\text{hom}}_{\mathcal {C}}(C,\varprojlim _{\mathbf {2} }(A,B))}$

and

${\displaystyle {\text{hom}}_{Fun(\mathbf {2} ,{\mathcal {C}})}((A,B),\Delta (C))}$
${\displaystyle \cong {\text{hom}}_{Fun(\mathbf {2} ,{\mathcal {C}})}((A,B),(C,C))}$
${\displaystyle \cong {\text{hom}}_{\mathcal {C}}(A,C)\times {\text{hom}}_{\mathcal {C}}(B,C)}$
${\displaystyle \cong {\text{hom}}_{\mathcal {C}}(A\coprod B,C)}$
${\displaystyle \cong {\text{hom}}_{\mathcal {C}}(\varinjlim _{\mathbf {2} }(A,B),C)}$

where

${\displaystyle \Delta :{\mathcal {C}}\to {\mathcal {F}}un(\mathbf {2} ,{\mathcal {C}})}$

is defined by

${\displaystyle C\mapsto (C,C)}$.

(This is an example of adjoints.)