Notes on Category Theory
Total Page:16
File Type:pdf, Size:1020Kb
Notes on Category Theory with examples from basic mathematics Paolo Perrone www.paoloperrone.org Last update: February 2021 arXiv:1912.10642v6 [math.CT] 9 Feb 2021 Contents Contents 2 About these notes 5 Acknowledgements................................... .... 6 Notationandconventions . ...... 6 1 Basic concepts 7 1.1 Categories ...................................... ... 7 1.1.1 Categoriesasrelations . ..... 8 1.1.2 Categoriesasoperations. ..... 11 1.1.3 Categories as spaces and maps with extra structure . .......... 13 1.1.4 Set-theoreticalconsiderations . ......... 15 1.1.5 Isomorphismsandgroupoids. 16 1.1.6 Diagrams,informally. 18 1.1.7 Theoppositecategory . 20 1.2 Monoandepi ....................................... 22 1.2.1 Monomorphisms ................................. 22 1.2.2 Splitmonomorphisms . 23 1.2.3 Epimorphisms .................................. 25 1.2.4 Splitepimorphisms. 26 1.3 Functorsandfunctoriality . ........ 27 1.3.1 Functorsasmappingspreservingrelations . ......... 28 1.3.2 Functorsasmappingspreservingoperations . ......... 28 1.3.3 Functorsdefininginducedmaps . 30 1.3.4 Functorsandcocycles . 37 1.3.5 Functors,monoandepi . 39 1.3.6 Whatisnotafunctor? . ..... ...... ..... ...... ..... 42 1.3.7 Contravariantfunctorsandpresheaves . ........ 42 1.4 Naturaltransformations . ....... 45 1.4.1 Natural transformations as systems of arrows . ......... 45 1.4.2 Natural transformations as structure-preserving mappings. 46 1.4.3 Natural transformations as canonical maps . ......... 48 1.4.4 Whatisnotnatural? ............................. 51 1.4.5 Functorcategoriesanddiagrams . ...... 52 1.4.6 Whiskeringandhorizontalcomposition . ........ 54 2 CONTENTS 1.5 Studyingcategoriesbymeansoffunctors . .......... 57 1.5.1 Thecategoryofcategories. ..... 57 1.5.2 Subcategories ................................. 58 1.5.3 Full, faithful, essentially surjective . ............ 59 1.5.4 Equivalencesofcategories. ...... 61 2 Universal properties and the Yoneda lemma 66 2.1 Representable functors and the Yoneda embedding theorem............ 66 2.1.1 Extractingsetsfromobjects . ...... 66 2.1.2 Representablefunctors. ..... 67 2.1.3 TheYonedaembeddingtheorem . 70 2.2 TheYonedalemma .................................. 71 2.2.1 ProofoftheYonedalemma . 72 2.2.2 Particularcases ............................... 74 2.3 Universalproperties ...... ..... ...... ..... ...... ...... 76 2.3.1 Theuniversalpropertyofthecartesianproduct . .......... 77 2.3.2 Theuniversalpropertyofthetensorproduct . ......... 80 3 Limits and colimits 82 3.1 Generaldefinitions ................................ 82 3.2 Particular limits and colimits . ......... 86 3.2.1 Theposetcase: constrainedoptimization . ......... 86 3.2.2 Thegroupcase: invariantsandorbits . ....... 87 3.2.3 Productsandcoproducts . 89 3.2.4 Equalizersandcoequalizers. ...... 91 3.2.5 Pullbacksandpushouts . 93 3.2.6 Initial and terminal objects, trivial cases . ............ 97 3.3 Functors,limitsandcolimits . ......... 99 3.3.1 The power set and probability functors, and complexity ..........100 3.3.2 Continuousfunctorsandequivalence . ....... 102 3.3.3 The case of representable functors and presheaves . ...........102 3.4 Limitsandcolimitsofsets . ....... 103 3.4.1 Completenessofthecategoryofsets . ....... 103 3.4.2 GeneralproofofTheorem3.3.16 . 106 4 Adjunctions 108 4.1 Generaldefinitions ................................ 108 4.1.1 Free-forgetfuladjunctions . ....... 108 4.1.2 Galoisconnections ... ..... ...... ..... ...... .... 110 4.2 Unitandcounitasuniversalarrows . ........ 111 4.2.1 Alternativedefinitionofadjunctions . ........ 116 4.2.2 Example: the adjunction between categories and multigraphs . 119 3 CONTENTS 4.3 Adjunctions,limitsandcolimits . ..........124 4.3.1 Right-adjointsandbinaryproducts . ....... 124 4.3.2 GeneralproofofTheorem4.3.1 . 125 4.3.3 Examples .....................................126 4.4 Theadjointfunctortheoremforpreorders . ........... 127 4.4.1 Thecaseofconvexsubsets. 128 4.4.2 ProofofTheorem4.4.1. 128 4.4.3 Furtherconsiderationsandexamples . ....... 129 5 Monads and comonads 131 5.1 Monadsasextensionsofspaces . 132 5.1.1 Kleislimorphisms ............................... 137 5.1.2 TheKleisliadjunction . 143 5.1.3 Closureoperatorsandidempotentmonads . ....... 145 5.2 Monadsastheoriesofoperations . ....... 148 5.2.1 Algebrasofamonad .............................. 151 5.2.2 Freealgebras .................................. 155 5.2.3 TheEilenberg-Mooreadjunction . 156 5.3 Comonadsasextrainformation . ....... 159 5.3.1 Co-Kleislimorphisms . 162 5.3.2 Theco-Kleisliadjunction . 164 5.4 Comonadsasprocessesonspaces. ....... 165 5.4.1 Coalgebrasofacomonad . 168 5.4.2 Theadjunctionofcoalgebras . 172 5.5 Adjunctions,monadsandcomonads . ....... 173 5.5.1 The adjunction between categories and multigraphs is monadic . 177 Conclusion 180 Bibliography 181 4 About these notes These notes were originally developed as lecture notes for a course that I taught at the Max Planck Institute of Leipzig in the Summer semester of 2019. They are rather different from other material on category theory, partly in content, and largely in form: • The audience of the course was very varied, there were algebraic geometers and topolo- gists, as well as computer scientists, physicists and chemists; • The lecture notes were always written after the lecture had taken place, to reflect what was discussed in class, and include all the questions, remarks, and views of the participants. These notes should be well-suited to anyone that wants to learn category theory from scratch and has a scientific mind. There is no need to know advanced mathematics, nor any of the disciplines where category theory is traditionally applied, such as algebraic geometry or theoretical computer science. The only knowledge that is assumed from the reader is linear algebra. Other assets of these notes are: • Thorough explanation of the Yoneda lemma and its significance, with both intuitive explanations, detailed proofs, and many specific examples; • Atreatmentofmonadsandcomonadsonanequalfooting,since comonads in the literature are often unjustly overlooked as “just the dual to monads”; • A detailed treatment of the relationship between categories and directed multigraphs. From the applied point of view, this shows why categorical thinking can help whenever some process is taking place on a graph. From the pure math point of view, this can be seen as the 1-dimensional first step into the theory of simplicial sets; • Many examples from different areas of mathematics (group theory, graph theory, proba- bility,. ). Not every example is helpful for every reader, but hopefully every reader can find at least one helpful example per concept. The reader is encouraged to read all the examples, this way they may even learn something new about a different field. One thing that is unfortunately not contained in these notes, since they are already quite long, is string diagrams. For those, we refer the interested reader for example to [Mar14] and [FS19]. While the tone of these notes is informal, the mathematics is rigorous, and every theorem is proven. I make no claim of scientific originality. Some of the technical content, and some of the examples, are taken from Emily Riehl’s book [Rie16], which was the recommended textbook for the “pure math” part of the course. Another considerable part, such as the adjoint functor theorem for preorders, is taken from Brendan Fong and David Spivak’s book [FS19], which was 5 CONTENTS the recommended textbook for the “applied” part of the course. Finally, many ideas about how to present certain mathematical concepts are novel, and are to be credited not only to me, but also to the participants of the course. (Part of the treatment of monads already appeared in the introduction of my PhD thesis [Per18].) Since these are informal lecture notes, most results are presented without citing the original work in which they were discovered. If however you find that you should be cited for a result used here, or that some citation here is incorrect or incomplete, please contact me. Just as well, feel free to contact me if you find any mistakes, or if you find that something is not clearly written. (Thanks to all the readers who reported such mistakes already.) Paolo Perrone. Acknowledgements There are many people who helped me developing these notes, helped me understanding the ideas behind these notes, and helped me finding ways to explain these ideas to new learners. • First of all, I want to thank all the participants of the course, without whom these notes wouldn’t exist. I want to thank in particular Emma Chollet, Wilmer Leal, Guillermo Restrepo and Sharwin Rezagholi, who came up with many original ideas during the lectures, now recorded in these notes. • I also want to thank Carmen Constantin, Jules Hedges, Jürgen Jost, Slava Matveev, David Spivak, and more recently Walter Tholen, for the interesting discussions, some of which were reflected in the way I taught this course and wrote these notes. • Finally I want to thank Tobias Fritz, who had the patience to teach category theory to me. Notation and conventions We will follow for the most part the notation and conventions of [Rie16]. The typesetting is slightly different. • We denote categories by boldface capitalized words, such as C and Set. • We denote functors by uppercase letters, such as : C → Set. (We compose functors on the left.) • We denote objects of a category by uppercase letters such as -,.,,. • We denote morphisms of a category by lowercase letters, such as 5 : → . (We compose