<<

Brief Introduction to Categories

Torsten Wedhorn

TU Darmstadt

Contents

1 Categories 1

2 3

3 Limits and Colimits 5

4 Special cases of limits and colimits 8

1 Categories

Definition 1.1. A C consists of† (a) a class Ob(C) of objects, (b) for any two objects X and Y a set C(X,Y ) := HomC(X,Y ) = Hom(X,Y ) of from X to Y , (c) for any three objects X, Y , Z a composition map

C(X,Y ) × C(Y,Z) → C(X,Z), (f, g) 7→ g ◦ f such that all morphisms sets are disjoint (hence every f ∈ C(X,Y ) has unique source X and a unique target Y ) and such that (1) the composition of morphisms is associative (i.e., for all objects X, Y , Z, W and for all f ∈ C(X,Y ), g ∈ C(Y,Z), h ∈ C(Z,W ) one has h ◦ (g ◦ f) = (h ◦ g) ◦ f, (2) For all objects X there exists a morphism idX ∈ C(X,X), called identity of X such that for all objects Y and for all morphisms f ∈ C(X,Y ) and g ∈ C(Y,X) one has f ◦ idX = f and idX ◦g = g. A category is called finite if it has only finitely many objects and morphisms.

Remark 1.2. For every object X of a category C the morphism idX is uniquely deter- ˜ ˜ ˜ mined by Condition (2) for if idX and idX are identities of X, then idX = idX ◦ idX = idX . †Here we ignore all set-theoretical issues. To avoid set-theoretical difficulties one should work with a fixed universe in the sense of [KaSh] Definition 1.1.1 and assume that the sets of morphisms between two objects always lies in the given universe. Then a category C is called small if Ob(C) is in that universe. Moreover it then will be sometimes necessary to pass to a bigger universe, for instance when considering the category of functors between two categories (see Definition 2.4 below). Finally one adds also the axiom that every set is an element of some universe to the axioms of Zermelo-Fraenkel set theory. We refer to [SGA4] Exp. I for details. Alternatively one can also work with classes as explained in [Sch].

1 Definition and Remark 1.3. A morphism f : X → Y in a category is called an if there exists a morphism g : Y → X such that f ◦g = idY and g◦f = idX . ∼ We often write f : X → Y to indicate that f is an isomorphism. We also write X =∼ Y and say that X and Y are isomorphic if there exists an isomorphism X →∼ Y . An morphism (resp. an isomorphism) with the same source and target X is called an endomorphism (resp. an ) of X. Composition yields the structure of a monoid on the set EndC(X) of endomorphisms of X and the structure of a on the set AutC(X) of . Definition 1.4. A of a category C is a category C0 such that every object of C0 is an object of C and such that C0(X0,Y 0) ⊆ C(X0,Y 0) for any pair (X0,Y 0) of objects of C0, compatibly with composition of morphisms and identity elements. The subcategory C0 is called full if C0(X0,Y 0) = C(X0,Y 0) for all objects X0 and Y 0 of C0.

Example 1.5. (1) (Sets) the : Objects are sets, for two sets X and Y a morphism is a map X → Y , composition in the category is the usual composition of maps, the identity of a set X is the usual identity map idX . An isomorphism in (Sets) is simply a bijective map. (2) (Grp) the : Objects are groups, morphisms are group homo- morphisms, composition is the usual composition of group homomorphisms, the identity is the usual identity. An isomorphism in (Grp) is a group isomorphism. (3) (Ab) is the full subcategory of (Grp) of abelian groups: Objects are abelian groups, morphisms are group homomorphisms, composition is the usual composition of group homomorphisms, the identity is the usual identity. (4) Fix a group G. Then (G-Sets) denotes the category of G-sets: Objects are sets with a left action by the group G, morphisms are G-equivariant maps. By (Sets-G) we denote the category of sets with a right action by G. (5) (Ring) the : Objects are rings (always assumed to have a unit), morphisms are ring homomorphisms (preserving the unit). (6) (Top) the category of topological spaces: Objects are topological spaces, morphisms are continuous maps. An isomorphism is a homeomorphism. (7) Let R be a ring. Then (R-Mod) denotes the category of left R-modules: Objects are left R-modules, morphisms are R-linear maps. An isomorphism is bijective R- because its inverse is automatically R-linear again. If R = k is a field, we obtain the category of k-vector spaces, usually denoted by (k-Vec) instead of (k-Mod).

Example 1.6. Let I be a set. (1) A relation ≤ on I is called partial preorder or simply preorder, if i ≤ i for all i ∈ I and i ≤ j, j ≤ k imply i ≤ k for all i, j, k ∈ I. (2) A preorder ≤ is called partial or simply order if i ≤ j and j ≤ i imply i = j for all i, j ∈ I. (3) A preorder ≤ is called filtered if for all i, j ∈ I there exists a k ∈ I with i ≤ k and j ≤ k. (4) A partial order ≤ is called total order if for all i, j ∈ I one has i ≤ j or j ≤ i.

2 Every preordered set I can be made into a category, again denoted by I, whose objects are the elements of I and for two elements i, j ∈ I the set of morphisms I(i, j) consists of one element if i ≤ j and is empty otherwise. There is a unique way to define a composition law in this category.

Definition 1.7. Let C be a category. A morphism f : X → Y in C is called monomor- phism (resp. epimorphism) if for all objects Z in C and all morphisms g, h: Z → X (resp. g, h: Y → Z) one has

f ◦ g = f ◦ h ⇒ g = h (resp. g ◦ f = h ◦ f ⇒ g = h).

Example 1.8. In the category of sets (resp. of groups), monomorphisms are injective maps (resp. group homomorphisms) and epimorphisms are surjective maps (resp. group homomorphisms). In the category of rings the inclusion Z → Q is a monomorphism and an epimorphism. This gives in particular an example of a morphisms that is a monomorphism and an epimorphism but not an isomorphism.

Definition 1.9. For every category C the , denoted by Copp, is the category with the same objects as C and where for two objects X and Y of Copp we set Copp(X,Y ) := C(Y,X) with the obvious composition law.

Definition 1.10. Let C and D be categories. We define the category C × D by Ob(C ×D) := Ob(C)×Ob(D) and (C ×D)((X1,Y1), (X2,Y2)) := C(X1,X2)×D(Y1,Y2). Composition of morphisms is defined componentwise.

2 Functors

Definition 2.1. Given categories C and D, a (covariant) F : C → D is given by attaching to each object C of C an object F (C) of D, and to each morphism f : C → C0 in C a morphism F (f): F (C) → F (C0), compatible with composition of morphisms, i.e., F (g◦f) = F (g)◦F (f) whenever the composition is defined, and preserving identity elements, i.e., F (idC ) = idF (C). If F : C → D and G: D → E are functors, we write G ◦ F : C → E for the composition. A covariant functor Copp → D is also called a contravariant functor from C to D.

By a “functor” we will always mean a covariant functor. If we write F : C → D, then we always mean that F is covariant. A contravariant functor F from C to D will always be denoted by F : Copp → D. It attaches to each object C in C an object F (C) in D and to each morphism f : C → C0 in C a morphism F (f): F (C0) → F (C) such that F (g ◦ f) = F (f) ◦ F (g) and F (idC ) = idF (C). Remark 2.2. Let F : C → D be a functor. Let C and C0 be objects in C and let f : C → C0 be an isomorphism in C. Then F (f) is an isomorphism. 0 Indeed, as f is an isomorphism, there exists a morphism g : C → C such that g◦f = idC and f ◦ g = idC0 . Hence F (g) ◦ F (f) = F (g ◦ f) = F (idC ) = idF (C) and similarly F (f) ◦ F (g) = idF (C0). Therefore F (f) is an isomorphism.

3 Example 2.3. A simple example is the functor which “forgets” some structure. An example is the functor F : (Grp) → (Sets) that attaches to every group the underlying set and that sends every to itself (but now considered as a map of sets), Definition and Remark 2.4. For two functors F,G: C → D we call a family of morphisms α(S): F (S) → G(S) for every object S of C functorial in S if for every morphism f : T → S in C the diagram

α(T ) F (T ) / G(T )

F (f) G(f)  α(S)  F (S) / G(S) commutes. We also say that α is a morphism of functors F → G. If β : G → H is a second morphism of functors, we define the composition β ◦ α by (β ◦ α)(S) = β(S) ◦ α(S). With this notion of morphism we obtain the category of all functors from C to D, C denoted by Func(C, D) or D . The identity idF is given by idF (S), where S runs through all objects of C. In particular we obtain the notion of an isomorphism F →∼ G of functors. Example 2.5. Let k be a field. ∨ (1) For every k-vector space V let V := Homk(V, k) be its space and for every k-linear map u: V → W let u∨ : W ∨ → V ∨, λ 7→ λ ◦ u be its dual homomorphism. We obtain a functor ( )∨ :(k-Vec)opp → (k-Vec). (2) For every k-vector space V one has the biduality homomorphism of k-vector space

∨ ∨ ∨ ιV : V → (V ) , v 7→ (λ 7→ λ(v)), v ∈ V, λ ∈ V .

Moreover, if u: V → W is k-linear, then the diagram

ιV V / (V ∨)∨

∨ u (u )∨

 ιW  W / (W ∨)∨

is commutative. In other words, the ιV for V a k-vector space form a morphism of ∨ ∨ functors id(k-Vec) → ( ◦ ). ∨ (3) If V is a finite-dimensional vector space, then V if finite-dimensional and ιV is an . Hence ( )∨ restricts to a functor (k-vec) → (k-vec), where (k-vec) denotes the full subcategory of (k-Vec) of finite-dimensional k-vector spaces, and ∼ ∨ ∨ V 7→ ιV is an isomorphism of functors id(k-vec) → ( ◦ ). Definition 2.6. Let F : C → D be a functor. (1) F is called faithful (resp. fully faithful) if for all objects X and Y of C the map C(X,Y ) → D(F (X),F (Y )), f 7→ F (f) is injective (resp. bijective).

4 (2) F is called essentially surjective if for every object Y of D there exists an object X of C and an isomorphism F (X) =∼ Y . (3) F is called an equivalence of categories if it is fully faithful and essentially surjective. There are analogous notions for contravariant functors. A contravariant functor which is an equivalence of categories is sometimes also called an anti-equivalence of categories. Theorem and Definition 2.7. A functor F : C → D is an equivalence of categories if and only if there exists a quasi-inverse functor G, i.e., a functor G: D → C such that ∼ ∼ G ◦ F = idC and F ◦ G = idD. Proof. [KaSh] Proposition 1.3.13.

Definition 2.8. Let C and D be categories and let F : C → D and G: D → C be functors. Then G is said to be right adjoint to F and F is said to be left adjoint to G if for all objects X in C and Y in D there exists a bijection

C(X,G(Y )) =∼ D(F (X),Y ) which is functorial in X and in Y . Example 2.9. If F : C → D is an equivalence of categories, then a quasi-inverse functor G: D → C is right adjoint and left adjoint to F . Indeed for all objects X in C and Y in D we have bijections, functorial in X and in Y

C(X,G(Y )) →∼ C(G(F (X)),G(Y )) →∼ D(F (X),Y ).

This shows that F is left adjoint to G. A similar argument shows that F is also right adjoint to G. Example 2.10. Let k be a field and let F :(k-Vec) → (Sets) be the forgetful functor. Then F is right adjoint to the functor G which sends a set I to the k-vector space

(I) k = { (xi)i∈I ; xi ∈ k, xi = 0 for all but finitely many i} and which sends a map a: I → J to the unique k-linear map G(a): k(I) → k(J) such that (I) (J) G(a)(ei) = ea(i) where (ei)i∈I (resp. (ej)j∈J ) is the standard basis of k (resp. k ). Indeed for every set I and every k-vector space V we have a bijection, functorial in I and in V ,

(I) ∼ Hom(k-Vec)(k ,V ) → Hom(Sets)(I,V ), f 7→ (i 7→ f(ei)).

3 Limits and Colimits

Let I always denotes a small category (i.e., a category where the objects form a set). Let C be a category and let CI be the category of functor I → C. For every object A of C let cA : I → C be the constant functor with value A, i.e., cA sends every object of I to A and every morphism in I to idA. Every morphism A → B in C induces a morphism of functors cA → cB. We obtain a functor I (3.0.1) C −→ C ,A 7→ cA.

5 Definition 3.1. Let X : I → C be a functor. We also call such a functor an I-diagram in C. We write Xi instead of X(i) for an object i ∈ I. (1) An object colimI X in C together with morphisms si : Xi → colimI X in C for all objects i in I is called colimit of X if (a) for every morphism ϕ: i → j in I one has si = sj ◦ X(ϕ), (b) for every object Z in C and for all morphism ti : Xi → Z such that for all morphism ψ : i → j in I one has ti = tj ◦ X(ψ) there exists a unique morphism t: colimI X → Z such that ti = t ◦ si. Instead of colimI X one also writes colimi∈I Xi. (2) Dually, a of X is an object limI X = limi∈I Xi together with morphisms pi : limI X → Xi for all objects i in I such that (a) for every morphism ϕ: i → j in I one has X(ϕ): pi = pj, (b) for every object Z in C and for all morphism qi : Z → Xi such that for all morphism ψ : i → j in I one has X(ψ) ◦ qi = qj there exists a unique morphism q : Z → limI X → Z such that qi = pi ◦ q. If X,X0 : I → C a functors, any morphism of functors u: X → X0 induces a morphism

0 0 colimI (u): colimI X → colimI X, resp. limI (u): limI X → limI X .

0 0 If colimI X and colimI X (resp. limI X and limI X ) are both representable, then this morphism corresponds to a unique morphism

colim(u): colim X → colim X0, resp. lim(u): lim X → lim X0. I I I I I I Remark 3.2. Let C be a category and let I be a small category such that for all functors X : I → C the colimit (resp. the limit) exists. Then we obtain a functor

colim: CI −→ C, (resp. lim: CI −→ C), and this functor is left adjoint (resp. right adjoint) to the functor A 7→ cA (3.0.1). In a given category C only some limits or colimits may exist. Definition 3.3. A category in which arbitrary limits (resp. colimits) exist is called com- plete (resp. cocomplete). A category in which limits (resp. colimits) of all I-diagrams exist for arbitrary finite categories I is called finitely complete (resp. finitely cocom- plete). The category of sets is complete and cocomplete: Remark 3.4. Let I be a small category, I := Ob(I), and let X : I → (Sets) be an I-diagram in the category of sets. (1) The limit limI X exists in (Sets) and can be described by Y (3.4.1) lim X = { (xi)i∈I ∈ Xi ; ∀ ϕ: i → j in I: X(ϕ)(xi) = xj}. I i∈I

For j ∈ I the map pj : limI X → Xj is given by the projection (xi)i∈I 7→ xj.

6 (2) The colimit colimI X exists in (Sets) and can be described by a (3.4.2) colim X = ( Xi)/ ∼, I i∈I ` where ( i∈I Xi) is the disjoint union of the sets Xi and where ∼ is the generated by the relation xi ∼ xj if xi ∈ Xi, xj ∈ Xj and X(ϕ)(xi) = xj for some ϕ: i → j. For j ∈ I the map sj : Xj → colimI X is given by attaching to ` xj ∈ Xj the equivalence class of xj ∈ i∈I Xi. Further examples for categories which are complete and cocomplete are (1) the category of topological spaces, (2) the category of groups, (3) the category of left R-modules (R a fixed not necessarily commutative ring).

Remark 3.5. Let X : I → C, i 7→ Xi be a diagram in a category C. Then the of lim Xi and colim Xi can also by definition be described as follows. An object limI X in C together with morphisms pi : limI X → Xi for all objects i of I is a limit of X in C if and only if for all objects Y in C the map

u7→(pi◦u)i C(Y, lim X) −−−−−−−→ lim C(Y,Xi) I I is bijective, where the right hand side denotes the limit in the category of sets. Similarly, an object colimI X in C together with morphisms si : Xi → colimI X for all objects i of I is a colimit of X in C if and only if for all objects Y in C the map

u7→(u◦si)i C(colim X,Y ) −−−−−−−→ lim C(Xi,Y ) I I is bijective.

Limits commute with limits, and colimits commute with colimits:

Remark 3.6. Let I and J be (small) categories and let C be a category such that limits (resp. colimits) of all I-diagrams and all J -diagrams in C exist. Let X : I × J → C, (i, j) 7→ Xij be a diagram in C. Then because of the definition of limits (resp. colimits) via a universal property one obtains that limI×J X (resp. colimI×J X) exists and one has isomorphisms ∼ ∼ lim Xij = lim lim Xij = lim lim Xij i,j i j j i ∼ ∼ (resp. colim Xij = colim colim Xij = colim colim Xij). i,j i j j i

Definition 3.7. A category I is called filtered if Ob(I) is non-empty and if the following two conditions are satisfied. (a) For all objects i and j in I there exists an object k and morphisms i → k and j → k. (b) For all objects i and j and all morphisms f, g : i → j there exists a morphism h: j → k such that h ◦ f = h ◦ g.

7 We also say that I is cofiltered if the opposite category Iopp is filtered.

For instance, a partially ordered set I is filtered if and only if the attached category is a filtered category. Filtered colimits of sets have a very concrete description:

Remark 3.8. Let I be a filtered category and let X : I → (Sets) be an I-diagram in ` the category of sets. In this case one has colimI X = ( i∈I Xi)/∼ where for xi ∈ Xi and xj ∈ Xj one defines xi ∼ xj if there exist morphisms ϕ: i → k and ψ : j → k such that X(ϕ)(xi) = X(ψ)(xj) (the properties of a filtered category imply that ∼ is an equivalence relation).

Let F : C → D be a functor between categories. Let X : I → C be a diagram in C such that the limits limI X and limI (F ◦ X) exist in C and D, respectively. For every object i in I the morphism limI X → Xi induces by application of F a morphism F (limI X) → F (Xi). The family of these morphisms corresponds by the universal property of limI (F ◦ X) to a morphism

(3.8.1) F (lim X) → lim(F ◦ X). I I We say that F commutes with limits if for every diagram X : I → C such that its limit limI X exists in C, the limit of F ◦ X exists in D and the morphism (3.8.1) is an isomorphism. Dually, there is the notion of a functor that commutes with colimits.

Proposition 3.9. Let F : C → D be a functor. (1) Suppose that F is right adjoint to some functor G: D → C. Then F commutes with limits. (2) Dually, suppose that F is left adjoint to some functor. Then F commutes with colimits.

Proof. Let us show (1). Let X : I → C be a diagram such that limI X exists. For each object Y in D one has functorial bijections

D(Y,F (lim X)) = C(G(Y ), lim X) I I

= lim C(G(Y ),Xi) i∈I

= lim D(Y,F (Xi)). i∈I

This shows that the limit of i 7→ F (Xi) exists in D and is equal to F (limI X). The argument for (2) is similar.

4 Special cases of limits and colimits

Let X : I → C be an I-diagram in a category C. Special cases of (co)limits are products and , pullbacks and pushouts, equalizer and :

8 Remark and Definition 4.1. If I is a category with no morphisms except the iden- Q ` tities, limI X is the product i∈Ob(I) Xi and colimI X is the i∈Ob(I) Xi. A special case is if I is the empty category. Then there is a unique I-diagram in every category C. Its limit (resp. its colimit) is a final object (resp. an initial object) of C.

Remark and Definition 4.2. Let I be the category with three objects j, i1, and i2 and whose only morphisms except the identities are two morphisms i1 → j and i2 → j. We represent I schematically by

i1 / jo i2

(1) An I-diagram X in a category C is a diagram of morphisms in C of the form

f1 f2 X1 / YXo 2.

The limit of X, if it exists, is called the pullback of the diagram or the fiber product of X1 and X2 over Y . It is denoted by X1 ×Y X2. (2) Dually, there is the notion of a pushout in a category C which is the colimit of a diagram X : Iopp → C. The category Iopp is represented schematically by

••o / •.

opp The pushout of a I -diagram X1 ←− Y −→ X2 in C is denoted by X1 qY X2. Remark and Definition 4.3. Now let I be the category with two objects j and i whose only morphisms except the identities are two morphisms i → j. Hence an I-diagram X is given by a diagram

u (4.3.1) Xi / Xj. v /

In this case its limit is called the of u and v or the equalizer of u and v. The colimit of the diagram (4.3.1) is called the of u and v or the coequalizer of u and v†.

Proposition 4.4. (1) A category C is complete if and only if arbitrary products exist in C and for each pair of parallel arrows u, v : X → Y exists its equalizer. A functor F : C → D commutes with arbitrary limits if and only if it commutes with products and equalizer. (2) A category C is finitely complete if and only if final objects, products of two objects, and for each pair of parallel arrows u, v : X → Y its equalizer exist in C. A functor F : C → D commutes with finite limits if and only if it commutes with final objects, products of two objects, and kernels.

†Formally, the coequalizer should be a colimit over a diagram indexed by Iopp. But note that in this case I and Iopp are isomorphic categories. In fact we should have made a similar remark already when we defined products and coproducts.

9 One has dual criteria for a category to be (finitely) cocomplete and for a functor to commute with (finite) colimits.

Proof. For a small category I let Mor(I) be the set of morphisms in I and for α ∈ Mor(I) let s(α) and t(α) be its source respectively its target. The limit of a diagram X : I → C can be constructed as the equalizer of the two morphisms

Q / Q σ, τ : i∈I Xi / α∈Mor(I) Xt(α), such that for all α ∈ Mor(I) the composition with the projection is given by

pr ◦ σ = X(α) ◦ pr , α Xs(α) pr ◦ τ = pr . α Xt(α) The other assertions are shown similarly.

Remark 4.5. Let C be a category. (1) Suppose that finite coproducts and filtered colimits exist in C. Then arbitrary coproducts exist in C because a a Xi = colim Xj J ⊆ I finite i∈I j∈J

for any family (Xi)i∈I of objects in C. (2) Similarly, a functor F : C → D commutes with arbitary coproducts if it commutes with finite coproducts and filtered colimits. There are dual assertions for products and filtered limits.

References

[KaSh] M. Kashiwara, P. Schapira, Categories and Sheaves, Springer-Verlag. [McL] S. MacLane, Categories for the Working Mathematician, Springer-Verlag. [Sch] H. Schubert, Categories, Springer-Verlag. [SGA4] A. Grothendieck et al., Th´eoriedes et cohomologie ´etaledes sch´emas.

10