After my recent attempt to learn the core of category theory and exploration of Saunders Mac Lane’s insightful books, I have tried to organize my notes, thoughts, and highlights in this post. The post is divided into two parts: the origins of category theory are covered in the first one, and next comes the core machinery for working with categories.
Mathematics is said to have its origins in “human cultural activities,” as Mac Lane put it. These activities lead to some ideas, like the activity of observing, which leads to a notion of the “symmetry” of objects, and this general idea of “symmetry” is then formalized as a symmetry group of figures or formulae (which when defined on an infinite set becomes a transformation group). This perspective comes from the intuitionists, who argue that mathematics is a human construct, not an objective truth, and that is to say that there would be no math without the brain. The ideas that have their origins in these activities are said to have some intuitive content, which can then be formalized. By formal, we mean a list of rules, axioms, or methods of proof that can be applied without attention to the “meaning” but which give results that do have the correct interpretation.
Activity | Idea | Formalization |
---|---|---|
Argue | Proof | Logical Connectives |
Choosing | Chance | Probability |
Counting | Next | Successor; Ordinal Number |
Observing | Symmetry | Transformation Group |
If we consider mathematics to be the science of number and space, then we can construct some formal notions. It is the morphosis of fact into form.
We can use set theory as a foundation, primarily because essentially all mathematics is reducible to sets. Another way to look at this is that instead of looking at mathematics as a whole, it’s better viewed as its objects and mappings between them. This approach works for numerous branches of mathematics.
Branch | Objects | Morphisms/Mappings |
---|---|---|
Set Theory | Sets | Functions |
Topology | Topological Spaces | Continuous Maps |
Groups | Groups | Homomorphism |
Euclidean Geometry | Inner Product Spaces | Orthogonal Transformations |
A category \(\mathbf{C}\) consists of
Since, anything that satisfies this definition is a category, we can say that category theory is abstract algebra of arrows.
To construct a category, this question has to be answered, given a mathematical structure, what are the morphisms preserving this structure? which, in turn, gives us the arrows of a category.
In each category \(\mathbf{C}\) with two objects \(a\) and \(b\) there exists a collection,
\(hom(a,b) \ = \ \{f \ | \ f \ \text{is an arrow of} \ \mathbf{C} \ \text{and} \ f:a \to b\}\)
\(\textbf{hom-set}\) is not always a set, as occasionally, it might be too big to be considered under the ZF axioms.
Examples, of categories,
We know that morphisms between any two objects (\(a,b\)) in a category (\(\mathbf{C}\)) form a set called \(\textbf{hom}_{\mathbf{C}}(a,b)\). This set also happens to be an object in the category Set. We can, thus, have a functor (covariant representable functor) that goes from any category (\(\mathbf{C}\)) to the category of sets (\(\textbf{Set}\)), moreover, if we fix the source object and vary the target object i.e
\(\forall a \in \mathbf{C} \ , \ \textbf{hom}_\mathbf{C}(a,\_) \ : \ \mathbf{C} \to \textbf{Set}\)
where,
As we are fixing the source \(a\) the functor \(\textbf{hom}_{\mathbf{C}}(a, \_)\) combines all arrows from \(a\) to somewhere in \(\mathbf{C}\). On the other hand, if we were to fix the target \(b\) the functor \(\textbf{hom_{\mathbf{C}}(\_, b)\) should combine all arrows coming to \(b\) since functors preserve the source and destination of objects,
\(\forall b \in \mathbf{C} \ , \ \textbf{hom}_{\mathbf{C}}(\_,b) \ : \ \mathbf{C}^{op} \to \textbf{Set}\)
this is a contra-variant representable functor and is defined as,
From above, we can say that \(\textbf{hom}_{\mathbf{C}}\) is a hom-functor,
\(\textbf{hom}_{\mathbf{C}}(\_,\_) \ : \ \mathbf{C}^{op} \times \mathbf{C} \to \textbf{Set}\)
which maps,
When we ask “what are morphisms that preserve this structure?” with mathematical structure under considerations as functors then the structure preserving morphisms are called natural transformations.
Given two categories \(\mathbf{C}\) and \(\mathbf{D}\) and functors \(F : \mathbf{C} \to \mathbf{D}\), \(G : \mathbf{C} \to \mathbf{D}\) we define a natural transformation as, \(\alpha : F \Rightarrow G\) such that,
Consider two fuctors \(F,G\) between two categories \(\mathbf{C}, \mathbf{D}\) such that a natural transformation,
\(\alpha : F \to G\)
is taken to be any rule that takes an object \(a \in \mathbf{C}\) and an arrow \(\alpha_a : Fa \to Ga\) in a way that the following diagram commutes for every arrow \(f : a\to b\) where \(f \in\mathbf{C}\) , In other words, \(Gf \circ \alpha_a = \alpha_b \circ Ff\) for all \(f\).
We can compose natural transformations as depicted visually by the following diagram where we have three functors \(F,G,H\) between \(\mathbf{C}\) and \(\mathbf{D}\),
A natural isomorphism is an isomorphism in a functor category. If \(F : \mathbf{C} \to \mathbf{D}\) and \(G : \mathbf{C} \to \mathbf{D}\) are two functors, a natural isomorphism between them is a natural transformation \(\eta : F \Rightarrow G\) whose components are isomorphisms. In this case, the inverse natural transformation \(\eta^{−1} : G \Rightarrow F\) is given by \((\eta^{-1})_A = (\eta_A)^{-1}\). We write \(F \cong G\) when F and G are naturally isomorphic.
An equivalence (\(\simeq\)) of categories is a pair of functors, \(F\) and \(G\) such that,
According to nLab ,
“In category theory a limit of a diagram \(D:\mathbf{J}\to \mathbf{C}\) in a category \(\mathbf{C}\) is an object \(Lim_D\) of \(\mathbf{C}\) equipped with morphisms to the objects \(Dj\) for all \(j\in \mathbf{J}\), such that everything in sight commutes. Moreover, the limit \(lim_D\) is the universal object with this property, i.e. the “most optimized solution” to the problem of finding such an object.”
Let’s try to unpack this definition and generalize this notion of \(lim_D\). Consider two categories \(\mathbf{C}\) and \(\mathbf{J}\) with two functors \(D\) and \(\Delta_x\). The objects in \(\mathbf{J}\) are indexed \(1,2,3\cdots\) thus, objects in \(\mathbf{C}\) become \(D1,D2,D3\cdots\) and \(D\) takes some objects from \(\mathbf{J}\) with their morphisms to \(\mathbf{C}\). And another collapsing constant functor \(\Delta_x\) that collapses all objects into a single object \(x\) in \(\mathbf{C}\) and all morphisms into the single identity morphism \(\mathbf{1}_x\).
Two constructions emerge,
Cone :
Co-Cone :
Now, let’s try to construct a category of cones where we want to have the before-mentioned cones as objects and the unique morphism between \(LimD\) and \(x\) (which can be any other apex of some cone). So let \(m\) to be that morphism between cones such that all the triangles of the following form commute.
The terminal object of this category is called the limit.
Furthermore, we have natural transformations between the two functors \(D\) and \(\Delta_x\). Since there can be any number of such natural transformations, they form a \(\textbf{hom-set}_{\mathbf{C}^{\mathbf{J}}} (D,\Delta_x)\) in the functor category \(\mathbf{C}^{\mathbf{J}}\) where \(D\) and \(\Delta_x\) are just objects. Moreover, this hom-set is also a member of the category \(\textbf{Set}\).
For a natural transformation \(\alpha : \Delta_x \to D\). We have two hom-sets,
Similarly, we have two functors that go from \(\mathbf{C} \to \textbf{Set}\),
We want to show that the morphism (α) between the above hom-sets is a natural transformation.
To show that consider natural transformations \(\mu\) and \(\gamma\) such that,
Similarly in Set,
Therefore for \(\alpha\) to be a natural transformation, the naturality condition must hold, and all such squares must commute.
A presheaf is a functor, \(F: \mathbf{C}^{op} \to \textbf{Set}\) such that for any \(x \in \mathbf{C}\), \(Fx\) in \(\textbf{Set}\) is the set that represents the ways \(x\) can occur in \(F\) and any mapping \(f: x \to y\) where \(f,y \in \mathbf{C}\) the corresponding \(Ff : Fy \to Fx\) maps each of the \(y\)’s of \(Fy\) to each of the \(x\)’s in \(Fx\).
The above presheaf \(F\) becomes a representable when it is naturally isomorphic to a hom-functor \(\textbf{hom}_{\mathbf{C}} (\_ , X) : \mathbf{C}^{op} \to \textbf{Set}\) which maps any object \(c \in \mathbf{C}\) to the hom-set \(\textbf{hom}_{\mathbf{C}} (c , X)\) and each \(f : c’ \to c\) where \(f, c’ \in \mathbf{C}\) to the function which maps each morphism \(c \to X\) to the composite \((c’ \to c) \to X\). Here the object \(X\) is determined uniquely upto an isomorphism in \(\mathbf{C}\) and is called the representing object.
“The set of morphisms from a representable presheaf \(y( c)\) into an arbitrary presheaf \(X\) is in natural bijection with the set \(X( c)\) assigned by \(X\) to the representing object \(c\).”
In simple words if we have a functor \(F\) that goes from \(\mathbf{C} \to \textbf{Set}\) then the natural transformation between \(F\) and the hom-functor \(\textbf{hom}_{\mathbf{C}} (\_ , c)\) corresponds by a natural isomorphism (set theoretic bijection) to the set \(Fc\).
Consider the category of presheaves on a locally small category \(\mathbf{C}\), viz. \(\textbf{Set}^{\mathbf{C}^{op}}\) with an incoming functor \(y\) from \(\mathbf{C}\),
\(y : C \to \textbf{Set}^{\mathbf{C}^{op}} \\ \forall c \in \mathbf{C}, \ y = c \mapsto \textbf{hom}_{\mathbf{C}}(\_ , c)\)
\(y\) sends each object of \(\mathbf{C}\) to the hom-functor into that object i.e presheaf represented by \(c\).
We want to prove that for any \(X \in \textbf{Set}^{\mathbf{C}^{op}}\) there is an isomorphism between the hom-set of the presheaf functors from \(y( c)\) to \(X\) and the value of \(X\) at \(c\).
\(\textbf{hom}_{\textbf{Set}^{\mathbf{C}^{op}}}(y( c),X) \cong X( c)\)
Consider the following diagram,
Since we know that,
We can have a similar diagram with elements instead of sets,
From above it is clear that the set of natural transformations of form, \(\eta : \textbf{hom}_{\mathbf{C}} (\_, c) \Rightarrow X\) is completely determined by a value \(\eta_c (\mathbf{1}_c) \in X( c)\). This means that to show the naturality condition on any \(\eta : \textbf{hom}_{\mathbf{C}} (\_, c) \Rightarrow X\) it is sufficient to show that \(\eta\) is already fixed by some value \(\eta_c(\mathbf{1}_{\mathbf{C}}) \in X( c)\) of its component \(\eta_c : \textbf{hom}_{\mathbf{C}} (c,c) \to X( c)\) on \(\mathbf{1}_{\mathbf{C}}\).
In other words, each object of \(\mathbf{C}\) is uniquely specified by the arrows into it (or out of it), up to isomorphism. The objects of a category can be uniquely defined in terms of the role they play in the category and in terms of their interactions with the whole.