MacLane: Categories for Working Mathematician

1 Categories, Functors, and Natural Transformations

1.1 Axioms for Categories

1.2 Categories

Discrete categories. A category is discrete when every arrow is an identity.

1.3 Functors

full=hom-function is surjective (for every pair of objects), faithfull=injective

1.4 Natural Transformations

Given two functors S, T: C → B a natural transformation τ : S →^{·} T is a function which assigns to each object c of C an arrow τ_{c} = τc: Sc → T c of B in such a way that every arrow f: c → c′ in C yields a diagram

\xymatrix{c \ar[d]^{f} & Sc \ar[r]^{τc} \ar[d]_{Sf} & T c \ar[d]^{T f} \\ c′ & Sc′ \ar[r]^{τc′} & T c′}

which is commutative.

A natural transformation τ with every component τc invertible in B is called natural equivalence or better a natural isomorphism.

An equivalence between categories C and D is defined to be a pair of functors S: C → D, T: D → C together with natural isomorphisms I_{c} ≅ T ∘ S, I_{D} ≅ S ∘ T.

1.5 Monics, Epis and Zeros

monic=monomorphism, epic=epimorphism

right inverse=section, left inverse=retraction

An object t is terminal in C if to each object a in C there is exactly one arrow a → t. Dual: initial object.

A null object z in C is an object which is both initial and terminal. For any two objects a and b of C there is a unique arrow a → z → b, celled the zero arrow from a to b.

A groupoid is a category in which every arrow is invertible. A typical groupoid is the fundamental groupoid π(X) of a topological space X. (objects=points, arrow x → x′ =homotopy classes of paths from x to x′) connected groupoid: there is an arrow joining any two of its objects. (It is determined up to isomorphism by a group.)

1.6 Foundations

1.7 Large Categories

Ab-categories ? (hom-sets are abelian groups)

2 Construction on categories

2.1 Duality 2.2 Contravariance and Opposites 2.3 Products of categories

Functors S: B × C → D from a product category are called bifunctors. Proposition 2.3.1. Let B, C and D be categories. For all objects c ∈ C and b ∈ B, let

L_{c}: B → D, M_{b}: C → D

be functors such that M_{b}(c) = L_{c}(b) for all b and c. Then there exists a bifunctor S: B×C → D with S(−, c) = L_{c} for all c and S(b, −) = M_{b} for all b if and only if for every pair of arrows f: b → b′ and g: c → c′ one has

M_{b′}g ∘ L_{c}f = L_{c′}f ∘ M_{b}g.

These equal arrow in D are then the value S(f, g) of the arrow function of S. Proposition 2.3.2. For bifunctors S, S′, the function α which assigns to each pair of objects b ∈ B, c ∈ C an arrow α(b, c): S(b, c) → S′(b, c) is a natural transformation α : S →^{·} S′ (i.e., of bifunctors) if and only if α(b, c) is natural in b for each c ∈ C and natural in c for each b ∈ B.

Such natural transformations appear in the fundamental definition of adjoint functor (Chapter IV.) A functor F: X → C is the left adjoint of a functor G: C → X (opposite direction) when there is a bijection

hom_{C}(F x, c) ≅ hom_{x}(x, Gc)

natural in x ∈ X and c ∈ C. 2.4 Functor categories

B^{C} − F unct(C, B) with objects the functors T: C → B and morphism the natural transformations. Nat(S, T) := B^{C}(S, T) = {τ|τ : S →^{·} T natural}. 2.5 The Category of All Categories

We have defined a “vertical” composite τ · σ,

[figure: ↓σ; C; B; ↓τ]

Given functors and natural transformations,

\xymatrix{C \ar[r]^{S}_{↓τ} \ar[r]_{T} & B \ar[r]^{S′}_{↓τ′} \ar[r]_{T′} & A}  (2.1)

one may construct natural transformation τ′ ∘ τ as

(τ′ ∘ τ)c = T′τc ∘ τ′Sc = τ′T C ∘ S′τc.  (2.2)

This composition is readily shown to be associative. It moreover has identities. It is convenient to let the symbols S for a functor also denote the identity transformation 1_{S} : S →^{·} S. The definition (2.2) can then be rewritten using also the vertical composition, as

τ′ ∘ τ = (T′ ∘ τ) · (τ′ ∘ S) = (τ′ ∘ T) · (S′ ∘ τ)  (2.3)

There is a more general rule. Given three categories and four transformations

[figure: C; ↓σ; ↓τ; B; ↓σ′; ↓τ′; A]  (2.4)

the “vertical” composites under · and the “horizontal” composites under ∘ are related by the identity (interchange law)

(τ′ · σ′) ∘ (τ · σ) = (τ′ ∘ τ) · (σ′ ∘ σ)  (2.5)

Exercise 4: Let G be a topological group with identity element e, while σ, σ′, τ, τ′ are continuous paths in G starting and ending at e. ∘ - skladanie ciest, · pointwise product. Then interchange law holds.

Exercise 5: (Hilton=Eckmann). Let S be a set with two (everywhere defined) binary operations ·: S × S → S, ∘: S × S → S which both have the same (two-sided) unit element e and which satisfy the interchange identity (2.5). Prove that · and ∘ are equal, and that each is commutative.

Exercise 6: Combine Exercises 5 and 6 to prove that the fundamental group of a topological group is abelian.

2.6 Comma categories

Category of objects under b is the category (b ↓ C) with objects all pairs ⟨f, c⟩, where c is an object of C and f: b → c is and arrow of c. Arrows are arrows of C (resp. commutative triangles).

If a is an object of C, the category (C ↓ a) of objects over a has objects f: c → a.

If b is an object of C and S: D → C a functor, the category (b ↓ S) of objects S-under b has an objects all pairs ⟨f, d⟩ with f: b → Sd.

(T ↓ a) of objects T -over a.

Here is the general construction. Given categories and functors

\xymatrix{E \ar[r]^{T} & C & D \ar[l]_{S}}

the comma category (T ↓ S), also written (T, S) has objects all triples ⟨e, d, f⟩, with d ∈ ObjD, e ∈ ObjE, and f: T e → Sd and as arrows ⟨e, d, f⟩ → ⟨e′, d′, f′⟩ all pairs ⟨k, h⟩ of arrows k: e → e′, h: d → d′ such that f′ ∘ T k = Sh ∘ f. In pictures

Objects ⟨e, d, f⟩ \xymatrix{T e \ar[d]^{f} \\ Sd};  arrows ⟨k, h⟩ \xymatrix{T e \ar[r]^{T k} \ar[d]_{f} & T e′ \ar[d]^{f′} \\ Sd \ar[r]_{Sh} & Sd′}  (2.6)

with the square commutative. The composite ⟨k′, h′⟩ ∘ ⟨k, h⟩ = ⟨k′ ∘ k, h′ ∘ h⟩, when defined.

2.7 Graphs and Free Categories

skipped

2.8 Quotient Categories

skipped

3 Universals and limits

Definition 3.0.1. If S: D → C is a functor and c an object of C, a universal arrow from c to S is a pair ⟨r, u⟩ consisting of an object r od D and an arrow u: c → Sr of C, such that to every pair ⟨d, f⟩ with d an object of D and f: c → Sd an arrow of C, there is a unique arrow f′: r → d of D with Sf′ ∘ u = f. In other words, every arrow f to S factors uniquely through the universal arrow u, as in the commutative diagram

[figure: c; u; f; Sr; Sf′; Sd]  (3.1)

Examples: Bases of vector spaces, free categories form graphs, fields of quotients, completion of metric space (universal for forgetful functor from complete metric spaces).

If D is a category and H: D → Set functor, a universal element of the functor H is a pair ⟨r, e⟩ consisting of an object r ∈ D and an element e ∈ Hr such that for every pair ⟨d, x⟩ with x ∈ Hd there is a unique arrow f: r → d of D with (Hf)e = x.

Diagonal functor: Δ: C → C × C, Δc = ⟨c, c⟩.

3.1 The Yoneda Lemma

Proposition 3.1.1. For a functor S: D → C a pair ⟨ru: c → Sr⟩ is universal from form c to S if and only if the function sending each f′: r → d into Sf′ ∘ u: c → Sd is a bijection of hom-sets

D(r, d) ≅ C(c, Sd)  (3.2)

This bijection is natural in d. Conversely, given r and c, any natural isomorphism (3.2) is determined in this way by a unique arrow u: c → Sr such that ⟨r, u⟩ is universal from C to s.

Definition 3.1.2. Let D have small hom-sets. A representation of a functor K: D → Set is a pair ⟨r, ψ⟩ with r an object of D and

ψ : D(r, −) ≅ K  (3.3)

a natural isomorphism. The object r is called the representing object. The functor K is said to be representable when such a representation exists.

Proposition 3.1.3. Let ∗ denote any one-point set and let D have small hom-sets. If ⟨r, u: ∗ → Kr⟩ is a universal arrow from ∗ to k: D → Set, then the function ψ which for each object d of D send the arrow f′: r → d to K(f′)(u^{∗}) ∈ Kd is a representation of K. Every representation of K is obtained in this way from exactly one such universal arrow.

The argument for Proposition 3.1.1 rested on the observation that each natural transformation φ : D(r, −) →^{·} K is completely determined by the image under φ_{r} of the identity 1: r → r. This fact may be stated as follows:

Lemma 3.1.4 (Yoneda). If k: D → Set is a functor from D and r an object in D (for D a category with small hom-sets), there is a bijection

y: Nat(D(r, −), K) ≅ Kr  (3.4)

which sends each natural transformation α : D(r, −) →^{·} K to α_{r}1_{r}, the image of the identity r → r.

Corollary 3.1.5. For objects r, s ∈ D each natural transformation D(r, −) →^{·} D(s, −) has the form D(h, −) for a unique arrow h: s → r.

Lemma 3.1.6. The bijection of 3.4 is a natural isomorphism y : N →^{·} E between the functors E, N: Set^{D} × D → Set.

3.2 Coproducts and Colimits

Cokernels. Suppose that C has zero object z, so that for any two objects b, c ∈ C there is a zero arrow 0: b → z → c. The cokernel of f: a → b is then an arrow u: b → e such that (i) uf = 0: ae; (ii) if h: b → c has hf = 0, then h = h′u for a unique arrow h′: e → c. The picture is

\xymatrix{a \ar[r]^{f} & b \ar[r]^{u} \ar[dr]_{h} & e \ar@{-->}[d]^{h′} & uf = 0, \\  &  & c & hf = 0.}

3.3 Products and limits

3.4 Categories with finite products

Proposition 3.4.1. If a category C has a terminal object t and a product diagram a ← a × b → b for any two of its objects, then C has all finite products. The product object provide, by ⟨a, b⟩ → a × b, a bifunctor C × C → C. For any three objects there is an isomorphism

α = α_{a,b,c}: a × (b × c) ≅ (a × b) × c  (3.5)

natural in a, b and c. For any object a there are isomorphisms

λ = λ_{a}: t × a ≅ a ϱ = ϱ_{a}: a × t ≅ a  (3.6)

which are natural in a, where t is the terminal object of C.

3.5 Groups in categories

Let C be a category with finite products products and a terminal object t. Then a monoid in C is a triple ⟨c, μ: c × c → c, η: t → c⟩, such that the following diagrams commute

\xymatrix{c × (c × c) \ar[r]^{α} \ar[d]_{1×μ} & (c × c) × c \ar[r]^{η×1} & c × c \ar[d]^{μ} \\ c × c \ar[rr]^{μ} &  & c}  (3.7)

\xymatrix{t × c \ar[r]^{η×1} \ar[dr]^{λ} & c × c \ar[d]^{μ} & c × t \ar[l]_{1×η} \ar[dl]^{ϱ} \\  & c}  (3.8)

μ=multiplication, α=asocitivity isomorphism of (3.5).

We now define a group in C to be a monoid ⟨c, μ, η⟩ together with an arrow ξ: c → c which makes the diagram (with δ_{c} the diagonal)

\xymatrix{c \ar[r]^{δ_{c}} \ar[d] & c × c \ar[r]^{1×η} & c × c \ar[d]^{μ} \\ t \ar[rr]^{η} &  & c}  (3.9)

commute (ξ=right inverse).

Proposition 3.5.1. If C is a category with finite products, then an object c is a group (or, a monoid) in C if and only if the hom functor C(−, c) is a qroup (respectively, a monoid) in the functor category Set^{C^{op}}.

4 Adjoints

4.1 Adjunctions

Definition 4.1.1. Let A and X be categories. An adjunction from X to A is a triple ⟨F, G, φ⟩: XA, where F and G are functors

\xymatrix{F \ar[r]_{F} & G \ar[l]_{G}}

while φ is a function which assigns to each pair of objects x ∈ X, a ∈ A a bijection

φ = φ_{x,a}: A(F x, a) ≅ X(x, Ga)  (4.1)

which is natural in x and a.

An adjunction may also be described without hom-sets directly in terms of arrows. It is a bijection which assigns to each arrow f: F x → a an arrow φf = radf: x → Ga, the right adjunct of f, in such a way that the naturality conditions

φ(f ∘ F h) = φf ∘ h, φ(k ∘ f) = Gk ∘ φf,  (4.2)

hold for all f and all arrows h: x′ → x and k: a → a′. It is equivalent to require that φ^{−1} be natural; i.e., that for every h, k and g: x → Ga one has

φ^{−1}(gh) = φ^{−1}g ∘ F h, φ^{−1}(Gk ∘ g) = k ∘ φ^{−1}g.  (4.3)

Given such an adjunctions, the functor F is said to be a left-adjoint for G, while G is called a right adjoint for F. (TODO Find TEXequivalent!!!)

Every adjunction yields a universal arrow. Specifically, set a = F x in (4.1). The left hand hom-set of (4.1) then contains the identity 1: F x → F x; call its φ-image η_{x}. By Yoneda’s Proposition 3.1.1 this η_{x} is a universal arrow η_{x} for every objects x. Moreover, the function x ↦ η_{x} is a natural transformation I_{X} → F G.

The bijection φ can be expressed in terms of the arrow η_{x} as

φ(f) = G(f)η_{x} for f: F x → a.  (4.4)

Theorem 4.1.2. An adjunction ⟨F, G, φ⟩: X → A determines

(i) A natural transformation η : I_{x} →^{·} GF such that for each object x the arrow η_{x} is universal to G from x, while the right adjunct of each f: F x → a is

φf = Gf ∘ η_{x}: x → Ga;  (4.5)

(ii) A natural transformation ε: F G → I_{A} such that arrow ε_{a} is universal to a from F, while each g: x → Ga has left adjunct

φ^{−1}g = ε_{a} ∘ F g: F x → a.  (4.6)

Moreover, both the following composites are the identities (of G, resp. F).

\xymatrix{G \ar[r]^{ηG} & GF G \ar[r]^{Gε} & G, & F \ar[r]^{F η} & F GF \ar[r]^{εF} & F.}  (4.7)

We call η unit and ε the counit of the adjunction.

Theorem 4.1.3. Each adjunction ⟨F, G, φ⟩: X → A is completely determined by the items in any one of the following lists:

(i) Functors f, G and a natural transformation η : 1_{x} →^{·} GF such that each η_{x}: x → GF x is universal from G to x. The φ id defined by (4.5).

(ii) The functor G: A → X and for each x ∈ X an object F_{0}x ∈ A and a universal arrow η_{x}: x → GF_{0}x from x to G. Then the functor F has object function F_{0} and is defined on arrow h: x → x′ by GF h ∘ η_{x} = η_{x′} ∘ h.

(iii) Functors F, G and a natural transformation ε : F G →^{·} I_{A} such that each ε_{a}: F Ga → a is universal from F to a. Here φ^{−1} is defined by (4.6).

(iv) The functor F: X → A and for each a ∈ A an object G_{0}a ∈ X and an arrow ε_{a}: F G_{0}a → a universal from F to a.

(v) Functors F, G and natural transformations η : I_{X} →^{·} GF and ε : GF →^{·} I_{A} such that both composites (4.7) are the identity transformations. Here φ is defined by (4.5) and φ^{−1} by (4.6).

Corollary 4.1.4. Any two left-adjoints F and F′ of a functor G: A → X are naturally isomorphic.

Corollary 4.1.5. A functor G: A → X has a left adjoint if and only if, for each x ∈ X, the functor X(x, Ga) is representable as a functor of a ∈ A. If φ: A(F_{0}x, a) ≅ X(x, Ga) is representation of this functor, then F_{0} is the object function of a left-adjoint of G for which the bijection φ is natural in a and gives the adjunction.

Theorem 4.1.6. If the additive functor G: A → M between Ab-categories A and M has a left adjoint F: M → A, then F is additive and the adjunction bijections

φ: A(F m, a) ≅ M(m, Ga)

are isomorphisms of abelian groups (for all m ∈ M, a ∈ A).

4.2 Examples of Adjoints

4.3 Reflective Subcategories

Theorem 4.3.1. For an adjunction ⟨F, G, η, ε⟩: X → A:

(i) G is faithful if and only if every component ε_{a} of the counit ε is epi,

(ii) G is full if and only if every ε_{a} is a split monic.

Hence G is full and faithful if and only if each ε_{a} is an isomorphism F Ga ≅ a.

Lemma 4.3.2. Let f^{∗} : A(a, −) →^{·} A(b, −) be the natural transformation induced by an arrow f: b → a of A. Then f^{∗} is monic if and only if f is epi, while f^{∗} is epi if and only if f is a split monic (i.e., if and only if f has a left inverse).

A subcategory A of B is called reflective in B when the inclusion functor K: A → B has a left adjoint F: B → A. This functor F may be called a reflector and the adjunction ⟨F, K, φ⟩ = ⟨F, φ⟩: B → A a reflection of B in its subcategory A.

4.4 Equivalence of Categories

skipped

4.5 Adjoints for Preorders

skipped

4.6 Cartesian Closed Categories

To assert that a category C has all finite products and coproducts is to assert that the functors C → 1 and Δ: C → C × C have both left and right adjoints. Indeed, the left adjoints give initial object and coproduct respectively, while the right adjoints give terminal object and product, respectively.

A category C with all finite products specifically given is called cartesian closed when each of the following functors

C → 1,  C → C × C,  C C^{−×b},
c ↦ 0,  c ↦ ⟨c, c⟩  , a ↦ a × b

has a specified right adjoint (with a specified adjunction). This adjoints are written as follows

t ↢ 0,  a × b ↢ ⟨a, b⟩,  c^{b} ↢ c

TODO oprav to na otocena mapsto

The third required adjoint specifies for each functor − × b: C → C a right adjoint, with the corresponding bijection

hom(a × b, c) ≅ hom(a, c^{b})

natural in a and c. By the parameter theorem (to be proved in the next section), ⟨b, c⟩ ↦ c^{b} is then (the object function of) a bifunctor C^{op} ×C → C. Specifying the adjunction amounts to specifying for each c and b an arrow e

e: c^{b} × b → c

which is natural in c and universal form − × b to c. We call e = e_{b} the evaluation map.

Exercise 1: a) If U is any set, show that the preorder P(U) of all subsets of U is a cartesian closed category.

b) Show that any Boolean algebra, regarded as a preorder, is cartesian closed. Exercise 3: In any cartesian closed category, prove c^{t} ≅ c and c^{b×b′} ≅ (c^{b})^{b′}. Exercise 4: In any cartesian closed category obtain a natural transformation c^{b} × b^{a} → c^{a}

which agrees in Set with composition of functions. Prove it (like composition) associative. Exercise 5: Show that A cartesian closed need not imply A^{J} cartesian closed.