yoneda lemma and string diagrams

42
Yoneda lemma and string diagrams Ray D. Sameshima 2014/09/06 2014/09/20

Upload: ray-sameshima

Post on 17-Jul-2015

247 views

Category:

Science


3 download

TRANSCRIPT

Yoneda lemma and string diagrams

Ray D. Sameshima

2014/09/06 ∼2014/09/20

Contents

-1 Preface 3-1.1 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1.2 Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

0 Definitions 50.0 The size problem . . . . . . . . . . . . . . . . . . . . . . . . . 5

0.0.1 Naive definition of a category . . . . . . . . . . . . . . 50.0.2 Definition of a universe . . . . . . . . . . . . . . . . . 70.0.3 Axiom (universe) . . . . . . . . . . . . . . . . . . . . . 90.0.4 Axiom (class) . . . . . . . . . . . . . . . . . . . . . . . 10

0.1 Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100.1.1 Definition of categories . . . . . . . . . . . . . . . . . . 100.1.2 Examples of category . . . . . . . . . . . . . . . . . . 120.1.3 Some arrows . . . . . . . . . . . . . . . . . . . . . . . 12

0.2 Functors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130.2.1 Definition of functors (covariant functors) . . . . . . . 13

0.3 Natural transformations . . . . . . . . . . . . . . . . . . . . . 150.3.1 Definition of natural transformations . . . . . . . . . . 150.3.2 Definition of functor categories . . . . . . . . . . . . . 16

1 Yoneda lemma 181.1 Representable functors . . . . . . . . . . . . . . . . . . . . . . 18

1.1.1 Definition of representable functors . . . . . . . . . . . 181.1.2 The Yoneda lemma . . . . . . . . . . . . . . . . . . . . 19

2 Godement products of natural transformations 242.1 Definition of Godement products . . . . . . . . . . . . . . . . 24

2.1.1 Check . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.2 Proposition (The interchanging law) . . . . . . . . . . . . . . 26

1

2.2.1 Proof . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

3 String diagrams 283.1 A class change method . . . . . . . . . . . . . . . . . . . . . . 283.2 String diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . 293.3 The Godement product . . . . . . . . . . . . . . . . . . . . . 31

3.3.1 The interchanging law . . . . . . . . . . . . . . . . . . 333.3.2 Functors . . . . . . . . . . . . . . . . . . . . . . . . . . 333.3.3 Natural transformations . . . . . . . . . . . . . . . . . 34

3.4 The Yoneda lemma . . . . . . . . . . . . . . . . . . . . . . . . 35

2

Chapter -1

Preface

This is a rough note from my under progress work entitled ”Cat”. I wish toexpress my gratitude to Professor Azita Mayeli and Arthur Parzygnat fortheir advises.

-1.1 References

Handbook of Categorical Algebra 1 Basic Category Theory (Francis Borceux)

Category Theory (Steve Awodey)

An Introduction to Category Theory (Harold Simmons)

nLab (http://ncatlab.org)

http://d.hatena.ne.jp/m-hiyama/20130621/1371785971

http://hal.archives-ouvertes.fr/docs/00/69/71/15/PDF/csl-2008.pdf

http://www.pps.univ-paris-diderot.fr/~curien/categories-pl.ps

http://www.ma.kagu.tus.ac.jp/~abe/index.html

(underconstruction) Cat (Ray D. Sameshima)

-1.2 Notations

∀ : (for) all

∃ : exists

3

∃! : uniquely exists

S ⇒ T : If S, then T .

S ⇔ T : S iff (if and only if) T .

lhs := rhs or lhs :⇔ rhs : (unknown) lhs is defined by (known) rhs.

4

Chapter 0

Definitions

0.0 The size problem

We have to pay some attentions on the sizes, but let us start with someintuitive definitions.

0.0.1 Naive definition of a category

A category C consists of the following date:

1. Objects: A,B,C, · · · ∈ Obj.

2. Arrows:f→,

g→,h→, · · · ∈ Arr.

3. ∀f ∈ Arr,∃dom(f), cod(f) ∈ Obj.The notation

f : A → B (1)

means that A = dom(f), B = cod(f).

4. (composition law) ∀f : A → B and g : B → C with

cod(f) = B = dom(g) (2)

then ∃ an arrow

g ◦ f : A → C. (3)

5

5. (∃identity arrow as a unit) ∀A ∈ Obj,∃ an arrow

1A : A → A (4)

s.t. if we compose it with ∀ arrow from left and right, we get the samearrow, ∀f : A → B,

f ◦ 1A = f = 1B ◦ f. (5)

Then the identity arrow is unique:

1′A = 1A ◦ 1′A = 1A. (6)

6. (associativity) ∀f : A → B, g : B → C, h : C → D,

h ◦ (g ◦ f) = (h ◦ g) ◦ f. (7)

We depict these in the following diagram:

A

1A �� f //

g◦f ��@@@

@@@@

@ B

1B��

g

��

h◦g

@@@

@@@@

@

Ch

// D

(8)

Now we can define a category of sets and mappings. It is easy to checkthe above conditions, for example

1A : A → A; a 7→ 1A(a) := a (9)

and ∀a ∈ A,

h ◦ (g ◦ f)(a) = h (g (f(a))) = (h ◦ g) ◦ f(a). (10)

We denote this category as

Set (11)

We, however, face a problem: objects of Set runs through ”something whichis not a set!” This fact is a consequence of the following well-known paradox:

Russell’s paradox

There exists no set S s.t.,

x ∈ S ⇔ x is a set. (12)

6

Proof We use a contradiction argument. Let say there exists such S,define

R := {x ∈ S|x ∈ x}. (13)

R is well-defined and is a subset of S. By the law of excluded middle, eitherR ∈ R or R ∈ R, but from the definition of R itself,

R ∈ R ⇒ R ∈ R (14)

R ∈ R ⇒ R ∈ R. (15)

This leads us to a contradiction in each case.Or, we can prove it directly, let x be a set,

x ∈ R ⇔ x ∈ x (16)

From the axiom of extensionality, i.e., if every element of M is also anelement of N , and vice versa, then M = N , we get

R = x (17)

that is, R is not a set.■

Taking, intuitively, a set of sets, it is not a set, something ”bigger” thana set. In category theory, it is useful to pay some attention to the ”size.”In order to handle this size problem, there is a way to assume the axiom ofuniverses:

0.0.2 Definition of a universe

A universe is a set U with the following properties:

x ∈ y, y ∈ U ⇒ x ∈ U (18)

I ∈ U , ∀i ∈ I, xi ∈ U ⇒∪i∈I

xi ∈ U (19)

x ∈ U ⇒ P(x) ∈ U (20)

x ∈ U , f : x → y is surjective ⇒ y ∈ U (21)

N ∈ U (22)

where N denotes the set of finite ordinals and P(x) denotes the set of allsubsets of x (the power set of x).

7

Corollary

The following results are immediate consequence of the definition of a uni-verse U .

x ∈ U , y ⊂ x ⇒ y ∈ U (23)

x, y ∈ U ⇒ {x, y} ∈ U (24)

x, y ∈ U ⇒ x× y ∈ U (25)

x, y ∈ U ⇒ yx ∈ U (26)

Proof Since

∅ ∈ N ⇒ ∅ ∈ U . (27)

Assume that x ∈ U , y ⊂ x with y = ∅. Pick z ∈ y and define f : x → y tobe

f(t) :=

{t t ∈ y

z t ∈ y(28)

then f is surjective and therefore y ∈ U .Then let us define

I := {1, 2} ∈ N, x1 = x, x2 = y (29)

then

{x, y} =∪i∈I

xi (30)

and we get {x, y} ∈ U .Since we can use x× y as its index, we have

x× y =∪x0∈x

x0 × y =∪y0∈y

∪x0∈x

x0 × y0 (31)

and hence x× y ∈ U .Finally,

yx =∪x0∈x

yx0 =∪y0∈y

∪x0∈x

yx0o (32)

and we get yx ∈ U .■

8

Axiom of choice

For any set X of nonempty sets, there exists a choice function f defined onX:

∀X, ∅ ∈ X ⇒ ∃f : X →∪

X;A 7→ f(A) ∈ A, (33)

eq.(21) should have been replaced precisely by eq.(23): (x ∈ U , y ⊂ x ⇒ y ∈U).

By the above, the existence of a universe axiom can be translated asbelow:

0.0.3 Axiom (universe)

Every set belongs to some universe.Because of the property in eq.(23), it sounds reasonable to think of the

elements of a universe as being ”sufficiently small sets.” If we choose to usethe theory of universes as a foundation for category theory, the followingconvention has to remain valid:

Convention

We fix a universe U and call ”small sets” the elements of U .Obviously we now have the following proposition:

Proposition

There exists a set S with the property

x ∈ S ⇔ x is a small set. (34)

Proof For the proof, it is sufficient to choose S = U .■

An alternative way to handle these size problem is to use the Godel-Bernays theory of sets and classes. In the Zermelo-Frankle theory, the prim-itive notions are ”set” and ”membership relation”. In the Godel-Bernaystheory, there is one more primitive notion called ”class” (think of it as ”abig set”); that primitive notion is related to the other two by the propertythat every set is a class and, more precisely:

9

0.0.4 Axiom (class)

A class is a set iff it belongs to some (other) class.The axioms concerning classes imply in particular the following ”com-

prehension scheme” for constructing classes:

Comprehension scheme

If

φ(x1, · · · , xn) (35)

is a formula where quantification just occurs on set variables, then there isa class A s.t.

(x1, · · · , xn) ∈ A ⇔ φ(x1, · · · , xn) (36)

Thus the ”class of all sets” is well defined:

the class of all sets := |Set|. (37)

When the axiom of universes is assumed and a universe U is fixed, onegets a model of the Godel-Bernays theory by choosing as ”sets” the elementsof U and as ”classes” the subsets of U ;

sets ∈ classes ⊂ a fixed universe U . (38)

It makes no relevant difference whether we base category theory on theaxiom of universes or on the Godel-Bernays theory of classes. We shall usethe terminology of the latter, thus using the words ”set” and ”class”.

0.1 Categories

0.1.1 Definition of categories

A category C consists of the following date:

1. (Objects) A class |C|, whose elements is called objects of C:

A,B,C,D, · · · ∈ |C|. (39)

10

2. (Arrows) ∀ pair of objects A,B, a set C(A,B), whose elements is calledarrows from A to B:

f ∈ C(A,B). (40)

We write

f : A → B or Af→ B (41)

to indicate that A = dom(f), B = cod(f). We sometimes call such acategory locally small whose arrows consist of a set. We may use

dom(f) = s(f) = source of f, (42)

cod(f) = t(f) = target of f. (43)

3. Let us abuse the notation; C also means all the arrows of category C.Then ∀f ∈ C,

∃dom(f), cod(f) ∈ |C|. (44)

4. (composition law) ∀f ∈ C(A,B) and g ∈ C(B,C) with

cod(f) = B = dom(g) (45)

then ∃ an arrow

g ◦ f ∈ C(A,C). (46)

5. (∃identity arrow as a unit) ∀A ∈ |C|, ∃ an arrow

1A ∈ C(A,A), (47)

s.t.

f ◦ 1A = f = 1B ◦ f. (48)

Then the identity arrow is unique, since

1′A = 1A ◦ 1′A = 1A. (49)

6. (associativity) ∀f ∈ C(A,B), g ∈ C(B,C), h ∈ C(C,D),

h ◦ (g ◦ f) = (h ◦ g) ◦ f. (50)

11

We depict these as a following diagram:

A

1A �� f //

g◦f ��@@@

@@@@

@ B

1B��

g

��

h◦g

@@@

@@@@

@

Ch // D

(51)

We stresses the fact that a category is a ”typed” monoid, that is, in order tomake a composition of arrows, we have to check the domain and codomain.

0.1.2 Examples of category

Empty category

The category 0 or simply ∅ looks like this:

(52)

It has neither objects nor arrows.

Discrete categories

Let us write

1 (53)

for the discrete category withe a single object ∗ and its identity arrow:

id∗=1∗

(54)

0.1.3 Some arrows

Let us define some arrows here.

Commutative diagrams

If

f2 ◦ f1 = f4 ◦ f3 (55)

then we say that the following diagram is commutative:

f1 //

f3

��f2

��f4

//

(56)

12

Isomorphisms

Let f ∈ C(A,B), g ∈ C(B,A) be arrows,

f and g are isomorphisms :⇔ (g ◦ f = 1A and f ◦ g = 1B). (57)

We say that A and B are isomorphic to each other and denote

A ∼= B (f : A ∼= B : g) . (58)

If two arrows g, g′ satisfy eq.(57), then

g′ = g′ ◦ 1B = g′ ◦ f ◦ g = 1A ◦ g = g. (59)

i.e., g is unique. Thus we write the unique inverse

g = f−1(f : A ∼= B : f−1

), (60)

and denote it as a following diagram:

Ag◦f=1A 88

f++ B

g=f−1

kk 1B=f◦gww

(61)

0.2 Functors

Let us consider ”homomorphisms” i.e., structure preserving mappings, amongcategories.

0.2.1 Definition of functors (covariant functors)

A (covariant) functor

F ∈ Func(C,D) (62)

between categories C and D is a mapping between the classes of objects|C| → |D| and arrows C → D, such that,

1. (dom and cod) F preserves domains and codomains:

F (f ∈ C(A,B)) = F (f) ∈ D(FA,FB). (63)

2. (identity) F preserves identity arrow:

∀A ∈ |C|, F (1A) = 1FA. (64)

13

3. (composition) F preserves composition:

F (g ◦ f) = F (g) ◦ F (f). (65)

We depict it as follows:

C

F

��

Af //

g◦f ""FFF

FFFF

FFB

g

��C

D FAF (f) //

F (g◦f)=F (g)◦F (f) ""FFF

FFFF

F FB

F (g)��

FC

(66)

Given two functors

A F→ B G→ C, (67)

a point-wise composition produces a new functor

A G◦F→ C. (68)

This composition law is associative, and the identity functor on categoryA is clearly an identity for this composition law, since we can choose everymapping in the definition to be the identity.

A careless argument could thus lead to the conclusion that categoriesand functors constitute a new category... but this can easily be reduced toa contradiction using Russell’s paradox in §0.0.1. The point is that, in theaxioms for a category, it is required to have a set of morphisms betweenany two objects. And when the categories A and B merely have a classof objects, there is no way to force the functors from category A to B toconstitute a set.

Definition of small categories

A category C is called a small category when its class of object |C| is a set.The next result is then obvious (see Comprehension scheme in §0.0.4).

14

Proposition (Small categories)

Small categories and functors between them constitute a category Cat.

0.3 Natural transformations

Let us consider a ”homotopy” for categories and functors.

0.3.1 Definition of natural transformations

For categories C,D and functors

F,G ∈ Func(C,D), (69)

a natural transformation ϑ ∈ Nat(F,G):

f ∈ C(A,B) �F //

ϑ

��

Ff ∈ D(FA,FB)

f ∈ C(A,B) �G

// Gf ∈ D(GA,GB)

(70)

is a class of |C| indexed arrows in D, ∀f ∈ C(A,B),

(ϑC ∈ D(FC,GC))C∈|C| s.t. ϑB ◦ F (f) = G(f) ◦ ϑA, (71)

i.e., the following diagram is commutative:

FAF (f) //

ϑA

��

FB

ϑB

��GA

G(f)// GB

(72)

Tautologically, we call this commutativity as the naturality of the naturaltransformations.

Given such a natural transformation ϑ ∈ Nat(F,G), the arrow in D,

ϑC ∈ D(FC,GC) (73)

is called the component of ϑ at C or simply C-component of ϑ.Given two natural transformations

Fθ→ G

τ→ H, (74)

15

of functors between categories C and D, we can define a new natural trans-formation:

(τ ◦ θ)C := τC ◦ θC (75)

This composition law is associative, and the unit at each functor F is thenatural transformation 1F whose C-component is 1FC . We sometimes referthis composition as a vertical composition of natural transformations:

FAF (f) //

ϑA

��

FB

ϑB

��GA

G(f) //

τA��

GB

τB��

HAH(f) // HB

(76)

Again a careless argument would deduce the existence of a categorywhose objects are the functors from category C to D and whose arrows arethe natural transformations between them. But since C and D have merelyclasses of objects, there is in general no way to prove the existence of a setof natural transformations between two functors. But when C is a smallcategory, that problem disappears and we get the following result.

Proposition (Functor categories)

Let C be a small category and D be an arbitrary category. The functors fromcategory C to D and the natural transformations between them constitutea category; that category is small as long as D is small.

Let us define this new category;

0.3.2 Definition of functor categories

Let C be a small category. A functor category CFun(C,D) has the following.

The objects are functors F ∈ Func(C,D):

|CFun(C,D)| = Func(C,D). (77)

The arrows are natural transformations ϑ ∈ Nat(F,G):

CFun(C,D)(F,G) = Nat(F,G). (78)

16

For each object F , the natural transformation 1F has components (C-components)

(1F )C = 1FC ∈ D(FC,FC) (79)

and the composite natural transformation of

Fθ→ G

τ→ H (80)

has components (the vertical composition)

(τ ◦ ϑ)C = τC ◦ ϑC . (81)

17

Chapter 1

Yoneda lemma

1.1 Representable functors

1.1.1 Definition of representable functors

Given a category C and a fixed object C ∈ |C|, let us define a covariantfunctor

C(C,−) ∈ Func(C, Set) (1.1)

from C to the category of sets by first putting

C(C,−)(A) := C(C,A). (1.2)

Now if f ∈ C(A,B) is an arrow of C, the corresponding mapping of arrows

C(C,−)(f) := C(C, f) (1.3)

is defined by the formula, ∀g ∈ C(C,A),

C(C, f)(g) := f ◦ g (1.4)

C(C,A)C(C,f)

//

∈��

C(C,B)

∈��

C

g

��

f◦g

��===

====

=

g �C(C,f)

// C(C, f)(g) = f ◦ g Af

// B

(1.5)

Such a functor is called a ”representable functor” because the functor is”represented” by the object C. Since C has a set of arrows (i.e., is locallysmall), the objects |C(C,−)(C)| consist a set. And the arrows of C(C,−)(C),i.e., the codomain of the functor C(C,−), are just mappings between sets,that is, C(C,−)(C) is a category of sets and mappings: Set.

18

1.1.2 The Yoneda lemma

Let A be an arbitrary category. Consider a representable functor of A ∈ |A|and arbitrary functor from A to Set:

A(A,−), F ∈ Func(A, Set). (1.6)

There exists a bijective correspondence

θF,A : Nat(A(A,−), F ) ∼= FA (1.7)

between the natural transformations from A(A,−) to F and the elementsof the set FA; in particular, those natural transformations constitute aset. The bijections θF,A constitute a natural transformation in the variableA ∈ |A|; when A is small, the bijections θF,A also constitute a naturaltransformation in the variable F .

Proof

(bijective) ∀α ∈ Nat(A(A,−), F ), let us define

θF,A(α) := αA(1A). (1.8)

∀a ∈ FA,B ∈ |A|, let us define a mapping as follows, ∀f ∈ A(A,B),

τ(a)B : A(A,B) → FB; f 7→ τ(a)B(f) := F (f)(a). (1.9)

Then τ(a) is a natural transformation, because, ∀g ∈ A(B,C),

F (g) ◦ τ(a)B(f) = F (g) ◦ F (f)(a) ∵ eq.(1.9) (1.10)

= F (g ◦ f)(a) ∵ F is a functor (1.11)

= τ(a)C(g ◦ f) ∵ eq.(1.9) (1.12)

= τ(a)C ◦ A(A, g)(f) ∵ eq.(1.4) (1.13)

Thus we get

F (g) ◦ τ(a)B = τ(a)C ◦ A(A, g) (1.14)

that is, τ(a) : A(A,−) → F is a natural transformation:

τ(a) ∈ Nat(A(A,−), F ) (1.15)

19

A(A,B)

τ(a)B��

A(A,g)// A(A,C)

τ(a)C��

FBF (g)

// FC

(1.16)

In order to prove that θF,A and τ are inverse to each other, let us firstconsider, ∀a ∈ FA,

θF,A ◦ τ(a) = τ(a)A(1A) ∵ eq.(1.8) (1.17)

= F (1A)(a) ∵ eq.(1.9) (1.18)

= 1FA(a). (1.19)

And ∀f ∈ A(A,B),

(τ ◦ θF,A(α))B (f) = τ (θF,A(α))B (f) (1.20)

= τ(αA(1A))B(f) ∵ eq.(1.8) (1.21)

= F (f)(αA(1A)) ∵ eq.(1.9) (1.22)

= αB ◦ A(A, f)(1A) ∵ α ∈ Nat(A(A,−), F )(1.23)

= αB(f ◦ 1A) ∵ eq.(1.4) (1.24)

= αB(f). (1.25)

Thus

θF,A ◦ τ = 1FA (1.26)

τ ◦ θF,A = 1Nat(A(A,−),F ) (1.27)

and θF,A : Nat(A(A,−), F ) ∼= FA is bijective.(naturality) ∀f ∈ A(A,B), define a natural transformation

A(f,−) ∈ Nat(A(B,−),A(A,−)) (1.28)

as follows:

∀C ∈ |A|, g ∈ A(B,C),A(f,−)C(g) = A(f, C)(g) := g ◦ f, (1.29)

then the following diagram is commutative, h ∈ A(C,D),

A(B,C)A(f,C)//

A(B,h)��

A(A,C)

A(A,h)��

A(B,D)A(f,D)

// A(A,D)

(1.30)

20

since

g � A(f,C) //_

A(B,h)��

A(f, C)(g) = g ◦ f_

A(A,h)��

A(B, h)(g) = h ◦ g �A(f,D)

// A(A, h)(g ◦ f) = h ◦ g ◦ f = A(f,D)(h ◦ g)

(1.31)

is commutative.Let us consider a functor N ∈ Func(A, Set), and define

N(Af→ B) = NA

N(f)→ NB (1.32)

:= Nat(A(A,−), F )N(f)→ Nat(A(B,−), F ) (1.33)

s.t., ∀α ∈ Nat(A(A,−), F ),

αN(f)7→ N(f)(α) := α ◦ A(f,−). (1.34)

Then ∃ a natural transformation η ∈ Nat(N,F ) defined by

ηA := θF,A. (1.35)

Indeed, ∀α ∈ Nat(A(A,−), F ),

(ηB ◦N(f)(α)) = (θF,B ◦N(f)(α)) (1.36)

= θF,B (α ◦ A(f,−)) ∵ eq.(1.33) (1.37)

= (α ◦ A(f,−))B (1B) ∵ eq.(1.8) (1.38)

= αB(1B ◦ f) ∵ eq.(1.29) (1.39)

= αB(f ◦ 1A) (1.40)

= (αB ◦ A(A, f)) (1A) ∵ eq.(1.4) (1.41)

= F (f)(αA(1A)) ∵ α ∈ Nat(A(A,−), F ) (1.42)

= (F (f) ◦ θF,A)(α) ∵ eq.(1.8) (1.43)

= (F (f) ◦ ηA)(α). (1.44)

That is, the following diagram is commutative:

NA

ηA=θF,A

��

N(f) // NB

ηB=θF,B

��FA

F (f)// FB

(1.45)

21

Thus η is a natural transformation, i.e., θF,A is a natural transformation inthe variable A.

When A is small, it makes sense to consider the functor category

CFun(A,Set) (1.46)

of functors from A to Set and natural transformations between them. Letus fix an object A ∈ |A|, and consider a functor

M ∈ Func(CFun(A, Set), Set). (1.47)

∀F,G ∈ CFun(A, Set), γ ∈ Nat(F,G), define

MF := Nat(A(A,−), F ), (1.48)

and

M(γ) : Nat(A(A,−), F ) → Nat(A(A,−), G);α 7→ M(γ)(α) := γ ◦ α.(1.49)

Let us define an evaluation functor in A ∈ |A|,

evalA ∈ Func (CFun(A, Set),Set) (1.50)

by, ∀F ∈ CFun(A, Set), γ ∈ Nat(F,G),

evalAF := FA (1.51)

evalA(γ) := γA (1.52)

evalA(Fγ→ G) := FA

γA→ FG. (1.53)

Let us define µ ∈ Nat(M, evalA) as follows,

µF := θF,A (1.54)

then

µG ◦M(γ)(α) = θG,A ◦M(γ)(α) (1.55)

= θG,A(γ ◦ α) ∵ eq.(1.49) (1.56)

= (γ ◦ α)A(1A) ∵ eq.(1.8) (1.57)

= γA ◦ αA(1A) (1.58)

= γA ◦ θF,A(α) ∵ eq.(1.8) (1.59)

= γA (θF,A(α)) (1.60)

= evalA(γ) ◦ θF,A(α) ∵ eq.(1.52). (1.61)

22

Thus

µG ◦M(γ) = evalA(γ) ◦ µF (1.62)

and the following diagram is commutative:

Nat(A(A,−), F )

µF=θF,A

��

M(γ) // Nat(A(A,−), G)

µG=θG,A

��FA

evalA(γ)=γA

// FB

(1.63)

That is, µ is a natural transformation, i.e., θF,A is a natural transformationsin the variable F (when A is small).■

23

Chapter 2

Godement products ofnatural transformations

In eq.(81), we have used a first composition law for natural transforma-tions, a vertical composition. In fact, there exists another possible type ofcomposition for natural transformations, a horizontal composition.

2.1 Definition of Godement products

Let A,B,C be categories, F,H ∈ Func(A,B), G,K ∈ Func(B,C), α ∈Nat(F,H), β ∈ Nat(G,K):

AF

""

H

>>BG

""

K

>>C (2.1)

Fα→ H,G

β→ K (2.2)

The formula, ∀A ∈ |A|,

(β ∗ α)A := βHA ◦G(αA) = K(αA) ◦ βFA (2.3)

defines a natural transformation

β ∗ α : G ◦ F → K ◦H (2.4)

called the ”Godement product” of two natural transformations α and β.

24

2.1.1 Check

Since

αA ∈ B(FA,GA) (2.5)

β ∈ Nat (G,K ∈ Func(B,C)) (2.6)

we have the following commutative diagram:

B

��

FAαA // GA

C GFAGαA //

βFA

��

GHA

βHA

��KFA

KαA

// KHA

(2.7)

Thus the definition

βHA ◦GαA =: (β ∗ α)A := KαA ◦ βFA (2.8)

is consistent:

B

��

FAαA // GA

C GFAGαA //

βFA

��(β∗α)A

((

GHA

βHA

��KFA

KαA

// KHA

(2.9)

Let us consider the following diagram:

A Af // A′

C GFAGFf // GFA′

KHAKHf // KHA′

(2.10)

25

Using the 1st equality of the definition,

GFAGFf //

GαA

��

GFA′

GαA′��

GHAHGf //

βHA

��

GHA′

βHA′��

KHAKGf // KHA′

= GFAGFf //

βHA◦GαA=(β∗α)A��

GFA′

βHA′◦GαA′=(β∗α)A′��

KHAKGf // KHA′

(2.11)

Similarly, we can use the 2nd equality:

GFAGFf //

βFA

��

GFA′

βFA′��

KFAKFf //

KαA

��

KFA′

KαA′��

KHAKHf // KHA′

= GFAGFf //

KαA◦βFA=(β∗α)A��

GFA′

KαA′◦βFA′=(β∗α)A′��

KHAKGf // KHA′

(2.12)

In summary, the Godement product (β ∗ α) is

(β ∗ α)A = βcod(α)A ◦ dom(β)(αA) = cod(β)(αA) ◦ βdom(α)A. (2.13)

2.2 Proposition (The interchanging law)

AF

""H //L >>B

G""

K //M >>C (2.14)

Fα→ H

γ→ L,Gβ→ K

δ→ M, (2.15)

⇒ (δ ∗ γ) ◦ (β ∗ α) = (δ ◦ β) ∗ (γ ◦ α) (2.16)

2.2.1 Proof

Since

β ∗ α = βH ◦Gα = Kα ◦ βF (2.17)

δ ∗ γ = δL ◦Kγ = Mγ ◦ δH (2.18)

26

We have the following commutative diagrams, ∀A ∈ |A|,

GFAGαA //

(β∗α)A((

βFA

��

GHA

βHA

��

KHA

δHA

��(δ∗γ)A

((

KγA // KLA

δLA

��KFA

KαA

// KHA MHAMγA

// MLA

(2.19)

Thus we get the following square diagram:

GFAGαA //

(β∗α)A((

βFA

��

GHA

βHA

��

GγA // GLA

βLA

��KFA

δFA

��

KαA

// KHA

δHA

��(δ∗γ)A

((

KγA // KLA

δLA

��MFA

MαA

// MHAMγA

// MLA

(2.20)

From the diagonal composition of the square, ∀A ∈ |A|,

(δ ∗ γ)A ◦ (β ∗ α)A = {(δ ∗ γ) ◦ (β ∗ α)}A , (2.21)

and, since the outer square is commutative, ∀A ∈ |A|, from the upper side,

{(δ ◦ β) ∗ (γ ◦ α)}A = (δ ◦ β)LA ◦G(γ ◦ α)A (2.22)

= δLA ◦ βLA ◦GγA ◦GαA (2.23)

= (δ ∗ γ)A ◦ (β ∗ α)A (2.24)

= MγA ◦MαA ◦ δFA ◦ βFA (2.25)

= M(γ ◦ α)A ◦ (δ ◦ β)FA (2.26)

= {(δ ◦ β) ∗ (γ ◦ α)}A (2.27)

i.e., we get

(δ ∗ γ) ◦ (β ∗ α) = (δ ◦ β) ∗ (γ ◦ α) (2.28)

27

Chapter 3

String diagrams

We now introduce a graphical language of string diagrams in category the-ory. Our, or at least my motivation to use such diagrammatic notions is tosimplify some of routine works in category theory with a pencil and papers.We have to save notations, because on 2 dimensional papers we can use atmost 3 types of shapes; dots(nodes), lines, and areas. How to do it?

3.1 A class change method

We can always view ∀ arrow f ∈ C(A,B) in a category C as a naturaltransformation. That is, we can view objects and arrows as functors andnatural transformations:

∀f ∈ C(A,B) ⇒ ∃f ∈ Nat(A, B ∈ Func(1,C)). (3.1)

Let us define, ∀C ∈ |C|,

C ∈ Func(1,C) (3.2)

as follows:

C(∗) := C (3.3)

C(id∗) := idC = 1C . (3.4)

∀f ∈ C(A,B), define a natural transformation

f ∈ Nat(A, B) : ∗ 7→ f∗ := f (3.5)

28

1(∗ id∗ // ∗) A //

f

��

C(A 1A // A)

1(∗ id∗ // ∗)B

// C(B 1B // B)

(3.6)

See the following diagram:

A1A

f∗��

A

f∗��

B1B

B

= A

f��B

(3.7)

Now we have a correspondence between arrows and natural transforma-tions:

¯: C(A,B) → Nat(A, B); f 7→ f , (3.8)

that is

(Af→ B) 7→ (A

f→ B). (3.9)

We may omit upper bar for simplicity, and we can view ∀f ∈ C(A,B)as f ∈ Nat(A,B), and A,B ∈ |C| as ∀A,B ∈ Func(1,C). This is quitecategorical view of points, i.e., the objects are also arrows!

3.2 String diagrams

We represent 5 elements in the category theory, that is, objects, arrows,categories, functors, and natural transformations, with string diagrams. Inour graphical representation, functors are 1 dimensional lines, natural trans-formations are 0 dimensional nodes, and categories are 2-dimensional areas.This situation is thus Poincare dual to that of usual diagrams in categorytheory, see Table 3.1.

We represent a natural transformation α between functors F,G of cate-gories C,D,

α ∈ Nat(F,G), F,G ∈ Func(C,D) (3.10)

29

Table 3.1: Poincare dual

categories functors n.t.

diagrams 0 1 2

string diagrams 2 = 2-0 1 = 2-1 0 = 2-2

as the following diagram:

F

C /.-,()*+α

G

D

(3.11)

From §3.1, we can always see f ∈ C(A,B) as a natural transformationf ∈ Nat(A,B ∈ Func(1,C)):

A

1 /.-,()*+f

B

C

(3.12)

We can also view f as a correspondence 1 → C(A,−)(B) := C(A,B):

1

1 /.-,()*+f

B��������� C(A,−)

AAAA

AAAA

AASet

C

(3.13)

30

Then the (vertical) composition of f ∈ C(A,B), g ∈ C(B,C) is

A/.-,()*+f

B'&%$ !"#gC

=

A

g ◦ fC

(3.14)

or

1/.-,()*+f

B�������

C(A,−)

..............'&%$ !"#g

C

=

1

g ◦ f

Czzzzzzzz C(A,−)

DDDD

DDDD

(3.15)

Notice that, we may omit the label of category for each areas. And forFf ∈ D(FA,FB),

A

F/.-,()*+f

B

=ACC

CCCC

C

F{{{{{{{GFED@ABCFf

B

{{{{{{{{

F CCCC

CCCC

(3.16)

3.3 The Godement product

With our graphical notation, Godement product is the following identity,i.e. a good example of so called the ”elevator” rule: we can freely move the

31

nodes up or down in the diagram as long as they have no overlaps.

F G/.-,()*+α

H

/.-,()*+β

K

=FEE

EEEE

EE

GzzzzzzzzWVUTPQRSβ ∗ α

Hzzzzzzzzz K

EEEE

EEEE

(3.17)

=

F

G/.-,()*+α

H /.-,()*+β

K

=FCC

CCCC

CC

G{{{{{{{{GFED@ABCGα

H GGFED@ABCβH

H|||||||| K

BBBB

BBBB

(3.18)

=

F

G/.-,()*+β

K/.-,()*+α

H

=FBB

BBBB

BB

G||||||||GFED@ABCβF

F KGFED@ABCKα

H{{{{{{{{ K

CCCC

CCCC

(3.19)

that is

β ∗ α = βH ◦Gα = Kα ◦ βF. (3.20)

Thus we get ∀A ∈ |A|,

(β ∗ α)A = βHA ◦G(αA) = K(αA) ◦ βFA. (3.21)

See eq.(2.3).

32

3.3.1 The interchanging law

Using the elevator rule, we can easily derive the interchanging law. Considerthe following diagram:

F G/.-,()*+α

H

/.-,()*+β

K/.-,()*+γ

L

'&%$ !"#δM

(3.22)

then we have two expression of it:

FEE

EEEE

EE

Gzzzzzzzz

β ∗ α

H K

δ ∗ γ

Lzzzzzzzzz M

EEEE

EEEE

=

F G

γ ◦ αL

δ ◦ βM

(3.23)

3.3.2 Functors

Using our graphical notation and the Godement product, we have anotherrepresentation of Ff . From eq.(3.16) and eq.(3.17),

ACC

CCCC

C

F{{{{{{{GFED@ABCFf

B

{{{{{{{{

F CCCC

CCCC

=

A

F/.-,()*+f

B

=

A F/.-,()*+f

B

?>=<89:;1F

F

=AGG

GGGG

GG

Fwwwwwwww_^]\XYZ[1F ∗ f

B

wwwwwwwww

F GGGG

GGGG

G

(3.24)

i.e., we get

Ff = 1F ∗ f. (3.25)

33

3.3.3 Natural transformations

Using our graphical notation, we can show that the Godement products area kind of generalization of the natural transformations. Let us consider anatural transformation

θ ∈ Nat(F,G), F,G ∈ Func(C,D) (3.26)

∀f ∈ C(A,B), the commutative diagram

FAFf //

ϑA

��

FB

ϑB

��GA

Gf// GB

(3.27)

is represented by the following ”identity”:

A F/.-,()*+f

B

'&%$ !"#θG

=ADD

DDDD

DD

FzzzzzzzzWVUTPQRSθ ∗ f

Bzzzzzzzz G

DDDD

DDDD

(3.28)

=

A

F/.-,()*+f

B '&%$ !"#θG

=FAA

AAAA

AA

F}}}}}}}}GFED@ABCFf

B F?>=<89:;θB

B}}}}}}}} G

AAAA

AAAA

(3.29)

=

A

F'&%$ !"#θG/.-,()*+f

B

=ABB

BBBB

BB

F}}}}}}}}?>=<89:;θA

A GGFED@ABCGf

B}}}}}}}} G

AAAA

AAAA

(3.30)

34

Thus the naturality of the natural transformations are represented by theelevator rule, and we get another representation of the naturality

θB ◦ Ff = θ ∗ f = Gf ◦ θA. (3.31)

Equivalently, we can say that θ : F → G is a natural transformation iff∀C ∈ |C|,

C@@

@@@@

@@

F~~~~~~~~?>=<89:;θC

G

@@@@

@@@@

C~~~~~~~~

= C

F'&%$ !"#θG

(3.32)

In general, the commutativity of the category theory is naturally repre-sented as the elevator rule in our string diagrams.

3.4 The Yoneda lemma

We will translate the Yoneda lemma in the string language here. The defi-nition θF,A(α) := αA(1A) (eq.(1.8)) is

1

θF,A(α)

Awwwwwwwww

F GGGG

GGGG

G

:=

1?>=<89:;1A

A

�������������� A(A,−)

AAAA

AAAA /.-,()*+α

F

(3.33)

and the definition τ(a)B(f) := F (f)(a) (eq.(1.9)) is

1/.-,()*+f

B A(A,−)

τ(a)BB

yyyyyyyyy F

EEEE

EEEE

E

:=

1

Ff(a)

Bxxxxxxxxx

F FFFF

FFFF

F =

1'&%$ !"#aA

��������

F

.............../.-,()*+f

B

(3.34)

35

Then the natulality of τ(a)B in the variable B is trivial; we can proveeq.(1.14)

F (g) ◦ τ(a)B = τ(a)C ◦ A(A, g) (3.35)

directly, ∀f ∈ C(A,B),

1/.-,()*+f

B A(A,−)

τ(a)B

B FGFED@ABCFgC

xxxxxxxxx F

FFFF

FFFF

F

=

1/.-,()*+f

B A(A,−)

τ(a)BB

zzzzzzzzz

F

2222

2222

2222

222'&%$ !"#g

C

=

1'&%$ !"#aA

��������

F

))))))))))))))))))))))/.-,()*+f

B'&%$ !"#gC

=

1

g ◦ f

C A(A,−)

τ(a)CC

yyyyyyyyy F

EEEE

EEEE

E

=

1/.-,()*+fB

yyyyyyyyy

A(A,−)'&%$ !"#gC DD

DDDD

DDD

τ(a)CC

wwwwwwwww F

EEEE

EEEE

E

=

1/.-,()*+f

B A(A,−)

A(A, g)

C A(A,−)

τ(a)CC

wwwwwwwww F

GGGG

GGGG

G

(3.36)

thus we get

τ(a) ∈ Nat (A(A,−), F ) (3.37)

36

and the definition eq.(3.34) becomes

1/.-,()*+f

B

��������������� A(A,−)

AAAA

AAAA ONMLHIJKτ(a)

F

=

1'&%$ !"#aA

��������

F

.............../.-,()*+f

B

(3.38)

Next, we show that θF,A and τ are inverse to each other. Using eq.(3.33)and eq.(3.38),

1'&%$ !"#aA F

θF,A ◦ τA

wwwwwwwww F

GGGG

GGGG

G

=

1

θF,A ◦ τ(a)A

tttttt

tttt F

JJJJJJ

JJJJ

=

1?>=<89:;1A

A

���������������

F

CCCC

CCCC ONMLHIJKτ(a)

F

=

1'&%$ !"#aA

}}}}}}}

F

...............?>=<89:;1A

A

=

1'&%$ !"#aA FONMLHIJK1FA

A

{{{{{{{{

F CCCC

CCCC

(3.39)

i.e., we get the same result of eq.(1.19),

θF,A ◦ τ = 1FA (3.40)

37

and

1/.-,()*+f

B

��������������� A(A,−)

IIII

IIII

II

τ(θF,A(α))

F

=

1

θF,A(α)

Axxxxxxxxx

F

3333

3333

3333

3333/.-,()*+f

B

=

1?>=<89:;1A

A�������� A(A,−)

????

????/.-,()*+f

B

/.-,()*+α

F

=

1/.-,()*+f

B

�������������� A(A,−)

????

???? /.-,()*+α

F

(3.41)

thus we get eq.(1.25)

τ (θF,A(α))B (f) = αB(f) (3.42)

= (τ ◦ θF,A(α))B (f) (3.43)

or simply

τ ◦ θF,A = 1Nat(A(A,−),F ). (3.44)

Let us consider the naturality of θF,A in the variable A. The defini-tion of N ∈ Func(A, Set) is as follows. ∀α ∈ Nat(A(A,−), F ),A(f,−) ∈Nat(A(B,−),A(A,−)),

A(B,−)

N(f)(α)

F

:=

A(B,−)

α ◦ A(f,−)

F

=

A(B,−)

A(f,−)

A(A,−)/.-,()*+α

F

(3.45)

38

Then, using eq.(3.33), (θF,B ◦N(f)(α)) is

1

θF,B ◦N(f)(α)

Bppp

pppppp

pp F

NNNNNN

NNNNN

=

1?>=<89:;1B

B

��������������� A(B,−)

IIII

IIII

I

N(f)(α)

F

=

1?>=<89:;1B

B

���������������������� A(B,−)

HHHH

HHHH

H

A(f,−)

A(A,−)/.-,()*+α

F

=

1?>=<89:;1B

B A(B,−)

A(f,B)

F

A(A,−)

HHHH

HHHH

H /.-,()*+α

F

(3.46)

Since

A(f,B)(1B) = 1B ◦ f = f, (3.47)

39

the above equation becomes

1?>=<89:;1B

B A(B,−)

A(f,B)

B

A(A,−)

HHHH

HHHH

H /.-,()*+α

F

=

1/.-,()*+f

B

�������������� A(A,−)

????

???? /.-,()*+α

F

=

1?>=<89:;1AA

�������� A(A,−)

????

????/.-,()*+f

B

/.-,()*+α

F

=

1

θF,A(α)

A FGFED@ABCFfB

vvvvvvvvv F

HHHH

HHHH

H

(3.48)

thus we get

(θF,B ◦N(f)(α)) = Ff ◦ θF,A(α). (3.49)

See eq.(1.45).In the case of A to be small, let us consider the naturality of θF,A in

the variable F . The definition of M ∈ Func(CFun(A, Set), Set) is as follows.∀α ∈ Nat(A(A,−), F ), γ ∈ Nat(F,G), M(γ)(α) := γ ◦ α:

A(A,−)

M(γ)(α)

G

:=

A(A,−)/.-,()*+α

F/.-,()*+γ

G

(3.50)

40

Then, using eq.(3.33), and the definition eq.(3.50),

1

θG,A(M(γ)(α))A

pppppp

ppppp G

NNNNNN

NNNNN

=

1?>=<89:;1A

A

��������������� A(A,−)

IIII

IIII

I

M(γ)(α)

G

=

1?>=<89:;1A

A

��������������������� A(A,−)

AAAA

AAAA /.-,()*+α

F/.-,()*+γ

G

=

1

θF,A(α)

A F?>=<89:;γAA

uuuuuuuuu

G

IIII

IIII

I

=

1

θF,A(α)

A F

evalA(γ)A

vvvvvvvvv G

HHHH

HHHH

H

(3.51)

thus

θG,A(M(γ)(α)) = evalA(γ) ◦ θF,A(α). (3.52)

See eq.(1.63).

41