<<

Lecture 14: Categories and

We review some basic theory. 14.1. Categories. was invented to be able to re- late di↵erent languages of math together. Vaguely, here’s a table:

Table 1. default The objects we care about The functions we care about Sets Functions Groups Rings homomorphisms Topological spaces Continuous functions Smooth manifolds Smooth maps

So we have objects,andways to compare objects; i.e., homomor- phisms. Definition 14.1. Acategory is the data of: C (1) AcollectionOb ;wecallanelementX Ob an object of . In the categoryC of groups, every group is2 an object.C 1 C (2) For every pair of objects X, Y Ob ,asethom(X, Y ), called the of from X to2 Y . CIn the , hom(X, Y )isthesetofgrouphomomorphismsfromX to Y . (3) For every triple of objects X, Y, Z Ob ,afunction 2 C :hom(Y,Z) hom(X, Y ) hom(X, Z), (f ,f ) f f ⇥ ! YZ XY 7! YZ XY called composition. In the category of groups, this is usual composition of homomorphisms. These data must satisfy the following conditions:

1I am using the “collection” to avoid set-theoretic issues; for instance, there is no set of sets. We ignore such issues altogether. 1 2LECTURE14:CATEGORIESANDFUNCTORS

(4) For every ob ject X Ob ,anelementidX hom(X, X) called the of 2X;itmustsatisfythepropertythatforC 2 all Y Ob and all fXY hom(X, Y ),fYX hom(Y,X), we have 2 C 2 2 id f = f ,fid = f . X YX YX XY X XY In the category of groups, idX is the identity from X to itself. (5) Associativity: For every quadruple of objects W, X, Y, Z,and for every triple of morphisms f hom(a, b), an ab 2 (f f ) f f (f f ). YZ XY WX YZ XY WX Composition of group homomorphisms is associative. Example 14.2. The blue above shows that there’s a category of groups with objects and morphisms as you’d expect from the table. Likewise there is a , of topological spaces, of smooth manifolds, of sets. Example 14.3. Another example is as follows: Fix a category with only one object, so Ob = .ThenthereisasinglemorphismC set A := hom( , )tospecify,alongwithacompositionmapC {⇤} A A A. These data⇤ must⇤ admit a 1 A, and the composition⇥A !A A must be associative. That is, a category2 with only one object⇥ is the! same data as that of an associative (i.e., a group that may not admit inverses). More generally, for any category ,anyobjectX Ob determines an associative monoid called hom(X,C X). 2 C The term “” has a meaning in this general context: Definition 14.4. Let be a category and choose a f hom (X, Y ). We say thatC f is an isomorphism if there exists g 2 homC(Y,X)suchthat 2 C fg =idY ,gf=idX . 14.2. Functors. Even better, if we now decide that we care about categories (at the very least, we have interesting examples), we should ask about what the “functions” or “relations” we care about are: I’ve appended the table: The notion of a “morphism of categories” is a . It’s a key new word. LECTURE 14: CATEGORIES AND FUNCTORS 3 Table 2. default The objects we care about The functions we care about Sets Functions Groups Group homomorphisms Rings Ring homomorphisms Topological spaces Continuous functions Smooth manifolds Smooth maps Categories Functors

Definition 14.5. Let and be two categories. Then a functor F : is the data of2 C D C!D (1) AfunctionF :Ob For example, if is the category of groups and is theC! categoryD of associativeC rings, we could D have a that sends any group G to the ring CG. (2) For every pair of objects X, Y Ob ,afunction 2 C F :hom (X, Y ) hom (FX,FY). C ! D For example, for any group G H,weassign ! the obvious CG CH.. And this data must satisfy the following:! (3) F respects units, so for any X, F (idX )=idFX, (4) F respects compositions, so F (f f )=F (f ) F (f ). YZ XY YZ XY Example 14.6. The blue example above shows that the assignment G CG,alongwiththeobviousassignmentonhomomorphisms,isa functor7! from Groups to Rings. Example 14.7. Another example: If and each has only one object, then a functor is just a map of associativeC D . 14.3. More examples of categories. Example 14.8. The category of categories, denoted Cat.ObCat consists of all categories (ignoring set-theoretical issues; this is actu- ally delicate). Given two categories and ,welethomCat( , )= Fun( , )denotethesetoffunctorsfromC Dto . C D C D C D 2Confusingly, both the functor F and the functions in (1) and (2) are denoted F . This is fairly common. 4LECTURE14:CATEGORIESANDFUNCTORS

Example 14.9 (Sets). Let S be a set. Then one can define a cate- gory where Ob = S,hom(x, x)= is a point for every x S,and hom(Cx, y)= forC any x = y. ⇤ 2 In this way,; one can think6 of a set as a category where there are no morphisms between any objects except the identity morphism from an object to itself. Notationally, if S is a set, we will also let S denote the category described above. Believe it or not, it will be meaningful to think about functors from S to an arbitrary category when we later discuss limits and colimits. D Example 14.10 (Posets). Recall that a (P, ) is a set P together with a partial .Thisisarelation which satisfies:  (1) x x for all x P . (2) If x y and y 2 x,thenx = y. (3) If x  y and y  z,thenx z.(Transitivity.)    Then any poset P defines a category as follows: Ob = P ,and hom(x, y)isemptyunlessx y.IfxC y,thenhom(x,C y)= is a .   ⇤ Believe it or not, the example of the posets

(Z 0, )and(Z 0, )    will both be important when we consider limits and colimits later. Notationally, we will write (P, )orevenjustP for the category given by a poset.  Example 14.11 (Opposites). Given a category ,onecanconstruct another category op.WedefineitbyOb op =ObC,andforx, y op, we set C C C 2C

hom op (x, y):=hom (y, x). C C The composition maps are the obvious ones:

hom op (y, z) hom op (x, y)=hom (z,y) hom (y, x) C ⇥ C C ⇥ C = hom (y, x) hom (z,y) ⇠ C ⇥ C hom (z,x) ! C =hom op (x, z). C You should check this is associative. LECTURE 14: CATEGORIES AND FUNCTORS 5

Example 14.12 (Products). Given two categories and ,their category is defined as follows: Ob( )=ObC D Ob , and C⇥D C⇥D C⇥ D hom ((x, x0), (y, y0)) := hom (x, y) hom (x0,y0) C⇥D C ⇥ D with the obvious composition maps. Example 14.13 (S-). Fix a ring S.Wecanformacategory SAlg whose objects are S-algebras (i.e., a ring R with a ring map S R) and whose morphisms are maps of S-algebras (i.e., ring maps R ! ! R0 which are a map of S-modules). 14.4. More examples of functors. Example 14.14. We already gave the example of a functor Groups ! Rings which sends a group G to its CG,andwhichsends a to its induced ring map. Note there is such a functor for any choice of base ring k (i.e., k need not equal C). Example 14.15. Here is another example: Given a ring S, we have its category of S-modules. Moreover, given a ring map S T ,wecan turn any S- M into an R-module by taking T M!.Thisalso ⌦S turns any S-module map f : M N into a T -module map idT f, and defines a functor ! ⌦ Rings Cat ! from the category of rings to the category of categories. Example 14.16 (Forget). Given any group, one can forget its group structure and consider it just as set. Since any group homomorphism is in particular a function, we have a functor Groups Sets. ! Likewise, we have “forgetful” functors Rings Sets, Spaces Sets, ! ! et cetera. Example 14.17 (Free). Given a set, we can consider the generated by that set. And any function X Y induces a group homomorphism Free(X) Free(Y ). So we also! have a functor ! Sets Groups. ! 6LECTURE14:CATEGORIESANDFUNCTORS

14.5. Natural Transformations and equivalences of cate- gories. Here is an astounding lesson in life: are not always the correct notion of equivalence. Perhaps the better lesson to be learned is: Assignments should be allowed to be inverses “” a reasonable ambiguity. Definition 14.18. Let F and G be functors from to .Anatural C D transformation from F to G is a choice ⌘X hom (FX,GX)forevery 2 D X Ob such that, for any morphism f : X X0 in ,thefollowing diagram2 C commutes: ! C F (f) F (X) / F (X0)

⌘X ⌘ X0 ✏ G(f) ✏ G(X) / G(X0)

Anaturaltransformationiscalledanatural isomorphism if every ⌘X is an isomorphism. Here’s the idea behind the following definition: When should two categories and be considered “the same?” Well, certainly there should beC a correspondenceD between Ob and Ob ,andwhatever this correspondence is, it should also includeC some bijectionD between the appropriate morphism spaces (i.e., between the hom sets). This looks like one wants the notion of an “isomorphism” for functors; a functor F : which is a on Ob = Ob and a bijection C!D C ⇠ D hom(X, Y ) ⇠= hom (FX,FY). But here’s anotherD insight: Let’s say we have a functor which doesn’t hit every object of ,butallobjectsof are hit up to isomor- phism.Inmath,weonlycaseaboutindividualobjectsofD D or up to isomorphism, so shouldn’t this be “enough” to consider F Cas someD sort of equivalence? After all, all the algebraic information is already being captured. Definition 14.19. AfunctorF : is called an isomorphism if the maps Ob Ob and hom(CX,! Y )D hom(FX,FY)areall . C! D ! Afunctor is called an equivalence of categories if C!D (1) for any D Ob cD,thereexistsanobjectC such that F (C)isisomorphicto2 D,(i.e.,F is essentially surjective2C )and (2) For any X, Y Ob ,themaphom(X, Y ) hom (FX,FY) is a bijection (i.e.,2 FC is fully faithful). ! D 0LECTURE14:CATEGORIESANDFUNCTORS

Remark 14.20. For more “combinatorial” applications of category theory, the notion of isomorphism of categories can be very useful and important. For more “algebraic” or “structural” applications of category theory, the notion of equivalence is far more useful. Exercise 14.21. Let F : be an equivalence of categories. C!D Show that there is a full 0 such that if F 0 is the C ⇢C restriction of F to 0, F 0 is an isomorphism onto F ( ). C C Exercise 14.22. Let F : be an equivalence of categories. Show that there exists a functorC!G :D and natural isomorphisms F G id , G F id . D!F Prove! theD converse. ! ThisC proves the sense in which F is like an “isomorphism of categories up to natural isomorphism”. 14.6. More examples. Example 14.23. Let be a category. Then for any object Y Ob ,thereisafunctor C 2 C : op Sets YY C ! which sends an object X to the set hom(X, Y ). Exercise: Prove this is a functor. Example 14.24 (Yoneda ). In fact, since the above as- signment works for any object of ,onemightexpectittoforma functor as follows: C : Fun( op, Sets),Y . Y C! C 7! YY Indeed one can; a map Y Y 0 induces a ! YY ! Y 0 . Y Exercise: Prove this is a fully faithful functor (that is, the map on morphism sets is a bijection). Example 14.25. Let be a category with one object, which we identify with a monoid MC. What are the natural transformations of the identity functor? Answer: The of M.