CATEGORY THEORY PROFESSOR PETER JOHNSTONE Cats have been around for 70 years. Eilenberg + Mac Lane =. Cats are about building bridges between different parts of maths. Definition 1.1. A category C consists of: 1. Chapter I. Definitions and examples (i) a collection ob C of objects A, B, C,... (ii) a collection mor C of morphisms f, g, h,... (iii) two operations, dom and cod, from morphisms to objects, denoted f : A B or A f B, standing for dom f = A, cod f = B. (iv) an operation A 1 A from objects to morphisms such that 1 A : A A (v) an operation (f, g) fg from pairs with dom f = cod g such that dom fg = dom g and cod fg = cod f. These data satisfy (vi) f : A B, f1 A = 1 B f = f (vii) if fg and gh are defined, then f(gh) = (fg)h. Remark 1.2. (a) we don t require ob C and mor C to be sets. If they are, we call C a small category. (b) we don t need the objects at all, because we can recover them from the identity morphisms: A 1 A is a bijection from ob C to the collection of morphisms f satisfying fg = g and hf = h whenever the composites are defined 1. Example 1.3. (a) Set, the category of sets with set functions. Morphisms are formally pairs (f, B) where f is a function from A to B, because set functions don t specify their codomain. (b) We can impose some structure on sets and require the morphisms to respect that structure in order to obtain new categories. This way, we get Gp - the category of groups with group homomorphisms, Rng - the category of rings with ring homomorphisms, and Mod R, the category of R-modules with R-module homomorphisms. (c) Top, the category of topological structures, and Mf - the category of C manifolds with smooth C -maps between them. (d) Htpy - the homotopy category with objects the same as those of Top, but morphisms X Y are homotopy classes of maps. This is our first example of a category where the morphisms are not just special kinds of set functions. By the way, in general an equivalence relation on mor C is called a congruence if: f g = dom f = dom g, cod f = cod g f g = fh gh, kf kg whenever the composites are defined. Then for a congruence, there is a category C/ with the same objects as C, but where morphisms are -equivalence classes. 1 This needs a bit of work: if f : A A is such that fg = g and hf = h whenever the composites are defined, we have f = f1 A = 1 A. 1
2 PROFESSOR PETER JOHNSTONE (e) For any category C, we have the opposite category C op, obtained by reversing all morphisms. So whenever we have a theorem about categories, we get another one by inverting the arrows. This is the duality principle: if ϕ is a valid statement about categories, so is the statement ϕ obtained by reversing all morphisms. (f) A cat with one object is a monoid. In particular, a group can be viewed as a small category with one object. (g) A groupoid is a cat in which all morphisms are isomorphisms. For example, the fundamental groupoid of a topological space. (h) a category whose only morphisms are identities is called discrete. A cat in which for any A, B there is at most one morphisms A B is called a preorder, i.e. a class equipped with a reflexive and transitive relation. In particular, a partial order is a preorder in which the only isomorphisms are identities. (i) The category Rel with the same objects as Set, but morphisms given by binary relations. The composition of functions extends to composition of relations: the composite of the relations S on B C and R on A B is R S = { (a, c) b B such that (a, b) R, (b, c) S } Notice that Set is a subcategory (we haven t defined that yet, but it s obvious what it should be) of Rel, and Rel = Rel op. (j) Let K be a field. The category Mat K has objects N and morphisms n p are p n matrices over K, with composition being matrix multiplication. Note that Mat K = Mat op K by transposition. (k) Let Π be a formal theory. The category Der Π of derivations relative to Π has objects the formulas in the language of Π, and morphisms are derivations ϕ ψ, that is, a list of formulas following the rules of Π, with 1 ϕ being the one-line derivation ϕ, and composition is by concatenation. Definition 1.4. Let C, D be cats. A functor F : C D consists of: (i) an operation A F A from ob C to ob D (ii) an operation f F f from mor C to mor D having the obvious consistency properties: If f : A B then F f : F A F B F (1 A ) = 1 F A F fg = F ff g whenever fg is defined. Example 1.5. (a) Forgetful functors: they forget some amount of additional structure. We have forgetful functors Gp Set, Top Set, Rng Gp,.... (b) The free group functor. Let F A denote the free group on a set A. It comes equipped with an inclusion map η A : A F A between underlying sets, and any f : A G for G a group factors uniquely through F A. In fact, F is a functor Set Gp, because of the following commutative diagram: A η A F A f B η B F B The rest of the details are straightforward to check. (c) The abelianization of an arbitrary group G is the quotient G/G where G is the (necessarily normal) subgroup generated by the commutators x 1 y 1 xy for all x, y G. This construction defines a functor Gp AbGp.!F f
CATEGORY THEORY 3 (d) The powerset functor. For any set A, let P A denote the powerset. Then P is a functor Set Set: given f : A B, define P f(a ) = { f(x) x A } A A We can also make P into a functor P : Set Set op by setting P f(b ) = { x A } f(x) B B B. By the way, a contravariant functor C D is defined to be a functor C op D; a covariant functor is just a functor, as we ve defined it. (e) The dual of a vector space over a field K is a contravariant functor Mod K Mod K : given α : V W, α : W V is the operation of precomposing linear maps W K with α. (f) Let Cat denote the category of small categories and functors between them. Then C C op is a (covariant) functor Cat Cat. (g) If M, N are monoids regarded as one-object categories, a functor M N is a monoid homomorphism. In particular, Gp is a subcategory of Cat. (h) Similarly, if P and Q are partially ordered sets regarded as categories, a functor P Q is an order-preserving map. (i) Let G be a group regarded as a category G. A functor F : G Set is an action of G on a set, i.e. a permutation representation of G. Similarly, a functor G Mod K is a K-linear representation of G. (j) And of course many examples from algebraic topology, such as the fundamental group, homology and cohomology. Definition 1.6. Let C, D be categories and F, G : C D two functors. A natural transformation α : F G is an operation A α A from ob C to mor D such that for all A, (i) dom α A = F A and cod α A = GA for all A (ii) for all functors f : A B, the following diagram commutes: F A F f F B α A GA Gf GB Example 1.7. (a) There s a natural transformation α : 1 ModK (where is the dual space functor). Here α V : V V sends r V to evaluation at r. In fact, if we restrict to finite-dimensional spaces, α becomes a natural isomorphism, i.e. an isomorphism in the category [fdmod K, fdmod K ], where [C, D] denotes the category of all functors C D and natural transformations between them. Note that if α is a natural transformation and each α A is an isomorphism, then the inverses β A of the α A also form a natural transformation, since α B β B Gf = β B Gfα A β A = β B α B F fβ A = F fβ A (b) Let F : Set Gp be the free group functor and U : Gp Set the forgetful functor. The inclusion of generators η A : A UF A is a natural transformation between id Set and UF. (c) Consider the maps α A : A P(A) given by A {A}; they give a natural transformation between id Set and P. (d) Suppose G, H are groups, and f, f : G H are homomorphisms. A natural transformation f f is an element h H such that hf(g) = f (g)h for all g G, i.e. hf(g)h 1 = f (g), so h exists iff f, f are conjugate homomorphisms.
4 PROFESSOR PETER JOHNSTONE (e) For any space X with basepoint x, there exists a natural mapping h (X,x) : π 1 (X, x) H 1 (X), which is the (X, x) component of a natural transformation to the composite Top U Top H1 AbGp ι Gp Definition 1.8. Let f : C D be a functor. We say F is faithful if, given f, g mor C, the equations dom f = dom g, cod f = cod g and F f = F g imply f = g. F is full if, given g : F A F B in D, there exists f : A B in C with F f = g. We say a subcategory C of C is full if the inclusion C C is full. So for example AbGp is a full subcategory of Gp, but the category Lat of lattices (i.e., posets with least upper bounds and greatest lower bounds for finite subsets) is not a full subcategory of Poset. Definition 1.9. Let C and D be categories. An equivalence between C and D is a pair of functors F : C D and G : D C together with natural isomorphisms α : id C GF, β : F G id D. We denote equivalence by C D. We say a property P of categories is a categorical property if whenever C has P and C D, then D has P. Example 1.10. (a) Given an object B of a category C, we write C/B for the cat whose objects are morphisms f : A B and morphisms are commutative diagrams A g A f B For example, we have Set/B Set B. We obtain a functor in the forward direction if we take an object (f : A B) to the set b B {f 1 (b)}, and a morphism g as in the diagram to the product map b B g. A functor going the other way sends b B C b to b B C π b {b} 2 B, and a map b B g b : b B C b b B C b to the map b B g b id. (b) Let 1\Cat be the cat of pointed sets (A, a) and let Part be the subcat of Rel whose morphisms are partial functions, i.e. relations R such that (a, b), (a, b ) R = b = b. Then 1\Set Part: in one direction, send (A, a) A {a} and f : (A, a) (B, b) to { } (x, y) x A, y B, f(x) = y, y b f In the other, send A to (A {A}, {A}) and a partial function f : A B to the function f defined by { f(a), if a dom f f = {B}, otherwise. (c) The cat fdmod K is equivalent to fdmod op K by the duality functors and the natural isomorphism id fdmodk. (d) The cat fdmod K is equivalent to Mat K : in one direction, we send an object n of Mat K to K n, and a morphism A to the linear map with matrix A. In the opposite direction, we choose a basis for each space V and send V dim V and (θ : V W ) the matrix representing θ with respect to the chosen bases. We say a functor F : C D is essentially surjective if, for all B ob D, there exists A ob C such that B = F A.
CATEGORY THEORY 5 Lemma 1.11. A functor F : C D is part of an equivalence between C and D iff F is full, faithful, and essentially surjective. Proof. ( = ) Suppose given G, α and β as in Definition 1.9 (equivalence of categories). Then B = F GB for all B, so F is essentially surjective. Suppose given f, g : A B in C with F f = F g; then GF f = GF g, but f = α 1 B (GF f)α A by naturality of α, so f = g. For fullness, suppose given g : F A F B in D. Define f = α 1 B (Gg)α A : A GF A GF B B. Then GF f = Gg since both are equal to α B fα 1 A. But G is faithful, so F f = g. ( = ) For each B ob D, choose GB and an isomorphism β B : F GB B. To define G on morphisms, suppose given g : B C. Then define Gg : GB GC to be the unique morphism whose image under F is β 1 C gβ B : F GB F GC. Faithfulness of F ensures that G(g)G(h) = G(gh) whenever gh is defined, since they have the same image under F. So, G is a functor, and by construction β is a natural isomorphism F G 1 D. To define α A : A GF A, take it to be the unique map such that F α A = β 1 F A. This is natural since the unique morphism mapped to β F A is a 2-sided inverse for it. Definition 1.12. (a) A category C is called skeletal if any isomorphism f in C satisfies dom f = cod f. (b) By a skeleton of a category C, we mean a full subcategory C containing exactly one object from each isomorphism class of objects of C By Lemma 1.11, if C is a skeleton of C then the inclusion functor C C is part of an equivalence. Remark 1.13. Each of the following statements is equivalent to the (set-theoretic) axiom of choice: (a) Every small cat has a skeleton. (!!) (b) Every small cat is equivalent to any of its skeletons. (c) Any two skeletons of a given small cat are isomorphic Definition 1.14. (a) A morphism f : A B in a cat C is called a monomorphism if, given any two morphisms g, h : C A with fg = fh, we have g = h. We write f : A B (b) Dually, f is called an epimorphism if kf = lf implies k = l whenever the composites are defined. We write Af : B (c) C is called balanced if every f mor C which is both monic and epic is an isomorphism. Example 1.15. (a) In Set, monic injective; injectivity is the case C = { } of the definition, but that implies the general case. Also, epic surjective: if f is not surjective, let b B im f and consider k, l : B {0, 1} where k = 0 and l(b) = 1, l( b) = 0. (b) In Gp, monic injective (proof as in (a), but replace { } by Z. Also, epic surjective. Proof is not trivial. (c) In Rng, we again have monic injective, but there exist epimorphisms that are not surjective, e.g. the inclusion map Z Q is epic. So Rng is not balanced. (d) In Top, monic injective and epic surjective, with essentially same proof as for Set, but Top isn t balanced: e.g., different topologies on 2-point set. (e) In a poset, every morphism is both monic and epic, so the only balanced posets are discrete ones.