9.2 Functors and transformations

9.2 Functors and transformations

The following definitions are fairly obvious, and need no modification.

Definition 9.2.1

.

Let

A

and

B

be

precategories

.
A

functor

F

:

A

→

B

consists of

1.

A

function

F

0

:

A

0

→

B

0

, generally also denoted

F

.

2.

For each

a

,

b

:

A

, a function

F

a

,

b

:

hom

A

⁡

(

a

,

b

)

→

hom

B

⁡

(

F

⁢

a

,

F

⁢

b

)

, generally also denoted

F

.

3.

For each

a

:

A

, we have

F

⁢

(

1

a

)

=

1

F

⁢

a

.

4.

For each

a

,

b

,

c

:

A

and

f

:

hom

A

⁡

(

a

,

b

)

and

g

:

hom

B

⁡

(

b

,

c

)

, we have

F

⁢

(

g

∘

f

)

=

F

⁢

g

∘

F

⁢

f

.

Note that by

induction

on

identity

, a functor also preserves

𝗂𝖽𝗍𝗈𝗂𝗌𝗈

.

Definition 9.2.2

.

For functors

F

,

G

:

A

→

B

, a

natural transformation

γ

:

F

→

G

consists of

1.

For each

a

:

A

, a

morphism

γ

a

:

hom

B

⁡

(

F

⁢

a

,

G

⁢

a

)

(the “

components

”).

2.

For each

a

,

b

:

A

and

f

:

hom

A

⁡

(

a

,

b

)

, we have

G

⁢

f

∘

γ

a

=

γ

b

∘

F

⁢

f

(the “naturality axiom”).

Since each type

hom

B

⁡

(

F

⁢

a

,

G

⁢

b

)

is a set, its identity type is a mere proposition.
Thus, the naturality axiom is a mere proposition, so identity of natural transformations is determined by identity of their components.
In particular, for any

F

and

G

, the type of natural transformations from

F

to

G

is again a set.

Similarly, identity of functors is determined by identity of the functions

A

0

→

B

0

and (transported along this) of the corresponding functions on hom-sets.

Definition 9.2.3

.

For precategories

A

,

B

, there is a precategory

B

A

defined by

•

(

B

A

)

0

is the type of functors from

A

to

B

.

•

hom

B

A

⁡

(

F

,

G

)

is the type of natural transformations from

F

to

G

.

Proof.

We define

(

1

F

)

a

:

≡

1

F

⁢

a

.
Naturality follows by the unit axioms of a precategory.
For

γ

:

F

→

G

and

δ

:

G

→

H

, we define

(

δ

∘

γ

)

a

:

≡

δ

a

∘

γ

a

.
Naturality follows by

associativity

.
Similarly, the unit and associativity laws for

B

A

follow from those for

B

.
∎

Lemma 9.2.4

.

A natural transformation

γ

:

F

→

G

is an

isomorphism

in

B

A

if and only if each

γ

a

is an isomorphism in

B

.

Proof.

If

γ

is an isomorphism, then we have

δ

:

G

→

F

that is its

inverse

.
By definition of composition in

B

A

,

(

δ

⁢

γ

)

a

≡

δ

a

⁢

γ

a

and similarly.
Thus,

δ

⁢

γ

=

1

F

and

γ

⁢

δ

=

1

G

imply

δ

a

⁢

γ

a

=

1

F

⁢

a

and

γ

a

⁢

δ

a

=

1

G

⁢

a

, so

γ

a

is an isomorphism.

Conversely

, suppose each

γ

a

is an isomorphism, with inverse called

δ

a

, say.
We define a natural transformation

δ

:

G

→

F

with components

δ

a

; for the naturality axiom we have

F

⁢

f

∘

δ

a

=

δ

b

∘

γ

b

∘

F

⁢

f

∘

δ

a

=

δ

b

∘

G

⁢

f

∘

γ

a

∘

δ

a

=

δ

b

∘

G

⁢

f

.

Now since composition and identity of natural transformations is determined on their components, we have

γ

⁢

δ

=

1

G

and

δ

⁢

γ

=

1

F

.
∎

The following result is fundamental.

Theorem 9.2.5

.

If

A

is a precategory and

B

is a

category

, then

B

A

is a category.

Proof.

Let

F

,

G

:

A

→

B

; we must show that

𝗂𝖽𝗍𝗈𝗂𝗌𝗈

:

(

F

=

G

)

→

(

F

≅

G

)

is an equivalence.

To give an inverse to it, suppose

γ

:

F

≅

G

is a

natural isomorphism

.
Then for any

a

:

A

, we have an isomorphism

γ

a

:

F

⁢

a

≅

G

⁢

a

, hence an identity

𝗂𝗌𝗈𝗍𝗈𝗂𝖽

⁢

(

γ

a

)

:

F

⁢

a

=

G

⁢

a

.
By function extensionality, we have an identity

γ

¯

:

F

0

=

(

A

0

→

B

0

)

G

0

.

Now since the last two axioms of a functor are mere propositions, to show that

F

=

G

it will suffice to show that for any

a

,

b

:

A

, the functions

F

a

,

b

:

hom

A

⁡

(

a

,

b

)

→

hom

B

⁡

(

F

⁢

a

,

F

⁢

b

)

⁢

\mathrlap

and

G

a

,

b

:

hom

A

⁡

(

a

,

b

)

→

hom

B

⁡

(

G

⁢

a

,

G

⁢

b

)

become equal when transported along

γ

¯

.
By computation for function extensionality, when applied to

a

,

γ

¯

becomes equal to

𝗂𝗌𝗈𝗍𝗈𝗂𝖽

⁢

(

γ

a

)

.
But by

\autoref

ct:idtoiso-trans, transporting

F

⁢

f

:

hom

B

⁡

(

F

⁢

a

,

F

⁢

b

)

along

𝗂𝗌𝗈𝗍𝗈𝗂𝖽

⁢

(

γ

a

)

and

𝗂𝗌𝗈𝗍𝗈𝗂𝖽

⁢

(

γ

b

)

is equal to the composite

γ

b

∘

F

⁢

f

∘

(

γ

a

)

-

1

, which by naturality of

γ

is equal to

G

⁢

f

.

This

completes

the definition of a function

(

F

≅

G

)

→

(

F

=

G

)

.
Now consider the composite

(

F

=

G

)

→

(

F

≅

G

)

→

(

F

=

G

)

.

Since hom-sets are sets, their identity types are mere propositions, so to show that two identities

p

,

q

:

F

=

G

are equal, it suffices to show that

p

=

F

0

=

G

0

q

.
But in the definition of

γ

¯

, if

γ

were of the form

𝗂𝖽𝗍𝗈𝗂𝗌𝗈

⁢

(

p

)

, then

γ

a

would be equal to

𝗂𝖽𝗍𝗈𝗂𝗌𝗈

⁢

(

p

a

)

(this can easily be proved by induction on

p

).
Thus,

𝗂𝗌𝗈𝗍𝗈𝗂𝖽

⁢

(

γ

a

)

would be equal to

p

a

, and so by function extensionality we would have

γ

¯

=

p

, which is what we need.

Finally, consider the composite

(

F

≅

G

)

→

(

F

=

G

)

→

(

F

≅

G

)

.

Since identity of natural transformations can be tested componentwise, it suffices to show that for each

a

we have

𝗂𝖽𝗍𝗈𝗂𝗌𝗈

⁢

(

γ

¯

)

a

=

γ

a

.
But as observed above, we have

𝗂𝖽𝗍𝗈𝗂𝗌𝗈

⁢

(

γ

¯

)

a

=

𝗂𝖽𝗍𝗈𝗂𝗌𝗈

⁢

(

(

γ

¯

)

a

)

, while

(

γ

¯

)

a

=

𝗂𝗌𝗈𝗍𝗈𝗂𝖽

⁢

(

γ

a

)

by computation for function extensionality.
Since

𝗂𝗌𝗈𝗍𝗈𝗂𝖽

and

𝗂𝖽𝗍𝗈𝗂𝗌𝗈

are inverses, we have

𝗂𝖽𝗍𝗈𝗂𝗌𝗈

⁢

(

γ

¯

)

a

=

γ

a

as desired.
∎

In particular, naturally isomorphic functors between categories (as opposed to precategories) are equal.

We now define all the usual ways to compose functors and natural transformations.

Definition 9.2.6

.

For functors

F

:

A

→

B

and

G

:

B

→

C

, their composite

G

∘

F

:

A

→

C

is given by

•

The composite

(

G

0

∘

F

0

)

:

A

0

→

C

0

•

For each

a

,

b

:

A

, the composite

(

G

F

⁢

a

,

F

⁢

b

∘

F

a

,

b

)

:

hom

A

⁡

(

a

,

b

)

→

hom

C

⁡

(

G

⁢

F

⁢

a

,

G

⁢

F

⁢

b

)

.

It is easy to check the axioms.

Definition 9.2.7

.

For functors

F

:

A

→

B

and

G

,

H

:

B

→

C

and a natural transformation

γ

:

G

→

H

, the composite

(

γ

⁢

F

)

:

G

⁢

F

→

H

⁢

F

is given by

•

For each

a

:

A

, the component

γ

F

⁢

a

.

Naturality is easy to check.
Similarly, for

γ

as above and

K

:

C

→

D

, the composite

(

K

⁢

γ

)

:

K

⁢

G

→

K

⁢

H

is given by

•

For each

b

:

B

, the component

K

⁢

(

γ

b

)

.

Lemma 9.2.8

.

For functors

F

,

G

:

A

→

B

and

H

,

K

:

B

→

C

and natural transformations

γ

:

F

→

G

and

δ

:

H

→

K

, we have

(

δ

⁢

G

)

⁢

(

H

⁢

γ

)

=

(

K

⁢

γ

)

⁢

(

δ

⁢

F

)

.

Proof.

It suffices to check componentwise: at

a

:

A

we have

(

(

δ

⁢

G

)

⁢

(

H

⁢

γ

)

)

a

≡

(

δ

⁢

G

)

a

⁢

(

H

⁢

γ

)

a

≡

δ

G

⁢

a

∘

H

⁢

(

γ

a

)

=

K

⁢

(

γ

a

)

∘

δ

F

⁢

a

(by naturality of $\delta$)

≡

(

K

⁢

γ

)

a

∘

(

δ

⁢

F

)

a

≡

(

(

K

⁢

γ

)

⁢

(

δ

⁢

F

)

)

a

.

∎

Classically, one defines the “horizontal composite” of

γ

:

F

→

G

and

δ

:

H

→

K

to be the common value of

(

δ

⁢

G

)

⁢

(

H

⁢

γ

)

and

(

K

⁢

γ

)

⁢

(

δ

⁢

F

)

.
We will refrain from doing this, because while equal, these two

transformations

are not

definitionally

equal.
This also has the

consequence

that we can use the symbol

∘

(or

juxtaposition

) for all kinds of composition unambiguously: there is only one way to compose two natural transformations (as opposed to composing a natural transformation with a functor on either side).

Lemma 9.2.9

.

Composition of functors is associative:

H

⁢

(

G

⁢

F

)

=

(

H

⁢

G

)

⁢

F

.

Proof.

Since composition of functions is associative, this follows immediately for the actions on objects and on homs.
And since hom-sets are sets, the rest of the data is automatic.
∎

The equality in

\autoref

ct:functor-assoc is likewise not definitional.
(Composition of functions is definitionally associative, but the axioms that go into a functor must also be composed, and this breaks definitional associativity.) For this reason, we need also to know about

coherence

for associativity.

Lemma 9.2.10

.

\autoref

ct:functor-assoc is coherent, i.e. the following pentagon of equalities commutes:

\xymatrix

⁢

&

⁢

K

⁢

(

H

⁢

(

G

⁢

F

)

)

⁢

\ar

⁢

@

=

[

d

⁢

l

]

⁢

\ar

⁢

@

=

[

d

⁢

r

]

⁢

(

K

⁢

H

)

⁢

(

G

⁢

F

)

⁢

\ar

⁢

@

=

[

d

]

⁢

&

⁢

&

⁢

K

⁢

(

(

H

⁢

G

)

⁢

F

)

⁢

\ar

⁢

@

=

[

d

]

⁢

(

(

K

⁢

H

)

⁢

G

)

⁢

F

⁢

&

⁢

&

⁢

(

K

⁢

(

H

⁢

G

)

)

⁢

F

⁢

\ar

⁢

@

=

[

l

⁢

l

]

Proof.

As in

\autoref

ct:functor-assoc, this is evident for the actions on objects, and the rest is automatic.
∎

We will henceforth abuse notation by writing

H

∘

G

∘

F

or

H

⁢

G

⁢

F

for either

H

⁢

(

G

⁢

F

)

or

(

H

⁢

G

)

⁢

F

, transporting along

\autoref

ct:functor-assoc whenever necessary.
We have a

similar

coherence result for units.

Lemma 9.2.11

.

For a functor

F

:

A

→

B

, we have equalities

(

1

B

∘

F

)

=

F

and

(

F

∘

1

A

)

=

F

, such that given also

G

:

B

→

C

, the following

triangle

of equalities commutes.

\xymatrix

⁢

G

∘

(

1

B

∘

F

)

⁢

\ar

⁢

@

=

[

r

⁢

r

]

⁢

\ar

⁢

@

=

[

d

⁢

r

]

⁢

&

⁢

&

⁢

(

G

∘

1

B

)

∘

F

⁢

\ar

⁢

@

=

[

d

⁢

l

]

⁢

&

⁢

G

∘

F

.

See

\autoref

ct:pre2cat,

\autoref

ct:2cat for further

development

of these ideas.

Title

9.2 Functors and transformations

\metatable

Generated on Thu Feb 8 19:42:25 2018 by

LaTeXML