THE BOX MONADS 1. Notation Let {∗} denote the terminal category

THE BOX MONADS
DAVID I. SPIVAK
1. Notation
Let {∗} denote the terminal category (which has one arrow). Let Cat denote the
category of small categories (morphisms are functors). Given a category A ∈ Cat,
let Ob(A) denote the set of objects in A.
Let F : A → C and G : B → C be functors. We denote by (F ↓C G) the category
whose objects are pairs (a, b, f ) where a ∈ Ob(A), b ∈ Ob(b) and f : F (a) → G(b)
is a morphism in C. These are pictured as
(1)
Fa
f
Gb.
The morphism sets are given by
Hom(F ↓C G) ((a, b, f ), (a0 , b0 , f 0 )) = {(x, y)|x : a → a0 , y : b → b0 , Gy ◦ f = f 0 ◦ F x}.
In pictures, a morphism (a, b, f ) → (a0 , b0 , f 0 ) in (F ↓C G) is written
Fa
Fx
f0
f
Gb
/ F a0
Gy
/ Gb0 .
Suppose now that C is a 2-category; we will use the morphism-terminology of
C = Cat because that is the main example we ultimately want to consider. In
other words, we will call morphisms in C “functors” and 2-arrows in C “natural
transformations.” We still consider A and B as 1-categories.
Example 1.1. Let C = Cat. Suppose that F : A → Cat is a functor and B
is a category, we sometimes write (A ↓Cat {B}) to denote (F ↓Cat iB ), where
iB : {∗} → Cat is the category B. In other words, (A ↓Cat {B}) is the category of
A-shaped diagrams in B.
We can add a layer of complexity to (F ↓C G), by adding the possibility that
the morphisms are not commutative diagrams in C, but instead involve a natural
transformation (i.e. a 2-arrow in C). To that end, we define a category (F ⇓C G)
whose objects are the same as those in (F ↓C G), pictured in (1), but for which
morphisms sets are given by
Hom(F ⇓C G) ((a, b, f ), (a0 , b0 , f 0 )) =
{(x, y, α)|x : a → a0 , y : b → b0 , α : Gy ◦ f → f 0 ◦ F x}.
This project was supported in part by the Office of Naval Research.
1
2
DAVID I. SPIVAK
In pictures, a morphism (a, b, f ) → (a0 , b0 , f 0 ) in (F ⇓C G) is written
Fa
f
Gb
Fx
α
=⇒
Gy
/ F a0
f0
/ Gb0 .
We write (F ⇑C G) to denote a similar category but with some reversal of 1arrows. Its objects are the same as those in (F ↓C G) and (F ⇓C G); they are
sequences (a, b, f ), as seen in (1). The morphism sets are given by
Hom(F ⇑C G) ((a, b, f ), (a0 , b0 , f 0 )) =
{(x, y, α)|x : a0 → a, y : b0 → b, α : f ◦ F x → Gy ◦ f 0 }.
In pictures, a morphism (a, b, f ) → (a0 , b0 , f 0 ) in (F ⇑C G) is written
Fa o
Fx
f
=⇒
Gb o
α
Gy
F a0
f0
Gb0 .
For those who prefer, we can simply write (F ⇑C G) = (Gop ⇓C op F op ), where
F op : Aop → C op and Gop : B op → C op are the opposites of F and G.
Example 1.2. Suppose that C = Cat and that B is a category, considered as a
B
functor {∗} −
→ C. We may write (F ⇓ {B}) to denote (F ⇓ iB ). Explicitly, the
f
objects in (F ⇓ {B}) are functors F (a) −
→ B, where a ∈ A, and the morphisms
f
f
0
(F a −
→ B) −→ (F a0 −→ B) are pairs (x, α), where x : a → a0 and α : f → f 0 ◦ F x,
as seen in the natural transformation diagram
/ F a0
F aB
BB
{
{
α
BB =⇒
{{
B
{{ f 0
f BB
{
}{
B
Fx
On the other hand, while the objects in (F ⇑ {B}) are the same as those in
f
f0
(F ⇓ {B}), a morphism (F a −
→ B) −→ (F a0 −→ B) has a reversal in the top
1-arrow. It is a pair (x, α) where x : a0 → a and α : f ◦ F x → f 0 , as seen in the
natural transformation diagram
Fx
F a Bo
F a0
BB
{
{
α
BB =⇒
{{
B
{{ 0
f BB
}{{ f
B
2. The Box monads
In this section we will be working in the base category Cat, so when we write
(X ⇓ Y ) we mean (X ⇓Cat Y ). In particular, let FC denote the category of finite
categories and consider the full inclusion FC → Cat. We will be considering, for
THE BOX MONADS
3
any category C ∈ Cat, the categories (FC ⇓ {C}) and (FC ⇑ {C}). These are
particular cases of the categories considered in Example 1.2.
Theorem 2.1. Let FC denote the category of finite categories. Consider the
endofunctor d := (FC ⇓ {−}) : Cat → Cat. There are natural transformations
η : idCat → d and µ : d2 → d that give d the structure of a monad on Cat.
Proof. For C ∈ Cat, define ηC : C → dC to be the functor given on objects by
c
c 7→ ({∗} →
− C), and given on morphisms by










id{∗}

0
/ {∗} 
(f : c → c ) 7→  {∗}
.
AA


}
f
AA
}


AA =⇒ }}}


0
c AA
}


~}} c
C
This is clearly a natural transformation.
Defining µ is more difficult. Let C ∈ Cat be a category; we will define µC : d2 C →
dC.
Let X be a finite category and let σ : X → (FC ⇓ {C}) be an object in d2 C.
We need to establish some notation for σ. On objects x ∈ X, denote σ(x) by
σx : Sx → C,
where Sx is a finite category. On morphisms f : x → y in X, denote σ(f ) by






σf

]
/ Sy
(σf , σf ) :  Sx @

@@
]
~
σ
~

f
@@ =⇒
~

~~ σy
σx @@@

~~
C





.




Define µ(X, σ) ∈ Cat as the category with objects
Ob(µ(X, σ)) := {(x, sx )|x ∈ X, sx ∈ Sx }
and morphisms
Homµ(X,σ) ((x, sx ), (y, sy )) = {(f, f ] )|f : x → y, (f ] : σf (sx ) → sy ) ∈ Sy }.
Note that since X and each Sx is finite, so is µ(X, σ).
There is a canonical functor µ(X, σ) → C given on objects by (x, sx ) 7→ σx (sx )
and given on morphisms by sending (f, f ] ) : (x, sx ) → (y, sy ) to the composite
σf]
σy (f ] )
σx (sx ) −→ σy σf (sx ) −−−−→ σy (sy ).
Thus µ(X, σ) is indeed in (FC ⇓ {C}).
4
DAVID I. SPIVAK
So far, we have only established µ on objects. On morphisms
m
/ 0,
X KK
sX
KK
s
]
KK
m
ss
K
=⇒
ss
σ KKK
ss σ0
s
%
ys
(FC ⇓ {C})
define µ(m, m] ) : µ(X, σ) → µ(X 0 , σ 0 ) as the functor given as follows. Send the
object (x, sx ) ∈ µ(X, σ) to (m(x), m]x (sx )) ∈ µ(X 0 , σ 0 ). Send (f, f ] ) : (x, sx ) →
(y, sy ) to
0
(m(x), (m]y ◦ f ] : σmf
(m]x (sx )) → m]y (sy ))) : µ(X, σ) → µ(X 0 σ 0 ).
There is an obvious natural transformation
/ µ(X 0 , σ 0 )
µ(X, σ)
GG
v
GG
vv
GG =⇒
vv
GG
v
G# {vvv
C
because m] : σ 0 ◦ m → σ was assumed natural.
We draw the following diagram, in case it is useful to the reader:
σx
Sx
σf
m]x
0
Smx
0
σmx
/ Sy
]
σ
f
@⇐=
@@
@@ σy
]
@@
my
@@
@@
⇓
0
/ Smy
/C
0
A
σmy
]
σmf
⇑
0
σmx
We forgo showing that this really is a monad.
Corollary 2.2. Let FC denote the category of finite categories. Consider the
endofunctor e := (FC ⇑ {−}) : Cat → Cat. There are natural transformations
η : idCat → e and µ : e2 → e, which gives e the structure of a monad on Cat.
Proof. Recall the endofunctor d : Cat → Cat given by d = (FC ⇑ {−}) as in
Theorem 2.1. For any category C there is a isomorphism (natural in C)
∼
=
(FC ⇓ {C}) −
→ (FC ⇑ {C op })op
given by sending an object σ : S → C to the object σ op : S op → C op and by sending
a morphism (σf , σf] ) : (σx : Sx → C) −→ (σy : Sy → C), pictured as
σf
/ Sy ,
Sx @
@@
]
~
σ
f
@@ =⇒
~~
~~ σy
σx @@@
~
~
C
THE BOX MONADS
5
to the morphism pictured as
σ
f
Syop o
Sxop .
DD
]
z
σf
DD
zz
DD =⇒
zzσop
z
σyop DD
"
|zz x
C op
Now we can simply apply the maps µ and η from Theorem 2.1. For µ we have
(FC ⇑ {FC ⇑ {C}}) ∼
= (FC ⇓ {FC ⇑ {C op }})op
∼
= (FC ⇓ {FC ⇓ {C op }})op
µ
−
→ (FC ⇓ {C op })op ∼
= (FC ⇑ {C})
and it is natural in C. Writing op : Cat → Cat to denote the involution, we also
have
(FC⇑{−})
Cat
op
/ Cat
/ Cat(FC⇓{−})
:
op
&
/ Cat
idCat
so the natural transformation η : idCat → (FC ⇓ {−}) extends to a natural transformation idCat → (FC ⇑ {−}).
All the monad diagrams commute for e because they do for d.
In the next section we will define the “global sections functor”
Γ : (FC ⇓ {Cat}) → Cat,
which is related to the Grothendieck construction. For now, we just record a proposition as to the purpose of this material.
Proposition 2.3. The global sections functor Γ : (FC ⇓ {Cat}) → Cat gives Cat
the structure of a d-algebra.
Proof. ***
3. Grothendieck construction
Let f : S → Cat be a functor. The Grothendieck construction for f is given by
Gr(f ) := ({∗} ⇓ f ).
Explicitly, Gr(f ) is the category with objects (S, s) where S ∈ Ob(S) and s ∈ f (S).
The morphism sets in Gr(f ) are given by
Hom((S, s), (S 0 , s0 )) = {(y : S → S 0 , α : f (y)(s) → s0 )}.
There is a natural projection πf : Gr(f ) → S given by (S, s) 7→ S. It is a split
fibration; that is, for any y : S → S 0 and s ∈ S, there is a canonical choice of map
(S, s) → (S 0 , f (y)(s)) lying over y.
6
DAVID I. SPIVAK
Lemma 3.1. Let f : S → Cat be a diagram of categories. A functor σ : C → S
induces a diagram
/ Gr(f )
Gr(f σ)
y
πf σ
C
πf
σ
/ S,
which is a pullback square.
Proof. ***
Definition 3.2. Let π : T → S be a functor. A section of π is a functor g : S → T
such that πg = idS . A morphism of sections of π is a natural transformation over
S.
Recall that a pullback square as in Lemma 3.1 defines a functor
g 7→ (idC ×idS (g ◦ σ))
from the sections of πf : Gr(f ) → S to the sections of πf σ : Gr(f σ) → C.
Lemma 3.3. Suppose given two functors f, g : S → Cat; let Nat(f, g) denote the
set of natural transformations from f to g. There is a natural isomorphism
∼
=
HomS (Gr(f ), Gr(g)) −
→ Nat(f, g).
Proof. ***
Definition 3.4. There is a functor Γ : (Cat ⇑ {Cat}) → Cat defined as follows.
On objects, Γ(f : C → Cat) is defined to be the category of sections of the functor π : Gr(f ) → C. To define Γ on morphisms, suppose we are given a natural
transformation diagram
x
C oCC
D.
CC
zz
α
z
CC =⇒ zz
z g
f CC
! }zz
Cat
By Lemma 3.1, there is a canonical functor Γ(g) → Γ(gx). By Lemma 3.3, there is
a canonical functor Γ(gx) → Γ(f ) induced by α. The composition gives the desired
functor.
Lemma 3.5. Suppose that σi : Ci → Cat, for i = 1, 2, 3, are three functors and
suppose that f : C2 → C1 and g : C2 → C3 are functors too. There is an induced
σ4
functor C4 := C1 qC2 C3 −→
Cat. Taking Grothendieck constructions yeilds the
THE BOX MONADS
diagram
Gr(σ1 ) VV
VVVV
q8
q
VVVV
q
qq
VV+
Gr(σ2 ) VV
Gr(σ4 )
VVVV
qq8
VVVV
q
q
q
VV+
g0
Gr(σ3 )
f0
C
1 WWWWW
7
f ppp
WWWWW
WWWWW pppp
W+
C2 WWWWW
7 C4
WWWWW
p
pp
p
W
p
W
W
p
g
WWW+
p
C3
All of the vertical squares are pullback squares by Lemma 3.1.
The natural map
Γ(σ4 ) −→ Γ(σ1 ) ×Γ(σ2 ) Γ(σ3 )
is an isomorphism.
7