Introduction to Category Theory
Introduction to Category Theory
Jakob Scholbach
0 Preface 5
1 Introduction 7
2 Basic notions 9
2.1 Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Functors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 Sameness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3 Functor categories 21
3.1 The Yoneda embedding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5 Adjunctions 49
5.1 Definitions and examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.2 Limits and adjoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.3 The triangle identities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.4 Constructing adjoint functors via the solution set condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.5 The adjoint functor theorem for presentable categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
6 Monads 65
6.1 Definitions and examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.2 Algebras over a monad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
6.3 Monadic adjunctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
6.4 Monadicity theorems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7 Abelian categories 79
7.1 Definitions and examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.2 Elementary properties of abelian categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3
4 CONTENTS
8 Kan extensions 85
8.1 (Co)ends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
8.2 Kan extensions via (co)ends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
8.3 The free cocompletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
8.4 The Ind-completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
8.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
References 94
Chapter 0
Preface
These are growing notes for a lecture on category theory offered in Fall 2021 at the University of Münster.
While category theory has practically no strict prerequisites, it is hard to appreciate category theory
without some applications in other areas of mathematics. We will therefore include examples from algebra,
topology, functional analysis and logic. Some very basic knowledge of some of these areas is therefore
helpful.
The exclamation mark (!) indicates that you should repeat some aspects of a definition etc. in order
to make sure you are following the lecture.
Three dots indicate some content that is not written in the notes, but will be explained in the lecture.
These are links to video recordings of the lecture. 04.11.
5
6 CHAPTER 0. PREFACE
Chapter 1
Introduction
Category theory offers a high-level abstraction for mathematical reasoning. It is comparable to the step of
studying general linear equations
ax by c
instead of studying these one-by-one for specific choices of coefficients a, b and c. The process of abstracting
the solution process for such an equation from the concrete choice of coefficients helps in understanding the
essential points. A next step of abstraction is the concept of a vector space, which realizes the insight that
the choice of a coordinate system does, for many purposes, not matter. Linear algebra is the mathematical
theory that studies the totality of all vector spaces, and how they interact with each other. Category
theory, in turn, studies all mathematical theories at a time. It seeks to identify what is common in different
theories. For example, the concept of finiteness is a recurrent theme in algebra and topology. Finitely
generated algebras, finitely generated or presented modules are pervasive in algebra, while compactness is
an important condition in topology. Category theory offers a way to jointly address both conditions. While
it is unsurprising that both are “in some way” a finiteness condition, it is not a priori obvious how to make
sense of that notion since it requires to avoid talking about a set of generators of some algebra, or a finite
subcovering of a given open covering. Category theory also clarifies how the relation between compact
Hausdorff spaces and sets is similar to the relation between, say, Zrts-modules and abelian groups. Again,
it does (and has to do) this by offering a framework to express the common features of both situation
without specifically talking about topology, nor modules. This way, it helps clarify our thinking about
these notions within one theory, and also helps to establish crucial bonds between different branches of
mathematics.
Category theory, as exposed in this lecture, is only the penultimate step in this ladder of abstraction: 8-
categories and their theory, now central in branches such as contemporary algebraic topology or algebraic
geometry, are not touched upon in this course. However, the concepts learned in this course carry over,
often without any change in the statement, to 8-category theory. In this sense, this course can serve as a
preparation to go that one step further ...
7
8 CHAPTER 1. INTRODUCTION
Chapter 2
Basic notions
2.1 Categories
Category theory seeks to identify, clarify and exploit recurring patterns that occur throughout different
branches of mathematics. This chapter provides the basic language needed to identify the common sources
of such distant phenomena. A category is, roughly speaking, the arena in which you can perform some
mathematical discipline.
Definition 2.1. A category is the datum consisting of a
class ObjpC q called the objects of the category,
for each pair X, Y P ObjpC q, a set HomC pX, Y q called the set of morphisms (from X to Y ),
for each X P ObjpC q a distinguished element idX P HomC pX, X q called the identity morphism,
Remark 2.2. We will also write HompX, Y q : HomC pX, Y q. Another common notation is C pX, Y q. We
also use EndpX q : EndC pX q : HomC pX, X q. Morphisms f P HomC pX, Y q are also denoted as X Ñ Y .
f
Example 2.3. We have the following examples of categories. The assertion that the indicated objects
morphisms form a category requires, in each case, an argument: saying that Top forms a category contains,
in particular, the fact that the composite of two continuous maps is again continuous.
objects morphisms HompX, Y q
Set all sets all maps from X to Y
Grp all groups all group homomorphisms from X to Y
Top all topological spaces all continuous maps from X to Y
Ban all Banach spaces (over C, say) all continuous C-linear maps
CRing all commutative rings all ring homomorphisms
9
10 CHAPTER 2. BASIC NOTIONS
Definition 2.4. A category D is called a subcategory if ObjpDq ObjpC q and if for any X, Y P D,
HomD pX, Y q is a subset of of HomC pX, Y q that contains idX for all X P D and is stable under the
composition.
It is called a full subcategory, if HomD pX, Y q HomC pX, Y q. We will write
D C
to indicate that D is a full subcategory.
The formation of full subcategories is very common; it amounts to selecting an arbitrary subclass of
objects, while keeping the morphisms between them.
Example 2.5. By definition, we have the following (full) subcategories:
Ab Grp is the category of abelian groups and all group homomorphisms, i.e., by definition a full
subcategory of Grp
Grp is a full subcategory of Mon, the category of monoids and monoid homomorphisms,
Ban¤1 is the category of all Banach spaces with contracting maps, i.e.,
HomBan¤1 pV, W q : tf P HomBanpV, W q, |f | ¤ 1u
(i.e., |f pv q| ¤ |v | for all v P V ). Note this indeed is a category, and it is a (non-full) subcategory of
Ban. We will see later (e.g., in Exercise 4.9) that the two categories Ban and Ban¤1 , while having the
same objects, are profoundly different. This highlights the importance of the morphisms. However,
in many situations the choice of morphisms (and more so, for identity morphisms and composites) is
left implicit.
Haus Top is the category of Hausdorff spaces, again by definition a full subcategory.
Definition 2.6. A category is called small if ObjpC q is a set (as opposed to a class).
Example 2.7. The above examples are not small, e.g., since all sets form a proper class. Small categories
can be constructed by imposing some size condition. For example, fixing a set X, the subsets of X (and
all maps between them) forms a small category.
Remark 2.8. In order to emphasize that the morphisms between two fixed objects form a set some authors
also refer to a category as defined above as a locally small category. It is possible to drop this condition
as well, so allowing HomC pX, Y q to be a class. Such categories are then referred to as big categories.
A set-theoretically clean method of incorporating these different cases is by working with universes, in
which case one would choose two universes U V . A small U -category C would then be such that ObjpC q P
U and all HomC pX, Y q P U . A locally small U -V -category C has ObjpC q P V and all HomC pX, Y q P U .
In this language, a big category would be just a small category with respect to the larger universe V .
As long as category theory is only used as a device to organize one’s thinking, such set-theoretic issues
can largely be ignored. The distinction between sets and classes of objects will, however, matter strongly
in the adjoint functor theorem.
Example 2.9. Any preordered set 1 pA, ¤q gives rise to a small category whose objects are the elements
of A, and where Hompa, bq tu if a ¤ b and Hompa, bq H otherwise. Conversely, any small category C
in which HomC pX, Y q has at most one element gives rise to a preordered set.
Definition 2.10. If C is a category, then the opposite category C op is the category whose objects are
ObjpC op q : ObjpC q, but for X, Y P ObjpC op q (i.e., X, Y P ObjpC q)
HomC op pX, Y q : HomC pY, X q.
The identity morphisms and composition are inherited from C.
1 Recall that a preordered set is defined by the following axioms: a ¤ a for all a P A; a ¤ b and b ¤ c imply a ¤ c.
2.2. FUNCTORS 11
This is a “stupid” definition in the sense that it just reverses the way we think of morphisms, and has
otherwise no deeper content: it can be performed for any category C. Given a category, a meaningful
description for C op is often the starting point for interesting insights. E.g., parts of linear algebra can
be viewed as a consequence of an equivalence of categories (see Definition 2.31) between the category of
finite-dimensional vector spaces and its opposite category
2.2 Functors
The same way as differentiable maps are what makes differentiable manifolds talk to one another, or the
same way as Q-linear maps are what is needed to connect different Q-vector spaces, category theory
becomes useful mostly by connecting different categories. This is what functors do: they connect different
categories and thus are the notion to use in order to connect different areas of mathematics.
Definition 2.11. Let C, D be two categories. A functor from C to D, commonly denoted as F : C ÑD
is the following datum:
a map (of classes), F : ObjpC q Ñ ObjpDq,
Some authors call this a covariant functor and use the term contravariant functor for a map on the objects
as above, and maps
HomC pX, Y q Ñ HomD pF pY q, F pX q
subject to similar conditions as above. In the notation of Definition 2.10, a contravariant functor is just a
functor C op Ñ D.
Example 2.12. Consider the category C whose objects are Rn for n ¥ 0, and such that
T0 pg f q T0 g T0 f,
2.3 Sameness
Definition 2.17. A morphism f : X Ñ Y in a category C is called an isomorphism if there is another
morphism g : Y Ñ X (going in the other direction!, called an inverse) such that
f g idY , g f idX .
One shows(!) that such an inverse is unique if it exists. It is therefore also denoted f 1 .
Example 2.18. A map in Set is an isomorphism iff it is bijective.
Example 2.19. In the category TopGp of topological groups (with continuous group homomorphisms),
the logarithm
log : R¡0 Ñ R
is an isomorphism, since the exponential exp : R Ñ R¡0 is again a continuous group homomorphism and
the two composites are the respective identities.
F pf 1 q F pf q F pf 1 f q F pidX q idF pX q
and similarly with the other composite. (Note this uses both conditions on being a functor.)
Conversely, though, it is not necessarily true that f is an isomorphism whenever F pf q is. Applied to
the forgetful functor
U : TopGp Ñ Set
this means that just checking log is bijective (so that U plogq is an isomorphism) is a priori not enough to
ensure that its set-theoretically existing inverse is actually continuous and a group homomorphism. See
Exercise 2.4 for further examples.
Definition 2.21. A functor F : C Ñ D is called conservative if the following holds: a morphism f in C
is an isomorphism if (and therefore iff) F pf q is an isomorphism.
Clearly(!) every isomorphism is both a monomorphism and an epimorphism. The converse holds in the
category of Set, but does not hold in other categories such as CRing, see Exercise 2.8.
Working towards the notion of sameness in category theory, it is at first suggestive to consider the
following idea:
Definition 2.23. A functor F : C Ñ D is an isomorphism of categories if there is another functor
G : D Ñ C such that the two composites G F idC and F G idD are the respective identity functors,
i.e., for each object GpF pX qq X, F pGpY qq Y and likewise for each morphism.
Example 2.24. Let k K be a finite Galois extension.2 Let G : GalpK {k q : tσ : K Ñ K, σ|k idk u
be the group of field automorphisms of K that fix k elementwise.
The main theorem of Galois theory can be stated as a bijection
tk L K u Õ tH Gu
between the intermediate fields and the subgroups of G. The maps are given by
L ÞÑ GalpK {Lq : tσ : K Ñ K, σ|L idLup Gq
and conversely
H ÞÑ FixpH q : tx P K, σx x @σ P H up K q.
That is we have identities:
L FixpGalpK {Lqq, H
GalpK {FixpH qq.
Looking slightly closer, one notices that to an inclusion L L1 corresponds an inclusion (note the
direction changes) GalpK {L1 q GalpK {Lq and conversely to H H 1 p Gq corresponds pk qFixpH 1 q
FixpH qp K q.
We can therefore add this extra structure and consider the following categories
SubG : objects are the subgroups of G, with morphisms given by inclusions.
FieldsK
k : objects are subfields k L K and morphisms are inclusions L L1p K q.
Note that these categories are (categories associated to) posets (Example 2.9), since there is at most one
morphism between any two objects. Thus, the bijection on the level of objects and the functoriality (i.e.,
preservation of inclusions) gives automatically rise to an isomorphism of categories
GalpK {q : FieldsK
k Õ Sub op
G : Fixpq.
It is possible to slightly enlarge the morphisms allowed by consider the category of transitive G-sets
(these are of the form G{H for some subgroup H) instead of SubG and on the other side allow not just
inclusions, but arbitrary field homomorphisms L Ñ L1 (whose restriction to k is the identity). In this case,
one still obtains an isomorphism of categories (which are no longer posets), see [Rie17, Example 1.3.15]
for a precise statement.
Keeping this example in mind, let us however point out that isomorphisms of categories are rare in
practice. What made it work for the example of Galois theory is that there are few (almost no in the first
case) isomorphisms. This is, however, not so in many other situations, like the following example.
Example 2.25. Let k be a field and Vectfd
k the category of finite-dimensional k-vector spaces and k-linear
maps. Consider the functors
pVectfdk qop Õ
F
G
Vectfd
k
defined on objects by F pV q HompV, k q and GpV q HompV, k q and on morphisms in the “obvious way”.
2 Recall a finite field extension k Ñ
K is called Galois if it is separable and normal. Equivalently, the number of automorphisms σ : K K
|
with σ k idk equals dimk K. See, e.g., [Bower:Category] for a leisurely introduction to Galois theory with an eye towards its categorical
interpretation.
2.3. SAMENESS 15
As usual, the set HompV, k q is regarded as a k-vector space in its own right. (This is an example of a
so-called inner homomorphism, i.e., a case where the set of homomorphisms happens to be an object in
the category itself again.)
The composites are given by
However, from linear algebra we also know that demanding that two vector spaces are the same is
actually too strong: for all purposes it is enough to ensure they are isomorphic. We want to relax the
above definition by just requiring that GpF pV qq be isomorphic to V . However, these isomorphisms should
not be chosen at will individually for each V , but should rather be in harmony with one another. In order
to express this latter idea we need to introduce another concept:
Definition 2.26. Let F, G : C Ñ D be two functors (going in the same direction). A natural transforma-
tion
α:F ñG
is the datum of a morphism αpX q : F pX q Ñ GpX q for all objects X P ObjpC q, such that for each morphism
f : X Ñ Y in C, the square
p q/
F pX q GpX q
α X
pq
F f pq
G f
p q/
F pY q GpY q
α Y
Example 2.27. Recall the category Ban¤1 of Banach spaces and contractive maps and the forgetful and
“ball of radius 1” functors:
U : Ban¤1 Ñ Set, V ÞÑ V,
U ñ B1,
since for a linear contractive map f : V Ñ W , we will not in general have
β pf pv qq f pβ pv qq.
16 CHAPTER 2. BASIC NOTIONS
There is a useful criterion to show that a given functor F : C Ñ D is part of an equivalence of categories.
To state it we introduce some more language:
Definition 2.34. A functor F : C Ñ D is essentially surjective if for each Y P D there is some X P C
and an isomorphism F pX q Y .
Proposition 2.35. Let F : C Ñ D be a functor. The following are equivalent:
(1) F is part of an equivalence of categories (i.e., there is a functor G : D Ñ C such that the conditions
in Definition 2.31 are satisfied),
(2) F is fully faithful (Definition 2.15) and essentially surjective.
Proof. The direction (1) ñ (2) is left as an exercise. Conversely, assume F is essentially surjective and
fully faithful. Using the axiom of choice (for classes), we can choose for each Y P D some object, denoted
GpY q P C such that F pGpY qq Y . To complete the definition of G, we specify it on morphisms such that
this (somewhat arbitrary choice) becomes functorial. Let f : X Ñ Y be a morphism in D. Consider the
composite
F pGpX qq X Ñ Y F pGpY qq.
f
Since F is fully faithful, there is exactly one morphism GpX q Ñ GpY q that is mapped to this composite
under F . Define Gpf q to be that map. In other words, the diagram
F pGpX qq
/X
p p qq
F G f f
F pGpY qq
/Y
commutes. One checks the conditions for G being a functor(!) . By the diagram above, we have a
(functorial) isomorphism F G idD . We conclude
F pG F q pF Gq F idD F F idC .
One checks, using the full faithfulness of F , that this implies G F idC .
Example 2.36. Given a category C with a full subcategory C 1 C such that the inclusion is essentially
surjective, then C 1 C.
Given a category C 1 , we can thus for example consider a category C with ObjpC q ObjpC 1 q \ ObjpC 1 q
(two copies of objects of C 1 ), and
HomC pX, Y q HomC 1 pX, Y q.
For X P C 1 , writing X1 for the object regarded in the first copy of C 1 , and X2 for the one in the second
copy, the identity idX in particular gives a morphism
ιXP HomC pX1, X2qp HomC 1 pX, X qq.
This map is an isomorphism(!) . Thus the functor C 1 Ñ C mapping X ÞÑ X1 and f ÞÑ f is fully faithful
and essentially surjective. It is therefore an equivalence of categories. In a sense, C consists of another
copy of C 1 , with just different names for the objects.
Example 2.37. Let k be a field and Matk the category whose objects are the natural numbers N
t0, 1, . . . u and HomMatk pn, mq knm with composition given by matrix multiplication. The obvious
functor
F : Matk Ñ Vectfd
k , n ÞÑ k
n
where at the right we use the natural isomorphism k mn k nm given by taking the transpose of a matrix.
(Alternatively, it is also possible to prove this using Proposition 2.35 directly.)
Definition 2.39. An equivalence of the form
C op D
is called a duality. (Some authors, however, do not use the term duality in a precise technical sense.)
Example 2.40. In functional analysis there is the notion of Smith spaces (also known as Waelbroeck
spaces).3 There is an equivalence of categories (see, e.g., [Scholze:Lectures] for a recent exposition)
Homp, Rq : Smithop Ban : Homp, Rq.
The Hahn–Banach theorem can be read off from this equivalence: it is commonly stated by saying that
for an inclusion of Banach spaces and a map f , there is an extension g with the same norm:
f
V _ /
>R
g
W.
One checks (quickly) that inclusions of Banach spaces correspond to surjections of the corresponding
Smith spaces. In the context of Smith spaces, the corresponding statement is trivial: any map a : R Ñ A
corresponds to just an element in A and this can always be lifted along a surjection:
>B
b
R
a / A.
2.4 Exercises
Exercise 2.1. Let M be a monoid (e.g., a group). Show that M gives rise to a category, denoted BM with
a single object, denoted , and such that HomBM p, q M with composition given by the multiplication
in the monoid M .
Unwind the definition of a functor BM Ñ Set and explain why such a functor is called a set with an
M -action (or M -set).
Exercise 2.2. A category in which every morphism is an isomorphism is called a groupoid . Explain why
that terminology has been adopted.
Let C be a groupoid and f : X Ñ Y be an (iso-)morphism. Show that f gives rise to a group
isomorphism
EndC pX q Ñ EndC pY q.
Consider the groupoid C consisting of all finite-dimensional vector-spaces (over a fixed field k), where
we only allow isomorphisms as morphisms. Let V P C and f : k n Ñ V an isomorphism. What is the
relation of the above to the representation of linear maps V Ñ V in terms of a basis?
V
c¡0 cK with the induced compactly generated topology on V .
3A Smith space is a complete locally convex topological R-vector space V that admits a compact absolutely convex subset K such that
V
2.4. EXERCISES 19
Z pM q t g P M |gh hg @h P M u.
(1) Is the assignment
Mon Ñ AbMon, G ÞÑ Z pGq
part of a functor (taking values in the category of abelian monoids and monoid homomorphisms)?
(2) Let M Set be the category of M -sets (Exercise 2.1). Construct a bijection
Exercise 2.4. Which of the following functors are faithful, which are fully faithful, which are conservative?
Functors called U are the obvious forgetful functors.
(1) U : Top Ñ Set
(2) U : CptHaus Ñ Set (compact Hausdorff spaces with continuous maps)
(3) U : ModQ Ñ ModZ . Here ModR denotes the category of R-modules, for a ring R, with morphisms
being R-linear maps. Thus ModZ Ab is the category of abeliang groups, and ModQ is the category
of Q-vector spaces.
(4) U : Ban¤1Ñ Ban
(5) U : Ban Ñ VectC
(6) bZ Q : ModZ Ñ ModQ .
Note: To decide (2) and (5), you need to use a fact from point-set topology, respectively functional
analysis.
Exercise 2.5. Let FinSet be the category of finite sets, where we only consider bijections as morphisms.
Define a functor Sym : FinSet Ñ Set by sending a finite set X to its set of permutations. Defne another
functor Ord : FinSet Ñ Set by sending X to the set OrdpX q of total orderings on X, and a bijection
f : X Ñ Y to the map
Ordpf q : OrdpX q Ñ OrdpY q
that sends a total order ¤X on X to the following order ¤Y on Y :
y ¤Y y 1 ô f 1 py q ¤X f 1 py 1 q.
Show that for each finite set X, SympX q OrdpX q, but that there is no isomorphism of functors Sym
Ord. This is expressing the fact that any finite set can be totally ordered, but not functorially (or, as one
also says, not canonically).
Exercise 2.7. Show that the functors (U denotes the usual forgetful functors)
U : Ring Ñ Set
U : Ab Ñ Set
B¤1 : Ban¤1 Ñ Set
Op : Topop Ñ Set, X ÞÑ OppX q : tthe set of open subsets of X u, f ÞÑ f 1
are (co)representable.
20 CHAPTER 2. BASIC NOTIONS
Exercise 2.8. Show that a morphism in CRing is a monomorphism iff it is injective. Show that a morphism
in CRing is an epimorphism if it is surjective. The converse is false: show that Z Ñ Q is an epimorphism.
Note: the description of epimorphisms in CRing is subtle. A sample theorem is the following: sup-
pose f : A Ñ B is a local homomorphism between local (commutative) rings with A Noetherian. If
f is an epimorphism then B C rS 1 s is a localization of an A-algebra C that is finitely generated
[Ferrand:Monomorphismes]. The expectation that an epimorphism is surjective can be partly sal-
vaged: surjective ring homomorphisms A Ñ B are precisely the finite (i.e., B is a finitely generated
A-module) epimorphisms [StacksProject].
Exercise 2.9. The following exercise shows that the condition that a naturality of a transformation is a
strong condition.
Consider the functor
f
F : Set Ñ Set, X Þ X X, pX Ñf Y q ÞÑ pX X fÑ
Ñ Y Yq
as well as the identity functor id : Set Ñ Set.
Show that the only natural transformations F ñ id are given by the projections on the two coordi-
nates, i.e., on objects by X X Ñ X, px0 , x1 q ÞÑ x0 or x1 .
Hint: consider first what happens for X t0, 1u.
Give an example of an “unnatural” transformation, i.e., a collection of maps F pX q Ñ X for all sets
X, that fails to be natural.
Exercise 2.10. Show that a fully faithful functor is conservative.
Chapter 3
Functor categories
Given two categories C and D, the totality of all functors C Ñ D carries the structure of a category in its
own right.
Definition 3.1. Let F, G, H : C Ñ D be three functors, and α : F ñ G, β : G ñ H natural transforma-
tions. The composite
βα:F ñH
is defined in the expected way, for objects X, Y P C and morphisms f : X ÑY:
pq
F pX q F pY q
F f
/
p q
α X p q
α Y
pq
pβ αqpX q GpX q GpY q
G f
/ pβ αqpX q
p q
β X p q
β Y
p q/
H pX q H pY q.
H f
Note this is in contrast of the composition of functors (which would, given a functor F : C Ñ D and
another functor to another category, F 1 : D Ñ E, give a functor F 1 F : C Ñ E.) It can be useful to
illustrate compositions of natural transformations like so:
F
α "
C
G / D.
β
=
H
For a more comprehensive approach to visualizing category theory, see e.g., [Marsden:Category].
Definition and Lemma 3.2. Let C, D be two categories. We define the functor category
FunpC, Dq
(also denoted as DC ) to have as objects the functors C Ñ D and as morphisms the natural transformations
between such functors and composition being the one in Definition 3.1).
If C is a small category and D is small, then this is again a small category. If C is a small category and
D is locally small (i.e., HomD p, q are sets), then this is again locally small. (If no smallness condition
is imposed on C, then FunpC, Dq will be a big category, cf. Remark 2.8.)
Proof. Verifying the conditions of a category is routine. About the size issues note that the morphisms
± transformations) between two given objects (i.e., functors F and G) form a set, in fact a
(i.e., natural
subset of X PC HomD pF pX q, GpX qq (which is a set since each factor is one and the product is over a set
of objects).
If, in addition D is small, then ObjpFunpC, Dqq HomSet pObjpC q, ObjpDqq is a set, i.e., the functor
category is small.
21
22 CHAPTER 3. FUNCTOR CATEGORIES
Example 3.4. For a topological space X, consider the category OppX q of open subsets, ordered by in-
clusion. Then a presheaf on X (in the sense of any topology textbook) is a presheaf (in the above sense)
on OppX q. Concretely, a set F pU q for each U X open, and for each inclusion U V , a (so-called)
restriction map F pV q Ñ F pU q that is compatible with respect to further inclusions.
Fixing a “target” topological space T , a prototypical example is the representable presheaf
U ÞÑ HomToppU, T q.
For example, for T R, this is just the presheaf that assigns to any U the continuous, real-valued functions
on U .
Morphisms F Ñ G of presheaves are collections of maps F pU q Ñ GpU q that are compatible with the
restriction maps.
Copresheaves are similar, except that there are maps F pU q Ñ F pV q for U V . These maps are called
corestriction maps. Copresheaves are more rare than presheaves in practice. An example is the copresheaf
of compactly supported functions:
UÞ tf : U Ñ R, supppf q is compact u,
Ñ
with the corestriction maps (for U V ) given by extending a function by zero.
Let C be any small category, X P C and F : C op Ñ Set a presheaf on C. There is a map (of sets)
F pX q Ñ HomCp phX , F q
hX pY q HomC pY, X q / F pY q
y HomC y,X
p q F y pq
hX pZ q HomC pZ, X q / F pZ q
commutes since F is a functor(!) Thus we have indeed defined an element in HomCp phX , F q.)
Conversely, there is a map (of sets)
HomCp phX , F q Ñ F pX q
Lemma 3.5. The above two maps are inverse to each other, so we have an isomorphism.
3.2 Exercises
Exercise 3.1. Let Poly CRing be the full subcategory consisting of the polynomial rings Zrt1 , . . . , tn s.
Show that the Yoneda embedding restricts to an equivalence of categories
CRing Ñ Fun1 pPolyop , Setq.
At the right, Fun1 denotes the full subcategory of FunpPolyop , Setq consisting of functors preserve finite
products (i.e., regarded as a contravariant functor coproducts in Poly are mapped to products in Set).
Exercise 3.2. Prove Lemma 3.5. Also show that the isomorphism is functorial in F and in X, in the
sense that there is an isomorphism of functors
ev : C op C
p Ñ Set, pX, F q ÞÑ F pX q
and
C op C
p Ñ
y op id pop Cp
C Ñ
HomCp
Set.
Exercise 3.3. In the interplay of algebraic and analytic geometry, there is a functor
SchftC Ñ An
between the category of finite type schemes over Spec C and analytic spaces. See, for example, [Neeman:Algebrai
Describe this functor in terms of its restriction to affine schemes.
pCRingftCqop Ñ An in terms of its restriction to PolyC.
Describe the functor AffSchft
C
Exercise 3.4. Let C be a small category and D be a category. Let F, G P FunpC, Dq. Show that a natural
isomorphism (Definition 2.26) α : F ñ G is the same thing as an isomorphism F G in the category
FunpC, Dq.
Exercise 3.5. Let P : Setop Ñ Set be the power set functor. Describe EndSy et pP q explicitly.
A classical lemma in topology says that a pair of continuous functions taking values in some topological
space X
f : p8, 0s Ñ X, f : r0, 8q Ñ X
such that f p0q f p0q gives rise to a unique function
f : p8, 8q Ñ X
whose restrictions are f and f . In the same vein, given say a field k and two commutative k-algebras A
and B, a ring homomorphism
f : A bk B Ñ C
into another commutative ring C is the same as a pair of ring homomorphisms
a : A Ñ C, b : B ÑC
whose composition with the maps k Ñ A and k Ñ B agrees. In both cases, we see that a map out of a
given object (p8, 8q, resp. A bk B) into any other object in the category in question consists of maps
out of certain other objects that are compatible. Both notions are pushouts, which in turn is a special
case of the concept of a colimit. These, and the corresponding dual notion, limits, are introduced in this
chapter.
It is customary, in view of the examples below, to denote initial objects by 0 P C and terminal objects
by 1 P C.
25
26 CHAPTER 4. LIMITS AND COLIMITS
Lemma 4.3. Initial and terminal objects are unique up to unique isomorphism. That is: if X and Y
PC
are both initial (or both terminal) objects, then there is a unique isomorphism X Ñ Y .
Proof. Since X and Y are initial, there are unique maps f and g as in the following diagram:
f
X / Y
idY
g
idX f
X / Y.
Since X (resp. Y ) is initial both parts commute, i.e., g f idX and f g idY . We conclude that X is
uniquely isomorphic to Y . For terminal objects, apply the argument to C op .
While initial (and terminal) objects are unique (up to unique isomorphism) if they exist, there is no
a priori reason for them to exist in a category. As a “stupid” example, the full subcategory Set¥2 of all
sets that have at least 2 elements has neither an initial nor a terminal object(!) . A more meaningful
counterexample is the category of fields (Exercise 4.1).
Definition 4.6. Given a category J, the left cone J is defined as the category whose objects are
ObjpJ q tu \ ObjpJ q,
i.e., we add a new object. Moreover, this object is turned into an initial object:
HomJ p, q HomJ p, j q : tu
for each j P J. The morphisms in J itself are untouched, i.e., HomJ pi, j q : HomJ pi, j q for i, j P J.
Finally, HomJ pj, q : H. The identity and composition laws are the obvious ones, noting that we have
no choice how to compose morphisms out of (there is only one such morphism), nor into (there are no
such morphisms).
Definition 4.7. Let D : J Ñ C be a diagram (if we speak of diagrams by definition this includes the
assumption that J is a small category). The category of cones of D, denoted ConepDq is defined as the
(non-full) subcategory of the category of functors
FunpJ , C q
consisting of those objects (i.e., functors), whose restriction to J J is the given diagram D and of those
morphisms (i.e., natural transformations), whose restriction to J is the identity of D.
4.3. LIMITS 27
~ Dα
Di / Dj
commutes. A morphism between such a cone, and another similar one (with X 1 , fi1 etc.) is a map X Ñ X1
such that the diagrams
X / X1
fi
~ fi1
Di
commute for all i P J.
Example 4.8. We further demystify this with some concrete examples:
J D : J Ñ C ObjpConepDqq
t0u D0 P C X Ñ D0 (i.e., an object X and a morphism to the given D0 )
t0 1u D0 Ñ D1 X , i.e., an object X, two maps f0 , f1 such
f0 f1
~
D0 / D1
that the diagram commutes
t0u \ t1u pD0, D1q X P C, f0 : X Ñ D0 , f1 : X Ñ D1 , i.e., an object X, two
maps f0 , f1 with no condition on them.
t0 Ñ 1u ÑD Ña D0 Ñf D1, i.e., an object X, a morphism a such that
g g
D0 1 X
f
f a g a.
The morphisms in ConepDq are the expected ones. For example, for D0 Ñ D1 a morphism between two
g
f
cones
HomConepDq pX Ña D0 Ñf D1, Y Ñb D0 Ñf D1q
g g
4.3 Limits
Definition 4.9. Let D : J Ñ C be a functor. A cone over D, i.e., an object in ConepDq is called a limit
of D if it is a terminal object of ConepDq.
limpD0 Ñ D q : limpD : J Ñ C q,
g
f
1
where D is the functor t0 Ñ 1u Ñ C mapping to the previously displayed objects and morphisms in C.
Example 4.12. We revisit the examples above:
28 CHAPTER 4. LIMITS AND COLIMITS
For J t0u Ñ C, a limit is a terminal object in the category whose objects are maps X Ñ D0 and
D
whose morphisms are the obvious commutative triangles. This category contains, in particular, the identity
morphism D0 Ñ0 D0 . This object is terminal: given any X Ñ
idD f0
D0 , there is a unique dotted map making
the triangle commute:
f0
X / D0 .
f0
idD0
D0
Thus a limit for J is just the given object D0 (together with the only possible map as part of the cone,
namely the identity). We observe that 0 is the initial object of J, so this somewhat boring result is a
special case of a more general phenomenon considered in Exercise 4.3.
This exercise shows that the limit of a diagram D0 Ñ D1 (of shape 0 1) in any category is just the
object D0 together with the obvious maps, namely the identity idD0 and the given map to D1 .
Definition 4.13. A limit of a diagram D : J t0u \ t1u Ñ C is called a binary product or just product.
If it exists, it is also denoted as D0 D1 (given that such a diagram is nothing but a pair of objects D0
and D1 P C).
Concretely, a product of such a diagram is an object X equipped with two maps X Ñ D0 , X Ñ D1 such
that for any other object Y coming with two maps Y Ñ D0 , Y Ñ D1 there is a unique map Y Ñ X making
the obvious diagrams commute. To say more about this, we need to look at some specific categories:
Example 4.14. For C Set, the product is just the usual product of sets: D0 D1 tpd0 , d1 q|di P Di u:
it comes with two projections pi : D0 D1 Ñ Di , and given any other set Y with two maps fi : Y Ñ Di ,
there is a unique map
f : Y Ñ D0 D1 , y ÞÑ pf0 py q, f1 py qq
such that pi f fi .
For C Top, the product D0 D1 is the set-theoretical product, equipped with the product topology.
Indeed, this topology on D0 D1 is such that the two projections D0 D1 Ñ Di are continuous, and such
that for any two continuous maps fi : Y Ñ Di (from any topological space Y ), the resulting map f as
above is again continuous. The (easy) proof of this fact is in any topology textbook.
Example 4.15. In the same vein, for C Vectk , the product is the usual product of vector spaces. We
will understand the observation that the product in these two categories is “just” the product in Set
equipped with some extra structure more fully once we see that the forgetful functor Vectk Ñ Set does
not come alone, but has a so-called left adjoint (see Example 5.3) which automatically forces the forgetful
functor to preserve products (see Lemma 5.7).
Example 4.16. In the category of fields Fieldsp CRingq, there is no product K L if the two fields have
different characteristic, since there are no maps between fields of different characteristic. One can also
show (easily) that there is no product even of the form K K if K admits a non-identity automorphism.
By contrast, the category Ring (or also CRing) does have products, given by the set-theoretic product
together with the component-wise addition and multiplication.
Product of vector spaces exist for more than two factors. They are special cases of the following:
Definition 4.17. Let I be a set, regarded as a category in which we only have identity morphisms (this
± called a discrete category). A limit of a functor D : I Ñ C is called a product. It is also denoted as
is
iPI Di , using that such a functor D is just a collection of objects Di P C (for each i P I).
Note that an empty product (the case I H) is just an initial object. All we said so far about
Set, Mon, ModR , Top, CRing, Ring (existence and description of binary products) extends to arbitrary
products (indexed by sets) without any change.
4.3. LIMITS 29
±
It is useful to picture these notions: a product is an object i Di with maps pi such that for any other
object T mapping to all the Di there is a unique dotted map making everything commutative, like so:
± D!
i Di o T
pi
pj
| v " ~
Di t Dj Dk .( . .
The following little lemma will be used later in the construction of adjoint functors (Theorem 5.19).
Lemma 4.20. Suppose we have an equalizer
eqpX Ñg Y q
f
E
in a category (i.e., assume the equalizer exists). Then the natural map E Ñ X is a monomorphism.
Proof. We have
HompT, E q tt P HompT, X q, f t gtu HompT, X q.
/
T /A
B / C
is called cartesian if the natural map T Ñ A C B : limpA Ñ C Ð B q is an isomorphism.
Example 4.22. In Set, the fiber product of a diagram A Ñ C Ð B is the set tpa, bq P A B, f paq g pbqu.
f g
If a category C has fiber products, then a map f : X Ñ Y is a monomorphism iff the natural map ∆ is
an isomorphism. This follows directly(!) from the definition of monomorphisms and the universal property
of the fiber product.
X
∆
$
X Y X / X
f
f
X / Y.
30 CHAPTER 4. LIMITS AND COLIMITS
4.4 Colimits
Definition 4.23. A colimit of a diagram D : J Ñ C is, by definition, a limit of the resulting diagram
Dop : J op Ñ C op .
A coproduct is a colimit of a²diagram D : J Ñ C where J is a discrete category (has only identity
morphisms). It is then denoted j PJ Dj .
A coequalizer is a colimit of a diagram D : t0 Ñ
1u Ñ C.
A pushout is the dual notion for a pullback, i.e., a colimit of a diagram of shape
/
.
Thus, a colimit is just a special case of a limit (and vice versa). However, since for many specific
categories C, one does not have a handy description of C op , it is in practice quite useful to understand
this concept independently from limits, so we now unwind these notions.
Let J be a discrete small category and²D : J Ñ C a functor. I.e., just a collection of objects Dj , for
each j P J (which is a set). A coproduct j Dj is then a product in the opposite category C op . Thus, it is
²
an object i Di with maps pi such that for any other object T mapping from all the Di there is a unique
dotted map making everything commutative, like so:
² D!
D 46/ > TO
< i O ib h
pi
pj
Di Dj Dk ...
Again, coproducts and other colimits need not exist. If a colimit for a given diagram D : J Ñ C does
exist, it is unique up to unique isomorphism.
Example 4.24. ² In Set, arbitrary (small) coproducts exist. ² They are given by the disjoiunt union (whence
the notation i ). The disjoint union of topological spaces Xi (in which U is open iff U X Xi is open in
Xi for each i) is the coproduct of topological spaces.
In Mon and Grp, coproducts exist as well. The adjoint functor theorem (see Theorem 5.19 and its
corollaries) will construct coproducts in Grp for free. That said, let us only indicate that the coproduct
in Grp is given by the so-called free product (which really is not a product): given two groups G, H the
elements in G \ H are words with letters from both groups except the identity elements, modulo the
relations xx1 H for any two adjacent copies of x P G Y H and its inverse.
In Ab and Vectk , and more generally ModR (modules over a ring R), coproducts are given by direct
sums º
Vi tpvi q|vi P Vi , only finitely many vi 0u.
P
i I
In CRing, coproducts exist as well. The coproduct R \ S is commonly known as the tensor product
R bZ S. Indeed, by definition of the tensor product HompR b S, T q HompR, T q HompS, T q for any
commutative ring. More generally, the coproduct in CRingk (commutative k-algebras) is given by bk .
4.5. FUNCTORIALITY 31
Infinite coproducts exist as well, and are referred to as infinite tensor products in the literature (see
e.g., [Bourbaki:Algebra]). See also Exercise 4.7.
4.5 Functoriality
In the discussion of (co)limits, we have so far fixed a given diagram
D:J Ñ C.
We will now lift this restriction and discuss how (co)limits behave when D varies. Therefore, in this
section, we fix a small category J and a (not necessarily small) category C.
Definition 4.25. The diagonal functor
∆:C Ñ FunpJ, C q
sends an object XP C to the functor pJ Qqj ÞÑ X and any morphism j Ñ j 1 in J is mapped to idX .
Given D P FunpJ, C q, a cone on D is then nothing else but an object X P C and a map of diagrams
∆pX q Ñ D.
Lemma 4.26. Suppose that C has all J-shaped limits. Then the choice of a limit lim D for each diagram
D : J Ñ C assembles to a functor
lim : FunpJ, C q Ñ C.
Proof. In order to specify this functor, we need to define it on objects, which we already did, and on
morphisms. Let us be given a morphism between diagrams, i.e., a natural transformation α : D Ñ D1 (of
functors J Ñ C). (We write D Ñ D1 as opposed to D ñ D1 just to streamline the notation.) The limits
lim D and lim D1 give rise to the vertical maps in the following diagram
∆plim Dq / ∆plim D1 q
ι ι1
D α
/ D1 .
The composite α ι is a cone on the diagram D1 . As lim D1 is a terminal cone (being a limit), there is
a unique map of diagrams as depicted making the diagram commutative. We define this map to be the
image (under lim) of our map α.
By the unicity of such maps, it is clear that lim preserves composition and identity, so it indeed gives
a functor.
Example 4.27. Consider the category J t1 Ñ 0 Ð 2u. Recall that a limit of a diagram D : J Ñ Top
is the pullback of a pair of continuous maps
X1 X0 X2 / X1
f1
f2
X2 / X0
(a choice of a pullback is the subspace of the product tpx1 , x2 q P X1 X2 , f1 px1 q f2 px2 qu, equipped with
the subspace topology of the product topology). In this case the lemma says that given a collection of
continous maps Xi Ñ Xi1 (i 0, 1, 2) where X11 Ñ X01 Ð X21 is another similar diagram such that the
obvious squares commute), there is a unique continuous map
X1 X0 X2 Ñ X11 X 1 X21 0
V ÑW
f
is the subspace tv P V |f pv q g pv qu (with the obvious inclusion into V ), and this is also the equalizer of
the underlying diagram of sets. Similarly, the underlying set of a product of vector spaces is the product
of the underlying sets.
Lemma 4.30. Let C be a category and X P C arbitrary. Then the corepresenting functor
hX : C Ñ Set, Y ÞÑ HomC pX, Y q
preserves limits. Written colloquially:
HomC pX, lim Yi q lim HomC pX, Yi q.
Likewise, the representing functor
hX : C op Ñ Set
preserves limits. Again, written colloquially (and using that limits in C op are colimits in C):
HomC pcolim Yi , X q lim HomC pYi , X q.
Proof. Let D : I Ñ C be a diagram whose limit lim D exists. A morphism X Ñ lim D is a collection of
compatible morphisms fi : X Ñ Dpiq for each i P I that are compatible. This is the same as an element
in lim HomC pX, Di q.
The dual statement follows since the representing functor hX,C : C op Ñ Set is the same as the corepre-
senting functor hX
C op : C
op
Ñ Set for X, regarded as an object in the opposite category.
Corollary 4.31. Representable functors C op Ñ Set (Definition 2.29) and corepresentable functors C Ñ
Set preserve limits.
We will establish a converse statement for this in the context of the adjoint functor theorem.
We suppose that all these products exist. If, moreover, the equalizer E of the above diagram exists, then
this equalizer is a limit of D.
±
Proof. For X P C, HomC pX, E q identifies with morphisms h : X Ñ k Dk such that f h g h.
Moreover, h is tantamount to a familiy of morphisms hk : X Ñ Dk . The equality f h gh is then
equivalent to pf hqα pghqα for each α : i Ñ j, so that pj h Dpαqpi h and then hj Dα hi . All in all, this
is a familiy of morphisms hk : X Ñ Dk such that hj Dα hi for all α. This is precisely the datum of a
cone over D. This shows that E is a limit for D.
Definition 4.33. A category is called complete (resp. cocomplete) if all diagrams D : J Ñ C (with
arbitrary small categories J) admit a limit (resp. colimit).
The proposition thus shows that a category is (co-)complete if (and obviously also only if) it has (co-
)equalizers and (co-)products. See also Exercise 4.7 for a statement further reducing (co-)products to finite
(co-)products and cofiltered limits (resp. filtered colimits).
The categories Set, Mon, Grp, Ab, ModR , Top, Ring and CRing are all complete and cocomplete. The
fact that both completeness and cocompleteness hold parallely is not a coincidence: we will show – as a
consequence of the adjoint functor theorem) – that, under a mild additional set-theoretic condition (known
as accessibility) a category is complete iff it is cocomplete.
The existence of (co)limits is passed on to the category of functors as follows:
Lemma 4.34. Let J, C be small categories and D be a category. Suppose that D has all limits (resp. col-
imits) of shape J. Then the functor category FunpC, Dq also has all limits (resp. colimits) of shape J.
Moreover, these (co)limits are computed objectwise, i.e., for each X P C the evaluation-at-X-functor
evX : FunpC, Dq Ñ D, F ÞÑ F pX q
preserves (co)limits. Written more colloquially, the following natural maps are isomorphisms:
F pX q : J Ñ FunpC, Dq Ñ D, j ÞÑ Fj ÞÑ Fj pX q,
ev
X
(i.e., evX is the evaluation at the object X). has a limit by assumption on D. Choose such a limit and
define E pX qpP Dq to be that chosen limit. The limit is functorial in X by Lemma 4.26, so any map X Ñ X 1
in C gives rise to a unique map E pX q Ñ E pX 1 q that is compatible with the given maps Fj pX q Ñ Fj pX 1 q
for all j P J. (More formally, a morphism X Ñ X 1 yields a natural transformation F pX q Ñ F pX 1 q of
diagrams J Ñ D. Then apply Lemma 4.26). By unicity, E is then necessarily a functor.
One checks(!) by unwinding the definitions that E is indeed a limit.
C Ñ Cp
preserves all limits, but does not usually preserve colimits.
34 CHAPTER 4. LIMITS AND COLIMITS
Ñ
J is finite) has a cocone. This is equivalent to the following three conditions (these amount to the cases
J H, J t0, 1u and J t0 1u).
C H,
P C, there is an object Z P C together with morphisms X Ñ Z Ð Y .
for any two objects X, Y
for any two morphisms X Ñ Y in C, there is an object Z and a morphism h : Y Ñ Z such that
f
g
hf hg:
X Ñ Y Ñ Z.
f h
g
Remark 4.38. Note the datum of h in the last condition resembles the situation with a coequalizer.
However, the condition here is weaker: the cocone is not required to be initial.
If C happens to be (the category associated to) a poset, then the third condition is vacuous since
necessarily f g. A (category associated to a) poset P is also called directed if it is filtered.
Equivalently P H and for any x, y P P there needs to be a z P P with x ¤ z, y ¤ z.
Definition 4.39. A diagram D : I Ñ C in a category C is a filtered diagram (resp. directed diagram) if I
is filtered (resp. if I is a directed poset). A filtered colimit is the colimit of a filtered diagram D : I Ñ C.
To emphasize the fact that I is directed, many authors denote directed colimits by
ÝÑ D
lim or also as Ýlim
Ñ Xi
and refer to such colimits as inductive limits. We will avoid this terminology to avoid confusion of such
special colimits with limits.
As usual, the condition on the opposite categories or diagrams is denoted with a “co”: a cofiltered
diagram D : I Ñ C is one where I is a cofiltered category, i.e., I op is filtered etc.
A codirected limit is, in older literature, also known as a projective limit, and denoted
ÐÝ D
lim or also as Ð Ý Xi
lim
Example 4.40. The natural numbers N are a directed poset. Diagrams N Ñ C can be depicted as
X0 Ñ X1 Ñ X 2 Ñ . . . .
This is an example of a directed diagram.
Dually, diagrams Nop Ñ C can be depicted as
. . . X2 Ñ X1 Ñ X 0 .
This is a codirected diagram.
More generally, any preordered set pA, ¤q in which any finite subset (including the empty set) has an
upper bound, gives a directed poset.
4.8. FILTERED COLIMITS AND COMPACT OBJECTS 35
The category Idem is the category with one object , and one non-identity morphism e : Ñ
satisfying
e e e.
This category is an example of a filtered, but non-directed category.
Lemma 4.41. Let D : J Ñ Set be a filtered diagram. Then the colimit of D exists, and it is given by
º
Di { ,
i J P
where is the equivalence relation xipP Diq xj pP Dj q if and only if there is some k P J and maps
i Ñ k Ð j such that Dpαqpxi q Dpβ qpxj qpP Dk q.
α β
Informally, two elements in the disjoint union of the sets Di are identified if and only if they agree
“eventually” in some Dk for “large enough” k.
Proof. We first check that is an equivalence relation. It is clearly reflexive and symmetric. For transi-
tivity, let x1 P Di1 , x2 P Di2 , x3 P Di3 such that x1 x2 , x2 x3 . Thus there are objects i4 and i5 and
maps as indicated in the diagram
i1 i2 i3 x1 <x_2 <x3
~ ~
i12 i23 x12 <x23
~
i, x.
As J is filtered, the finite diagram consisting of i1 , i2 , i3 , i12 , i23 has a cocone, denoted i. The image of x12
and x23 in Di²agree since they both are the image of x2 . This shows x1 x3 .
Let C : Di { as in the claim. We have natural maps si : Di Ñ C which we denote by x ÞÑ rxs.
These clearly exhibit C as a cocone. Suppose given another cocone pti : Di Ñ M q on our diagram D.
Clearly there is at most one map t : C Ñ M such that t si ti , since the Di map (jointly) surjective to
C. To check the existence of such a map, define
Ñ M, tprxsq : tipxq.
t:C
Recall from Lemma 4.30 that corepresentable functors hX HomC pX, q preserve limits (in C).
Whether or not corepresentable functors preserve colimits depends very much on the category C, on
the object X, and on the type of colimits allowed. We now discuss the most important class of colimits
that corepresentable functors may preserve. A variant of this appears in Exercise 4.14.
Definition 4.42. Let C be a category that has all filtered colimits. An object X P C is called compact or
finitely presentable if the functor hX : HomC pX, q preserves filtered colimits. I.e., for any filtered diagram
D : I Ñ C, the natural map
is a bijection.
The colimit at the left is a colimit in Set, whereas the one in the right is in C. The surjectivity of the
map means that given a map (in C)
f : X Ñ colim Di
36 CHAPTER 4. LIMITS AND COLIMITS
there is some j P J and a map f 1 such that the following diagram commutes:
: Dj
f1
f
X / colim Di .
Thus X is “small enough” so that any map out of X factors over a finite piece of the colimit. The following
examples corroborate the idea that compactness is really a finiteness condition.
Example 4.43. A set X P Set is compact iff its cardinality is finite. First of all, a singleton
² tu is
compact since Homptu, Di q Di . More generally, the compactness of any finite set X finite tu
then follows either from direct inspection(!) or, alternatively from Corollary 4.47 below.
Conversely, let X be a compact object in Set. We observe
¤
X U.
U X finite
This union is in fact a filtered colimit (even directed): for any finite family of finite subsets Ui X
(i runs through a finite index set), the union i Ui is again a finite subset of X). Using the bijection
colim HomSet pX, U q HomSet pX, colim U q HomSet pX, X q Q idX ,
and the description of filtered colimits in Lemma 4.41, we see that there is some finite subset U X
and a map f : X Ñ U such that its composition with the inclusion U X equals idX . This forces
U X and in particular that X is finite.
Let X be a topological space. Then X is compact in the sense of topology (i.e., every open covering
of X has a finite subcover) iff X is compact in the poset OpenpX q consisting of the open subsets of
X, ordered by inclusion.
To see this, note first that to a set Ui , i P I of open subsets we can assign a filtered diagram
K : tfinite subsets of I u Ñ OpenpX q,
which sends any finite subset J I to iPJ Ui . This diagram is filtered and its colimit is iPI Ui (!) .
Now if X P OpenpX q is a compact object, and X iPI Ui is an open covering, then idXis a map
X Ñ colim K, where K is as above. By compactness it factors over some K pJ q, i.e., over iPJ Ui for
a finite J. Thus X is compact in the sense of topology.
Conversely, assume X is compact in the sense of topology and let U : I Ñ OpenpX q, i ÞÑ Ui be any
filtered diagram. We have to show
HomOpenpX q pX, colim U q colimi HomOpenpX q pX, Ui q.
The left hand side is empty iff colim U iPI Ui X, otherwise it is a singleton. In the former
case, all the Ui X, so that the Hom-sets in the right hand colimit are all empty, hence so is their
In the latter case there is, by compactness of X, a finite subset J ObjpI q such that
colimit.
X iPJ U i . Since the diagram U is filtered, there is some cocone c of J (in the filtered category I).
Then Uc iPJ Ui X, and we are done.
As a bit of a terminological mismatch, let us point out that an object X P Top is compact (as in
Definition 4.42) iff it is a discrete topological space associated to a finite set (Exercise 4.11).
The one-dimensional Banach space C P Ban¤1 is not compact. Using l1 ²iPN C colimp²ni1 Cq
gives a counter-example to the compactness condition. First observe
HomBan¤1 pC, V q B1 pV q.
4.9. COMMUTING (CO)LIMITS WITH (CO)LIMITS 37
Proof. This can be shown by reducing to the case C Set via the Yoneda lemma (Lemma 3.6) and direct
inspection in that case, such as done in [Rie17, Theorem 3.8.1].
We will be able to prove this more conveniently after introduce a little more terminology by the following
steps, which are relevant in their own right:
the limit functor is a partial right adjoint to the diagonal functor ∆ : C Ñ FunpI, C q (Lemma 5.10),
trivially, the diagram involving the diagonal functors
/ FunpI, C q
∆
C
∆
∆ ∆
(
FunpJ, C q ∆ / FunpI J, C q
commute,
therefore, their (partial) right adjoints commute up to isomorphism (Lemma 5.11).
While the above proof is not a one-line-proof, it is still “trivial” in the sense that it does not use any
assumptions on I, J and F (other than the statement to make sense in the first place). A sharper question
is the compatibility of colimits with limits (or, dually, limits with colimits). Let us be given a diagram
F :P J Ñ C.
38 CHAPTER 4. LIMITS AND COLIMITS
Assuming that all limits and colimits in the following line exist, we have a canonical map
κ : colimj lim F pp, j q Ñ lim colimj F pp, j q.
p p
(two objects, three non-identity morphisms and f σ g σ id0.) See, e.g., [AdamekRosickyVitale:What
for an exposition of sifted categories and sifted colimits.
We now show that finite colimits of compact objects are again compact.
Corollary 4.47. Let C be a category with all colimits. Let D : J Ñ C be a finite diagram (i.e., J is a
finite category, Definition 4.36) such that Dpj q is a compact object for each object j in J. Then colim D
is a compact object.
Proof. Let T : I Ñ C be a filtered diagram. We have the following commutative diagram, in which the
isomorphisms hold as indicated. Thus the top horizontal map is an isomorphism, so that colimj Dj is
compact:
colimi Hompcolimj Dj , Ti q / Hompcolim Dj , colim Ti q
,Lemma 4.30
,Lemma 4.30 limj HompDj , colim Ti q
O
,Definition 4.42
colimi limj HompDj , Ti q,Proposition 4.45/ limj colimi HompDj , Ti q.
Example 4.48. Continuing our list of compact objects in various categories, let R be a ring. An object
M P ModR is compact iff it is finitely presented (in the usual sense of algebra, i.e., the cokernel of an
appropriate map Rn Ñ Rm with n, m 8). The proof proceeds along similar lines as above: R P ModR
is compact since
HomModR pR, q U
is the forgetful functor ModR Ñ Set, which does preserve filtered colimits(!) . We invoke Corollary 4.47
to see that finitely presented modules are compact.
Conversely, suppose M is compact. We have
M colimN M finitely generated N.
The indexing category consisting of finitely generated submodules of M is filtered since the sum N N 1 M
is finitely generated if N and N 1 are. Thus, idM factors over a finitely generated submodule N , making M
a direct summand of N . Thus M is finitely generated.
Then, for a finitely generated module M Rn {E, where E Rn is the submodule of relations. Again
we have E colimF E finitely generated and we obtain(!) M colimF Rn {F . Again idM factors over some
finitely presented module Rn {F , and hence M is itself finitely presented.
Definition 4.49. A functor K : I Ñ J between small categories I and J is called initial if for each functor
D : J Ñ C (with C being arbitrary), the natural map
lim D Ñ lim D K
is an isomorphism.
Dually, K is called final if K op : I op Ñ J op is initial. Equivalently, for each functor D : J Ñ C, the
natural map
colim D K Ñ colim D
is an isomorphism.
In order to exhibit a criterion that allows to check whether some given K is final, we need to introduce
some more terminology.
Definition 4.50. Let F : C Ñ D be a functor and X P D. The comma category
F {X
is the category whose objects are pairs pY, f q consisting of an object Y P C and a morphism (in D)
f : F pY q Ñ X. We define HomX {F ppY, f q, pY 1 , f 1 qq to be the set of morphisms y : Y Ñ Y 1 in C such that
the diagram
pq
F pY q F pY 1 q
F y
/
f1 f
" |
X
commutes. (The composition is the obvious one, coming from composing morphisms in C.)
Example 4.51. A dual variant of this is the comma category X {F whose objects are pairs pY, f q with
f : F pY q Ñ X (as opposed to X Ñ F pY q).
A special case is F idC . The categories X {idC (resp. idC {X) are commonly denoted X {C (resp. C {X)
and called the under-category (resp. over-category) of X in C.
Concrete examples include the following:
Given a commutative ring k, the category k {CRing is the category of k-algebras and k-algebra homo-
morphisms.
In algebraic geometry, the category Sch{S, for a scheme S is the category of S-schemes.
The category tu{Top is the category of pointed topological spaces and base-point preserving maps.
Definition 4.52. For a small category C, the set of path components, denoted π0 C is defined as
ObjpC q{ ,
where is the equivalence relation generated by the relation 0 : X 0 Y iff there is a morphism X ÑY.
Concretely, X Y if there is a finite zig-zag of morphisms in C:
: T0 Ð T1 Ñ T2 Ð T3 . . . Tn Y.
X
A category is called connected if X Y for any two objects, i.e., π0 C is either empty or a singleton.
Example 4.53. If C has an initial or, alternatively, a final object, then π0 C tu.
The category Fields has π0 pFieldsq tp prime u \ t0u, since there a zig-zag of morphisms between
two fields precisely iff their characteristic is the same.
Proposition 4.54. Let K : I Ñ J be a functor. The following are equivalent:
4.10. FINAL FUNCTORS 41
(1) for each object j P J, the comma category K {j is non-empty and connected, i.e., π0pK {j q tu,
(2) K : I Ñ J is initial.
Example 4.55. This statement recovers Exercise 4.3: if J has an initial object e, then the inclusion
K : te u J
ÑC
is an initial functor, i.e., for any diagram D : J
lim D Dpeq.
Indeed, for each j P J, the under-category K {j has as objects maps e Ñ j. There is precisely one such
object, in particular the category is non-empty and connected.
Proof. (of Proposition 4.54) (1) ñ (2): Let D : J Ñ C be a functor. Restricting a cone over D to a cone
over D K defines a functor
ConepDq Ñ ConepD K q.
We will show this is an isomorphism of categories, so that in particular one has a terminal object iff the
other has one (i.e., lim D exists iff lim DK exists, and in that event they are the same).
Let us be given a cone X for the diagram D K. In order to construct X Ñ Dpj q for each j, we choose
some i P I and a map K piq Ñ j (which is possible since K {j is non-empty). We define a map X Ñ Dpj q
u
as the composite
X Ñ DK piq DÑpuq Dpiq.
For another choice pi1 , u1 q as in the diagram below, we the composite
pu q 1
X Ñ DK pi1q DÑ Dpiq
agrees with the previous map. By induction it suffices to consider two-step zig-zags as in the diagram:
i ù K piq ù DK
; E
piq .
u u
iO 1 u2 ! u2
#
K pO i2 q /
=j X / DK
; O
pi2q / Dj
;
u1 u1
i1 #
K pi1 q Y / DK pi1 q
(Note that in the right diagram, the left half commutes since X is a cone over F K.) One checks this is
indeed an inverse function for the objects in Cone D and ConepD K q (!) . This bijection on the level of
objects also extends to morphisms: given a map X Ñ Y fitting into a commutative diagram including the
dotted arrows above, it yields a morphism of cones over D by composition.
For the proof of the converse (2) ñ (1), we refer to [Riehl:Categorical].
Example 4.56. The category ∆ has as objects the sets rns : t0, 1, . . . , nu, and morphisms are given by
non-decreasing maps:
Hom∆ prns, rmsq tf : t0, 1, . . . , nu Ñ t0, 1, . . . , mu, f piq ¤ f pj q for all i ¤ j pP rnsqu.
For example, there are two maps r0s Ñ r1s (mapping to 0 and 1, respectively), and one map r1s Ñ r0s.
We can thus consider the (non-full) subcategory
ι : tr1s Ñ r0su Ñ ∆.
This functor is initial.(!) Therefore limits of diagrams
∆ Ñ C,
42 CHAPTER 4. LIMITS AND COLIMITS
can be computed by considering the (much smaller!) diagram consisting only of the two objects r0s and
r1s instead.
A sample application of this situation is as follows: let X be a topological space, and
§
U : Ui ÑX
P
i I
Since the inclusion tr1s Ñ r0su Ñ ∆ is initial, the limit of this infinite diagram can be computed as the
Ñ F pU
limit of
F pU q X U q.
This simplification is implicit in the definition of a sheaf , where one demands that the natural map
F pX q Ñ limpF pU q Ñ F pU X U qq
OpenpX q such
a sheaf on a topological space X is a ±
Ñ
is an isomorphism. (More precisely, presheaf F on±
that for any open covering V iPI Vi of an open subset, F pV q is a limit of iPI F pVi q i,j F pVi X Vj q,
where the two maps are restriction along Vi X Vj Vi and Vj , respectively.)
4.11 Exercises
Exercise 4.1. Let Fields CRing be the full subcategory of the category of commutative rings whose
objects are fields. Show this category has neither initial nor terminal objects.
Exercise 4.2. (1) Show that Fields has all filtered colimits. What are the compact objects in this cate-
gory?
(2) Fix a field k and consider Fieldsk{ , the category of field extensions of k. Recall that a field extension
k K is called finite iff dimk K 8. Express this as a compactness condition.
(3) Express the condition of being an algebraic extension k K in terms of appropriate filtered colimits
and an appropriate compactness condition. (Solving this requires some basic field theory.)
Exercise 4.3. Let J be a category with an initial object 0. Let D : J Ñ C be any diagram. Show that
D0 is a limit for D.
4.11. EXERCISES 43
Exercise 4.4. Let C be a category such that all equalizers and finite products exist. Show that all fiber
products exist in C. Hint: express a fiber product A B C in terms of an appropriate equalizers involving
appropriate products.
Exercise 4.5. Let C be a category and X P C an object. The over-category C{X is the category whose
objects are maps T Ñ X in C and whose morphisms are commutative triangles as expected. Dually, the
under-category CX { has as objects maps X Ñ T .
State and prove a necessary and sufficient condition for C{X (dually CX { ) to have products (resp.
coproducts).
Describe concretely coproducts in the category Top : Toptu{ of pointed topological spaces.
Exercise 4.6. Show that Zrts bZ Zrus Zrt, us is not the coproduct of Zrts and Zrus in the category
Ring of non-commutative (but associative and unital) rings.
Hint: contemplate the corepresenting functor hZrts (Example 2.14). What can you say a priori about
X \Y
h for two objects X, Y in any category?
Note: the category of rings does have all small colimits, but coproducts are less simple to describe; they
involve taking free associative rings.
Exercise 4.7. Let C be a category that has all filtered colimits and all finite coproducts. Show C has
arbitrary (small) coproducts.
Conclude that CRing has arbitrary (small) coproducts.
Exercise 4.8. An object X P C is called a zero object if it is both initial and terminal. Assume that C
has a zero object and
has finite coproducts and finite products
the natural map X \ Y Ñ X Y (from the coproduct to the product) of two arbitrary objects
X, Y P C is an isomorphism.
(1) Show that HomC pX, Y q is naturally an abelian monoid.
(2) C is called additive if it satisfies the above three conditions and if the abelian monoid HomC pX, Y q is
actually an abelian group.
Which of the categories Set, Mon, Ab, Vectk , Ban and Ban¤1 are additive?
Exercise 4.9. Let pVi qiPI be a (set-indexed) family of Banach spaces. Show that a coproduct in Ban¤1 is
given by º ¸
Vi tv pvi q|vi P Vi , |v |1 : |vi| 8u
(and the | |1-norm). Show that a product in Ban¤1 is given by
¹
Vi tv pvi q|vi P Vi , |v |8 : sup |vi | 8u
² ±
(and the | |8 -norm). In particular, l1 iPN C and l8 iPN C.
Also show that products and coproducts in Ban only exist if all but finitely many of the Vi are 0. (One
may reduce to the case Vi C for all i first.)
Exercise 4.10. Let G be a group and BG Ñ Vectk a functor, i.e., a vector space V with a G-action.
Compute the limit and the colimit of this functor explicitly.
Exercise 4.11. Show that X P Top is compact in the sense of Definition 4.42 iff it is finite and discrete.
Hint: for the nontrivial direction, consider the canonical injection X Ñ X \N colimn X \t0, 1, . . . , n
1u and put a (non-trivial) topology on the spaces X \ t0, 1, . . . , n 1u such that the colimit carries the
coarse topology.
44 CHAPTER 4. LIMITS AND COLIMITS
Exercise 4.12. Show that the categories CptHaus Top of compact Hausdorff spaces, respectively
all topological spaces, have all small limits and that the inclusion preserves them. (This requires using
some non-trivial theorem from point-set topology.)
Discuss the pushout of the diagram (with the natural maps)
tr0s Ñ
Ð
r1suop
are sifted, but not filtered. (A bare-hands proof of this assertion is tedious.) Colimits indexed by this
latter category are known as reflexive coequalizers.
4.11. EXERCISES 45
Exercise 4.19. Let R be a commutative ring and M an R-module. Let S R be a submonoid with
respect to the multiplication (also known as a multiplicatively closed nonempty subset). In this context
there is the notion of localization of R-modules [StacksProject].
(1) Show that the localization M rS 1 s is a filtered colimit of an appropriate diagram
Ñ ModR
D:J
that has the property that Dpj q M for each object j P D. (Stated slightly colloquially: what are
the transition maps so that M rS 1 s colimpM Ñ M Ñ M . . . ?)
? ?
(3) Show by an example that the localization functor M ÞÑ M rS 1s does not preserve infinite products.
Exercise 4.20. Let
A / B / C
A1 / B1 / C1
be a commutative diagram in some category. Prove:
(1) If both squares and are cartesian, then so is the total square (consisting of A, C, A1 and C 1 ).
(2) If the total square and are cartesian then so is .
Exercise 4.21. Describe the coequalizer of a diagram of sets,
R 1 X,
f
Ñ f
0ÑAÑB Ñg C Ñ 0
f
is called a short exact sequence of abelian groups, if (by definition), g is surjective, ker g im f and f is
injective.
46 CHAPTER 4. LIMITS AND COLIMITS
Show that f and g fit into a short exact sequence iff the square
f
A / B
g
0 / C
is both cartesian and cocartesian, i.e., cartesian in the opposite category pAbqop .
Exercise 4.25. Let I be the christmas-tree-category: its objects are the christmas tree balls located at the
endpoints of the branches, and there are morphisms as depicted (and also composites of these morphisms,
not depicted):
/ o
/ o
Exercise 4.26. Let ∆ be as in Example 4.56 and let ∆n : ∆op Ñ Set be the functor represented by rns.
Show that for any m, n 0 the functor
Exercise 4.27. A category C is called pointed if it has a zero object (Exercise 4.8), denoted 0 P C. A zero
morphism is a morphism f : X Ñ Y that factors over some zero object (equivalently, by Lemma 4.3, over
any zero object). A zero morphism is also denoted by 0. In a pointed category C, a kernel (resp. cokernel )
is a limit (resp. colimit) of a diagram
X Ñ Y.
f
Adjunctions
It was already mentioned that functors are what connects different categories. Many times, we don’t like
one way tickets, but want to come back at some point. Given a functor
F :C Ñ D,
(how) can we go back from D to C? In complete generality, we cannot expect this. In special cases, namely
if F is (part of) an equivalence of categories, we do have an inverse functor. Adjunctions are in between
the void and the perfect: we will have two functors F : C Ñ D and G : D Ñ C that are closely related,
but (in general) stopping short of being an equivalence.
The situation is comparable to the situation with (continuous, linear) maps between Hilbert spaces:
given such a map (a.k.a. operator) f : H Ñ H 1 , an adjoint operator is a map g : H 1 Ñ H such that
xf pxq, yy xx, gpyqy.
In category theory, functions get replaced by functors and the inner product between vectors gets replaced
by Hom-sets between objects.
We will see in §5.1 that adjunctions are all over the place. We will understand that having an adjoint
functor for F tells us a lot about the functor. Notably, we will establish a close bond between (co)limits
and adjoints.
Given the interest in establishing adjoint functors, we will prove an easy adjoint functor theorem (The-
orem 5.19), which constructs, for example, the Stone-Čech compactification functor
β : Top Ñ CptHaus.
We will then single out and study a particular class of adjunctions, so-called monadic adjunctions.
49
50 CHAPTER 5. ADJUNCTIONS
Remark 5.2. By definition of an isomorphism of functors, this means that for each X P C, Y P D, we
have an isomorphism of sets (i.e., a bijection)
ΨX,Y : HomD pLX, Y q Ñ HomC pX, RY q.
This isomorphism is functorial (a.k.a. natural) in X and Y in that for each morphism f : X Ñ X 1 and
g : Y Ñ Y 1 the following diagram commutes:
ÞÑghLpf q
HomD pLX 1 , Y q HomD pLX, Y 1 q
h
/
ΨX 1 ,Y ΨX,Y 1
ÞÑRpgqhf /
HomC pX 1 , RY q HomC pX, RY 1 q.
h
Adjunctions are everywhere, too numerous to name even a fraction! First of all, every equivalence of
Õ
categories
F :C D : F 1
is an adjunction. Indeed, HomC p, q Ñ HomD pF pq, F pqq is a bijection (with inverse given by applying
F 1 ), so that we obtain a bijection, functorial in X and Y :
HomD pF pX q, Y q HomC pF 1 pF pX qq, F 1 pY qq HomC pX, F 1 pY qq.
(Note that, by definition of an equivalence, there is a functorial isomorphism id Ñ F 1 F .) As a partial
converse, given an adjunction, one can construct an equivalence on certain subcategories, see Exercise 5.1.
Example 5.3. We consider the forgetful functor
U : Ab Ñ Set.
We show it admits a left adjoint, known as the free abelian group functor,
Zrs : Set Ñ Ab.
If this exists, it must satisfy
This is(!) satisfied if we set the free abelian group on a single generator to be Zrtus : Z. Furthermore,
for the free abelian group on any set S, we observe that
º
S tu.
P
s S
In view of Lemma 5.7 and Exercise 5.4, we have actually no choice (up to an isomorphism of functors)
in defining this left adjoint.
The functor U does not preserve coproducts (Z ` Z, which is the coproduct in Ab, is not bijective to
Z \ Z, the coproduct in sets). Hence U does not admit a right adjoint by Lemma 5.7.
The discussion above goes through without any changes if we replace Z by any ring R, giving rise to a
the free-forgetful adjunction
R rs
t
ModR 6 Set
U
Example 5.4. For a set X, we can consider the power set P pX q, as a poset ordered by inclusion, and
thus as a category (Example 2.9). Given a map (of sets) f : X Ñ Y , we then have an order-preserving
map, hence a functor
f 1 : P pY q Ñ P pX q, V ÞÑ f 1 pV q.
This functor has a left adjoint, known as the existential quantifier :
Df : P pX q Ñ P pY q, U ÞÑ f pU q ty P Y |Dx P f 1pyq, x P U u.
It also has a right adjoint, known as the all quantifier :
@f : P pX q Ñ P pY q : U ÞÑ ty P Y |@x P f 1pyq, x P U u.
Thus, we get a chain of adjunctions
Df % f 1 % @f .
For, say, the left adjunction we need to check
Df U V ðñ U f 1pV q.
“ñ”: for x P U , y : f pxq P Df U V , so x P f 1 pV q. “ð”: for y P Df U , there is x ÞÑ y, x P U f 1 pV q,
so y P V .
Example 5.5. There is a chain of adjunctions, where left adjoints are drawn on top of right adjoints: U
is the forgetful functor, D is the functor equipping a set with the discrete topology (any subset is open), C
puts the coarse topology on a set X (only H and X are open),
v D
Top h U / Set
C
i.e., any map of sets X Ñ U T is continuous with the discrete topology on X. The chain of adjoints can not
be prolonged: if C had a right adjoint, it would need to send coproducts to coproducts (by Lemma 5.7).
However, the coproduct in Top, C pS q \ C pS q does not have the coarse topology (it has 4 open subsets
±
instead). Similarly, if D had a left adjoint, it would preserve products, so that the product topology
on iPN t0, 1u would need to be discrete. This is however not the case. A remedy for this is offered by
Exercise 5.3.
52 CHAPTER 5. ADJUNCTIONS
Example 5.6. Let f : R Ñ S be a map of (not necessarily commutative, but associative and unital) rings.
As above, let ModS be the category of left S-modules with S-linear maps as morphisms. The forgetful
functor U (sending an S-module M to the same abelian group M , but now regarded as an R-module via
f ) has two adjoints:
S bR
t
ModS j U / ModR
HomR S, p q
Here HomR pS, q is the set of homomorphisms of left R-modules, regarded as a left S-module via the right
action of S on itself.
Lpcolim Df i qj
D! /42 T
8 O < O
p q
p q
L pi
L pj
LpDi q
p q LpDj q LpDk q
/ ...
L α
We need to show there exists a unique dotted map so that the diagram still commutes.
We now apply the adjunction isomorphism, crucially (!) also using that this isomorphism is functorial
to see that such a diagram as above is equivalent to
D! p q
colim
; O D
d ii 35/ R
< O
T
pi
pj
Di / Dj Dk ...
α
In this diagram a dotted map exists uniquely as stated. Again by adjunction, this is equivalent to the
existence and unicity of the dotted map in the previous diagram. This shows that Lpcolim Di q is a colimit
for L D.
Example 5.8. For a map f : X Ñ Y of sets, the preimage functor f 1 : P pY q Ñ P pX q between the
power sets preserves unions and intersections. Indeed, these are colimits and limits, respectively (!) , so
the claim follows from f 1 having a left and a right adjoint.
Example 5.9. As in Example 5.6, let f : R Ñ S be a ring homomorphism. The functor S bR preserves
all colimits. In particular, it preserves cokernels, i.e., coequalizers of the form
pM Ñ0 N q.
f
5.3. THE TRIANGLE IDENTITIES 53
Dually, HomR pS, q preserves limits and, in particular, kernels. Indeed, they are left (resp. right) adjoint
to the forgetful functor U .
Lemma 5.10. Let J be a small category and C be a category with all J-shaped limits (resp. J-shaped
colimits). Then the limit (res. colimit) functor constructed in Lemma 4.26 is a right (resp. left) adjoint of
the diagonal functor ∆ : C Ñ FunpJ, C q (Definition 4.25).
Proof. For X P C and a diagram D : J Ñ C, a bijection
HomFunpJ,C q p∆pX q, Dq Ñ HomC pX, lim Dq
is obtained by noticing that a map ∆pX q Ñ D is nothing but a cone on D, with tipping point X. This is
the same as a map X Ñ lim D. One checks(!) that this bijection is functorial in X and D.
Lemma 5.11. Let
C Ñ
F
DÑE
G
Example 5.12. Dually, the same also applies for the composite of left adjoints. For example, let R Ñ
S Ñ T be two ring homomorphisms. The composite of the forgetful functors ModT Ñ ModS Ñ ModR is
again the forgetful functor. Thus, passing to left adjoints, we obtain functorial isomorphisms:
T bS S bR b T bR .
Now we can (conveniently) prove the categorical Fubini theorem, stated in Lemma 4.44.
Proof. We want to show that for F : I J Ñ C, the object X : limi limj F pi, j q is, provided that
all these limits exist, a limit of F . We use the Yoneda embedding y : C Ñ C, p which creates (i.e.,
preserves and detects) limits (Exercise 4.16). Thus X is a limit for F iff y pX q is a limit for y F and
y pX q limi limj y pF pi, j qq. We can therefore replace our functor F by I J Ñ C Ñ C.
y p p
The category C
has all (small) limits (Corollary 4.35), so we may assume C has all limits.
As outlined in the proof sketch of Lemma 4.44, the diagram involving the diagonal functors
/ FunpI, C q
∆
C
∆
∆ ∆
(
FunpJ, C q / FunpI J, ∆q
∆
ÕD:R
Definition 5.13. Given an adjunction
L:C
we call a morphism f : X Ñ RpY q (in C) and a morphism g : LpX q Ñ Y transposes if they correspond to
each other under the bijection
ΨX,Y : HomC pLpX q, Y q HomD pX, RpY qq.
54 CHAPTER 5. ADJUNCTIONS
ÕD:R
Lemma 5.14. Let
L:C
be two functors.
Then there is an adjunction between L and R (i.e., a functorial isomorphism Ψ as in Definition 5.1
above) if and only if there is a pair of natural transformations
The transformation η is then called the unit and ϵ is called the counit of the adjunction.
Proof. “ñ”: for an object X P C, ηX : X Ñ RLX is defined to be the transpose of idLpX q : LpX q Ñ LpX q,
and ϵY : LRY Ñ Y the transpose of idRY . The statement that η is natural amounts to the commutativity
of the left hand square below, which is (using the functoriality of Ψ!), equivalent to the commutativity of
the right hand square, which is obvious:
ηX idLX
X / RLX LX / LX
f RLf Lf Lf
ηX 1 idLX 1
X1 / RLX 1 LX 1 / LX 1 .
The left triangle identity is equivalent to the commutativity of the left square below, which again by
adjunction is equivalent to the commutativity of the right square below, which is obvious:
idLX ηX
LX / LX X / RLX
LηX idLX ηX idRLX
ϵLX idRLX
LRLX / LX RLX / RLX.
“ð”: Given ϵ and η, we define two maps
R pf q
HomD pLX, Y q Ñ HomC pX, RY q, pf : LX Ñ Y q ÞÑ pX Ñ RLX Ñ RY q,
η X
and conversely
Using the triangle identities, one checks(!) that these two maps are indeed mutual inverses.
P :C Ñ tu
5.4. CONSTRUCTING ADJOINT FUNCTORS VIA THE SOLUTION SET CONDITION 55
sending all objects (and morphisms) in some category C to (and id ). A left adjoint L of this functor, if
it exists, is an object X : Lpq P C such that for all Y P C:
In other words, X needs to be an initial object. The statement to come can therefore be regarded as
asserting the existence of a left adjoint to some (very) special functors.
Definition 5.15. A set tXi uiPI of objects in a category C is called weakly initial if for each Y P C there
is some i P I and a map Xi Ñ Y .
The point in this definition is that we have a set of such objects. If we were to allow a class at this
point, the definition would be vacuous: in this case we could take the class of all objects in C, and the
identity morphisms.
Proposition 5.16. Let C be a category that is complete, i.e., has all small limits. Then C has an initial
object iff it satisfies the following condition, known as the solution set condition: there is a weakly initial
set tXi uiPI .
Proof. If C has an initial object 1, then the solution set condition is satisfied by definition of an initial
object.
Conversely, assume we± have a weakly initial set tXi uiPI . Since C has all small (i.e., set-indexed) limits,
±
we can consider W : iPI Xi . For each Y P C there is at least one morphism W Ñ Y , namely
W Xi Ñ Xi Ñ Y . We can further consider
¹
E : eqpW Ñ W q Ñ W,
i
P
f EndC W p q
where the projection to the copy corresponding to f are the maps idW and f , respectively. We claim that
E is an initial object. For each Y P C there is a map E Ñ W Ñ Y .
Suppose there are two maps f, g : E Ñ Y . We will show f g which shows that E is initial. Consider
the diagram:
U : eq pf, gqι f,g
/ E / Y
O
s i
E
i / W
iιs / W.
/
idW
By the above property of W , there is some morphism s : W Ñ U as indicated. We have two endomorphisms
of W , the composite i ι s, and idW . By construction of E, pi ι sqi idW i i idE . Being an
equalizer map, i is a monomorphism (Lemma 4.20), so that
ι s i idE ,
i.e., the part in the diagram containing thge curved “” arrow and ιsi commutes. Thus ι has a right inverse.
Again, ι being an equalizer is a monomorphism. Having a right inverse means it is an isomorphism so that
f g.
We intend to upgrade this statement to the existence of more general left adjoints. Before stating that
adjoint functor theorem we show that it is enough to establish the value of a would-be left adjoint L on
individual objects.
Lemma 5.17. Let R : D Ñ C be a functor such that for each X P C the functor
D Ñ Set, Z ÞÑ HomC pX, RpZ qq (5.18)
56 CHAPTER 5. ADJUNCTIONS
is corepresentable by some object LpX q. (I.e., there is a bijection, functorial in Z, HomD pLpX q, Z q
HomC pX, RpZ qq.) Then there is a unique functor
L:C ÑD
which is given on objects by X ÞÑ LpX q and such that the family of isomorphisms in (5.18) is also functorial
in X.
Proof. This lemma is very similar to Lemma 4.26 and can be proven as outlined in Exercise 5.11. Alter-
natively, one may use the Yoneda lemma in the guise of the equivalence
y:D
FunpD, Setqcorepr ,
Ñ
where at the right we have the full subcategory of the functor category consisting of corepresentable
functors (Lemma 3.6). Then define L to be the composite
ÞÑHomC pc,Rpqq y 1
C
c
ÝÑ FunpD, Setqcorepr Ñ D.
One checks this is a left adjoint to R.
Theorem 5.19. (Adjoint functor theorem via the solution set condition) Let R : D ÑC be a functor
that preserves limits. We assume:
(1) D is complete, i.e., has all limits.
(2) For each c P C, the comma category (Example 4.51) c{R has a weakly initial set of objects.
Then R has a left adjoint (i.e., is a right adjoint).
Remark 5.20. Condition (2) amounts to the following solution set condition: for each c P C there is a
(small) set I and a family of maps fi : c Ñ Rpdi q such that any arrow h : c Ñ Rpdq can be written as a
composite for some i and some map t : di Ñ d
Rpdi q
fi
c /
h
p q
R ti
!
Rpdq.
Roughly speaking, this means that the class of maps out of c into Rpdq, which is potentially a class of
morphisms, is actually “controlled” by a set of such morphisms.
Lemma 5.21. A functor R : D Ñ C admits a left adjoint iff the comma category c{R has an initial object
for each c P C.
Proof. “ð”: By Lemma 5.17, we have to show that for each c P C functor
c / Rpdq
pq
R δ
!
Rpd1 q.
A map δ : d Ñ d1 is sent to the diagonal composite. Conversely, a map c Ñ Rpd1 q is an object in the
comma category, so there is a (unique) map δ making this diagram commute. The resulting maps are
indeed inverse by the unicity.
“ñ” is left as an exercise.
Lemma 5.22. Suppose R : D Ñ C is a limit-preserving functor and D is complete. Then the comma
category c{R is complete for each c P C.
Proof. Let K : I Ñ c{R be a diagram, written as pdi , fi : c Ñ Rpdi qq. We can pick a limit d lim di .
From the fi , we get a map c Ñ lim Rpdi q, which yields a map c Ñ Rpdq since R preserves limits, i.e.,
Rplim di q Ñ lim Rpdi q. One checks that this object is indeed a limit for K.
Proof. We know that Grp has all limits and that U preserves them. Indeed, it suffices to check this for
products and equalizers (Proposition 4.32), both of which are readily checked(!) . We now check the
solution set condition: fix X P Set. Consider a map (of sets) f : X Ñ U G. Let S G be the subgroup
of G generated by the elements f pxq, x P X. Then every element of S is a finite product of the form
pf px1qq1 . . . pf pxnqq1. Thus the cardinality of S is bounded (by ℵ0 7X). In the class of groups S arising
in this way (for all groups G and all maps f ), pick one element of each isomorphism class. Since the
cardinality of the groups arising in this way is bounded, there is a set of such isomorphism classes. The
collection of all maps X Ñ U pS q, with S in this set, forms a set, and is a solution set.
M bR N P Ab
of a right R-module M and a left R-module N . Recall that the desired universal property of such a tensor
product is that
The maps at the right hand side are called balanced maps.
Corollary 5.24. Let R be a ring, M a right R-module and N a left R-module. Then the functor
F : Ab Ñ Set, T ÞÑ tf : M N Ñ T, balancedu
is corepresentable.
Proof. The functor preserves limits, which is again quickly checked for products and equalizers and then
one uses Proposition 4.32. Taking our cue from the proof of Corollary 5.23, we consider a balanced map
f : M N Ñ T and consider the subgroup T 1 T generated by the elements f pm, nq for all m P M ,
n P N . Its cardinality is again bounded (by ℵ0 7M 7N ). So, up to isomorphism there is only a set of such
subgroups T 1 . We obtain a solution set for our functor since f factors as a balanced map (i.e., an element
in F pT 1 q) followed by the inclusion T 1 T .
58 CHAPTER 5. ADJUNCTIONS
bZ : Ab Ab Ñ Ab
such that for each M P Ab, there are adjunctions
M bZ : Ab Ñ Ab : HompM, q,
bZ M : Ab Ñ Ab : HompM, q.
Proof. We choose a corepresenting object, denoted M bZ N , of the above functor. This can be made into
a functor as in Lemma 5.17. The stated adjunctions then hold by design: e.g.
F :AB Ñ C, G : Aop C Ñ B, H : B op C Ñ A
together with functorial bijections (for a P A, b P B and c P C)
HomC pF pa, bq, cq HomB pb, Gpa, cqq HomA pa, H pb, cqq.
Example 5.27. Let A B C Set, and let F : Set Set Ñ Set be the product. This functor is part
of a two-variable adjunction with
U : CptHaus Ñ Top
admits a left adjoint, commonly denoted by β and called the Stone-Čech compactification.
Proof. To check that a fully faithful functor C D, such as CptHaus Top, preserves limits, it is
enough to see that a product and equalizer in the category D, of a diagram that only takes values in the
subcategory C, is an object of C. In the present situation Tychonoff ’s theorem asserts this for products.
Equalizers of compact Hausdorff spaces are closed subspaces of compact Hausdorff spaces, and therefore
again compact Hausdorff.
In order to check the solution set condition we make the following claim: given a compact Hausdorff
space K and a subset T K which is dense (i.e., T K; throughout closures are taken in K), we have
7K ¤ 227 T
.
5.5. THE ADJOINT FUNCTOR THEOREM FOR PRESENTABLE CATEGORIES 59
Given such a pvr q, there is a countable subset I R such that v P ²rPI Vr p ²rPR Vr q, and therefore
v factors over º
CÑ Vr .
P
r I
This argument can be used to show that C is ℵ1 -compact. More generally, any countably-dimensional
Banach space is ℵ1 -compact.
Definition 5.31. A category C is called κ-presentable if it has all (small) colimits and has a set(!) A
ObjpC q consisting of κ-presentable objects such that every object is a κ-filtered colimit of objects in A.
C is called presentable if it is κ-presentable for some regular cardinal κ.
Example 5.32. The categories Set, Ab, Mon, ModR are all ℵ0 -presentable. Indeed, we can take A
to be the set of finite sets of the form t1, . . . , nu (n P N), respectively. Similarly, for ModR , say, there
is a set of modules of the form
cokerpRn Ñ Rm q,
f
The following theorem, due to Adamek and Rosicky can be deduced (in a non-trivial manner) from the
adjoint functor theorem via the solution set condition.
Theorem 5.33. (Adjoint functor theorem for presentable categories) Let F : C Ñ D be a functor between
presentable categories. Then
F is a right adjoint iff it preserves limits and κ-filtered colimits for some regular cardinal κ.
F is a left adjoint iff it preserves colimits.
Example 5.34. This is a highly convenient adjoint functor theorem, it immediately produces the left
adjoints of the functors
U : Grp ÑSet
U : ModS ÑModS .
To pathological categories such as Top, it does however not apply, so the left adjoint to
U : CptHaus Ñ Top
is not ensured by this theorem, since Top is not presentable.
5.6 Exercises
Exercise 5.1. (Turning adjunctions into equivalences) Let F : C Õ
D : G be an adjunction. Let C 1 C
be the full subcategory consisting of the objects X P C such that the unit map X Ñ GpF pX qq is an
isomorphism. Define D1 D similarly. Show that F and G restrict to an equivalence of categories
F |C 1 : C 1 Õ D1 : G|D1 .
Exercise 5.2. Let F : C Õ D : G be an adjunction. Show that the following are equivalent:
(1) F is fully faithful,
(2) the unit map X Ñ GpF pX qq is an isomorphism for each X P C.
5.6. EXERCISES 61
Exercise 5.4. (The universal property of the category of sets) Let C be a category admitting all small
colimits. Let Fun1 pSet, C q be the full subcategory of FunpSet, C q consisting of the functors F : Set Ñ C
that preserve all colimits. Show that the composite
ÞÑF ptuq
Fun1 pSet, C q FunpSet, C q ÝÑ
F
C
is an equivalence.
This statement is referred to as saying that Set is the free cocompletion of tu (the category with a
single object and morphism). More generally, we will discuss in §8.3 that the Yoneda embedding (for a
small category C)
CC p
exhibits as the free cocompletion of C.
Exercise 5.5. Let R be a commutative ring and M an R-module. Let S R be a submonoid with respect
to the multiplication (also known as a multiplicatively closed nonempty subset).
Using solely the results from Exercise 4.19(1) and generalities about colimits, prove that:
(1) The localization of a flat R-module is flat. In particular, RrS 1 s is a flat R-module.
(2) M rS 1 s bR N pM bR N qrS 1s.
Exercise 5.6. Give an example of a ring homomorphism R Ñ S where the functors S bR (resp. HomR pS, q)
don’t preserve products (resp. coproducts), and give an example where they do.
Exercise 5.7. For a category C, the arrow category ArpC q is defined as Funpt0 Ñ 1u, C q. I.e., objects in
ArpC q are just morphisms in C (referred to here as arrows for distinction), and morphisms between arrows
are commutative squares.
Let ∆ : C Ñ ArpC q be the diagonal functor, i.e. X ÞÑ pX Ñ X q P ArpC q. Assume that C has
id
pullbacks, pushouts and a zero object, i.e., an object that is at the same time a final object and an initial
object. (For example, C Ab).
62 CHAPTER 5. ADJUNCTIONS
Here A ModB denotes the category of A-B-bimodules, i.e., abelian groups on which A acts from the left
and B from the right and these two actions commute. The statement in Corollary 5.24 corresponds
to A C Z. The statement above is also a special case, using that any (associative) ring S is an
S-S-bimodule. This functor can again be constructed using the adjoint functor theorem.
Exercise 5.9. Compute pZ{nqbZ pZ{mq by solely applying general facts about adjoints to the adjunction
in Example 5.6 (which was verified in Exercise 5.8).
Exercise 5.10. (Unicity of adjoints) Let L % R be an adjunction. Suppose that there is another functor
L1 : C Ñ D such that L1 % R is also an adjunction. Show that there is a functorial isomorphism L L1 .
Hint: one can construct a transformation L ñ L1 by taking two appropriate transposes of idC . Alter-
natively, one can argue by showing that there is a fully faithful functor
Φ : FunpC, Dq Ñ FunpC op D, Setq, L ÞÑ ΦpLq : ppc, dq ÞÑ HomD pLpcq, dqq.
(Functors C op D Ñ Set are called profunctors.) Then use that ΦpLq ΦpL1 q, since both are isomorphic
to the profunctor HomC p, Rpqq.
Exercise 5.11. Prove Lemma 5.17.
Hint: in Lemma 4.26 we showed the functoriality of limits. The limit functor constructed in this way
is a right adjoint (namely to the diagonal functor ∆ : C Ñ FunpJ, C q). Dualize that proof and replace the
functor category by an arbitrary category.
Exercise 5.12. Let
Pconv pRn q P pRn q
be the set of all convex subsets of Rn . Regard both sets as partially ordered by inclusion and therefore as
categories (Example 2.9). Use the adjoint functor theorem to construct the convex hull as the left adjoint
of the above inclusion.
Exercise 5.13. Equip Z and R with their usual total order ¤. Describe the right and the left adjoint
of the inclusion Z R (regarded as a functor between the categories associated to these ordered sets,
cf. Example 2.9).
Exercise 5.14. Let F : C Ñ D be a functor. Show that F admits a right adjoint if and only if the functor
HomD pF pq, Y q : C op Ñ Set is representable for every Y P D.
Exercise 5.15. Let f : X Ñ Y be a map between sets. Use Example 5.4 to explain why the preimage
functor f 1 : P pY q Ñ P pX q; U ÞÑ f 1 pU q commutes with unions and intersections and the image functor
f : P pX q Ñ P pY q; U ÞÑ f pU q only commutes with unions but not with intersections.
1 This exercise is suggested by Ben Wieland, [Link]
5.6. EXERCISES 63
Exercise 5.16. Let D be a complete poset category and R : D Ñ C be a limit preserving functor into a
locally small category C. Show that R admits a left adjoint.
η:RÑM bR M 1, ϵ : M 1 bR M Ñ R
(η is called the unit map (or coevaluation), ϵ is called the counit map or evaluation) such that the following
composites are the respective identities:
M1 M 1 bR R id Ñ1 bη M 1 bR M bR M 1 ϵbÑ
M id 1
R bR M 1 M 1 ,
M
η bid id bϵ
M R bR M Ñ M bR M 1 bR M Ñ M bR R M.
M M
(At the end, we use the canonical isomorphisms M bR R M .) Prove the following:
Suppose R k is a field. Show that a k-vector space V is dualizable iff it is finite-dimensional. This
provides a basis-free characterization of finite-dimensionality.
If M is dualizable, one may choose M 1 to be M : HomR pM, Rq in the above definition.
If M is dualizable, and pM̃ 1 , η̃, ϵ̃q is another datum as above, show that there is a unique isomorphism
M 1 M 2 that is compatible with the unit and counit maps.
(Voluntary) For a general commutative ring show that M is dualizable iff M is a finitely generated
projective R-module.
°
Hint: if M is dualizable, write η p1q ni1 mi b m1i P M bR M 1 and use these elements to factor idM
as an appropriate map M Ñ Rn Ñ M . Deduce that M is finitely generated projective.
If M is dualizable and f : M Ñ M is an R-module map, we define the trace to be the following map
trpf q : R Ñ M
η
bR M 1 f bÑid
M 1
bR M 1 M 1 bR M Ñϵ R.
M
Prove that this is well-defined, i.e., independent of the choice of pM 1 , η, ϵq.
Let f : V Ñ V be an endomorphism of a finite-dimensional vector space. Let tr1 pf qbe the trace of f
as defined in linear algebra. Show trpf q is the map k Ñ k given by multiplication with tr1 pf q.
64 CHAPTER 5. ADJUNCTIONS
Chapter 6
Abelian categories
In comparison to the wilderness of arbitrary categories, abelian categories are particularly well-behaved.
They also form the technical backbone of a number of disciplines including commutative algebra, and
homological algebra. This chapter is a brief invitation to this topic.
X \Y ÑX Y
(from the coproduct to the product) of two arbitrary objects X, Y P C, is an isomorphism. In this case
either of the two isomorphic objects is also called a biproduct and is often denoted
X ` Y.
For a semiadditive category, the set HomC pX, Y q carries the structure of an abelian monoid:
The zero morphism 0 P HomC pX, Y q is the unique morphism X Ñ 0 Ñ Y , where 0 is a zero object.
(One checks (!) that for another zero object 01 P C, the composite X Ñ 01 Ñ Y agrees with the
previous one.)
where ∆ is the diagonal, the map in the middle is the above isomorphism and ∇ is the so-called
codiagonal , i.e., the unique map whose restriction to both copies of Y is idY . Again, one checks (!)
that this is independent of the choice of the products and coproducts X X etc.
One checks the unitality, associativity and commutativity of the addition. For example, the commu-
tativity f g g f follows from the following commutative diagram
X
∆/
X X f g
/ Y Y o
Y \Y ∇ / Y
σ σ σ
X ∆/
X X g f
/ Y Y o
Y \Y ∇ / Y.
65
66 CHAPTER 6. ABELIAN CATEGORIES
The category Set : tu{Set of pointed sets has a zero object, namely tu Ñ tu. It
id
Example 6.1.
is not semiadditive since the coproduct X \ Y of two pointed sets is the pushout X \tu Y (with the
two maps being the pointings of X and Y ), while the product is the regular product in Set, X Y ,
pointed in the natural way. The natural map X \tu Y Ñ X Y is not an isomorphism.
The category AbMon of abelian monoids (and monoid homomorphisms) is semi-additive since the
set-theoretic product X Y of two abelian monoids, equipped with the usual monoid structure, is
both a coproduct and a product.
The category Mon of monoids (and monoid homomorphisms) is again pointed by the trivial monoid
0, but not semi-additive: the natural map
N\NÑNN
(coproduct, resp. product in Mon) is not an isomorphism. To see this, it suffices by the Yoneda lemma
(Lemma 3.6) to see that mapping out of these objects gives non-isomorphic sets. Indeed
HomMon pN \ N, M q M M,
while
HomMon pN N, M q tpm1 , m2 q P M M, m1m2 m2m1u.
Similarly, Grp is not semiadditive, but Ab and more generally ModR is semiadditive for any ring R.
For any small category C and any abelian category A, the functor category FunpC, Aq is again abelian.
Indeed, limits and colimits are computed pointwise.
Definition 6.2. A semiadditive category C is called additive if the abelian monoid HomC pX, Y q con-
structed above is in fact an abelian group.
Definition 6.3. An additive category C is called abelian if every morphism f : X Ñ Y in C has a kernel
and a cokernel (Exercise 4.27) and if the dotted natural map (which is the unique map making the square
commute) is an isomorphism:
f p
ker f
i / X /Y / coker f (6.4)
O
coker i / ker p
Example 6.5. The category AbMon is semiadditive, but not additive and therefore not abelian.
The category Grp of groups is not semiadditive. It does have kernels and cokernels, so the condition
in Definition 7.3 makes sense. However, this condition is not satisfied: for a group homomorphism
f : X Ñ Y , the kernel ker f tx P X, f pxq eY u is the usual kernel. The cokernel coker f
Y {NY pf pX qq is the quotient of Y by the normalizer of the subgroup f pX q Y (!) . In particular, if
f is injective, the above diagram simplifies to
te X u i /X f
/Y
O
p
/ Y {NY pX q
X / NY pX q
and the bottom map is an isomorphism iff X Y is a normal subgroup.
The category Ab and more generally ModR is abelian.
The category of Hausdorff topological abelian groups is not abelian (Exercise 7.4).
6.2. ELEMENTARY PROPERTIES OF ABELIAN CATEGORIES 67
If a category C is abelian, then C op is also abelian. Indeed, the axioms in the definition of an abelian
category are symmetric. A non-trivial fact in harmonic analysis, Pontryagin duality, establishes an
equivalence
Hom p, S 1 q : Abop CompAb
between Abop and the category of compact Hausdorff spaces, that are also abelian groups.
The following nontrivial theorem due to Freyd shows that the last examples are prototypical. To state
it, we need another definition:
Definition 6.6. A functor C Ñ D is left exact (resp. right exact, resp. exact) if it preserves finite limits
(resp. finite colimits, resp. finite limits and finite colimits).
Example 6.7. Any left adjoint is right exact, since it preserves all colimits. Dually, any right adjoint
is left exact. The property when, in addition, a given left adjoint is also left exact, leads to interesting
notions.
For example, for a commutative ring R and any R-module M , the functor
M bR : ModR Ñ ModR
is right exact. The module M is called flat iff it is left exact (cf. Definition and Lemma 6.17 for some
discussion).
The functors
HomR pM, q : ModR Ñ ModR , respectively HomR p, M q : ModopR Ñ ModR
are left exact. The module M is called projective (resp. injective) if the functors are exact.
Theorem 6.8. (Freyd-Mitchell embedding theorem) If C is a small abelian category, there is a (possibly
non-commutative) ring R and a fully faithful, exact functor
C Ñ ModR .
6.2 Elementary properties of abelian categories
Abelian categories have very special properties. Here is a small selection of such facts:
Lemma 6.9. Let C be an abelian category. Then any morphism f : X ÑY has a factorization
f me
with m a monomorphism and e an epimorphism. An example of such a factorization is
m ker coker f, e coker ker f.
This factorization has the property that for another map f 1 as in the following commutative diagram, there
is a unique morphism k making the whole diagram commutative:
X
e / Z
m / Y
g k h
e1 m1
X1 / Z1 / Y 1.
Proof. The existence of such a factorization follows from the definition, cf. (7.4). To show the existence
and unicity of k, consider
ker f
u /X e /Z m /Y
g k h
e1 m1
X1 / Z1 / Y 1.
68 CHAPTER 6. ABELIAN CATEGORIES
O ? BO
q: ker f
f
h ?A l m
g
k: coker q
There are maps h and l (making everything commutative) as indicated since f g 0 and f q 0. We
have kg kqh 0, so that there is also a map m with mf k. To check ml id and lm id we
may precompose with the epimorphisms f and k, respectively, which then holds by the construction of the
maps.
Lemma 6.11. Let
f
A /B
g h
C
k /D
be a pullback diagram (i.e., the natural map A Ñ B D C is an isomorphism) in an abelian category with
h an epimorphism. Then
(1) the square is a pushout square (i.e., the natural map B \A C Ñ D is an isomorphism),
(2) g is an epimorphism.
Remark 6.12. The second point asserts that epimorphisms are stable under pullback in an abelian cate-
gory. Note that by (the dual of Exercise 4.23), epimorphisms are stable under pushouts in any category.
Proof. Before embarking on the proof proper, we observe the following:
f
g ph,kq
(1) the square is commutative
iff the composite A Ñ B ` C Ñ D is zero. Indeed, that composite is
just hf kg. Here : A Ñ B ` C p B C q etc.
f
g
6.3. EXERCISES 69
(2) the square is a pullback iff
f
g
kerph, kq. Indeed, the latter kernel is just the pullback B D C:
HompT, kerph, k qq is the set of maps f : T Ñ B ` C such that the composites T Ñ B ` C p B \ C q Ñ
f
x y
'
E
By the universal property of the pushout, we get a unique map y with yh 0. Since h is an epimorphism
this gives y 0, so that x yk 0.
6.3 Exercises
Exercise 6.1. Suppose C is semi-additive. Let X P C and Y Ñf Z be a morphism. Show that the maps
f
HomC pX, Y q Ñ HomC pX, Z q,
f
HomC pZ, X q Ñ HomC pY, X q
are monoid homomorphisms.
Thus, if C is additive, these maps are homomorphisms of abelian groups. One refers to this situation
by saying that an additive category is enriched over abelian groups: its Hom-sets are in fact abelian groups
and the composition maps
HomC pY, Z q HomC pX, Y q Ñ HomC pX, Z q
are bilinear.
Exercise 6.2. Prove:
(1) Any isomorphism (in any category) is an epimorphism and a monomorphism.
(2) The converse holds in an abelian category.
(3) Show that (2) also holds in Set, but not in CRing (consider Z Ñ Q).
Exercise 6.3. State formally (and prove) the following assertion: the factorization of a morphism f in an
abelian category into an epimorphism followed by a monomorphism is functorial.
Exercise 6.4. Let C be the category of Hausdorff topological abelian groups: its objects are topological
Hausdorff spaces X equipped with a continuous map : X X Ñ X satisfying the usual conditions on
an abelian group); its morphisms are maps that are both continuous and group homomorphisms.
70 CHAPTER 6. ABELIAN CATEGORIES
Monads
D : Set Õ Top : U
from
β : Set Õ CptHaus : U.
Another classical application of monadicity for (opposite) categories arises in algebraic geometry by the
name of faithfully flat descent.
T :C Ñ C,
a natural transformation (called the unit of the monad)
η : idC ñ T,
71
72 CHAPTER 7. MONADS
T T T T pµq /T T T
ηT
/ T T
µT µ Tη µ
T T µ
/T T T µ
/ T.
Example 7.2. Let R be a ring. We define a monad on the category of sets as follows: T : Set Ñ Set sends
a set X to the free R-module generated by X regarded as a set (i.e., we forget that it is an R-module),
i.e., à
T pX q R.
P
x X
For x P X, we will consistently denote by ex p. . . , 0, 1, 0, . . . q the basis vector with the 1 at the spot
corresponding to x. For a map f : X Ñ Y , T pX q Ñ T pY q is then the map sending ex to ef pxq (and R-
linearly extending; note though that T pf q is just a map of sets). This is a monad: the unit map X Ñ T pX q
sends x P X to ex To define the multiplication map, it is useful to notice that
T pX q U FreepX q,
Õ Mod
where
Free : Set R :U
is the free-forgetful adjunction. Now, the map
T T pX q U FreepU FreepX qq Ñ T pX q U FreepX q
is defined to be the underlying map of sets associated to the map
FreepU FreepX qq Ñ FreepX q
of R-modules, which reads à
R Ñ FreepX q.
P
t U Free X p q
°
Let t rx x be À an element of U FreepX q. Then the multiplication map sends et pP FreepU FreepX qq to
t P FreepX q sPX R. This shows that the structure of the adjunction gives rise to the monad data.
We will revisit this for an abstract adjunction and verify the unitality and associativity condition for such
more general mondas below.
Lemma 7.3. Let L : C Õ D : R be an adjunction. Then the functor
T : R L : C ÑC
is a monad, whose unit η : id ÑT is the unit of the adjunction and whose multiplication is (essentially)
given by the counit:
µ:T T RLRL RϵL
Ñ RL T.
Proof. This is a consequence of the triangle identities. For example,
ηRL
RL / RLRL
RLη µ
RLRL
RϵL / RL,
7.1. DEFINITIONS AND EXAMPLES 73
so the commutativity of the lower left triangle is the triangle identity ϵL Lη idL (and applying R).
The associativity follows from naturality of the counit map as follows: since the counit ϵ is natural, we
get for any map f : X Ñ Y in D a commutative diagram
LRf
LRX / LRY
ϵX ϵY
f
X / Y.
Applying this to f ϵY : LRY Ñ Y , this reads
LRpLRqY
LRϵY
/ LRY
ϵLRY ϵY
ϵY
LRY / Y.
Picking finally Y LA for some A P C and also applying R, we obtain the desired commutative square
expressing the associativity condition:
RLRpLRqpLAq RLRpLAq
RLRϵLA
/ (7.4)
RϵLRLA RϵLA
RLRpLAq
RϵLA
/ RLA.
¤ ¤
f pUa q f Ua .
P
a A a A P
The conditions on a monad can be painfully verified by hand or alternatively by using the fact that there
Õ
is an adjunction
P pq : Set complete sup-lattices : U.
Here at the right we have the category of posets having suprema (i.e., colimits!), and suprema-preserving
(i.e., colimit-preserving) functors.
74 CHAPTER 7. MONADS
α µA α
T pAq /
α
A A.
Morphisms in AlgT are morphisms f : A Ñ A1 such that the following square commutes:
T A1 .
Tf
TA /
α α1
A
f
/ A1
These conditions look familiar from the definition of an R-module M . Indeed, this is no coincidende:
Example 7.8. Let T : Set Ñ Set be the monad associated to the free-forgetful adjunction associated to
À the notion of a T -algebra. Let pA, αq be such an algebra, i.e., A P Set.
a ring R, as above. We unwind
Given the map α : T pAq xPA R Ñ A we define the scalar multiplication by R as the map
R A Ñ A, pr, xq ÞÑ αprex q,
where ex P T pAq is the basis vector for x P A. The diagram
x ÞÑe/ xÀ
A x A P R
α
A
then means 1R x x. The commutativity of
T pT pAqq / T pAq
Tα
µA α
T pAq / A.
α
is equivalent to the associtavity of the R-multiplication on A (!) . We also define the addition on A as
A A Ñ A, px, y q ÞÑ αpex e y q.
It is a further routine check to verify the remaining conditions for being an R-module, such as distributivity
etc.
Definition and Lemma 7.9. Let T : C Ñ C be a monad. Then the forgetful functor
U : AlgT pC q Ñ C, pX, αq ÞÑ X
admits a left adjoint, denoted Free, and called the free T -algebra functor . It sends X P C to
pT X, µX : T pT X q Ñ T X q.
A T -algebra of this form is called a free T -algebra. The full subcategory of AlgT consisting of free T -algebras
is called the Kleisli category.
7.3. MONADIC ADJUNCTIONS 75
Proof. It is routine to check the functoriality of Free. To show it is an adjunction observe that a map
g : pT X, µX q Ñ pA, αq
One checks that this map is a map of T -algebras. One further checks that these two constructions are
indeed inverse to each other: for example, given a map g as above, we need to check that α T g T ηX is
the original map g, which results from the commutativity of the following diagram.
T ηX Tg
TX / TTX / TA
µ α
g
TX / A.
The left triangle is the unitality condition for T and the right one is part of α being a morphism of
T -algebras.
an adjunction
L:C ÕD:R (7.10)
gives rise to a monad
T : RL : C Ñ C.
If we start with a monad T , then the monad associated to the free-forgetful adjunction gives back the same
monad. This follows directly from the definition of the free algebra functor.
In order to adress the converse question we use the following notion:
Definition and Lemma 7.11. Let L % R be an adjunction as in (6.10). Then R factors as
D ÑR̃ AlgT pC q Ñ
U
C,
Proof. One checks that the map Rϵd indeed does define a T -algebra structure on Rpdq, as in (6.4) (replace
LA there by d)(!) .
76 CHAPTER 7. MONADS
(two objects, three non-identity morphisms and f σ g σ id0 .) This is the full subcategory of ∆
(Example 4.56) consisting of the objects r0s and r1s. Its non-full subcategory
f
/
1 / 0
g
is a cofinal subcategory. In particular a reflexive coequalizer can be computed as the coequalizer of the
diagram obtained by omitting the σ.
Theorem 7.16. (Crude monadicity theorem) Let L : C Õ D : R be an adjunction. Suppose
(1) D admits and R preserves reflexive coequalizers,
(2) R is conservative.
Then the adjunction is a monadic adjunction.
Before proving the theorem, we explore its reach by means of several examples. First, the theorem
shows (again) that the tensor-forgetful adjunction is monadic (cf. Example 6.12): the forgetful functor is
conservative and preserves all colimits by virtue of having a right adjoint, HomS pR, q, cf. Example 5.6.
Let R Ñ S be a ring homomorphism of commutative rings. Passing to the opposite categories in (6.13),
we obtain an adjunction
F orgetop : pModS qop Õ
pModR qop : pS bR qop.
Let us examine whether it is monadic (or, in common terminology, the adjunction (6.13) is comonadic).
For any R, Modop
R admits even all colimits, since ModR admits all limits.
Definition and Lemma 7.17. In the above situation, the following are equivalent. In this event, S is
called a flat R-algebra.
(1) S bR preserves finite limits,
(2) S bR preserves equalizers,
(3) S bR preserves kernels, i.e., for any map f : M Ñ N of R-modules, we have
kerpS bR M ÝÑb S bR N q S bR ker f.
idS f
(4) S bR preserves injective maps, i.e., if f : M Ñ N is an injective map of R-modules, then idS b f :
S bR M Ñ S bR N is also injective.
Proof. Clearly (1) ñ (2). Conversely, being a left adjoint the functor always preserves coproducts, hence
finite products (ModR is additive). Then use Proposition 4.32.
We have (2) ô (3) since an equalizer of a diagram M Ñ N is also the equalizer of the diagram M Ñ N ,
f
g
f g
0
i.e., the kernel of f .
For (3) ô (4) note that in ModR , a map f is a monomorphism iff it is injective. Then ñ follows since
p3q
f is injective iff ker f 0 ñ kerpidS b f q 0 iff idS b f is injective. Conversely, any monomorphism is
the kernel of a map (in fact, the kernel of its cokernel) by (the dualized version of) Lemma 7.10.
78 CHAPTER 7. MONADS
Definition and Lemma 7.18. Let S be a flat R-algebra. Then, the following are equivalent. In this
event, S is called a faithfully flat R-algebra.
(1) S bR is conservative,
(2) For M P ModR , we have S bR M 0 ñ M 0.
Proof. Indeed, M 0 iff 0 : M Ñ M is an isomorphism. Conversely, for f : M Ñ N , f is an isomorphism
iff ker f and coker f are zero. By flatness, tensoring preserves the kernel (and always preserves colimits
such as the cokernel). Thus S bR pker f q kerpS b f q 0 implies ker f 0 etc.
À 7.19. For any commutative ring R, the map R Ñ Rrts is faithfully flat: Rrts bR M
Example
n¥0 M (as an R-module). This functor preserves injections and is conservative.
The map Z Ñ Q is flat (either by inspection or alternatively using Exercise 5.5), but not faithfully
flat:
Q bZ Z{p Q{p 0.
whose kernel is
R kerpR Ñ Rq,
0
is monadic.
Remark 7.22. The condition that S is faithfully flat not quite necessary for the adjunction to be comonadic.
See [JanelidzeTholen:FacetsIII] for a necessary and sufficient condition.
We prepare for the proof of the crude monadicity theorem. For a ring R and an R-module M , the
natural map à ¸ ¸
R Ñ M, rm em ÞÑ rm m
P
m M P
m M P
m M
is surjective. A massive generalization of this fact, and also a description of the relations in RrM s is
provided by the following lemma.
7.4. MONADICITY THEOREMS 79
Lemma 7.23. Let T : C Ñ C be a monad and pA, α : T A Ñ Aq P AlgT . Then the following is a reflexive
coequalizer diagram in AlgT :
p q
T pT pAqqi T pAq pA, αq.
T α
/ α /
/
µA
p q
T ηA
Here, T pX q denotes the free T -algebra (previously denoted FreepX q) on an object X P C. If we forget the
T -algebra structures on all objects, the diagram is a reflexive coequalizer diagram in C.
Proof. First off, T ηA is indeed a splitting by the unitality of the T -algebra pA, αq and the unitality condition
for the monad T . For a cocone B P AlgT as depicted, we want to exhibit a unique dotted T -algebra map
g in the following diagram:
p q
T pT pAqq pAq
T α
/ α /
/T A
µA
f
Tg g
"
T pB q
β
/ B.
We momentarily regard the right triangle as a diagram in C (as opposed to AlgT ). The map g : f ηA
makes the right triangle commute. Moreover, this is the unique map with this property since α ηA idA .
This directly shows the final coequalizer claim in C. (Alternatively, this also follows from the argument in
Example 6.27 below.) For pA, αq to be a coequalizer in AlgT , we need to still argue as follows: since the
forgetful functor AlgT Ñ C is faithful (but not full!), it remains to see that g is indeed a T -algebra map,
i.e., the commutativity of the lower right square. We prove this using that f is a T -algebra map (*), the
monad axioms of T (**) and the naturality of η (***):
β T g : β T f T ηA pq
f µA T pηAq pq
f pq
f T pαq ηT A pq
pf ηAq α : g α.
Proof. (of Theorem 6.16) We have a factorization of R as
D ÑR̃ AlgT Ñ
U
C
and our goal is to show that R̃ is an equivalence. Our proof is in three steps:
(1) we construct a left adjoint L̃ to R̃,
(2) we show the unit map idAlgTÑ R̃ L̃ is a (functorial) isomorphism,
(3) we show that the counit map L̃ R̃ Ñ idD is a (functorial) isomorphism.
(1): if this left adjoint exists, it must satisfy
L L̃ Free L̃ T,
by Lemma 5.11. I.e., L̃pT pX qq needs to be (isomorphic to) LpX q. In addition, L̃ would need to preserve
colimits such as the coequalizer in Lemma 6.23. We therefore define, for any algebra pA, αq, L̃pAq to fit
into the following reflexive coequalizer diagram (in D):
p q
LpT pAqq LpAq L̃pA, αq.
L α
/ θ /
/ (7.24)
i ϵLA
LηA
(Here ϵLA is the evaluation of the counit ϵ : LR Ñ idD at LA P D). The coequalizer, L̃pA, αq, exists by
assumption on D. In order to check L̃ is a left adjoint to R̃, it suffices to exhibit a bijection
HomD pL̃pA, αq, B q HomAlgT ppA, αq, R̃pB qq
pq
functorially in B P AlgT (Lemma 5.17). Indeed the left hand Hom is tf : LpAq Ñ B, f Lpαq f ϵLpAq u.
The condition (*) is equivalent to the commutativity of the left hand diagram, which in its turn is equivalent
80 CHAPTER 7. MONADS
to the commutativity of the diagram at the right, which is obtained by passing to transposes (f t denotes
the transpose of t):
LT A LRLA / /
Lα α
LA RLA A
ϵLA f ft
f Rf
LA / B RLA / RB.
By definition of the counit map and the transpose, we have a commutative diagram
L ft p q/
LA LRB
f
ϵB
#
B.
Thus, condition (*) is equivalent to f t α RpϵB qRpLpf t qq. Thus the above Hom-set is the same as a
map of algebras
f t : pA, αq Ñ R̃pB q pRB, RϵB q.
(2): we apply R to (6.24). By assumption on R, this yields a coequalizer diagram
p q pq
RLpT pAqq RLpAq
RL α
/ R θ
/ RL̃A.
/ (7.25)
RϵLA
Note that RLT T 2 . We also have the free resolution coequalizer (Lemma 6.23), which we at this point
regard as a coequalizer in C (as opposed to AlgT )
p q
T pT pAqq T pAq
RL α
/ α /
/ A.
µA RϵLA
Thus there is a (unique) isomorphism fitting into the following commutative diagram:
RLA Rθ /
RL̃pA, αq
α
%
A.
RLRpB q pB q
RLRϵB
/ Rθ / RL̃R̃
RLRLRB /
RϵLRB
RϵB
Rτ
&
RB.
The two parallel maps and RϵB also form a coequalizer by Lemma 6.23. Thus, Rτ is an isomorphism. By
assumption on R, τ is therefore an isomorphism as well.
The above “crude” monadicity is not quite necessary, but we have done almost all the work to get a
necessary (and sufficient) condition for an adjunction to be monadic.
Definition and Lemma 7.26. A split coequalizer diagram in a category C is a diagram of shape
f
/ e /
Aa / Bb C,
g
t s
with ef eg and the “wrong way maps” satisfy es idC , se gt and f t idB .
For such a diagram, C (together with the map e) indeed is a coequalizer of pf, g q. Any functor preserves
split coequalizer diagrams. (A colimit that is preserved by any functor is called an absolute colimit.)
Example 7.27. Revisiting Lemma 6.23, we note that for a monad T : C Ñ C, and a T -algebra, the
diagram is a split coequalizer diagram in C
T pT pAqqi T pAqg
µA
/ α /
/ A.
Tα
ηT A ηA
(Parallely the diagram is also a reflexive coequalizer diagram in AlgT , but not a split coequalizer diagram
in AlgT : the map ηT A is not a map of T -algebras.)
g
Rf
Rg
original diagram admits a colimit, and R preserves that colimit.
R is conservative.
This can be proven along the same lines as the crude monadicity theorem above.
Õ CptHaus : U
Corollary 7.29. The adjunction
β : Set
is monadic.
Proof. For the proof, we use that a topological space is the same as a set X and a map (the closure)
: P X Ñ P X such that
H H, S Y T S Y T , S S, S S.
A continous map is a map such that f pS q f pS q.
82 CHAPTER 7. MONADS
Let X, Y P CptHaus, f and g be continuous maps such that for the underlying sets, there is a split
coequalizer diagram:
f
/ e /
Xa / Yb W,
g
t s
We can apply the covariant power set functor (Example 6.6). Since split coequalizer diagrams are preserved
by any functor, the rows are still coequalizers. The maps f and g are continuous and, being maps between
compact Hausdorff spaces, necessarily closed maps. Thus, the left square commutes, so that there is a
unique map (of sets), ? as depicted at the right:
Pf
/ Pe /
PX / PY PW (7.30)
Pg
? ? ?
Pf
/ Pe /
PX / PY PW
Pg
Note that for T W , T epe1 T q. Using this, it is trivial to check that the four conditions on the closure
are satisfied. Thus, W is a topological space, and the map e is continuous. What is more, a subset T W
is closed iff e1 pT q Y is closed (since in the latter case T epe1 pT qq is closed by the commutativity of
the right half in (6.30)). Thus, the topology on W is the quotient topology.
Since Y is compact, and e is surjective, W is also compact. Let w1 w2 P W be distinct points. We
have spw1 q spw2 q P Y (since es idW ), so there are open disjoint neighborhoods Ui Q spwi q in Y .
Their complements Zi : Y zUi are closed and cover Y . The map e is closed since the right part in (6.30)
commutes. Thus epZi q are closed, and cover W epY q. Their complements W zepZi q are thus disjoint
open neighborhoods of wi , so that W is Hausdorff.
We finally check that the compact Hausdorff space W is indeed a coequalizer. Let h : Y Ñ Z be a
continuous map with hf hg. Since W is a coequalizer in Set, h factors over e: h h1 e. Since W carries
the quotient topology, h1 is continuous as soon as h is.
Remark 7.31. The above statement leads to the question of describing the monad associated to the
adjunction β % U more concretely. One can show (without much difficulty) that the monad is the so-
called ultrafilter monad 1
T : Set Ñ Set, X ÞÑ tultrafilters on X u.
Note that the following diagram commutes:
FinSet /C
ι R
Set Set.
See [Leinster:Codensity] for an exposition of these ideas.
1 An
ultrafilter on a set X is a collection of subsets V X that is upwards closed and stable under intersection, and for any subset W X
z
either W or X W (but not both) are in the collection.
7.5. EXERCISES 83
This understanding of CptHaus can also be used to prove Riesz’ representation theorem [Hartig:Riesz],
stating that for any compact Hausdorff space X, there is a (functorial!) isomorphism (of Banach spaces)
»
M pX q Ñ C pX q , µ ÞÑ pf ÞÑ f dµq
X
between the space of measures on X and the dual space of the space of continuous, real-valued functions
on X. The basic idea in this categorical proof is to observe that it is enough to prove this for projective
T -algebras (which are classically known as extremally disconnected spaces), i.e., retracts of algebras of the
form β pX q, for X P Set. For these, one checks the result by an immediate inspection.
Finally, extremally disconnected spaces play an outsize rôle in Clausen–Scholze’s foundational work on
condensed mathematics [Scholze:Lectures].
7.5 Exercises
Exercise 7.1. Let T : C Ñ C be a monad on a category. Show that the Kleisli category for T is equivalent
to the category D with ObjpDq ObjpC q and with morphisms given by
HomD pX, Y q : HomC pX, T pY qq
Exercise 7.4. Apply Theorem 6.28 to show that the free-forgetful adjunction
Free : Set Õ Grp : U
is monadic.
Hint: assume that G Ñ H is a parallel pair of arrows that is split in sets (as in Definition and
f
Lemma 6.26). Show that G G Ñ H H is also part of a U -split coequalizer diagram. Then mimic the
f f
g g
situation in (6.30), with the group operation G G Ñ G instead of the closure operator.
84 CHAPTER 7. MONADS
Chapter 8
Kan extensions
is a left Kan extension of f along the inclusion Q R. (Dually, x ÞÑ inf s¥x f psq is a right Kan extension.)
Indeed, given a monotone function h : R Ñ R, HomFunpQ,Rq pf, h|Q q is a singleton iff f psq ¤ hpsq for each
s P Q, and is empty otherwise. The former is equivalent to
f pxq sup f psq ¤ hpxq
¤
s x
85
86 CHAPTER 8. KAN EXTENSIONS
This example indicates that (right or left) Kan extensions need not exist. We will prove (Proposi-
tion 8.15) that left Kan extensions (along a functor between small categories) do exist as soon as the
target category E is cocomplete. We will use Kan extensions to formulate (and prove) the universal
property of the category C p PShpC q of presheaves: it is the free cocompletion (Theorem 8.20). This
cocompletion is also useful in order to construct free completions for more restrictive colimits, notably the
Ind-completion, which freely adds filtered colimits.
Another prominent application of Kan extensions are derived functors. For example, the functor
Fp bZ : Ab Ñ ModFp
which is right exact, but not left exact admits a so-called left derived functor, which measures the deviation
of this functor to be left exact (and therefore exact). This left derived tensor product is the right Kan
extension in the following diagram:
b
ChpAbq pModF q
Fp
/ Ch
p
c c
bLZ
DpAbq pModF q.
Fp
/D
p
Here Ch denotes the category of chain complexes, and D the so-called derived category, which is the category
of chain complexes with quasi-isomorphisms inverted. See [Mac98, §X.4] for a glimpse or [KahnMaltsiniotis:Stru
for a full-fledged exposition in greater generality.
Remark 8.3. The name Kan extension may suggest the idea
LanF G F G.
This statement holds true if F is fully faithful (Corollary 8.19), but not necessarily otherwise: Kan exten-
sions along C Ñ tu are (co)limits, so that, in particular, the triangle does not commute, unless G is a
constant functor.
C G />E
F
LanF G colim G,RanF G lim G
tu
Indeed, functors tu Ñ E are just objects in e and the functor F : E Ñ FunpC, E q is simply the diagonal
functor previously denoted ∆, so the claim follows from Lemma 5.10.
8.1 (Co)ends
Our construction of right Kan extensions below will be based on ends (resp. coends for left Kan extensions).
These are special limits (resp. colimits) over the twisted arrow category, all of which we introduce in this
section.
Definition 8.4. Let C be a small category. Define the subdivision category C § to have as objects symbols
c§ and f § , for each object c P Objpcq and each morphism f : c Ñ c1 in C. (By definition, c§ pidc q§ .) By
definition, any morphism in this category is a composition of identity morphisms of these objects, together
with morphisms of the form
c§ Ñ f § , c1§ Ñ f § (8.5)
for each f : c Ñ c1 .
There is a natural functor
Ñ C op C,
ι : C§
given on objects by c§ ÞÑ pc, cq, pf : c Ñ c1 q ÞÑ pc, c1 q and on morphisms in the expected way: c§ Ñ f § is
mapped to pidc , f q, and c1§ Ñ f § is mapped to pf, idc1 q.
8.1. (CO)ENDS 87
Definition 8.6. Let F : C op C Ñ D be a functor. An end (resp. coend ) of F is a limit (resp. colimit)
of the composition
Ñι C op C Ñ F
C§D.
³ ³c
An end is denoted by c F pc, cq, and a coend by F pc, cq.
³
Concretely, this means that the end c F pc, cq is an object d P D together with maps
rc : d Ñ F pc, cq, rf : d Ñ F pc, c1 q
(for each f : c Ñ c1 in C) such that the diagram
d1 / F pc, cq
;
rc F c,f p q
* %
d
rf
/F
9
pc, c1q
rc1 p q
F f,c
#
F pc1 , c1 q.
commutes. Moreover, for any other object d1 with the same properties, there is a unique map d1 Ñd
making the whole diagram commutative.
Equivalently, an end can be computed as an equalizer
»
¹ ¹
F pc, cq eq F pc, cq Ñ F pc, c1 q , (8.7)
c P
c C f :c Ñ c1
where for each morphism f : c Ñ c1 , the two maps are given by
± p q
F pc, cq Ñ F pc, cq
Ñ F pc, c1 q,
F c,f
c
± F pf,c1 q
c F pc, cq Ñ F pc1 , c1 q Ñ F pc, c1 q.
Remark 8.8. The above definition of C § is somewhat ad hoc. A slightly more conceptual approach is to
define the twisted arrow category TwpC q to be the category whose objects are the morphisms in C. For
two morphisms f : A Ñ A1 , g : B Ñ B 1 in C (i.e., objects in TwpC q, we define HomTwpC q pf, g q to be the
set of commutative squares
Ao h B (8.9)
f g
A1 k / B1.
(Note the arrow h goes in the “wrong” direction.) The functor ι above factors as a composite
C§ Ñ TwpC q Ñ C op C,
the former functor being given by c§ ÞÑ idc, and morphisms in (8.5) are mapped to
c1 o f
c , co idc
c . (8.10)
id1c f idc f
id1c
/ c1
c1 c1
f
/ c
C§ Ñ TwpC q Ñ C op C Ñ
F
D
88 CHAPTER 8. KAN EXTENSIONS
Example 8.11. Let A, B P FunpC, Dq be two functors, where C is small. Consider the functor
F : C op C
Ñ
A B
Dop D
HomD
Ñp,q Set, pc, c1q ÞÑ HomD pApcq, B pc1qq.
The end of this functor recovers the set of natural transformations between A and B:
» »
F pc, cq HomD pApcq, B pcqq HomFunpC,Dq pA, B q. (8.12)
c c
Indeed, a morphism α : A Ñ B is a collection of elements in αc P HomD pApcq, B pcqq F pc, cq, subject to
the condition that the diagrams
p q/
Apcq Apc1 q
A f
αc αc 1
p q/
B pcq B p c1 q
B f
In the sequel, we will often have to talk about cocontinuous functors, i.e., colimit-preserving functors,
so we introduce a notation:
Definition 8.13. Let I be a small category and C a cocomplete category. Then Func pI, C q is the full
subcategory of the functor category FunpI, C q consisting of functors preserving all (existing) colimits.
Let E be a category with all (small) coproducts. Recall that by Exercise 5.18 the representable functor
HomE pe, q : E Ñ Set admits a left adjoint, denoted b e, given on objects by
º
s b e : e,
Ps
a coproduct indexed by the elements of the set s P Set. Being a left adjoint, this functor b e preserves
colimits, and is thus an object in Func pSet, E q. By Exercise 5.4, for any cocomplete category E, there is
an equivalence
ÞÑF ptuq
Func pSet, E q FunpSet, E q Ñ
F
E,
with an inverse functor given by e ÞÑ p b eq.
The following related statement can be viewed as a category-theoretic version of the formula
»
µpAq χA pxqdµpxq,
X
for a measure space pX, µq and a measurable subset A X. It expresses a decomposition of a functor F
into two independent pieces: the values F piq and the Hom-sets Homp, iq.
Lemma 8.14. Let I be a small category, and D be cocomplete. For a functor F : I op Ñ D, there is a
functorial isomorphism
»i
F Homp, iq b F piq.
8.2. KAN EXTENSIONS VIA (CO)ENDS 89
Proof. We need to show that F pj q is (functorially) isomorphic to the colimit of the diagram
I§
id D I idHom
Ñι I op I FÑ Ñ pj,q D Set Ñ
Ib D.
A cocone over that diagram is an object d P D together with a collection of maps τi (for each i P I), such
that for each map i Ñ i1 the following diagram commutes:
By definition of b as a left adjoint, the map τi is equivalent to a family of maps τi,g : F piq Ñ d for each
g P Hompi, j q, and then the condition amounts to requiring that these assemble to a morphism of functors
(in FunpI op , Setq)
By the Yoneda lemma (Lemma 3.5), this is the same as the evaluation of the right hand functor at j, i.e.,
a morphism F pj q Ñ d, namely τj,idj . Thus, the initial cocone is F pj q, showing our claim.
Proposition 8.15. Let E be a cocomplete category, and F : C Ñ C 1 be a functor between small categories.
Then the restriction functor
F : FunpC 1 , E q Ñ FunpC, E q
admits a left adjoint. That is, all functors G : C ÑE have a left Kan extension along F . It can be
computed as the coend of the functor
»c
LanF pGq HomC 1 pF pcq, q b Gpcq, (8.16)
i.e.,
»c
pLanF pGqqpc1q HomC 1 pF pcq, c1 q b Gpcq.
Example 8.17. If F idC , then F is just the identity so that its left adjoint, LanF pq is also the
identity, i.e., LanF pGq G. Thus, the statement here can be regarded as an extension of Lemma 8.14.
At another extreme, for F : C Ñ tu, we already know LanF G colim G. For this reason, the coend
appearing in (8.16) is referred to as a weighted colimit, the idea being that the terms Gpcq appearing in
the colimit are taken into account with “weight” HompF pcq, c1 q.
90 CHAPTER 8. KAN EXTENSIONS
The end of this functor is then isomorphic to the end of F , regarded as a functor pC C 1 qop pC C 1 q Ñ V .
In particular, by symmetry, we then have
» » » »
F pc, c, c1 , c1 q F pc, c, c1 , c1 q.
c c1 c1 c
C
F /
?D
y
Lany F
p
C
Theorem 8.20. Let C be a small category and y : C Ñ C p the Yoneda embedding into its category of
presheaves. For any cocomplete category D, the composite
y
Func pC,
p Dq FunpC,
p Dq Ñ FunpC, Dq
is an equivalence of categories, with an inverse given by left Kan extensions.
Example 8.21. Let f : X ÑY be a continuous map of topological spaces, and consider the associated
functor
f 1 : OpenpY q Ñ OpenpX q.
Composition with this functor defines the so-called pushforward functor
f : PShpX q : PShpOpenpX qq Ñ PShpOpenpY qq.
Concretely, for a presheaf F on X, f F is the presheaf given by pf F qpU q F pf 1pU qq. Consider the
following left Kan extension:
f 1
OpenpX q / OpenpY q
yX yY
PShpX q / PShpY q.
f : LanyX yY f 1
p q
The functor f is called the pullback functor . According to the theorem, it is the unique colimit preserving
functor that is given on representable presheaves by
f pHomp, U qq Homp, f 1 pU qq.
One can further show that f is a left adjoint of f (Exercise 8.3), which makes this functor into a crucial
functor in geometry and topology.
If C tu, then Theorem 8.20 recovers Exercise 5.4. We will in fact prove Theorem 8.20 as a consequence
of Exercise 5.4 and some considerations on Kan extensions. Recall that for two small categories I and J
and a category C, we have a natural equivalence
FunpI J, C q FunpI, FunpJ, C qq (8.22)
given by f Þ pi ÞÑ pj Ñ
Ñ Þ f pi, j qqq and conversely f ÞÑ ppi, j q ÞÑ f piqpj qq.
In other words, the process
of taking functor categories resembles being a right adjoint to taking products of categories. (We say
“resembles” here, since a regular adjunction involves functorial bijections of certain Hom-sets, whereas
the above involves an equivalence of certain categories. The above is an example of an adjunction in the
2-category of categories, in which the morphisms are not just sets, but categories in their own right.) The
following lemma is a noteworthy statement in that it allows to regard the functor category also as a certain
left adjoint:
92 CHAPTER 8. KAN EXTENSIONS
Lemma 8.23. Let I, C, D be categories, with I small and C and D cocomplete. Consider the functor
ι : I op C Ñ FunpI, C q, pi, cq ÞÑ HomI pi, q b c.
Then there is an equivalence of categories
todo: check
The right hand equivalence arises by restricting the equivalence
FunpI op C, Dq FunpC, FunpI op , Dqq
to the indicated subcategories.
Proof. (of Theorem 8.20) In Lemma 8.23, we take C Set and obtain, using Exercise 5.4
Func pI,
p Dq Func pSet, FunpI, Dqq ÝÑ FunpI, Dq.
F ÞÑF ptuq
Remark 8.25. The important point is to insist that K is filtered. Indeed, the formula
»i »i
F HomI p, iq b F piq y piq b F piq
(Lemma 8.14) shows that we can write any presheaf F as a colimit² (namely, the coend above, which is
a colimit involving of a diagram involving the terms y piqb F piq PF piq y piq) of a diagram involving
only the representable presheaves y piq.
By definition, we can think of the objects in IndpC q as being formal filtered colimits:
F “ colim Ki ”.
This is formal in the sense that the category C need not have such a colimit (and even if it does, the
Yoneda embedding need not preserve it).
Remark 8.26. We compute the set of morphisms HomIndpC q pF, F 1 q. Suppose F colim y pK piqq and
F 1 colim y pK 1 pi1 qq for K : I Ñ C and K 1 : I 1 Ñ C two filtered diagrams.
HompF, F 1 q HomPShpC q pcolimi y pK piqq, colimi1 y pK 1 pi1 qqq
lim HomPShpC q pypK piqq, colimi1 ypK 1pi1qqq
i
limi
pcolimi1 ypK 1pi1qqq pK piqq
lim
i
colimi1 py pK 1 pi1 qqq pK piqq
lim colimi1 HomC pK 1 pi1 q, K piqq.
i
At *, we have used that colimits in functor categories are computed pointwise (Lemma 4.34). Thus, given
a presentation of F and F 1 as above, a morphism f : F Ñ F 1 is a collection of maps, for each i,
K piq Ñ K 1 pi1i q,
where i1i P I 1 is an index (depending on i).
± These maps are supposed to be compatible as i varies (in order
to be an element in limi , as opposed to i ).
Theorem 8.27. Let C be a small category.
(1) The category IndpC q has all filtered colimits.
(2) For any category D that has all filtered colimits, the composite
y
Funfilt pIndpC q, Dq FunpIndpC q, Dq Ñ FunpC, Dq
is an equivalence. Here the left hand category is the full subcategory of the functor category consisting
of functors preserving filtered colimits. An inverse is given by left Kan extensions; it is also referred to
as the Ind-extension of a given functor F : C Ñ D.
(3) The Yoneda embedding y : C PShpC q takes values in the full subcategory IndpC q PShpC q. For
any c P C, y pcq is a compact object in IndpC q.
Proof. We only indicate some bits for (2): y pC q IndpC q by definition. The inclusion
IndpC q C
p
preserves filtered colimits (note that the inclusion C Ñ IndpC q need not preserve them; compare this with
Exercise 4.16). This follows from the second statement, applied to D C. p Then, the functor
HomIndpC q py pcq, q HomCp py pcq, q pcq
preserves filtered colimits, since the right hand functor in fact preserves all colimits (Lemma 4.34).
94 CHAPTER 8. KAN EXTENSIONS
In order to understand the Ind-completion more concretely, the following statement is useful:
Corollary 8.28. Let F : C Ñ D be a functor, with D admitting all filtered colimits, and F : IndpC q Ñ D
the Ind-extension of F .
(1) F is fully faithful if F is fully faithful and if F pcq is a compact object (in D) for each c P C.
(2) F is an equivalence if, in addition, every object d P D can be presented as a filtered colimit d
colim F pci q, for an appropriate filtered diagram I Ñ C.
V colimW V,dim W 8 W.
8.5 Exercises
Exercise 8.1. Let C be a category, X P C an object and f : X Ñ X an endomorphism. We regard the
pair pX, f q as a functor BN Ñ C (cf. Exercise 2.1) by sending ÞÑ X and Homp, q N Q n ÞÑ f n .
Show that the left, resp. right Kan extensions along the natural functor i : BN Ñ BZ are given by
Exercise 8.2. Let C be a small category. What is the left Kan extension in this diagram:
C
y
/C
@
p
y
Lany y ?
p
C
Exercise 8.3. Let f : C Ñ C 1 be a functor between small categories. Consider the precomposition-with-
f -functor
f : C
x1 Ñ Cp
as well as the Kan extension
C1
f
C /
y: yC y 1 : yC 1
Lany y 1 f
p q / x1
p
C C.
Õ Cx1 : f
Show that
Lany py 1 f q : C
p
are adjoint.
References
[Awo10] Steve Awodey. Category theory. Second. Vol. 52. Oxford Logic Guides. Oxford University Press, Oxford, 2010,
pp. xvi+311. isbn: 978-0-19-923718-0.
[Bor94] Francis Borceux. Handbook of categorical algebra. 1. Vol. 50. Encyclopedia of Mathematics and its Applications.
Basic category theory. Cambridge University Press, Cambridge, 1994, pp. xvi+345. isbn: 0-521-44178-1.
[Bra15] M. Brandenburg. Einführung in die Kategorientheorie: Mit ausführlichen Erklärungen und zahlreichen Beispielen.
Springer Berlin Heidelberg, 2015. isbn: 9783662470688.
[Fre70] Peter Freyd. “Homotopy is not concrete”. In: The Steenrod Algebra and its Applications (Proc. Conf. to Celebrate
N. E. Steenrod’s Sixtieth Birthday, Battelle Memorial Inst., Columbus, Ohio, 1970). Lecture Notes in Mathematics,
Vol. 168. Springer, Berlin, 1970, pp. 25–34.
[Lei14] Tom Leinster. Basic category theory. Vol. 143. Cambridge Studies in Advanced Mathematics. Cambridge University
Press, Cambridge, 2014, pp. viii+183. isbn: 978-1-107-04424-1. doi: 10.1017/CBO9781107360068. url: https:
//[Link]/10.1017/CBO9781107360068.
[Mac98] Saunders Mac Lane. Categories for the working mathematician. Second. Vol. 5. Graduate Texts in Mathematics.
New York: Springer-Verlag, 1998, pp. xii+314. isbn: 0-387-98403-8.
[Rie17] E. Riehl. Category Theory in Context. Aurora: Dover Modern Math Originals. Dover Publications, 2017. isbn:
9780486820804. url: [Link]
95
96 REFERENCES