<<

LECTURE NOTES ON THEORY

TARIK YILDIRIM

1.

C We will always write Set as Fun(C, Set) and often shorten HomFun(C,Set)(F,G) as Nat(F,G). For this section only, we will abbreviate HomC(A, B) as Hom(A, B). Definition 1.1. A F : C → Set is called representable if there exists an object A in C such that F is isomorphic to Hom(A, −). We say that F is represented by A. The following is one of the most important trivialities in .

Lemma 1.2. For a functor F : C → Set, there exists a bijective correspondance θF,A : Nat(Hom(A, −),F ) → F (A)

Proof. For a given α : Hom(A, −) → F , we define θF,A(α) as αA(1A). We claim that this is bijective. Let us define an inverse φ. For each element a ∈ F (A), we need to find a natural transformation φ(a) from Hom(A, −) to F . So, for each a ∈ F (A) and B in C, we need to come up with a function φ(a)B : Hom(A, B) → F (B). The most natural way to proceed is to define its value at f ∈ Hom(A, B) to be F (f)(a). (If F is representable, this amounts to pre-composition with a.)

The collection φ(a) = (φ(a)B)B∈C defines a natural transformation because φ(a)C (g ◦ f) = F (g ◦ f)(a) = F (g)(F (f)(a)) = F (g)(φ(a)B(f)) holds for every g : B → C in C. In other words, the following diagram commutes:

φ(a)B Hom(A, B) / F (B)

Hom(A,g) F (g)

  Hom(A, C) / F (C) φ(a)C

We still have to show that θF,A and φ are inverse to each other:

• For a ∈ F (A), we have θF,A(φ(a)) = φ(a)A(1A) = F (1A)(a) = 1F (A)(a) = a. • For each natural transformation α : Hom(A, −) → F , object B in C and a morphism f : A → B, we have φ(θF,A(α))B(f) = φ(αA(1A))B(f) = F (f)(αA(1A)) = αB(Hom(A, f)(1A)) = αB(f ◦ 1A) = αB(f). Hence φ(θF,A(α))B = αB for all B in C. This in turn implies φ(θF,A(α)) = α.  1 2 TARIK YILDIRIM

Define y : Cop → Fun(C, Set) as the functor sending a morphism f : A → B to the pre-composition natural transformation from Hom(B, −) to Hom(A, −). This is called the contravariant Yoneda functor.

Corollary 1.3. Contravariant Yoneda functor y : C op → Fun(C, Set) is full and faithful. Proof. This immediately follows from the remark we made in parentheses during the proof of Lemma 1.2. When F is set equal to Hom(C, −) for some C, bijection φ becomes the restriction of y to Hom(C,A).  Lemma 1.2 is called Yoneda Lemma, and is named after Nobuo Yoneda, a Japan- ese mathematician and computer scientist who died in 1996. Both Lemma 1.2 and Corollary 1.3 have dual versions:

Lemma 1.4. For a functor F : C op → Set, there exists a bijective correspondance Nat(Hom(−,A),F ) → F (A)

Corollary 1.5. Covariant Yoneda functor y : C → Fun(Cop, Set) is full and faith- ful. In the literature, covariant Yoneda functor is used more often than the con- travariant one, since its domain is the original category. Due to Corollary 1.5, it is referred to as the Yoneda Embedding. If we assume that hom-sets of C are dis- joint, then this functor is also injective on objects. However making this additional assumption would not be in line with the philosophy of Category Theory. (We care about between objects rather than equalities.)

Yoneda Lemma can be seen as an in Fun(Fun(C, Set) × C, SET). Pick a morphism (γ : F → G, f : A → B) in Fun(C, Set) × C. Define N as the bifunctor sending (γ, f) to the function Nat(Hom(A, −),F ) → Nat(Hom(B, −),G) that takes α to γ ◦ α ◦ Hom(f, −). Define E as the bifunctor sending (γ, f) to the function G(f) ◦ γA = γB ◦ F (f): F (A) → G(B). (Here E is called the evaluation functor and the equality follows from the naturality of γ.)

Lemma 1.6. The bijections θF,A together establish an isomorphism from N to E. Proof. First let us show that the bijections are natural in both F and A. Fix A in C, and pick a natural transformation γ : F → G. Then the following di- agram commutes because, for each α : Hom(A, −) → F , we have θG,A(N(γ, 1A)(α)) = θG,A(γ ◦ α) = (γ ◦ α)A(1A) = γA(αA(1A)) = γA(θF,A(α)) = E(γ, 1A)(θF,A(α)).

θF,A N(F,A) / E(F,A)

N(γ,1A) E(γ,1A)

  N(G, A) / E(G, A) θG,A

This proves that we have naturality in the first component. LECTURE NOTES ON CATEGORY THEORY 3

Now fix G : C → Set and pick a morphism f : A → B. The following diagram commutes because, for each α : Hom(A, −) → G, we have θG,B(N(1G, f)(α)) = θG,B(α ◦ Hom(f, −)) = (α ◦ Hom(f, −))B(1B) = αB(Hom(f, −)B(1B)) = αB(1B ◦ f) = αB(f ◦ 1A) = αB(Hom(A, f)(1A)) = (αB ◦ Hom(A, f))(1A) = (G(f) ◦ αA)(1A) = G(f)(αA(1A)) = G(f)(θG,A(α)) = E(1G, f)(θG,A(α)).

θG,A N(G, A) / E(G, A)

N(1G,f) E(1G,f)

  N(G, B) / E(G, B) θG,B

This proves that we have naturality in the second component. The above two squares, together with N(γ, f) = N((1G, f)◦(γ, 1A)) = N(1G, f)◦ N(γ, 1A) and E(γ, f) = E((1G, f) ◦ (γ, 1A)) = E(1G, f) ◦ E(γ, 1A), imply that the below square commutes for each morphism (γ, f) in Fun(C, Set) × C.

θF,A N(F,A) / E(F,A)

N(γ,f) E(γ,f)

  N(G, B) / E(G, B) θG,B

In other words, the bijections θF,A together form a natural transformation from N to E. 

Naturality in the first component gives an isomorphism (θF,A)F ∈Fun(C,Set) in Fun(Fun(C, Set), SET) showing that E(?,A), evaluation at A, is represented by Hom(A, −). In other words, we have E(?,A) =∼ Nat(Hom(A, −), ?). So we now have our first example of a ! (Sorry for the ugly notation.)

Naturality in the second component establishes an isomorphism (θF,A)A∈C in Fun(C, Set) between Nat(y(−),F ) and F . 2. Interpretation 2.1. Yoneda Subsumes Cayley. Yoneda Embedding can be viewed as a gener- alization of Cayley’s Theorem for monoids. Let M be a monoid. We can consider it as a category M with a single object •. If m ∈ M, then the natural transforma- tion HomM(−, m) : HomM(−, •) → HomM(−, •) can be seen as the endomorphism induced by the left-action of m: Since M has only one object, HomM(−, m) has only one leg, namely HomM(•, m) taking n ∈ HomM(•, •) to m ◦ n ∈ HomM(•, •). Faithfulness of Yoneda Embedding tells us that the left-actions of m and m0 induce the same endomorphism only if m = m0. This is exactly the content of Cayley’s Theorem which represents the elements of M as endomorphisms of the underlying set of M. (Of course, this underlying set is just HomM(•, •).) Since there may 4 TARIK YILDIRIM be endomorphisms that are not induced by left-actions, Cayley’s embedding is not necessarily full. Yoneda embedding on the other hand is full, because it considers only a certain class of endomorphisms, namely those that are natural. An endo- morphism α can be recognized as an object of Nat(HomM(−, •), HomM(−, •)) if and only if the following square commutes for each m ∈ HomM(•, •).

α HomM(•, •) / HomM(•, •)

Hom (m,•) Hom (m,•) M M   HomM(•, •) α / HomM(•, •)

In particular, this implies α(m) = α(1◦m) = α(1)◦m. So α is the endomorphism induced by the left-action of α(1).

2.2. The Philosophy. Recall that fully faithful reflect isomorphisms. ∼ Since any functor preserves isomorphisms, we have that HomC(−,A) = HomC(−,B) if and only if A =∼ B. (So, if a functor F : C → Set is represented by both A and B, ∼ then A = B.) If we regard HomC(C,A) as “A viewed from C”, then this result says that two objects are the same if and only if they look the same from all viewpoints. Here is an illustrative example given by Tom Leinster. ∼ ∼ If C = Set, then A = B if and only if HomSet(1,A) = HomSet(1,B). In other words, in Set, it suffices to look at objects from the view of one-element set. More structured categories often does not enjoy such a luxury. For instance, if C = Grp, then ∼ • HomGrp(1,A) = HomGrp(1,B) would tell us nothing at all. ∼ • HomGrp(Z,A) = HomGrp(Z,B) would tell us that A and B have isomor- phic underlying sets - that is, the same cardinality, but perhaps quite dif- ferent structures. ∼ • HomGrp(Z/pZ,A) = HomGrp(Z/pZ,B) would tell us that A and B have the same number of elements of order p, for a prime p, and so on. Each of these only gives partial information about the similarity of A ∼ and B, but the whole natural isomorphism HomGrp(−,A) = HomGrp(−,B) tells us that A =∼ B. So the lesson is that we can safely replace an object with its network of rela- tionships with every object. Objects themselves are blackboxes whose properties emerge via their interactions with each other. In Science and Hypothesis, Henri Poincare said: “The aim of science is not things themselves, as the dogmatists in their simplicity imagine, but the relations among things; outside these relations there is no reality knowable.” We can not analyze an object from inside out. We can analyze it only from outside in. For instance, our understanding of electrons changed substantially since they were first identified in late 19th century, although electrons are still the same electrons. On the other hand, there may be particles that do not interact with anything we interact with. Since we have no way of detecting them, for all practical purposes they can be considered as nonexistent. LECTURE NOTES ON CATEGORY THEORY 5

2.3. Generalized Elements. In Set, there is a one-to-one correspondance be- tween the elements of A and the from one element set to A. (Send a ∈ A to the function whose image consists of a. Conversely, send a function from 1 to A to its image.) From this perspective, evaluation of a function at a point can be seen as a special case of composition. The below triangle simply means that f(a) = b.

1  ?? a  ?? b  ??  ??   ? A / B f

So, evaluation is the special case of composition where T = 1:

T  @@ a  @@ b  @@  @@   @ A / B f

Based on this observation, William Lawvere and Robert Rosebrugh motivate the notion of a generalized element as follows. (The rest of this subsection, except for the final conclusion, is copied verbatim from the book Sets For Mathematics.) In many cases we will actually want to reverse this specialization procedure; that is, by the phrase “an element of A” we often actually mean a mapping to A from any T (not only T = 1). In case of confusion we may refer to this as “a generalized element of A”. A generalized element of A is actually nothing but an arbitrary mapping whose codomain happens to be A. It has some domain, but we do not insist that that domain be 1. A more accurate description in terms of the content would be “a variable element of A varing over T ”. This is a very ancient way of using the idea of element; for example, if we consider the way people talk about temperature, they say the temperature, which seems to be an element of the set of temperatures, and intend by it the actual temperature. On the other hand, yesterday it was one value, and today it is another value. It is varying, but it is still the. Just think of “T as the set of days”. For every day there is an element in the constant sense. The actual temperature on the day is the value of a mapping; the mapping itself is the temperature the weatherman is talking about. It is varying, but it is still considered as one entity, one “element”. We speak this way about many other situations. “I am a different person today than I was yesterday, yet I am still the same person.” To explain anything that involves that sort of variation, one very common model for it will involve somehow (not as its only ingredient by any means but as one ingredient) • an abstract set that plays the role of the “temporal” parameters, • another one that plays the role of values, and • a specific mapping that describes the result of the evolution process. 6 TARIK YILDIRIM

The process itself has some cause that may also have to be mentioned, but the result of that cause will be a succession of values; change is often described that way. But we will always correctly persist in attaching the definite article “the” as in “the temperature,” “the me” to express the underlying unity. An element of the set of temperatures might very well be (a) one single unchanging value of temperatures; equally well it might be (b) the temperature of Milan during one week, in which case it is still one (generalized) element of the set of temperatures, but its domain is T .

Using this language, Yoneda Embedding can be summarized as the following slogan: An object is determined completely by its generalized elements.

3. Some Examples Say C is the terminal category. Then Fun(Cop, Set) is just Set and Yoneda embedding takes the only object to the one element set. Similarly, if C is the discrete category with two objects, then Fun(Cop, Set) is just Set × Set and the Yoneda embedding takes the first and the second objects respectively to (1, 0) and (0, 1) where 1 is the one element and 0 is the empty set. Note that one can generate any object in Set×Set by taking unions of (1, 0) and (0, 1). (In fact, every Yoneda embedding has this generative property: A functor whose codomain is Set can be represented, in a canonical way, as a colimit of a diagram of representable functors. See Section 12.)

Say C is a poset considered as a category. Then Yoneda embedding takes A to the set ↓ (A) = (C ∈ C0 | C ≤ A), and becomes the statement that A = B if and only if ↓ (A) = ↓ (B). As a result, we get the representation of C by its principal ideals. (If C is the poset of open sets of a topological space, Fun(Cop, Set) is called the category of presheaves on that space and contains the category of sheaves as a full . See any theory book for more details.)

Say C is a group considered as a category. Then Fun(Cop, Set) is the category of all representations of the group C, where a representation consists of a set X to- gether with a left-action of C on X. A morphism between two such representations is simply a function f : X → Y respecting the action. (i.e. f(c · x) = c · f(x) for all c ∈ C1 and x ∈ x.) Yoneda Embedding recovers Cayley’s Theorem for groups in the same fashion as outlined in Section 2.1. (Just note that endomorphisms now become automorphisms.)

Say C is the category of finite ordinal numbers with order-preserving maps be- tween them. Then, by definition, Fun(Cop, Set) is the category of Simplicial Sets n and y(n) = Hom∆(−, n) is the standard n-simplex ∆ . The dual Yoneda Lemma implies that simplicial maps ∆n → F classify n-simplices of F in the sense that we can identify F (n) with Nat(∆n,F ). LECTURE NOTES ON CATEGORY THEORY 7

4. Universal Elements Definition 4.1. Say F : C → Set. If an element a ∈ F (A), for some A in C, satisfies the following property, then we say that (A, a) is a universal element of F : For each B in C and b ∈ F (B) there exists a unique f : A → B such that F (f)(a) = b. If F has two universal elements (A, a) and (A0, a0), then A is isomorphic to A0. This is an immediate consequence of the uniqueness condition in the definition.

Lemma 4.2. F : C → Set is a representable functor if and only if it has a universal element. Proof. Say F is represented by some A. In other words, there exists a natural isomorphism α : HomC(A, −) → F . Let us now go back to the proof of Yoneda Lemma in order to see that (A, θF,A(α)) is a universal element of F . For each B in C and b ∈ F (B), we need to find a morphism f : A → B such that F (f)(θF,A(α)) = b.

Recall that, for each g ∈ HomC(A, B), we had defined φ(θF,A(α))B(g) = αB(g) as −1 F (g)(θF,A(α)). So the most obvious choice for f is αB (b). If there was another 0 0 0 0 f : A → B such that F (f )(θF,A(α)) = b, then αB(f ) = F (f )(θF,A(α)) = b = 0 αB(f) would imply f = f by injectivity of αB.

Conversely, say F has a universal element (A, a). We claim that α : HomC(A, −) → F corresponding to a (via Yoneda Lemma) is an isomorphism. It suffices to show that function αB : HomC(A, B) → F (B) has an inverse for each B. But the univer- sality of a implies that, for each b ∈ F (B), there exists a unique f ∈ HomC(A, B) such that F (f)(a) = b. This defines a function βB : F (B) → HomC(A, B) such that αB(βB(b)) = F (βB(b))(θF,A(α)) = F (βB(b))(a) = b. Moreover, for any g ∈ HomC(A, B), we have βB(αB(g)) = βB(F (g)(θF,A(α))) = βB(F (g)(a)) = g  The universal property in Definition 4.1 can be rephrased as initiality in a suit- able category. Given F : C → Set, define El(F ) as the category whose objects are pairs (A, a) such that A ∈ C0 and a ∈ F (A), and whose morphisms from (A, a) to (B, b) consist of f ∈ HomC(A, B) satisfying F (f)(a) = b. Here El(F ) is called the of F , and the obvious forgetful functor from El(F ) to C is op denoted by πF . (For a contravariant functor F : C → Set, morphisms in El(F ) are defined differently to ensure that the codomain of πF is still C: The set of mor- phisms from (A, a) to (B, b) consist of f : A → B in C satisfying F (f op)(b) = a.) Note that, in El(F ), there are |A|-many copies of each f ∈ HomC(A, B). Corollary 4.3. F : C → Set is a representable functor if and only if El(F ) has an initial object.

Proof. Immediate from Lemma 4.2.  Back in those days when Category Theory was still in its infacy, the American and French Category Theorists preferred different methods for defining categorical objects. While the former group (led by ) preferred using initial- ity, the latter group (led by ) used representability. Corol- lary 4.3 shows that these two methods were in fact completely “interchangable”. (For the reverse direction, consider an object A in some category C. A is initial if and only if it represents the functor from C to Set sending every morphism to the identity function on the one element set.) 8 TARIK YILDIRIM

Let us study the case of tensor products as an illustration. Let C be Vect and fix vector spaces A and B. Consider the functor Bilin(A × B, −) ∈ Fun(C, Set) sending a C to the set of bilinear maps from A × B to C. The tensor ∼ product A ⊗ B represents this functor since HomVect(A ⊗ B, −) = Bilin(A × B, −). We also know that, for each vector space C and bilinear map f : A × B → C, there exists a unique homomorphism f¯ : A ⊗ B → C such that the following diagram commutes:

h A × B / A ⊗ B H HH HH HH ¯ HH f f HH HH HH  # C

Here h : A × B → A ⊗ B is the bilinear map taking (a, b) to a ⊗ b. Note that the commutativity of this triangle is equivalent to saying Bilin(A × B, f¯): Bilin(A × B,A ⊗ B) → Bilin(A × B,C) takes h to f. So, the pair (A ⊗ B, h) is initial in El(Bilin(A × B, −)). The French approach in this case looks neater.

Representing object is an optimally complicated object encoding enough infor- mation about your functor so that you can recover the functor by examining this object’s relationship with its environment. In some sense, it internalizes your func- tor and proves that you have not introduced anything “new”: The category C is perfectly capable of replicating your functor.

Search for representing objects is an ongoing enterprise in many different areas of mathematics. Here are some more examples:

• Forgetful functors are often representable. For example, Grp → Set and Top → Set are represented respectively by the group of integers Z and any one-point topological space.

• The powerset functor P : Setop → Set sending each A to its set of sub- sets is represented by the two element set Ω. We have HomSetop (Ω, −) = ∼ HomSet(−, Ω) = P since, for any A, the characteristic functions on A are in bijection with the subsets of A. (More generally, in any topos, the subobject functor is representable. Consult a topos theory book for more details.)

• Let Hot stand for the category of CW complexes, with the arrows being given by homotopy classes of continuous functions. For each natural number n, there is a functor Hn : Hotop → Set sending a CW complex A to its nth cohomology group Hn(A, Z). The Brown Representability Theorem asserts that this functor is represented by the Eilenberg-Mac Lane space K(Z, n). (This is a sophisticated result. Consult an advanced book on homotopy theory for more details.) LECTURE NOTES ON CATEGORY THEORY 9

5. Adjoint Functors Definition 5.1. Let G : D → C be a functor and A be an object in C. If HomC(A, G(−)) : D → Set is representable, then a universal element (RA, ηA) of this functor is called a reflection of A along G. We say that G has a left adjoint if each object in C has a reflection along G. Using axiom of choice, we can collapse this family of representability conditions into a single existence condition.

Proposition 5.2. Assume that G : D → C has a left adjoint and that a reflection (RA, ηA) has been chosen for each object A in C. Then there exists a unique functor F : C → D such that F (A) is RA for all A ∈ C0 and (ηA : A → G ◦ F (A))A∈C0 is a natural transformation from 1C to G ◦ F .

Proof. Given any morphism f : A → B in C, the universal property of (RA, ηA) ¯ ¯ induces a unique morphism f : RA → RB such that HomC(A, G(f))(ηA) = ηB ◦ f.

ηA A / G(RA) f G(f¯)   B / G(RB) ηB Let F send f to this unique f¯. If we can show that this assignment is functorial, then (ηA)A∈C0 will automatically become a natural transformation from 1C to G◦F and the proof will be complete. Pick a morphism g : B → C in C. Commutativity of the below diagram implies ¯ thatg ¯ ◦ f : A → C is the unique arrow induced by the pair (RC , ηC ◦ g ◦ f) and the universal property of (RA, ηA).

A / G(RA) ηA f G(f¯)   ¯ g◦f B / G(RB) G(¯g◦f) ηB g G(¯g ) %   z C / G(RC ) ηC

In other words, we have g ◦ f =g ¯◦f¯ and F respects composition. It is also clear that F preserves identities: F (1A) = 1A = 1RA = 1F (A). So F is indeed a functor. (Its uniqueness follows from that of each f¯.)  We now have the following alternative definition for left-adjoints. 10 TARIK YILDIRIM

Definition 5.3. F : C → D is left adjoint to G : D → C when there exists a natural transformation η : 1C → G ◦ F such that (F (A), ηA) is a reflection of A along G for each A in C. Say G : D → C is an equivalence of categories. Then there is a functor F : C → D, and natural isomorphisms  : F ◦G → 1D and η : 1C → G◦F . Given A ∈ C0, R ∈ D0 −1 and f ∈ HomC(A, G(R)), consider the morphism f ◦ ηA : G(F (A)) → G(R). Since G is full and faithful, there exists a unique morphism k : F (A) → R in −1 D such that G(k) = f ◦ ηA . In other words, there exists a unique k such that HomC(A, G(k))(ηA) = f. So (F (A), ηA) is a reflection of A along G. Since A was arbitrary, this means that F is left adjoint to G. Similarly, using −1 instead of η, one can deduce that G is left adjoint to F . So we have the following conceptual hierarchy: Every isomorphism between two categories is an equivalence, and every equivalence is an adjuction. Before we give any concrete examples of adjoint functors, let us derive two more alternative definitions. So far we used the same terminology for both the composi- tion of functors and the composition of morphisms. From now on, we will write FG instead of F ◦ G in order to avoid any confusion that may arise from this overlap. Theorem 5.4. Consider two functors F : C → D and G : D → C. The following conditions are equivalent: (a) F is left adjoint to G.

(b) There exist natural transformations η : 1C → GF and  : FG → 1D such that the following triangles commute for each A and R.

F (ηA) ηG(R) F (A) / F GF (A) G(R) / GF G(R) J J JJ JJ JJ JJ JJ JJ J F (A) J G(R) 1 JJ 1 JJ F (A) JJ G(R) JJ JJ JJ J%  J%  F (A) G(R) This characterization can be put into a purely equational form that has no direct set theoretical content. If you know how to compose natural transfor- mations horizontally, using the Godement product ∗, then commutativity of the above triangles simply means

( ∗ 1F ) ◦ (1F ∗ η) = 1F and (1G ∗ ) ◦ (η ∗ 1G) = 1G. (c) There exists bijections ∼ κA,R : HomD(F (A),R) = HomC(A, G(R)) for every object A in C and R in D, and these bijections are natural in both A and R. Proof. Let us first prove the implication (a) ⇒ (b).

Definition 5.3 supplies us a natural transformation η : 1C → GF . Pick an ar- bitrary R in D and consider the reflection (F (G(R)), ηG(R)) of G(R). Construct  by specifying its component R to be the unique morphism induced by the pair (R, 1G(R)) and the universal property of (F (G(R)), ηG(R)). This amounts to choos- ing R so that the second triangle above automatically commutes. Before we show that  is indeed a natural transformation, let us check that the first triangle com- mutes as well. LECTURE NOTES ON CATEGORY THEORY 11

Consider the following diagram where the square commutes since η is natural and the triangle commutes since it is an instance of the second triangle.

ηA A / GF (A)

ηA GF (ηA)

 ηGF (A)  GF (A) / GF GF (A) OOO OOO OOO OOO G(F (A)) 1GF (A) OO OOO OO'  GF (A)

Commutativity of the whole diagram implies that G(F (A) ◦ F (ηA)) ◦ ηA = G(F (A)) ◦ GF (ηA) ◦ ηA = 1GF (A) ◦ ηA = ηA. But the unique morphism f such that HomC(A, G(f))(ηA) = ηA is 1F (A). So we have F (A) ◦ F (ηA) = 1F (A), proving the commutativity of the first triangle. Now choose a morphism k : R → S in D. Consider the following diagrams where the square commutes since η is natural and the non-trivial triangles commute since they are instances of the second triangle of the theorem.

ηG(R) G(R) / GF G(R)

G(k) GF G(k)

 ηG(S)  G(S) / GF G(S) NNN NNN NNN NN G(S ) 1G(S) NN NNN NN'  G(S)

ηG(R) G(R) / GF G(R) > NN >> NN > NN 1 >> NNNG(R) > NN G(R) >> NNN >> NN > NN'  >> G(R) G(k) >> >> >> >> G(k) >> >> >  G(S) 12 TARIK YILDIRIM

Commutativity of the whole diagrams implies that G(S ◦ FG(k)) ◦ ηG(R) = G(S) ◦ GF G(k) ◦ ηG(R) = 1G(S) ◦ G(k) = G(k) and G(k ◦ R) ◦ ηG(R) = G(k). But there is only one morphism f such that HomC(G(R),G(f))(ηG(R)) = G(k). So we have S ◦ FG(k) = k ◦ R, proving the naturality of .

Let us now prove the implication (b) ⇒ (c).

Define κA,R as the function taking k ∈ HomD(F (A),R) to G(k) ◦ ηA. Similarly, define λA,R as the function taking f ∈ HomC(A, G(R)) to R ◦ F (f). Naturalities of η and  and the triangle equalities of (b) show that κA,R and λA,R are inverses to each other:

κA,R ◦ λA,R(f) = κA,R(R ◦ F (f)) = G(R ◦ F (f)) ◦ ηA = G(R) ◦ GF (f) ◦ ηA = G(R) ◦ ηG(R) ◦ f = 1G(R) ◦ f = f λA,R ◦ κA,R(k) = λA,R(G(k) ◦ ηA) = R ◦ F (G(k) ◦ ηA) = R ◦ FG(k) ◦ F (ηA) = k ◦ F (A) ◦ F (ηA) = k ◦ 1F (A) = k.

To prove the naturality of κA,R in A, we need to show that the following square commutes for each morphism g : A → B in C.

κB,R HomD(F (B),R) / HomC(B,G(R))

−◦ F (g) −◦ g

  Hom (F (A),R) / Hom (A, G(R)) D κA,R C

This is true since, for each k ∈ HomD(F (B),R), we have κA,R(k ◦ F (g)) = G(k ◦ F (g)) ◦ ηA = G(k) ◦ GF (g) ◦ ηA = G(k) ◦ ηB ◦ g = κB,R(k) ◦ g. To prove the naturality of κA,R in R, we need to show that the following square commutes for each morphism l : R → S in D.

κA,R HomD(F (A),R) / HomC(A, G(R))

l◦ − G(l)◦ −

  Hom (F (A),S) / Hom (A, G(S)) D κA,S C

This holds since, for each k ∈ HomD(F (A),R), we have κA,S(l◦k) = G(l◦k)◦ηA = G(l) ◦ G(k) ◦ ηA = G(l) ◦ κA,R(k).

Let us finally prove the implication (c) ⇒ (a). We will use Definition 5.1 for this purpose. Let λA,R stand for the inverse of the bijection κA,R. Given an object A in C, we will prove that (F (A), κA,F (A)(1F (A))) is a reflection of A along G. For any pair (R, f), where f ∈ HomC(A, G(R)), consider the mor- phism λA,R(f) ∈ HomD(F (A),R). By naturality of κA,R in the second component, we have G(λA,R(f))◦κA,F (A)(1F (A)) = κA,R(λA,R(f)◦1F (A)) = κA,R(λA,R(f)) = f. LECTURE NOTES ON CATEGORY THEORY 13

κA,F (A)(1F (A)) A / GF (A) RRR RRR RRR RRR RR G(λA,R(f)) f RRR RRR RRR RR(  G(R)

Moreover, λA,R(f) is the unique morphism making the above triangle commute.

If there is another such morphism k ∈ HomD(F (A),R), then naturality of κA,R in the second component implies κA,R(k) = κA,R(k◦1F (A)) = G(k)◦κA,F (A)(1F (A)) = f. In other words, we would have k = λA,R(κA,R(k)) = λA,R(f).  One writes F a G to indicate that F is left adjoint to G. In such a case G is called the right adjoint of F . A functor has a right adjoint if it itself is a left adjoint. Natural transformations η and  are called unit and counit of adjunction. Proposition 5.5. Adjoints are unique up to isomorphism. Given a functor G : D → C and left adjoints F,F 0, we have F =∼ F 0. Proof. For each A in C and R in D, we have two bijections induced by the adjunc- tions: 0 κA,R λA,R 0 HomD(F (A),R) −−−−−→ HomC(A, G(R)) −−−−−→ HomD(F (A),R) A 0 Their naturality in the second component tells us that Γ := (λA,R ◦ κA,R)R∈D0 0 forms a natural isomorphism from HomD(F (A), −) to HomD(F (A), −). Since the dual Yoneda Embedding is full and faithful, we have F (A) =∼ F 0(A) for each A in C. This new collection of bijections forms a natural transformation from F to F 0 if and only if the following commutes in the embedding for any g : A → B:

B Γ 0 HomD(F (B), −) / HomD(F (B), −)

−◦ F (g) −◦ F 0(g)

  Hom (F (A), −) / Hom (F 0(A), −) D ΓA D This diagram of natural transformations commutes since it does so component- 0 wise for each R. (Both κA,R and λA,R are natural in the first component.)

λ0 ◦κ B,R B,R 0 HomD(F (B),R) / HomD(F (B),R)

−◦ F (g) −◦ F 0(g)

  Hom (F (A),R) Hom (F 0(A),R) D 0 / D λA,R◦κA,R  14 TARIK YILDIRIM

Proposition 5.6. Adjoints compose. If F : C → D and H : D → E are respectively left adjoint to G and I, then HF : C → E is left adjoint to GI : E → C. Proof. For each C in C and E in E, consider the following bijections. ∼ ∼ HomE(HF (C),E) = HomD(F (C),I(E)) = HomC(A, GI(E)) Since they are natural in both C and E, we conclude that HF is left adjoint to GI.  Using Proposition 5.6, one can construct a category whose objects are small cat- egories and whose arrows are left adjoints. (Identity functors will be the identities.)

Proposition 5.7. Consider a functor G : D → C with a left adjoint F . If X is a small category, then the after-composition functor F∗ : Fun(X, C) → Fun(X, D) is left adjoint to G∗.

Proof. Let η : 1C → GF and  : FG → 1D be the unit and counit of F a G. Define η¯ : 1Fun(X,C) → G∗F∗ and ¯ : F∗G∗ → 1Fun(X,D) as the natural transformations with componentsη ¯K := η ∗ 1K : K → GF K and ¯H :=  ∗ 1H : F GH → H. Indeedη ¯ and ¯ are natural since η and  are. For instance, for any morphism 0 γ : K → K in Fun(X, C) and X in X, we have (G∗F∗(γ) ◦ η¯K )X = (1GF ∗ γ)X ◦ 0 0 (η ∗ 1K )X = GF (γX ) ◦ ηK(X) = ηK (X) ◦ γX = (η ∗ 1K )X ◦ (1Fun(X,C)(γ))X = 0 (¯ηK ◦ (1Fun(X,C)(γ)))X . In other words, the natural transformation G∗F∗(γ) ◦ η¯K is 0 equal toη ¯K ◦ (1Fun(X,C)(γ)). (A similar argument holds for ¯.) Moreover,η ¯ and ¯ satisfy the triangle identities required in Theorem 5.4, because

η and  do so. For instance, for each K in Fun(X, C), the equality ¯F∗(K) ◦F∗(¯ηK ) =

1F∗(K) holds since it does so componentwise for each A: (¯F∗(K) ◦ F∗(¯ηK ))A = (¯FK )A ◦ (F∗(¯ηK ))A = FK(A) ◦ F (ηK(A)) = 1K(A). (A similar argument holds for the other triangle equality.)  6. Some Examples 6.1. Representability. If a functor G : D → Set has a left-adjoint F , then there ∼ ∼ exists a family of bijections G(R) = HomSet(1,G(R)) = HomD(F (1),R) that is natural in R. So G is isomorphic to HomD(F (1), −). If D has copowers, then the converse is also true. Say G : D → Set is represented by some object R. Then the following functor

a X 7−→ R X is left adjoint to Hom (R, −), and therefore by the dual of Proposition 5.5 is also D ` left adjoint to G. Too see why, note that a morphism in HomD( X R,S) is just a collection of X-many morphisms from R to S. This correspondance establishes a ` natural bijection between HomD( X R,S) and HomSet(X, HomD(R,S)). 6.2. Initiality. Let G : D → 1 be the unique functor whose codomain is the category with one object • and one morphism 1•. A functor F from 1 to D is specified entirely by a choice of an object in D. So G has a left adjoint if and only if ∼ D has an object R such that HomD(R,S) = HomSet(•, •) = {∗} for all S. In other words, G has a left adjoint if and only if D has an initial object. Similarly, one can show that G has a right adjoint if and only if D has a terminal object. (Exercise.) LECTURE NOTES ON CATEGORY THEORY 15

6.3. Binary Coproducts. Assume that D has binary coproducts. Employ axiom of choice to pick a coproduct diagram for each pair of objects. Let ` be the bifunctor from D×D to D sending each pair of morphisms k : R → R0 and l : S → S0 to the following unique dashed arrow k ` l induced by the universal property of R ` S.

R0 ` S0 u: O dII uu II uu II u 0 0 I uu i j II uu II uu I R0 R ` S S0 O t: dJJ O tt JJ k tt JJ l tti j JJ tt JJ tt JJ R t S

Pick an object T in D. Every (m, n) ∈ Hom × ((R,S), (T,T )) induces a unique ` D D [m, n] ∈ Hom (R S, T ). This assignment has an inverse κ(R,S),T sending each `D f ∈ HomD(R S, T ) to (f ◦ i, f ◦ j). We claim that κ(R,S),T is natural in both (R,S) and T . Pick a morphism (k, l):(R,S) → (R0,S0).

κ 0 0 0 ` 0 (R ,S ),T 0 0 HomD(R S ,T ) / HomD×D((R ,S ), (T,T ))

−◦ (k ` l) −◦ (k,l)

 `  Hom (R S, T ) / Hom × ((R,S), (T,T )) D κ(R,S),T D D

` ` ` 0 0 Since κ(R,S),T (f ◦ (k l)) = (f ◦ (k l) ◦ i, f ◦ (k l) ◦ j) = (f ◦ i ◦ k, f ◦ j ◦ l) = 0 0 0 ` 0 (f ◦ i , f ◦ j ) ◦ (k, l) = κ(R0,S0),T (f) ◦ (k, l) holds for each f ∈ HomD(R S ,T ), the above square commutes. Let us now prove naturality of κ(R,S),T in the second component: Given a mor- 0 phism t : T → T , we have κ(R,S),T 0 (t ◦ f) = (t ◦ f ◦ i, t ◦ f ◦ j) = t ◦ (f ◦ i, f ◦ j) = ` t ◦ κ(R,S),T (f) for each f ∈ Hom (R S, T ). D ` So the bijections κ(R,S),T : HomD(R S, T ) → HomD×D((R,S), (T,T )) establish an adjuction. In other words, if D has binary coproducts, then the diagonal functor ∆ : D × D → D sending each object T to (T,T ) has a left-adjoint. Conversely, one can show that if ∆ has a left adjoint F , then D has binary coproducts. Coproduct of R and S will be F (R,S) and its canonical injections will be κ(R,S),F (R,S)(1F (R,S)) ∈ HomD×D((R,S), (F (R,S),F (R,S))). Note that there is a subtle difference between saying that D has binary coproducts and that ∆ has a left adjoint. In the latter case, we are supplied with a specific choice of a coproduct for each pair of objects. Also, in exactly the same fashion, one can show that the binary product × can be interpreted as a bifunctor and that ∆ has a right adjoint if and only if D has binary products. (Exercise.) 16 TARIK YILDIRIM

6.4. Exponents. Let D = Set. Assume that we are supplied with a specific choice of a product for each pair of sets. Choose a set S. Then (−) × S can be viewed as 0 0 an endofunctor from Set to Set sending k : R → R to k × 1S : R × S → R × S. Each function f : R × S → T induces R-many functions from S to T , since f(r, −) ∈ HomSet(S, T ) for each r ∈ R. Conversely, a choice of R-many functions fr ∈ HomSet(S, T ) determines a single function from R × S to T sending (r, s) to fr(s). It is easy to see that these assignments are inverse to each other. So, for each R and T we have a bijection from HomSet(R × S, T ) to HomSet(R, HomSet(S, T )). Moreover, these bijections are natural in both R and T . (Exercise.) In other words, (−) × S is left adjoint to HomSet(S, −). The component of the counit of adjuction at object T is the function evT ∈ HomSet(HomSet(S, T ) × S, T ) corresponding to

1HomSet(S,T ) via the described bijection. It is called an evaluation morphism since it sends (f, s) to f(s). In a general category D with binary products, if (−)×S has a right adjoint, then we notate it as (−)S and say S is exponentiable. If (−) × S has a right adjoint for each S, then we say D has exponents. A category is called cartesian closed if it has a terminal object, binary products and exponents. Recall that, in Section 1, we had constructed an evaluation morphism E : Fun(S, Set)×S → Set for Cat. One can use exactly the same definition to construct ET : Fun(S, T) × S → T for a general T. One can also show that (Fun(S, T),ET) is the coreflection of T along the functor (−) × S. (Exercise. Definition of coreflection is dual to that of reflection.) So, just like Set, Cat is also cartesian closed. Note that evaluation morphisms look like modus ponens inference rules of clas- sical logic: ((S ⇒ T ) ∧ S) ⇒ T. (In other words, if S implies T and S is true, then T is true as well.) This resemblance is not coincidental. (For more details, see Sheaves in Geometry and Logic by Saunders Mac Lane and Ieke Moerdijk.) The terminology chosen here is clearly reminiscent of arithmetic and that is done on purpose. In the category of finite sets FinSet, we have |T S| = |T ||S| as in 8 = 2 3. (Here |T | stands for the size of T .) Moreover, in a general cartesian , the usual exponent laws of arithmetic holds: 1S =∼ 1, T 1 =∼ T , T S×R =∼ (T R)S and (R × T )S =∼ (RS) × (T S). (Exercise.) If your category has also a strict initial object, then 0S =∼ 1 holds as well. (An initial object 0 is called strict if each morphism with codomain 0 is an isomorphism.) All are cartesian closed and have strict initial objects. (Set and FinSet are such examples.)

6.5. Tensor Products. The exponent T S is also called the internal hom of T and S. Set had exponents, because each HomSet(S, T ) was by definition a set. Similarly, Cat had exponents, because each set HomCat(S, T ) could be endowed with a category structure. Vect on the other hand is not cartesian closed. Each set HomVect(S, T ) has the structure of a vector space and each HomVect(S, −): has a left adjoint, but that left adjoint is not (−) × S. Let us try to copy the proof of (−) × S a HomSet(S, −) from the case of Set. Is the evaluation function evT from HomVect(S, T ) × S to T sending (f, s) to f(s) a vector space homomorphism for each T ? Unless S is the trivial vector space or your field is the trivial two element field, the answer is no. To see why pick a non-zero, non-identity element a from your field. Then evT (a · (f, s)) = evT (a · f, a · s) = 2 f(a · a · s) = a · f(s) is equal to a · evT (f, s) = a · f(s) for all f, s if and only if (a−1)·f(s) is 0 for all f, s. In other words, f(s) = 0 for all f, s and HomVect(S, T ) LECTURE NOTES ON CATEGORY THEORY 17 consists of only the zero homomorphism. This is clearly not true unless S or T is the trivial vector space. Let us ignore this issue for a second and try to see what else may go wrong. Say there exists a vector space homomorphism from g : R × S → T for some R. Considering g as a set theoretical function, the universal property of the evaluation function supplies us a unique functiong ¯ : R → HomSet(S, T ) such that the following diagram commutes in Set.

evT HomSet(S, T ) × S / T O oo7 ooo ooo ooo g¯×S oo ooog ooo ooo ooo R × S

Hereg ¯ sends r to the function g(r, −). Note that g(r, −) ∈ HomVect(S, T ) and g¯ ∈ HomVect(R, HomVect(S, T )) if and only if g satisfies the following properties for all r, r0 ∈ R, s, s0 ∈ S and field elements a: g(r + r0, s) = g(r, s) + g(r0, s), g(r, s + s0) = g(r, s) + g(r, s0), and g(a · r, s) = a · g(r, s) = g(r, a · s). In other words,g ¯ can be considered as a vector space homomorphism if and only if g is a bilinear map. This observation suggests us to leave the world of vector space homomorphisms and enter the world of bilinear maps. However there is one big obstacle. We are not allowed to switch from Vect to another category. Afterall we are trying to prove that HomVect(S, −): Vect → Vect has a left adjoint. How can we make sure that we are only faced with bilinear g without actually leaving Vect? Well, the most gentle way of guaranteeing this is by replacing the product × with the tensor product ⊗: Pre-composition of a morphism in HomVect(R ⊗ S, T ) with the canonical morphism h : R × S → R ⊗ S is automatically bilinear. More- over, by making this move, we will also eliminate the previous problem. The set theoretical function EVT from HomVect(S, T )⊗S to T sending f ⊗s to f(s) is a vec- tor space homomorphism. The left-multiplication issue is automatically resolved: evT (a · (f ⊗ s)) = evT (f ⊗ a · s) = f(a · s) = a · f(s) = a · evT (f ⊗ s). Given a vector space homomorphism g : R ⊗ S → T , the assignmentg ¯ from R to HomVect(S, T ) sending r to g ◦h(r, −) = g(r ⊗−) is a vector space homomorphism. Moreover, it clearly makes the following commute in Vect.

EVT HomVect(S, T ) ⊗ S / T O oo7 ooo ooo ooo g¯⊗S oo ooog ooo ooo ooo R ⊗ S Uniqueness ofg ¯ is derived as in the case of Set: For each fixed r ∈ R, commu- tativity of the above triangle implies thatg ¯(r)(s) = g(r ⊗ s) for all s ∈ S. We conclude that, for each vector space T , (HomVect(S, T ),EVT ) is the core- flection of T along the functor − ⊗ S : Vect → Vect. By the dual of Definition 5.1, this implies that HomVect(S, −) is right adjoint to (−) ⊗ S. 18 TARIK YILDIRIM

7. Limits Fix a functor F : C → D. (Think of its image as a diagram in D.)

Definition 7.1. A cone on F : C → D consists of the following data: (a) an object R in D, (b) a collection of morphisms (µA : R → F (A))A∈C0 in D satisfying µB = F (f) ◦ µA for each morphism f : A → B in C.

There is a nice way to express this data using the diagonal functor ∆ : D → Fun(C, D) that sends each object R to the constant functor ∆(R) mapping every morphism to 1R. On morphisms the diagonal functor is defined in the most obvious way: Each morphism k : R → S determines a natural transformation ∆(k): ∆(R) → ∆(S) where ∆(k)A = k for each object A of C. (The naturality diagrams are satisfied trivially since k ◦ 1R = 1S ◦ k.) A cone over F : C → D is simply a pair (R, µ) where R is an object in D and µ is a natural transformation from ∆(R) to F . (The components of the natural transformation coincide with the legs of the cone.) In other words, it is an object in the category of elements of the functor Nat(∆(−),F ): Dop → Set. Note that the naturality conditions amount to the commutativity of the following square for each f : A → B.

µA R / F (R)

1R F (f)

  R / F (B) µB

This is exactly the second condition in Definition 7.1.

A terminal object (Lim(F ), τF ) in the category El(Nat(∆(−),F )) is called a limit of F . (So Lim(F ) is unique up to an isomorphism!) In other words, in the language of Section 4, a limit of F is a couniversal element of the functor Nat(∆(−),F ). This means that, for every cone (R, µ), there exists a unique morphism k : R → Lim(F ) making the following triangle commute.

τ ∆(Lim(F )) F :/ F O uu uu uu uu ∆(k) u uuµ uu uu uu uu ∆(R) LECTURE NOTES ON CATEGORY THEORY 19

Let us put this requirement in a more explicit form. We will drop the subscript F from τF for the sake of notational clarity. Definition 7.2. Given a functor F : C → D, its limit is a cone (Lim(F ), τ) on F such that, for every cone (R, µ) on F , there exists a unique morphism k : R → Lim(F ) satisfying τA ◦ k = µA for each object A.

The uniqueness condition immediately implies the following fact: If τA ◦k = τA ◦l for all A, then k = l.

Definition 7.3. A category C is called small when its class of morphisms C1 is a set. It is called finite when C1 is a finite set. Recall that an arbitrary category has a class of objects and a set Hom(A, B) for each pair of objects A, B. Hence C0 is a set if and only if C1 is a set. Note that Cat, Set, Top and Grp are not small. A poset considered as a category, on the other hand, is small. A finite group considered as a category is finite. A category with infinitely many objects can never be finite.

Of course, there is no apriori reason why a category should have any limits: Definition 7.4. A category D is called finitely complete if every functor F : C → D, where C is a finite category, has a limit. It is called complete if every functor F : C → D, where C is a small category, has a limit. We need the smallness assumption due to a set theoretical complication. Say D is a category for which every functor F : C → D has a limit. Pick distinct parallel morphisms m, n : S ⇒ T . Let C be the discrete category of size |D1|. Let F send each object to T . Then the limit on F is just a product of |D1|-many copies of T . Using m, n we can construct 2|D1| many distinct cones on F , and thereby get 2|D1| many distinct factorizations from S to Lim(F ). But this cardinality strictly exceeds the cardinality |D1| of all morphisms! Hence we have a contradiction. There could never have been any distinct parallel morphisms m, n in the first place. In other words, requiring a category to have limits for every F : C → D is too restrictive. It forces the category to be a pre-ordered class. (Since D1 is a class, the cardinality argument needs to be carried inside the appropriate universe. For a definition of a universe, consult Handbook of Categorical Algebra I by Francis Borceux.) Smallness comes up in another context too. Whenever we considered Fun(C, D), we always implicitly assumed that C was a small category. Otherwise, there is no guarantee that the hom-sets in the are actually sets. (Re- call that each natural transformation is a collection of morphisms indexed by C0 which can be a proper class.) In general, if D lives in one higher universe than C does, then Fun(C, D) lives in the same universe as D does. For instance, Fun(Fun(C, Set), SET) mentioned in Section 1 lives in the same universe as the metacategory SET does.

We have already noted that limits can be seen as terminal objects. They can also be organized into right adjoints if the category D is complete. If the functor op HomFun(C,D)(∆(−),F ) = Nat(∆(−),F ) from D to Set has a couniversal element (Lim(F ), τF ) for each F , then there exists a unique functor Lim : Fun(C, D) → D that sends F to Lim(F ) and is right adjoint to ∆. (This is a consequence of the dual of Proposition 5.2.) 20 TARIK YILDIRIM

Say we are given a functor Γ : X → Fun(C, D) where X and C are small categories. Recall the bifunctor ED : Fun(C, D) × C → D mentioned in Section 6.4. For each A in C, the evaluation functor ED(−,A) : Fun(C, D) → D sends F to F (A). Pre- composed with Γ, it yields a functor ED(Γ(−),A): X → D sending each X to Γ(X)(A). We define Λ : C → Fun(X, D) as the functor sending each object A to ED(Γ(−),A) and each morphism f : A → B to (Γ(X)(f))X∈X. Here Λ(f) is natural since, for each u : X → Y , we have ED(Γ(u),B) ◦ Λ(f)X = Γ(u)B ◦ Γ(X)(f) = Γ(Y )(f)◦Γ(u)A = Λ(f)Y ◦ED(Γ(u),A) due to the naturality of Γ(u). Functoriality of Λ follows immediately from the functorialities of Γ(X)’s. If D is also small, then Λ is just the image of Γ under the isomorphisms (D C) X =∼ D X×C =∼ D C×X =∼ (D X) C in Cat. Let us call this composition of isomorphisms Ψ. (We will refer to it right after the proof of the following theorem.)

Theorem 7.5. Assume that X and C are small categories. Consider a functor Γ: X → Fun(C, D) and its corresponding Λ: C → Fun(X, D) which is defined as above. If Λ(A) has a limit (Lim(Λ(A)), τΛ(A)) for each A in C, then the limit of Γ exists and Lim(Γ) : C → D can be defined as follows: For each f : A → B, Lim(Γ)(f) : Lim(Λ(A)) → Lim(Λ(B)) is the uniquely induced morphism taking the cone (Lim(Λ(A)), Λ(f) ◦ τΛ(A)) to the limit cone (Lim(Λ(B)), τΛ(B)). Since Λ(A) = Γ(−)(A), we say that limits in Fun(C, D) are calculated pointwise.

Proof. Let us define Lim(Γ)(f) as in the statement of the theorem. This makes Lim(Γ) : C → D a functor due to the following observations:

• For each A in C, we have Lim(Γ)(1A) = 1Lim(Λ(A)) = 1Lim(Γ)(A). • For each f : A → B and g : B → C, Lim(Γ)(g ◦ f) is the unique morphism satisfying (τΛ(C))X ◦ Lim(Γ)(g ◦ f) = (Λ(g ◦ f) ◦ τΛ(A))X = Λ(g ◦ f)X ◦ (τΛ(A))X = Γ(X)(g ◦ f) ◦ (τΛ(A))X for all X. But we also have (τΛ(C))X ◦ Lim(Γ)(g) ◦ Lim(Γ)(f) = (Λ(g) ◦ τΛ(B))X ◦ Lim(Γ)(f) = Λ(g)X ◦ (τΛ(B))X ◦ Lim(Λ)(f) = Γ(X)(g)◦(τΛ(B))X ◦Lim(Γ)(f) = Γ(X)(g)◦(Λ(f)◦τΛ(A))X = Γ(X)(g) ◦ Λ(f)X ◦ (τΛ(A))X = Γ(X)(g) ◦ Γ(X)(f) ◦ (τΛ(A))X = Γ(X)(g ◦ f) ◦ (τΛ(A))X for all X. So Lim(Γ)(g ◦ f) = Lim(Γ)(g) ◦ Lim(Γ)(f).

Let µX denote the set ((τΛ(A))X )A∈C0 where each (τΛ(A))X is a morphism from Lim(Λ(A)) = Lim(Γ)(A) to Λ(A)(X) = Γ(X)(A). It constitutes a natural trans- formation from Lim(Γ) to Γ(X) since, for each f : A → B, we have (τΛ(B))X ◦ Lim(Γ)(f) = (Λ(f) ◦ τΛ(A))X = Λ(f)X ◦ (τΛ(A))X = Γ(X)(f) ◦ (τΛ(A))X by defini- tion of Lim(Γ)(f).

Let µ denote the set (µX )X∈X0 . It satisfies Γ(u) ◦ µX = µY for each u : X → Y since we have (Γ(u) ◦ µX )A = Γ(u)A ◦ (µX )A = Λ(A)(u) ◦ (τΛ(A))X = (τΛ(A))Y = (µY )A for each A. In other words, (Lim(Γ), µ) is a cone on Γ. Say (F, α) is another cone on Γ. For each u : X → Y , the equality Γ(u)◦αX = αY implies that Λ(A)(u) ◦ (αX )A = Γ(u)A ◦ (αX )A = (Γ(u) ◦ αX )A = (αY )A holds for each A. In other words, for a fixed A, the set of morphisms (αX )A : F (A) → Γ(X)(A) = Λ(A)(X) indexed by X constitutes a cone over Λ(A). So, for each A, we get a uniquely induced γA : F (A) → Lim(Λ(A)) = Lim(Γ)(A) such that (τΛ(A))X ◦ γA = (αX )A for all X. LECTURE NOTES ON CATEGORY THEORY 21

We claim that γ := (γA)A∈C0 is a natural transformation from F to Lim(Γ). Pick a morphism f : A → B. We need to prove that the following square commutes. It suffices to show that it does so after being composed with (τΛ(B))X for each X.

γA F (A) / Lim(Γ(A))

F (f) Lim(Γ)(f)

 γB  F (B) / Lim(Γ(B))

For each X, consider the following diagram where

• the top and bottom triangles commute by definition of γA and γB, • the right deformed rectangle commutes by definition of Lim(Γ)(f), • and the middle square commutes since αX : F → Γ(X) is natural.

Lim(Λ(A)) t9 tt tt γA tt tt (τΛ(A))X tt tt tt tt tt  F (A) / Λ(A)(X) (αX )A

F (f) Γ(X)(f) Lim(Γ)(f)

 (αX )B  F (B) / Λ(B)(X) J O JJ JJ JJ JJ J (τΛ(B))X γB JJ JJ JJ JJ J% x Lim(Λ(B))

Commutativity of the whole diagram implies that we have (τΛ(B))X ◦γB ◦F (f) = (τΛ(B))X ◦ Lim(Γ)(f) ◦ γA for each X. Hence, by the previous remark, γ is a natural transformation. Moreover, we have µX ◦ γ = αX for each X, because (µX ◦ γ)A = (µX )A ◦ γA = (τΛ(A))X ◦ γA = (αX )A holds for each A. Also, γ is the unique natural transformation satisfying this equality since each γA is the unique morphism satisfying (µX )A ◦ γA = (αX )A. For an arbitrary cone (F, α) on Γ, we have obtained a unique γ : F → Lim(Γ) satisfying µX ◦ γ = αX for each X. This proves that (Lim(Γ), µ) is indeed a limit cone on Γ.  22 TARIK YILDIRIM

Say X, C and D are all small categories. Assume that D is complete. Employ axiom of choice to get a functor Lim : D X → D. (See Proposition 5.2.) Rename this functor to LimD for the sake of terminological accuracy. Theorem 7.5 tells us that C is complete and Lim can be chosen in a way so that the following commutes. D D C

Ψ×1 (D C) X × C C / (D X) C × C

Lim ×1 E D C C D X

  D C × C D X II u II uu II uu II uu II uu E II uuLim D II uu D II uu II uu I$ zuu D Note that the pentagon commutes not only at the level of objects, but also at the level of morphisms. To see why, pick a morphism (η, f) from (Γ,A) to (Σ,B) in (D C) X × C. Let (Lim(Γ), τ) and (Lim(Σ), µ) be the limits of Γ and Σ respectively. Lim takes η to the uniquely induced morphism  : Lim(Γ) → Lim(Σ) taking D C the cone (Lim(Γ), η ◦ τ) to the limit cone (Lim(Σ), µ). (The component A of this natural transformation makes the top square of the following diagram commute for each X.) Then ED sends (, f) to Lim(Σ)(f) ◦ A.

(τX )A Lim(Γ)(A) / Γ(X)(A)

A (ηx)A

 (µX )A  Lim(Σ)(A) / Σ(X)(A)

Lim(Σ)(f) Σ(X)(f)

 (µX )B  Lim(Σ)(B) / Σ(X)(B) Let us now see what happens to (η, f) when it travels through the other route. Firstly, note that the A-component of Ψ(η) is a natural transformation Ψ(η)A : E(Γ(−),A) → E(Σ(−),A) whose X-component is (ηX )A : Γ(X)(A) → Σ(X)(A). So E takes (Ψ(η), f) to the natural transformation whose X-component is D X Σ(X)(f) ◦ (ηX )A : Γ(X)(A) → Σ(X)(B). Finally, LimD takes this natural trans- formation to the unique β : Lim(Γ)(A) → Lim(Σ)(B) satisfying the equality Σ(X)(f) ◦ (ηX )A ◦ (τX )A = (µX )B ◦ β for each X. We have already noted that the top square of the above diagram commutes. The bottom one also commutes since µX is a natural transformation from Lim(Σ) to Σ(X). Hence the whole diagram commutes for each X, and β is Lim(Σ)(f) ◦ A. So the pentagon commutes. LECTURE NOTES ON CATEGORY THEORY 23

Proposition 7.6. Say C has an initial object 0. For each F : C → D, the collection (F (!A): F (0) → F (A))A∈C0 constitutes a limit cone on F .

Proof. Note that (F (!A))A∈C0 constitutes a cone since F (f) ◦ F (!A) = F (f◦!A) = F (!B) for each f : A → B. If (R, µ) is another cone on F , then µ0 : R → F (0) satisfies F (!A) ◦ µ0 = µA for each A. If there exists another such l : R → F (0), then in particular we have l = 1F (0) ◦ l = F (10) ◦ l = F (!0) ◦ l = µ0.  The concept of a limit generalizes several important categorical constructions, some of which are already familiar to you: • A category D has a terminal object if and only if the unique functor from the empty category to D has a limit. (Note that a cone over the empty diagram is simply an object.) • Say C is a discrete category. If the limit of a functor F : C → D exists, then Lim(F ) is just the product Q F (A). In other words, every product A∈C0 (together with its projection morphisms) can be seen as a limit cone.

8. Equalizers and Pullbacks Let C be the category with two objects and two non-identity parallel arrows • ⇒ •. A functor F : C → D is determined by a selection of two parallel arrows m, n : S ⇒ T in D. A cone over this diagram is specified by an object R and a morphism µ : R → S such that m ◦ µ = n ◦ µ, and a limit cone is called an equalizer of m, n. Let us write out an explicit definition.

Definition 8.1. Consider m, n : S ⇒ T in a category D. An equalizer of m, n consists of a pair (L, τ) where (a) L is an object in D, (b) τ : L → S is a morphism satisfying m ◦ τ = n ◦ τ, such that for every pair (R, µ) where (a) R is an object in D, (b) µ : R → S is a morphism satisfying m ◦ µ = n ◦ µ, there exists a unique morphism k : R → L satisfying τ ◦ k = µ.

R L LL LL µ LL k LL LL LL m  L& / L τ / S T n / Given a pair m, n : S ⇒ T in Set, the inclusion of the set L = {s ∈ S | m(s) = n(s)} inside S is an equalizer of m, n. Similarly, in Top, the same set with the subspace topology induced from S is an equalizer of m, n. In Grp, L automatically inherits a group structure and again becomes an equalizer. (In particular, if n is the zero morphism, then L is just the kernel of m.) In Ab, L can be expressed as the kernel of m − n and is again an equalizer.

Proposition 8.2. If m, n : S ⇒ T in D have an equalizer (L, τ), then τ : L → S is a monomorphism.

Proof. This is a consequence of the remark made right after Definition 7.2  24 TARIK YILDIRIM

The converse statement is not true in every category. For instance, it is false in Rng: Since the inclusion Z ,→ Q is an epimorphism, if it was also an equalizer, then it would have to be an isomorphism. (See next proposition.) In Ab, if τ : L → S is a monomorphism, then it is an equalizer of the zero morphism and the quotient map taking S to S/τ(L). In Set, an injection τ : L → S is an equalizer of characteristic functions χτ(L), χS : S → {0, 1}. (Same argument can be carried out in any topos.) Split monomorphisms, on the other hand, are always equalizers: If a morphism s satisfies t ◦ s = 1dom(s) for some t, then s is an equalizer of 1cod(s) and s ◦ t. Proposition 8.3. If a morphism is both an equalizer and an epimorphism, then it is an isomorphism.

Proof. Say an epimorphism τ : L → S equalizes m, n : S ⇒ T . Then m ◦ τ = n ◦ τ immediately implies m = n. But the equalizer of m, m : S ⇒ T is simply 1S. Since limits are uniquely determined up to an isomorphism, this means that there exists an isomorphism k : L → S such that 1S ◦ k = τ. So τ itself is an isomorphism.  Now let us discuss another important categorical construction which is also a special case of limits. Let C be the category with three objects and the following two non-identity morphisms: • → • ← • . A functor F : C → D is determined by m n a selection of two morphisms S −→ T ←− U in D. A cone over this diagram is µ1 µ2 specified by an object R and morphisms S ←− R −→ U such that m ◦ µ1 = n ◦ µ2. A limit cone is called a pullback of m, n. Let us write out an explicit definition. m n Definition 8.4. Consider S −→ T ←− U in a category D. A pullback of m, n consists of a triple (L, τ1, τ2) where (a) L is an object in D, τ1 τ2 (b) S ←− L −→ U satisfies m ◦ τ1 = n ◦ τ2, such that for every triple (R, µ1, µ2) where (a) R is an object in D, µ1 µ2 (b) S ←− R −→ U satisfies m ◦ µ1 = n ◦ µ2, there exists a unique morphism k : R → L satisfying τ1 ◦ k = µ1 and τ2 ◦ k = µ2.

R OO //? OO / ? OOO / ? OOO // ? k OO µ2 / ? OOO / ? OOO // OO / ? OOO / ? τ OO / 2 O' µ1 / L / U // // // / τ1 n // // /   S m / T

We call the above square a pullback square, and refer to τ1, τ2 as pullback pro- jections. We say τ1 is a pullback of n along m, and τ2 is a pullback of m along n. In the literature, L and τi are often notated as S ×T U and πi. LECTURE NOTES ON CATEGORY THEORY 25

The pullback of a pair m, n in Set is given by the following data: L = {(s, u) ∈ S × U | m(s) = n(u)}, τ1(s, u) = s, τ2(s, u) = u. (If U is a subset of T and n is the canonical inclusion, then L is isomorphic to the inverse image m−1(U). If both m : S → T and n : U → T are canonical inclusions, then L is isomorphic to the intersection S ∩ U.) Similarly, in Top, L inherits a subspace topology from S × U and (L, τ1, τ2) becomes a pullback of m, n. In Grp, L inherits a group structure and (L, τ1, τ2) again becomes a pullback. (In particular, if U is the trivial group, then L is just the kernel of m.) Proposition 8.5. Pullback of a monomorphism along any morphism is again a monomorphism. Proof. Say we have a pullback square as in the previous diagram. Assume that n is a monomorphism and that τ1 ◦ k = τ1 ◦ l for some k, l : R ⇒ L. Then n ◦ (τ2 ◦ k) = m ◦ τ1 ◦ k = m ◦ τ1 ◦ l = n ◦ (τ2 ◦ l) implies τ2 ◦ k = τ2 ◦ l. By the remark made right after Definition 7.2, we deduce that k = l.  So, the class of monomorphisms is pullback-stable. The class of epimorphisms, on the other hand, is generally not pullback-stable. But in Set it is: In the diagram on the previous page, if n is an epimorphism and s ∈ S, then there exists an element u ∈ U such that n(u) = m(s). (So (s, u) ∈ L and τ1(s, u) = s.) More generally, the class of epimorphisms is pullback-stable in any topos. (Consult a topos theory book for more details.) Proposition 8.6. Pullback of an isomorphism along any morphism is again an isomorphism. Proof. Say we have a pullback square as in the previous diagram. Assume that 0 0 0 there exists n such that n ◦ n = 1T and n ◦ n = 1U . By the previous proposition, we already know that τ1 is a monomorphism. So, it suffices to prove that τ1 is a split epimorphism. The uniquely induced dashed arrow in the below diagram provides the required splitting:

S O /?OOO // ? OO / ? OOO / ? OOOn0◦m // OO / ? OOO / ? OOO // ? OO / ? OOO / τ2 O' 1 / L / U S // // // / τ1 n // // /   S m / T  If the pullback of a morphism m : S → T along itself exists, we call it the kernel pair of m. In Set, it consists of the following data: L = {(s, s0) ∈ S × S | m(s) = 0 0 0 0 m(s )}, τ1(s, s ) = s, τ2(s, s ) = s . In Grp, the set L is a of S × S and the quotient group induced by this congruence relation is the usual S/ker(m). 26 TARIK YILDIRIM

Here are two useful observations for m : S → T in an arbitrary category D: • If the kernel pair (L, τ1, τ2) of m exists, then τ1 and τ2 are split epimor- phisms. (The unique morphism induced by the equality m ◦ 1S = m ◦ 1S splits both of these morphisms.) • m is a monomorphism if and only if (S, 1S, 1S) is its kernel pair. (Exercise.) The last remark, together with Theorem 7.5, implies the following: If D has pullbacks and C is small, then a natural transformation in Fun(C, D) is a monomor- phism if and only if each of its components is one.

9. Existence Theorems Consider a functor F : C → Set where C is a small category. Then Lim(F ) is the following set sitting inside the product Q F (A): A∈C0

Q {(xA)A∈ ∈ F (A) | F (f)(xdom(f)) = xcod(f) for each f ∈ 1} C0 A∈C0 C

The fact that this set is indeed Lim(F ) should be clear: We are weeding out only the “bad” elements, the ones that prevent the product projections from satisfying the required commutativity conditions. (Adding more morphisms to your diagram downstairs will make this set smaller.) The inclusion of Lim(F ) inside Q F (A) can be seen as an equalizer: A∈C0

 Q α Q Lim(F ) / F (A) / F (cod(f)) A∈C0 / f∈C1 β Here, the second product contain as many copies of F (A) as the “number” of morphisms with codomain A, and α and β send each (xA)A∈C0 respectively to (xcod(f))f∈C1 and (F (f)(xdom(f)))f∈C1 .

This shows that limits in Set can be expressed by using only products and equalizers. Let us now see how the above construction can be carried out in any arbitrary category with products and equalizers.

Theorem 9.1. A category D is complete precisely when each set-indexed family of objects has a product and each pair of parallel arrows has an equalizer. Proof. In the previous two sections, we noted how products and equalizers can be viewed as special cases of limits. Hence completeness implies the existence of products and equalizers. Q Conversely, consider F : C → D where C is small. Construct products A∈ F (A) Q C0 and F (cod(f)) with projection morphisms (pA)A∈ and (qf )f∈ . f∈C1 C0 C1 Multiplying each pA as many times as the “number” of morphisms with codomain Q A gives us a cone from the object A∈ F (A) to the discrete diagram consisting C0 Q of (F (cod(f)))f∈ 1 . It, in turn, induces a unique morphism α from A∈ F (A) to Q C C0 F (cod(f)) satisfying qf ◦ α = pcod(f) for each f ∈ 1. f∈C1 C The following set of morphisms indexed by f ∈ C1 also constitutes a cone from Q the object F (A) to the discrete diagram consisting of (F (cod(f)))f∈ . A∈C0 C1

pdom(f) F (f) Q F (A) F (dom(f)) F (cod(f)) A∈C0 / / LECTURE NOTES ON CATEGORY THEORY 27

It, in turn, induces a unique morphism β satisfying qf ◦ β = F (f) ◦ pdom(f) for each f ∈ C1. Let (L, m) be the equalizer of the pair α,β.

α m Q Q L / F (A) / F (cod(f)) A∈C0 / f∈C1 β

Define τA : L → F (A) as pA ◦ m. Then, for each morphism f in C, we have F (f)◦τdom(f) = F (f)◦pdom(f) ◦m = qf ◦β◦m = qf ◦α◦m = pcod(f) ◦m = τcod(f). In other words, the set τ := (τA)A∈C0 constitutes a cone over the functor F : C → D. We claim that (L, τ) is in fact a limit cone. Say (R, µ) is another cone over F . Considering µ as a cone over the discrete diagram consisting of (F (A))A∈C0 , we get a uniquely induced l satisfying pA ◦l = µA for each A ∈ C0. But, for each f ∈ C1, we have qf ◦ α ◦ l = pcod(f) ◦ l = µcod(f) = F (f) ◦ µdom(f) = F (f) ◦ pdom(f) ◦ l = qf ◦ β ◦ l. So, by the remark made right after Definition 7.2, we deduce α ◦ l = β ◦ l. Since m is an equalizer of α and β, this induces a unique k : R → L such that m ◦ k = l. The following two observations prove that k is the required factorization:

• τA ◦ k = pA ◦ m ◦ k = pA ◦ l = µA for each A. 0 0 • Say there exists another morphism k such that τA ◦ k = µA for each A. 0 0 Then pA ◦ m ◦ k = pA ◦ l = µA = τA ◦ k = pA ◦ m ◦ k for each A. Hence m ◦ k = m ◦ k0. Since m is a monomorphism, this means k = k0.  We immediately deduce that Set, Grp and Top are all complete categories. If D is a poset considered as a category, then it has all equalizers since there are no distinct parallel arrows. So D is complete precisely when it is complete as a poset. Corollary 9.2. A category D is finitely complete precisely when it has a terminal object, binary products and equalizers. Proof. Clearly, a finitely complete category has a terminal object, binary products and equalizers. Conversely, the product of any finite (non-empty) family of objects exists since the binary products do. Since the product of an empty family of objects is simply a terminal object, this implies that all finite products exist. Now, it suffices to notice that when C in the proof of Theorem 9.1 is finite, so are all the products involved.  Corollary 9.3. A category D is finitely complete precisely when it has a terminal object and pullbacks. Proof. By the previous corollary, it suffices to show that binary products and equal- izers can be constructed using pullbacks and a terminal object. The product of any two objects S and T is given by the following pullback square:

π S × T 2 / T

π1 !T

  S / 1 !S 28 TARIK YILDIRIM

Now, we can use pullbacks and binary products to construct equalizers as follows. Given two parallel arrows m, n : S ⇒ T , consider the following pullback square:

τ L 2 / S

τ1 <1S ,n>

  S / S × T <1S ,m>

Note that τ1 = 1S ◦ τ1 = π1◦ < 1S, m > ◦τ1 = π1◦ < 1S, n > ◦τ2 = 1S ◦ τ2 = τ2. Let us call these equal morphisms as τ. The following two observations prove that (L, τ) is an equalizer of m, n:

• m ◦ τ = π2◦ < 1S, m > ◦τ = π2◦ < 1S, n > ◦τ = n ◦ τ • If µ : R → S is another morphism such that m ◦ µ = n ◦ µ, then we have π1◦ < 1S, m > ◦µ = 1S ◦ µ = π1◦ < 1S, n > ◦µ and π2◦ < 1S, m > ◦µ = m ◦ µ = n ◦ µ = π2◦ < 1S, n > ◦µ. So < 1S, m > ◦µ =< 1S, n > ◦µ and there exists a unique morphism k : R → L satisfying τ ◦ k = µ.  Definition 9.4. A category D satisfies the solution set condition if there exists a set I and an I-indexed family of objects Ri such that for every object S there exists an index s ∈ I and some morphism αs : Rs → S. Proposition 9.5. If D is complete, then it has an initial object if and only if it satisfies the solution set condition.

Proof. If D has an initial object, then the one object family consisting of the initial object can be used to satisfy the solution set condition. Conversely, assume that D satisfies the solution set condition. Denote the prod- Q uct i∈I Ri by X and its projections by πi. Let τ : Y → X be the “equalizer” of all endomorphisms of X. (i.e. the limit cone on the diagram consisting of the arrows in HomD(X,X).) For each S, there exists at least one morphism from Y to S, namely αs ◦ πs ◦ τ. Suppose that there are two distinct arrows m, n : Y ⇒ S. Take their equalizer µ : Z → Y . Then τ ◦ µ ◦ αz ◦ πz is an endomorphism of X. So, in particular, we have (τ ◦ µ ◦ αz ◦ πz) ◦ τ = 1X ◦ τ = τ ◦ 1Y . But τ is a monomorphism by Proposition 8.2. Hence the previous equality implies µ ◦ (αz ◦ πz ◦ τ) = 1Y . In other words µ is both an equalizer and a split epimorphism. By Proposition 8.3 it has to be an isomorphism. So m ◦ µ = n ◦ µ implies m = n, and Y is an initial object.  This proposition will play a substantial role in Theorem 10.10 which is also called the Adjoint Functor Theorem. If D is small, then it automatically satisfies the solution set condition. (Take Rs as S and αs as 1S.) But a complete and small category has to be a poset for the same reason why we were forced to incorporate a smallness condition into our definition of completeness. (See the discussion right after Definition 7.4.) So, for small D, Proposition 9.5 becomes the trivial statement that the infimum of all elements is a bottom element. LECTURE NOTES ON CATEGORY THEORY 29

10. Limit Preservation Definition 10.1. A functor F : C → D preserves limits if it satisfies the following property for each small category X and functor H : X → C: If H has a limit (L, τ), then the cone (F (L), 1F ∗ τ) is a limit on FH.

Recall that X-component of the natural transformation 1F ∗ τ is just F (τX ). Proposition 10.2. Let C be a complete category and D be an arbitrary category. A functor F : C → D preserves limits precisely when it preserves products and equalizers. Proof. Immediate from Theorem 9.1.  Proposition 10.3. Let C be a finitely complete category and D be an arbitrary category. A functor F : C → D preserves finite limits precisely when it preserves the terminal object and pullbacks. Proof. Immediate from Corollary 9.3.  Proposition 10.4. A functor which preserves pullbacks preserves monomorphisms. Proof. Immediate from the remark made at the of Section 8.  Proposition 10.5. If F =∼ G, then F preserves limits if and only if G does. Proof. Since the statement is symmetric, it suffices to prove one direction. Say α is an isomorphism from G : C → D to F : C → D, X is a small category and H : X → C has a limit (L, τ). Assume that G preserves limits. We claim that (F (L), 1F ∗ τ) −1 is a limit on FH. Note that (1F ∗ τ)X = F (τX ) = αH(X) ◦ G(τX ) ◦ αL holds for each X in X. Hence, for u : X → Y , we have FH(u) ◦ (1F ∗ τ)X = F (H(u)) ◦ −1 −1 −1 αH(X) ◦ G(τX ) ◦ αL = αH(Y ) ◦ G(H(u)) ◦ G(τX ) ◦ αL = αH(Y ) ◦ G(τY ) ◦ αL = (1F ∗ τ)Y . So (F (L), 1F ∗ τ) is a cone on FH. Say (R, µ) is another cone on FH. −1 Then (R, (α ∗ 1H ) ◦ µ) is a cone on GH. Hence there exists a unique morphism −1 k : R → G(L) satisfying G(τX ) ◦ k = αH(X) ◦ µX for all X. So αL ◦ k : R → F (L) satisfies (1F ∗ τ)X ◦ (αL ◦ k) = F (τX ) ◦ αL ◦ k = αH(X) ◦ G(τX ) ◦ k = µX . If l is −1 another morphism such that (1F ∗ τ)X ◦ l = µX , then we have G(τX ) ◦ (αL ◦ l) = −1 −1 −1 αH(X) ◦ F (τX ) ◦ l = αH(X) ◦ (1F ∗ τ)X ◦ l = αH(X) ◦ µX . By uniqueness of k, this −1 implies αL ◦ l = k and therefore l = αL ◦ k.  Proposition 10.6. Representable functors preserve limits.

Proof. By the previous proposition, it suffices to prove the theorem for HomC(A, −): C → Set for some object A. Say X is a small category and a functor H : X → C has a limit (L, τ). Consider a cone (M, µ) on HomC(A, H(−)) : X → Set. For each ele- ment m ∈ M, the set (µX (m): A → H(X))X∈X0 forms a cone on H since we have H(u)◦µX (m) = (HomC(A, H(u))◦µX )(m) = µY (m) for all u : X → Y . So, for each m ∈ M, there exists a unique morphism km : A → L satisfying µX (m) = τX ◦ km for all X. Define k : M → HomC(A, L) as the map sending each m to km. Then we have (HomC(A, τX ) ◦ k)(m) = HomC(A, τX )(km) = τX ◦ km = µX (m) for all m ∈ M. Moreover, k is the unique map satisfying HomC(A, τX ) ◦ k = µX . If there was another such map l, then τX ◦l(m) = µX (m) would have implied l(m) = km for each m ∈ M. So (HomC(A, τX ))X∈X constitutes a limit cone on HomC(A, H(−)).  30 TARIK YILDIRIM

Proposition 10.7. Yoneda Embeddings preserve limits.

Proof. Consider a functor H : X → C where both X and C are small cate- gories. Say (L, τ) is a limit on H. By the previous proposition, for each A in

C, HomC(A, H(−)) : X → Set has the limit (HomC(A, L), (HomC(A, τX ))X∈X0 ). But HomC(A, H(−)) is precisely Λ(A) of Theorem 7.5 when Γ is replaced with op y ◦ H : X → Fun(C , Set). For each f : A → B, Λ(f) is just HomC(f, H(−)) : HomC(B,H(−)) → HomC(A, H(−)). So Lim(y ◦ H)(f) is the unique map making the following commute for all X.

Hom (B,τ ) C X HomC(B,L) / HomC(B,H(X))

Lim(y◦H)(f) Hom (f,H(X)) C

  Hom (A, L) / Hom (A, H(X)) C Hom (A,τ ) C C X

For each l ∈ HomC(B,L), we have (HomC(A, τX ) ◦ HomC(f, L))(l) = τX ◦ l ◦ f = (HomC(f, H(X)) ◦ HomC(B, τX ))(l). So Lim(y ◦ H)(f) = HomC(f, L) for each f, and therefore Lim(y ◦ H) = HomC(−,L). Examining the proof of Theorem 7.5, we see that the legs of the limit cone on y ◦ H are defined as HomC(−, τX ): HomC(−,L) → HomC(−,H(X)). In other words, (y(τX ))X∈X constitutes a limit cone on y ◦ H. 

Proposition 10.8. If G : D → C has a left adjoint F , then it preserves limits.

Proof. Assume that some functor H : X → D has a limit (L, τ). Consider a cone (A, µ) on GH. By adjointness, for each X in X, we have a bijection κA,H(X) : HomD(F (A),H(X)) → HomC(A, G(H(X))) with an inverse λA,H(X). Naturality of these bijections in the second component implies that, for each u : X → Y in X, we have H(u)◦λA,H(X)(µX ) = λA,H(Y )(µX ◦GH(u)) = λA,H(Y )(µY ). Therefore the collection (λA,H(X)(µX ): F (A) → H(X))X∈X0 constitutes a cone on H, and we get a unique morphism k : F (A) → L satisfying τX ◦ k = λA,H(X)(µX ) for all X. By naturality of κA,X in the second component, κA,L(k): A → G(L) satisfies G(τX ) ◦ κA,L(k) = κA,H(X)(τX ◦ k) = κA,H(X)(λA,H(X)(µX )) = µX for all X. In other words, the morphism κA,L(k) takes (A, µ) to the cone (G(L), 1G ∗ τ). If there exists another f : A → G(L) such that G(τX ) ◦ f = µX for all X, then we have τX ◦ λA,L(f) = λA,H(X)(G(τX ) ◦ f) = λA,H(X)(µX ) for all X. Hence λA,L(f) = k and therefore f = κA,L ◦ λA,L(f) = κA,L(k). 

This proposition can be used to show quickly that certain functors do not have left adjoints. For instance, if S is not a one-point set, then (−) × S : Set → Set does not preserve the terminal object and therefore can not have a left adjoint. (In Section 6.4, we saw that this functor always has a right adjoint.) LECTURE NOTES ON CATEGORY THEORY 31

If C and D are complete and X is small, then Proposition 10.8 can be seen as a consequence of Proposition 5.5. In order to see why, let us first rename the adjoint functors ∆ : D → Fun(X, D) and Lim : Fun(X, D) → D as ∆D and LimD for the sake of terminological accuracy. Say G : D → C, and F a G with unit η and counit . Then we have the following squares of functors.

F∗ Fun( , ) / Fun( , ) X C o X D O G∗ O

∆ Lim ∆ Lim C C D D

F  /  C o D G

This square is commutative in one direction, namely F∗ ◦ ∆C = ∆D ◦ F : For each f : A → B in C and X in X, we have (F∗(∆C(f)))X = F ((∆C(f))X ) = F (f) = (∆D(F (f)))X . There are four adjunctions present in the square: F a G, F∗ a G∗, ∆C a LimC, ∆D a LimD. These adjunctions, together with Proposition 5.6 and the equality F∗ ◦ ∆C = ∆D ◦ F , imply that both LimC ◦G∗ and G ◦ LimD are left adjoints to ∆D ◦ F . For each H : X → D and K : X → C, let us denote the limit cones respectively as (LimD(H), τH ) and (LimC(K), µK ). (Note that τH is the H-component of the counit of ∆D a LimD, while µK is the K-component of the conit of ∆C a LimC.) Upon an examination of the bijections involved in the proof of Proposition 5.6, we realize that H-components of the counits of the adjunctions G ◦ LimD a ∆D ◦ F and LimC ◦G∗ a ∆D ◦ F are respectively as follows. (Here we wrote F∗ ◦ ∆C ◦ LimC ◦ G∗(H) as ∆D ◦ F ◦ LimC(GH), F∗ ◦ G∗(H) as F GH, and µG∗(H) as µGH . See Proposition 5.7 for the definition of the counit ¯ of F∗ a G∗.)

∆ (Lim (H)) τ D D H ∆D ◦ F ◦ G ◦ LimD(H) / ∆D ◦ LimD(H) / H

F∗(µGH ) ¯H ∆D ◦ F ◦ LimC(GH) / F GH / H

Both of these arrows are coreflections of H along the functor ∆D ◦ F . So there exists an isomorphism ψ : G ◦ LimD(H) → LimC(GH) in C satisfying the following commutative square for each X in X. 32 TARIK YILDIRIM

Lim (H) D FG(LimD(H)) / LimD(H)

F ((µGH )X ◦ψ) (τH )X

  FG(H(X)) / H(X) H(X)

But  is the counit of F a G. Therefore, by the dual of Proposition 5.2, we know that G((τH )X ) is the unique morphism satisfying H(X) ◦ F (G((τH )X )) = (τH )X ◦ Lim . Hence (µGH )X ◦ ψ has to be G((τH )X ) for all X. Since ψ is D(H) an isomorphism and (LimC(GH), µGH ) is a limit cone, this implies that G takes (LimD(H), τH ) to a limit cone. Since H was arbitrarily chosen, we conclude that G preserves limits.

There is a converse to Proposition 10.8, but it requires additional assumptions.

Proposition 10.9. Consider a functor G : D → C where D is complete. Assume that, for each A, the category El(HomC(A, G(−)) satisfies the solution set condition. If G preserves limits, then it has a left adjoint.

Proof. Recall that G : D → C has a left adjoint if and only if El(HomC(A, G(−)) has an initial object for each A. (See Definition 5.1.) Since these categories satisfy the solution set condition, if we can show that they are complete, then we will be done by Proposition 9.5.

Fix an object A in C. By Proposition 10.6, HomC(A, −) preserves limits. Since G preserves limits as well, so does HomC(A, G(−)). By Theorem 9.1, it suffices to show that El(HomC(A, G(−)) has equalizers and set-indexed products:

• Pick a family of objects (Si, si) indexed by I. Since Hom (A, G(−)) Q C preserves products, we can take the product Hom (A, G(Si)) to be Q i∈I C Hom (A, G( Si)). So the set of all si : A → G(Si) corresponds to a C i∈I Q unique morphism s in Hom (A, G( Si)). Denote the product projec- Q C i∈I tions of i∈I Si as πi. By definition, the product projection HomC(A, G(πi)) sends s to si. In other words, πi can be considered as a morphism from Q ( i∈I (Si), s) to (Si, si). We claim that these arrows form a product dia- gram for (Si, si). Say we have a set of morphisms µ(S ,s ) :(R, r) → (Si, si) i i Q indexed by I. There exists a uniquely induced k : R → i∈I Si satisfying

µ(Si,si) = πi ◦ k in D. So we have G(πi) ◦ s = HomC(A, G(πi))(s) = si = HomC(A, G(µ(Si,si)))(r) = G(µ(Si,si)) ◦ r = G(πi ◦ k) ◦ r = G(πi) ◦ (G(k) ◦ r) for all i ∈ I. Since G(πi) are product projections, this implies that G(k)◦r = Q s. In other words, k can be seen as a morphism from (R, r) to ( i∈I Si, s)

satisfying πi ◦ k = µ(Si,si). Its uniqueness is immediate. • Pick two parallel arrows m, n :(S, s) ⇒ (T, t). Let τ : L → S be their equalizer in D. So G(τ) is an equalizer of G(m),G(n). Since s : A → G(S) satisfies G(m)◦s = HomC(A, G(m))(s) = t = HomC(A, G(n))(s) = G(n)◦s, LECTURE NOTES ON CATEGORY THEORY 33

there exists a unique morphism l : A → G(L) such that s = G(τ) ◦ l in C. In other words, τ can be seen as a morphism from (L, l) to (S, s). If there exists a morphism µ :(R, r) → (S, s) such that m ◦ µ = n ◦ µ, then we get a uniquely induced k : R → L such that τ ◦ k = µ in D. The equality s = HomC(A, G(µ))(r) = G(µ)◦r = G(τ ◦k)◦r = G(τ)◦(G(k)◦r) together with the uniqueness of l implies G(k) ◦ r = l. In other words, k can be seen as a morphism from (R, r) to (L, l) satisfying τ ◦ k = µ. Its uniqueness is immediate.  If G : D → C has a left adjoint F , then it satisfies the set theoretical condi- tions mentioned in Proposition 10.9. (Just use the reflection (F (A), ηA) for each

El(HomC(A, G(−)).) So we can combine Propositions 10.8 and 10.9 to get the following characterization theorem in case D is complete. Theorem 10.10. Consider a functor G : D → C where D is complete. G has a left adjoint if and only if it preserves limits and each El(HomC(A, G(−)) satisfies the solution set condition.

If D is small then so is the category El(HomC(A, G(−)). Hence, by the remarks made right after Proposition 9.5, we have the following corollary. Corollary 10.11. Consider a functor G : D → C where D is complete and small. G has a left adjoint if and only if it preserves limits. This is not a very useful result since a complete small category has to be a poset.

11. Colimits This section will contain no proofs. The definitions and results here are simply duals of the ones presented during the last four sections. Definition 11.1. A cocone on F : C → D consists of the following data: (a) an object R in D, (b) a collection of morphisms (µA : F (A) → R)A∈C0 in D satisfying µB ◦F (f) = µA for each morphism f : A → B in C. A cocone over F : C → D is simply a pair (R, µ) where R is an object in D and µ is a natural transformation from F to ∆(R). In other words, it is an object in the category of elements of the functor Nat(F, ∆(−)) : D → Set. An initial object (Colim(F ), τF ) in the category El(Nat(F, ∆(−))) is called a colimit of F . This means that, for every cocone (R, µ), there exists a unique morphism k : Colim(F ) → R making the following triangle commute.

τ F ∆(Colim(F )) F J / JJ JJ JJ JJ JJ ∆(k) µ JJ JJ JJ JJ J$  ∆(R) Let us put this requirement in a more explicit form. We will drop the subscript F from τF for the sake of notational clarity. 34 TARIK YILDIRIM

Definition 11.2. Given a functor F : C → D, its colimit is a cocone (Colim(F ), τ) on F such that, for every cocone (R, µ) on F , there exists a unique morphism k : Colim(F ) → R satisfying k ◦ τA = µA for each object A.

The uniqueness condition immediately implies the following fact: If k◦τA = l◦τA for all A, then k = l. Definition 11.3. A category D is called finitely cocomplete if every functor F : C → D, where C is a finite category, has a colimit. It is called cocomplete if every functor F : C → D, where C is a small category, has a colimit. We have already noted that colimits can be seen as initial objects. They can also be organized into left-adjoints if the category D is cocomplete. If the func- tor HomFun(C,D)(F, ∆(−)) = Nat(F, ∆(−)) from D to Set has a universal element (Colim(F ), τF ) for each F , then there exists a unique functor Colim : Fun(C, D) → D that sends F to Colim(F ) and is left adjoint to ∆. (See Proposition 5.2.) This adjunction subsumes the one mentioned in Section 6.3. Theorem 11.4. Consider a functor Γ: X → Fun(C, D) where X and C are small. If Γ(−)(A) has a colimit for each A in C, then the colimit of Γ exists and is calculated pointwise. Proposition 11.5. Say C has a terminal object 1. For each F : C → D, the collection (F (!A): F (A) → F (1))A∈C0 constitutes a colimit cocone on F . The concept of a colimit generalizes several important categorical constructions, some of which are already familiar to you: • A category D has an initial object if and only if the unique functor from the empty category to D has a colimit. • Say C is a discrete category. If the colimit of a functor F : C → D exists, then Colim(F ) is just the coproduct ` F (A). In other words, every A∈C0 coproduct can be seen as a colimit cone. Let C be the category with two objects and two non-identity parallel arrows • ⇒ •. A functor F : C → D is determined by a selection of two parallel arrows m, n : S ⇒ T in D. A cocone over this diagram is specified by an object R and a morphism µ : T → R such that µ ◦ m = µ ◦ n, and a colimit cocone is called a coequalizer of m, n. Let us write out an explicit definition. Definition 11.6. Consider m, n : S ⇒ T in a category D. A coequalizer of m, n consists of a pair (L, τ) where (a) L is an object in D, (b) τ : T → L is a morphism satisfying τ ◦ m = τ ◦ n, such that for every pair (R, µ) where (a) R is an object in D, (b) µ : T → R is a morphism satisfying µ ◦ m = µ ◦ n, there exists a unique morphism k : L → R satisfying k ◦ τ = µ.

R 8 rrr O µ rrr rrr k m rr / rrr S T τ / L n / LECTURE NOTES ON CATEGORY THEORY 35

Given a pair m, n : S ⇒ T in Set, L is the quotient of T generated by the pairs (m(s), n(s)). Similarly, in Top, the same set with the quotient topology is a coequalizer of m, n. In Ab, the coequalizer of m and the zero morphism is just the quotient of T by the subgroup m(S). More generally, the coequalizer m, n is the coequalizer of f − g and the zero morphism. Unfortunately, in many other categories, the situation is less simple. The general procedure in most algebraic categories, like Grp, is to construct the quotient of T by the congruence generated by all the pairs (m(s), n(s)).

Proposition 11.7. If m, n : S ⇒ T in D have a coequalizer (L, τ), then τ : T → L is an epimorphism. The converse statement is not true in every category. It holds in Set since a surjection τ : T → L is a coequalizer of the two projections from S := {(t, t0) ∈ T × T | τ(t) = τ(t0)}. Note that S is just the kernel pair of τ. Again, in Grp, each surjective homomorphism is a coequalizer of its kernel pair. In Top, the same construction works when S is endowed with the subspace topology. Split epimorphisms, on the other hand, are always coequalizers: If a morphism t satisfies t ◦ s = 1cod(t) for some s, then t is a coequalizer of 1dom(t) and s ◦ t. Proposition 11.8. If a morphism is both a coequalizer and a monomorphism, then it is an isomorphism.

Let C be the category with three objects and the following two non-identity morphisms: • ← • → • . A functor F : C → D is determined by a selection of m n two morphisms S ←− T −→ U in D. A cocone over this diagram is specified by an µ1 µ2 object R and morphisms S −→ R ←− U such that µ1 ◦ m = µ2 ◦ n. A colimit cone is called a pushout of m, n. Let us write out an explicit definition. m n Definition 11.9. Consider S ←− T −→ U in a category D. A pushout of m, n consists of a triple (L, τ1, τ2) where (a) L is an object in D, τ1 τ2 (b) S −→ L ←− U satisfies τ1 ◦ m = τ2 ◦ n, such that for every triple (R, µ1, µ2) where (a) R is an object in D, µ1 µ2 (b) S −→ R ←− U satisfies µ1 ◦ m = µ2 ◦ n, there exists a unique morphism k : L → R satisfying k ◦ τ1 = µ1 and k ◦ τ2 = µ2.

R o7 oo?G ooo   ooo  µ1 oo k   oo   ooo   oo   ooo  oo   ooo τ1   S / L µ2 O O    m τ2     T n / U 36 TARIK YILDIRIM

Pushouts have different names in different categories. In Grp, they are called amalgamation products. In Top, when n is an inclusion of a closed space, then m is called the attaching map of the adjuction space. (For instance, you can attach a disc U to a torus S by specifying where the boundary T of the disc is going.) In Top, when m, n are arbitrary but T is the one-point space, then the pushout is called the wedge sum of S and U. Proposition 11.10. Pushout of an epimorphism along any morphism is again an epimorphism. Pushout of an isomorphism along any morphism is again an isomorphism.

Note that m is an epimorphism if and only if the pushout of m, m is (S, 1S, 1S). So a functor preserving pushouts preserves epimorphisms. Also, Theorem 11.4 im- plies the following: If D has pushouts and C is small, then a natural transformation in Fun(C, D) is an epimorphism if and only if each of its components is one. Theorem 11.11. A category D is cocomplete precisely when each set-indexed family of objects has a coproduct and each pair of parallel arrows has a coequalizer. A category D is finitely cocomplete precisely when it has an initial object and pushouts. Hence Set, Grp and Top are all cocomplete categories. If D is a poset considered as a category, then it has all coequalizers since there are no distinct parallel arrows. So D is cocomplete precisely when it is cocomplete as a poset. Definition 11.12. A functor F : C → D preserves colimits if it satisfies the following property for each small category X and functor H : X → C: If H has a colimit (L, τ), then the cocone (F (L), 1F ∗ τ) is a colimit on FH. Proposition 11.13. Let C be a cocomplete category and D be an arbitrary category. A functor F : C → D preserves colimits precisely when it preserves coproducts and coequalizers. It preserves finite colimits precisely when it preserves the initial object and pushouts. Proposition 11.14. If F : C → D has a right adjoint G, then it preserves colimits. Theorem 11.15. Consider a functor F : C → D where C is cocomplete. F has a right adjoint if and only if it preserves colimits and each El(HomD(F (−),R) satisfies the dual solution set condition. Yoneda Embedding does not behave well with respect to colimits.

12. Free Cocompletion Theorem 12.1. For each K : C → D, where C is small and D is cocomplete, there exists a colimit preserving functor Λ making the following triangle commute. If Λ0 is another such colimit preserving functor, then Λ0 is isomorphic to Λ.

y op C / Fun(C , Set) HH HH HH HH HH Λ K HH HH HH HH H$  D We say that Yoneda embedding of C is a free cocompletion of C. LECTURE NOTES ON CATEGORY THEORY 37

Proof. Although it is not clear how one can build a functor from Fun(Cop, Set) to D using only K, there is an obvious choice for going in the opposite direction. Define Γ as the functor sending each morphism l : R → S to the after-composition natural transformation l ◦ (−) : HomD(K(−),R) → HomD(K(−),S). Since a left-adjoint preserves colimits, we are tempted to inquire whether Γ has a left-adjoint. This functor could be the Λ we are looking for.

op We are looking for a functor Λ and a bijection ψF,R from HomFun(C ,Set)(F, Γ(R)) to HomD(Λ(F ),R) for each F and R. Let us pick a natural transformation τ : F → HomD(K(−),R) from the former set, and see if we can come up with anything.

The following square commutes for each f ∈ HomC(A, B).

τB F (B) / HomD(K(B),R)

F (f op) (−)◦K(f)

  F (A) / Hom (K(A),R) τA D

Therefore, for each f ∈ HomC(A, B) and b ∈ F (B), the following commutes.

op τA(F (f )(b)) K(A) / R

K(f) 1R

  K(B) / R τB (b)

This suggests us to inquire whether the collection of all τB(b) can be viewed as a natural transformation somewhere. Note that f : A → B in C can be thought of as a morphism from (A, F (f op)(x)) to (B, x) in El(F ). The forgetful functor πF : El(F ) → C takes this morphism back to f. Let ∆ : D → Fun(El(F ), D) be the diagonal functor sending each object R to the constant functor ∆(R) mapping every morphism to 1R. (Here El(F ) is small since C is.) Now we can rewrite the above square as follows.

τ (F (f op)(b)) op A op K ◦ πF ((A, F (f )(b))) / ∆(R)((A, F (f )(b)))

K◦πF (f) ∆(R)(f)

  K ◦ πF ((B, b)) / ∆(R)((B, b)) τB (b) 38 TARIK YILDIRIM

Hence the collection (τB(b))(B,b)∈El(F )0 constitutes a natural transformation from op K ◦ πF to ∆(R). Let ωF,R be the function from HomFun(C ,Set)(F, Γ(R)) to Hom (K ◦ π , ∆(R)) sending each τ to (τ (b)) . It is a bi- Fun(El(F ),D) F B (B,b)∈El(F )0 jection with an inverse taking each (α(B,b))(B,b)∈El(F )0 to (αB)B∈Co where αB is defined as the function sending each b ∈ F (B) to α(B,b) ∈ HomD(K(B),R).

op We have finally obtained a bijection out of HomFun(C ,Set)(F, Γ(R)), but its target is a wrong type of hom-set in the wrong category. There is no reason to lose hope. There is still a piece of information that we have not utilized. Since D is cocomplete, ∆ has a left adjoint Colim : Fun(El(F ), D) → D. This adjunction gives us a bijection σJ,R from HomFun(El(F ),D)(J, ∆(R)) to HomD(Colim(J),R) for each J and R. F Let us rename Colim and σJ,R as ColimF and σJ,R for the sake of terminological accuracy. Define ψF,R as the following composite bijection.

F σ ◦ ωF,R K◦πF ,R Hom op (F, Γ(R)) Fun(C ,Set) / HomD(ColimF (K ◦ πF ),R)

F Let us now try to understand this colimit cocone (ColimF (K ◦ πF ), ι ) that we have been naturally led towards to. Pick another functor G in Fun(Cop, Set). If F (B) is non-empty, then the image of πF contains all the morphisms with codomain op B: If f ∈ HomC(A, B), then πF send f :(A, F (f )(b)) → (B, b) onto it. Hence, if F (B) is empty or non-empty whenever G(B) is, then the diagrams of πF and πG will coincide in C. In that case, the bases of the colimit cocones of K ◦ πF and K ◦ πG will be the same. The “number” of legs touching K(B) in the former F cocone is equal to the size of F (B). (The set of such legs is just (ι(B,b))b∈F (B).) In other words, the information about how F behaves on objects is encoded in the “thickness” of the legs. If the sizes of F (B) and G(B) are not the same, then the “number” of legs touching K(B) will be different in each cocone. Even if F (B) = G(B) for all B, the cocones may still be very different, because the behaviours of F and G may diverge at the morphism level. For each (B, b), the F commutativity relations that the leg ι(B,b) needs to satisfy are determined by the F behaviour of F on the morphisms with codomain B. For each f : A → B, ι(B,b) G F and ι(B,b) respectively enter into a relationship (via K(f)) with ι(A,F (f op)(b)) and G ι(A,G(f op)(b)). The latter arrows may have different indexes, even if F (A) = G(A) and F (B) = G(B). It seems as if everything about F is encoded in the colimit cocone on K ◦ πF . This impression is wrong, because we also have K in the picture. For instance, F F if f, g : A ⇒ B and K(f) = K(g), then we have ι(B,b) = ι(A,F (f op)(b)) ◦ K(f) = F ι(A,F (gop)(b)) ◦ K(g) for all b ∈ F (B). In other words, the cocone can no longer distinguish how F acts on f and g. Hence, in some sense, K determines how much information about F is lost on the way. This suggests that, if K is some “nice” functor into a cocomplete category, then F may be completely recoverable from the colimit cocone on K ◦πF . (We will soon see that when K is the Yoneda embedding, we do not need to exert any effort to recover F . It will simply be the apex of our cocone!) LECTURE NOTES ON CATEGORY THEORY 39

Let Λ be the assignment sending each object F in Fun(Cop, Set) to the object ColimF (K ◦ πF ) in D. It can be defined on morphisms in the following way. Note that each natural transformation µ : F → G in Fun(Cop, Set) induces a functor op op µ : El(F ) → El(G) sending f :(A, F (f )(b)) → (B, b) to f :(A, µA(F (f )(b))) → op (B, µB(b)). (The latter is indeed a morphism in El(G) since G(f )(µB(b)) = op µA(F (f )(b)) holds by naturality of µ.) This functor determines a unique cocone on K ◦ πF out of the colimit cocone on K ◦ πG. The existence of each µA : F (A) → G(A) ensures that G(A) is non-empty whenever F (A) is. So the diagram of K ◦π sits inside that of K ◦π . The collection (ι G : K(B) → Colim (K ◦ F G (B,µB (b)) G op πG))(B,b)∈El(F )0 constitutes a cone over K ◦ πF since, for each f :(A, F (f )(b)) → G G G (B, b), we have ι op ◦ K(f) = ι op ◦ K(f) = ι . We (A,µA(F (f )(b))) (A,G(f )(µB (b))) (B,µB (b)) let Λ(µ) be the uniquely induced morphism from ColimF (K◦πF ) to ColimG(K◦πG) satisfying ι G = Λ(µ) ◦ ι F for all (B, b) in El(F ). Functoriality of Λ is an (B,µB (b)) (B,b) immediate consequence of the uniquenesses of Λ(µ).

op If we can show that the bijections ψF,R from HomFun(C ,Set)(F, Γ(R)) to HomD(Λ(F ),R) are natural in F and R, then it will follow that Λ preserves colimits. (See Theorems 5.4 and 11.14.) To show naturality in the first component, pick a natural transformation µ : F → G in Fun(Cop, Set). We need to demonstrate that the below square commutes.

ψG,R Hom op (G, Γ(R)) Fun(C ,Set) / HomD(Λ(G),R)

(−)◦µ (−)◦Λ(µ)

 ψF,R  Hom op (F, Γ(R)) Fun(C ,Set) / HomD(Λ(F ),R)

Note that ω sends τ ∈ Hom op (G, Γ(R)) to (τ (b)) ∈ G,R Fun(C ,Set) B (B,b)∈El(G)0 Hom (K ◦ π , ∆(R)) which is later taken by σ G to the unique Fun(El(G),D) G K◦πG,R G morphism ψG,R(τ) ∈ HomD(Λ(G),R) satisfying ψG,R(τ) ◦ ι(B,b) = τB(b) for all

(B, b) ∈ El(G)0. Similarly, ωF,R sends τ ◦µ to ((τ ◦µ)B(b))(B,b)∈El(F )0 which is later taken by σ F to the unique morphism ψ (τ ◦µ) satisfying ψ (τ ◦µ)◦ι F = K◦πF ,R F,R F,R (B,b) (τ ◦µ) (b) for all (B, b) ∈ El(F ) . But ψ (τ)◦Λ(µ)◦ι F = ψ (τ)◦ι G = B 0 G,R (B,b) G,R (B,µB (b)) τB(µB(b)) = (τ ◦ µ)B(b) holds for all (B, b) ∈ El(F )0. Hence ψF,R(τ ◦ µ) has to be ψG,R(τ) ◦ Λ(µ). To show naturality in the second component, pick a morphism l : R → S in D. We need to demonstrate that the below square commutes.

ψF,R Hom op (F, Γ(R)) Fun(C ,Set) / HomD(Λ(F ),R)

Γ(l)◦(−) l◦(−)

 ψF,S  Hom op (F, Γ(S)) Fun(C ,Set) / HomD(Λ(F ),S) 40 TARIK YILDIRIM

Recall that Γ(l) is the after-composition natural transformation l ◦ (−):

HomD(K(−),R) → HomD(K(−),S). With this in mind, ψF,S(Γ(l)◦τ) is the unique F morphism satisfying ψF,S(Γ(l)◦τ)◦ι(B,b) = (Γ(l)◦τ)B(b) = Γ(l)B(τB(b)) = l◦τB(b) F for all (B, b) ∈ El(F )0. But l◦ψF,R(τ)◦ι(B,b) = l◦τB(b) holds for all (B, b) ∈ El(F )0. Hence ψF,S(Γ(l) ◦ τ) has to be l ◦ ψF,R(τ).

Let us show that Λ is up-to-isomorphism the unique functor satisfying Λ◦y = K.

For each object A in C,(A, 1A) is a terminal object in El(y(A)). Therefore, by ∼ Proposition 11.5, we have Λ(y(A)) = Colimy(A)(K ◦ πy(A)) = K ◦ πy(A)((A, 1A)) = K(A). For each A, Colimy(A) is defined only up to an isomorphism. So we can choose the colimit cocones to be the ones dictated by Proposition 11.5. (i.e. Λ(y(A)) =∼ K(A) always holds with equality.) This change is harmless and does not affect anything we have done so far. Pick a morphism f : A → B in C. Λ(y(f)) is the unique morphism satisfying y(B) y(A) ι = Λ(y(f)) ◦ ι for all (B, b) ∈ El(y(A))0. Re-examining the proof of (B,y(f)B (b)) (B,b) y(A) Proposition 11.5, we see that ι(B,b) = K ◦πy(A)(!(B,b)) = K ◦πy(A)(b) = K(b) where y(B) ! = b is the unique morphism from (B, b) to (A, 1A). Similarly, ι = (B,b) (B,y(f)B (b)) y(B) ι(B,f◦b) = K ◦ πy(B)(f ◦ b) = K(f) ◦ K(b). Hence Λ(y(f)) has to be K(f).

Let us recap what we have proved so far. For each functor K : C → D, where D is a cocomplete category, there exists an adjunction Λ a Γ satisfying Λ ◦ y = K. op When K = y, we have Γ(F )(A) = HomFun(C ,Set)(y(A),F ) This set is bijective to F (A) via the Yoneda Lemma. Naturality of the bijections in F and A implies

∼ op op Γ = 1Fun(C ,Set). But 1Fun(C ,Set) is left-adjoint to itself. Hence, by Proposition ∼ op 5.5, we conclude that Λ = 1Fun(C ,Set) Let us call this natural isomorphism θ and make the following terminological changes: Rename the Λ we got by enforcing F F K = y as Λy, and relabel the legs ι(B,b) of the colimit cocone on y ◦ πF as j(B,b). So, for each µ : F → G in Fun(Cop, Set), we have the following commutative square where the horizontal arrows are isomorphisms.

θF Λy(F ) / F

Λy(µ) µ

  Λy(G) / G θG

Put in other words, each functor F in Fun(Cop, Set) is isomorphic to the colimit of a diagram of representable functors, and these isomorphisms are natural in F . (Note that this is the result that was promised at the end of the discussion about recovering F .) LECTURE NOTES ON CATEGORY THEORY 41

0 0 Say Λ is another colimit preserving functor with Λ ◦ y = K. Recall that Λy(µ) is the unique morphism satisfying j F = Λ (µ) ◦ j F for all (B, b) in El(F ). (B,µB (b)) y (B,b) 0 0 Since Λ preserves colimits, Λ (Λy(µ)) is the unique morphism sending the colimit cocone (Λ0(j F )) to the cocone (Λ0(j G )) . (Of course (B,b) (B,b)∈El(F )0 (B,µB (b)) (B,b)∈El(F )0 0 op both of these cocones are on Λ ◦y◦πF = K ◦πF .) For each F in Fun(C , Set), let F δF be the unique isomorphism sending the colimit cocone (Λ(F ), ι ) on K ◦ πF to 0 F the colimit cocone (Λ (j(B,b)))(B,b)∈El(F )0 . We claim that the following commutes.

δF 0 Λ(F ) / Λ (Λy(F ))

0 Λ(µ) Λ (Λy(µ))

 0  Λ(G) / Λ (Λy(G)) δG

But this square commutes if and only if it does so when it is pre-composed with F 0 each of the legs of the cocone (Λ(F ), ι ). And this is true since Λ (Λy(µ)) ◦ δF ◦ ι F = Λ0(Λ (µ)) ◦ Λ0(j F ) = Λ0(j G ) = δ ◦ ι G = δ ◦ Λ(µ) ◦ ι F (B,b) y (B,b) (B,µB (b)) G (B,µB (b)) G (B,b) holds for all (B, b) in El(F ). Combining the two squares above, we obtain the following commutative rectangle where the horizontal arrows are isomorphisms. So Λ is isomorphic to Λ0 via the 0 op natural tranformation (Λ (θF ) ◦ δF )F ∈Fun(C ,Set).

Λ0(θ ) δF 0 F 0 Λ(F ) / Λ (Λy(F )) / Λ (F )

0 0 Λ(µ) Λ (Λy(µ)) Λ (µ)

 0  0  Λ(G) / Λ (Λy(G)) 0 / Λ (G) δG Λ (θG)

 The assignment sending each small category C to Fun(Cop, Set) is a functor from the category Cat to the metacategory COCOMP whose objects are cocomplete categories and morphisms are colimit preserving functors. Theorem 12.1 suggests that (Fun(Cop, Set), y) is a “reflection” of C along the forgetful “functor” from COCOMP to Cat. There are two problems with this suggestion. Firstly, there is no such forgetful functor since most cocomplete categories, including Fun(Cop, Set), are not small. Secondly, the pair (Fun(Cop, Set), y) does not qualify to be a reflec- tion in the sense of Definition 5.1, because Λ is unique only up to a isomorphism. 42 TARIK YILDIRIM

Here are some interesting consequences of Theorem 12.1.

Let C be the terminal category 1. Then Fun(Cop, Set) and Γ(R) are respectively Set and HomD(K(•),R). So Γ : D → Set is represented by K(•). Again, specifying a functor in Fun(Cop, Set) amounts to a choice of a set X. So the morphisms in its category of elements are of the form 1X :(X, x) → (X, x) where x ∈ X. The forgetful functor takes them all to 1•. Hence Λ(X) is equal to the coproduct of K(•) X-many times. The resulting adjunction is the one mentioned in Section 6.1.

Let C be the poset category Open(X) of open subsets of a topological space X and K : Open(X) → (Top ↓ X) be the functor sending each open set A to the inclusion A,→ X. Here Fun(Open(X)op, Set) and (Top ↓ X) are respectively called as the category of presheaves over X and the category of bundles over X. For each bundle k : Y → X and open set A in X, Γ(k)(A) = Hom(Top↓X)(A,→ X, k) which is just the set of cross sections of k over A. Its left-adjoint Λ assigns each presheaf F to the bundle of germs of F . The adjunction Λ a Γ restricts to an equivalence of categories between the category of sheaves over X and the category of etale bundles over X. (For more details, see Sheaves in Geometry and Logic by Saunders Mac Lane and Ieke Moerdijk.)

Let C be the category ∆ of finite ordinal numbers with order-preserving maps op between them. Fun(C , Set) and y(n) = Hom∆(−, n) are respectively called as the category of Simplicial Sets and the standard n-simplex ∆n. (These constructions were mentioned in Section 3.) Let K : ∆ → Top be the functor sending each n to the topological standard n-simplex |∆n| sitting in Rn+1. Then we have Γ(X)(n) = n HomTop(|∆ |,X) for each topological space X. So Γ(X) is the singular . (This functor is used in the construction of the singular homology of the space X.) Its left-adjoint Λ is called the geometric realization functor. (The usual notation for Λ(F ) is |F |. That is why we used the symbol |∆n| to denote the topological standard n-simplex K(n) = Λ ◦ y(n) = Λ(∆n).)

Pick some arbitrary functor H : C → X between two small categories. Let K : C → Fun(Xop, Set) be the after-composition of H with the Yoneda Embedding. Then, for each A in C and J in Fun(Xop, Set), the Yoneda Lemma gives us natural ∼ op bijections Γ(J)(A) = Nat(HomX(−,H(A)),J) = J(H(A)). So Γ : Fun(X , Set) → Fun(Cop, Set) is isomorphic to the pre-composition functor (−) ◦ Hop. Hence its left adjoint Λ is isomorphic to the functor LanHop sending each F to the Left Kan extension of F along Hop. (For more details on Kan extensions, consult Categories for the Working Mathematician by Saunders Mac Lane.)

Corollary 12.2. Each functor from a small category to Set is isomorphic to the colimit of a diagram of representable functors. This is the result we stumbled on towards the end of the proof of Theorem 12.1. It is the mirror image of Yoneda Lemma via the adjunction Γ a Λ. So we have now made a full circle back to the beginning of Section 1.