Directory UMM :Journals:Journal_of_mathematics:OTHER:

Theory and Applications of Categories, Vol. 24, No. 4, 2010, pp. 84–113.

MONADS AS EXTENSION SYSTEMS
—NO ITERATION IS NECESSARY
F. MARMOLEJO AND R. J. WOOD
Abstract. We introduce a description of the algebras for a monad in terms of extension systems, similar to the one for monads given in [Manes, 1976]. We rewrite
distributive laws for monads and wreaths in terms of this description, avoiding the iteration of the functors involved. We give a profunctorial explanation of why Manes’
description of monads in terms of extension systems works.

1. Introduction
For adjoint functors S ⊣ H, it has been well known since [Eilenberg & Moore, 1965]
that monad structures on S are in bijective correspondence with comonad structures on
H. Moreover, it is shown in [Eilenberg & Moore, 1965] that if (S, H) is a corresponding
(monad, comonad) pair then the category of S-algebras is isomorphic to the category of
H coalgebras via a functor that identifies the forgetful functors. After [Street, 1972] it has
been clear that these results of [Eilenberg & Moore, 1965] are actually part of the formal
theory of monads, the definitions making sense in any 2-category and the theorems being
provable in any suitably complete 2-category. It was acknowledged in [Lack & Street,
2002] that the formal theory of monads is easily adjusted to the greater generality of
bicategories, although it suffices to prove most results in a general 2-category. Where
possible we take the latter point of view in this paper.

The bijective correspondence of the nullary data
η:1

/

S
1
ε:H
for monads and comonads is accomplished by a single application of taking mates with
respect to the adjunction S ⊣ H (in any 2-category). For the binary components, it is
useful to consider the correspondence of the data as a three-step mating process:
/

µ : SS
ξ:S
λ : SH
δ:H

/


S
HS
/H
/ HH
/

The second author gratefully acknowledges continuing financial support from the Canadian NSERC.
Received by the editors 2009-10-25 and, in revised form, 2010-04-01.
Transmitted by F. W. Lawvere. Published on 2010-04-03.
2000 Mathematics Subject Classification: 18C15, 18C20, 18D05.
Key words and phrases: extension systems, monads, distributive laws, wreaths, profunctors.
c F. Marmolejo and R. J. Wood, 2010. Permission to copy for private use granted.


84

MONADS AS EXTENSION SYSTEMS —NO ITERATION IS NECESSARY

85


This leads us to contemplate not only monads S = (S, η, µ), and comonads H = (H, ε, δ)
but also 3-tuples (S ⊣ H, η, ξ) and (S ⊣ H, ε, λ). For each of the latter two, it is a
simple matter to determine three equations so that the correspondences of the data above
extend to the resulting equational structures. We give such equations for an (S ⊣ H, η, ξ),
which we then call an extension system, in Section 9. The experienced reader will see
immediately how to prescribe equations making an (S ⊣ H, ε, λ) what we would call a
lifting system, although we will say little, explicitly, about these. We will speak of ξ as an
extension operator, which terminology has already been used, for a special case, in [Manes
& Mulry, 2007].
Suppose that (S ⊣ H, η, ξ) is an extension system on an object C in a bicategory K.
Then, for every A, B : T → C in K, we have the composite functions
K(T, C)(B, SA) → K(T, C)(B, HSA) → K(T, C)(SB, SA)
where the first factor is given by composition with ξA and the second by taking mates with
respect to S ⊣ H. This composite, which we will call (−)S , satisfies equations, which we
will give in Section 2, but no longer requires that S have a right adjoint in K. Accordingly,
we generalize the definition of extension system to include the case where S does not
necessarily have a right adjoint and show in Section 2 that, given η : 1C → S : C → C
in K, there is a bijective correspondence between monads (S, η, µ) and extension systems
(S, η, (−)S ).
In [Manes, 1976], Exercise 1.3, p. 32, monads in Cat were presented as extension

systems in which the data η : 1C → S : C → C on a category C required only that S be
initially given as an object function |S| : |C| → |C| and η as a function defined on |C| with
no a priori naturality requirement. We are able to analyse this simplification in Cat by
considering the canonical embedding of Cat in Pro, the bicategory of profunctors. Here
we use the fact that any category C is, in Pro, the Kleisli object for a canonical monad C
on |C|. We discuss this in Section 9. We remark that when considering extension systems
in Cat, we can always regard the situation as taking place in Pro, where every functor
in Cat has a right adjoint, and exploit the simpler form that extension systems take in
the presence of a right adjoint.
We define algebras for an extension system and, interpolating the aforementioned
theorem of [Eilenberg & Moore, 1965], show that if (S, η, µ) and (S, η, (−)S ) correspond
then the categories of algebras for each are isomorphic via an arrow that identifies the
forgetful arrows. Thus we are able to think of extension systems and their algebras as no
more than an alternate presentation for monads. However, there is an important overarching reason to consider monads in this way. Extension systems allow us to completely
dispense with the iterates SS and SSS of the underlying arrow. No iteration is necessary.
A moment’s reflection on the various terms of terms and terms of terms of terms that
occur in practical applications suggest that this alone justifies the alternate approach. We
give examples in Section 8.
We use the simplicity of the approach to further advance the general theory of monads
with respect to composition of monads via both distributive laws, Sections 4 and 6, and


86

F. MARMOLEJO AND R. J. WOOD

wreaths, Sections 5 and 7. Here we are able to make use of alternate formulations of
distributive laws first given in [Marmolejo, Rosebrugh, Wood, 2002]. In anticipation
of further work, we note that extension systems in higher dimensional category theory
provide an even more important simplification of monads. For even in dimension 2, some
of the tamest examples are built on pseudofunctors that are difficult to iterate.

2. Extension systems in a 2-category
In the Introduction we motivated the idea of an extension system in terms of monad-like
data with underlying arrow S : C → C in a 2-category, in the case that S is part of
an adjunction S ⊣ H. However, it is the non-elementary definition, that we can state
without the assumption of a right adjoint for S, that is most useful for our work. After
a preliminary Definition and Lemma we take this as our starting point.
We work in a 2-category K. Let
= D EE
EET

zz
z
EE
zz
ε
z
E"
z

/E
C
S

(1)

U

be a 2-cell (in K). For any span of arrows (C, D) : T → C;D, pasting ε at S defines a
family of functions
(−)#

D,C : K(T, D)(D, SC) → K(T, E)(T D, U C)
whose effect on d in K(T, D)(D, SC) is the pasting composite
D

/D
EE
y<
EE
y
EET
EE d  yyyS ε
EE
E
y
E"
C
y
"

/E

C

T EE

U

#
This 2-cell, whose full name is d#
D,C , will often be written simply as d . The family of
functions (−)#
D,C respects whiskering at T, meaning that for any X : S → T,

d# X = (dX)#

(2)

and respects blistering at D, meaning that for any b : B → D : T → D,
(db)# = d# · T b
2.1.


Definition. A pasting operator
(−)# : K(T, D)(1, S) → K(T, E)(T, U )

is a family of functions
(−)#
D,C : K(T, D)(D, SC) → K(T, E)(T D, U C)
which respects whiskering and blistering.

(3)

MONADS AS EXTENSION SYSTEMS —NO ITERATION IS NECESSARY

2.2.

87

Lemma. For arrows S, T, U configured as is in (1), pasting operators
K(T, D)(1, S) → K(T, E)(T, U )

are in bijective correspondence with 2-cells T S → U .

Proof. Given a pasting operator (−)# : K(T, D)(1, S) → K(T, E)(T, U ), we have
(1S )#
S,1C : T S → U.
Moreover, it is easy to see that any d : D → SC arises by whiskering 1S at C by C and
blistering the result at SC by d. Thus any (−)# : K(T, D)(1, S) → K(T, E)(T, U ) is
completely determined by (1S )#
S,1C and the latter can be any 2-cell T S → U . It follows
#
that the assignment (−) 7→ (1S )#
S,1C is a bijection.
2.3. Definition. Let C be an object in a 2-category K. An extension system on C
consists of an arrow S : C → C, a 2-cell η : 1C → S, and a pasting operator
(−)S : K(T, C)(1, S) → K(T, C)(S, S)
that we call the S-extension operator. This data is subject to the following equations, for
every C, B, A : T → C, f : B → SA, and g : C → SB,
η S = 1S ,
ηB

B CC / SB
CC

CC
fS
f CC! 
SA,

(4)
(5)

and
SC FF

gS

/

SB

(6)

FF
S
FF
F f
S
(f g)S F" 

SA.

2.4. Theorem. For η : 1C → S : C → C in a 2-category K, there is a bijective correspondence between extension systems (S, η, (−)S ) and monads (S, η, µ).
Proof. By Lemma 2.2 we have a bijection between pasting operators (−)S and 2-cells
µ : SS → S. Let (S, η, µ) be a monad. The correspondence of Lemma 2.2 provides
f S = µA · Sf : SB → SA. Now (4) is one of the unit monad axioms, while (5) is
f S · ηB = µA · Sf · ηB = µA · ηSA · f = f
using the other unit monad axiom, and (6) is
f S · g S = µA · Sf · µB · Sg = µA · µSA · SSf · Sg = µA · SµA · SSf · Sg
= µA · S(µA · Sf · g) = (f S · g)S

88

F. MARMOLEJO AND R. J. WOOD

using monad associativity; so that (S, η, (−)S ) is an extension system.
On the other hand, if (S, η, (−)S ) is an extension system, the correspondence of
Lemma 2.2 provides µ = 1S S . The first monad equation is µ · ηS = 1S S · ηS = 1S
by (5). The second is µ · Sη = 1S S · Sη = η S = 1S , by (3) and (4). Monad associativity is
given by
µ · Sµ = 1S S · Sµ = µS = (1S S )S = 1S S · 1S 2 S = 1S S · 1S S S = µ · µS,
using (2), (3), and (6); so that (S, η, µ) is a monad.
From now on we do not need to distinguish between monads and extension systems.
If (S, η, (−)S ) and (S, η, µ) correspond, we write (S, η, (−)S ) = S = (S, η, µ) and use freely
the equations relating both. Note too that, for b : B → D : T → C, we have
Sb = (ηD · b)S ,

(7)

which we leave as a simple exercise.

3. Algebras for extension systems
Notwithstanding the last paragraph, in the spirit of [Eilenberg & Moore, 1965], we give a
definition of algebras for an extension system.
3.1. Definition. For (S, η, (−)S ) an extension system on C and X an object, both in
K, an (S, η, (−)S )-algebra with domain X is a pair B = (B, (−)B ), where B : X → C and
(−)B : K(T, C)(1, B) → K(T, C)(S, B)
is a pasting operator that we call the B-extension operator, subject to the following equations, for every h : Y → BD and k : Z → SY : T → C,
ηY

/ SY
DD
DD
hB
h DD! 

Y DD

(8)

BD,

kS

/ SY
FF
FF
hB
(hB ·k)B FF# 

SZ FF

(9)

BD.

B

A

A homomorphism p : (B, (−) ) → (A, (−) ) of (S, η, (−)S )-algebras with domain X is a
2-cell p : B → A subject to the following equation, for every h : Y → BD,
hB

/ BD
FF
FF
pD
(pD·h)A FF# 

SY FF

AD.

(10)

MONADS AS EXTENSION SYSTEMS —NO ITERATION IS NECESSARY

89

It is easy to see that (S, η, (−)S )-algebras with domain X and their homomorphisms
form a category K(X, (C, (S, η, (−)S )) equipped with a forgetful functor to K(X, C). We
recall the (S, η, µ)-algebras with domain X as described in [Street, 1972] or [Marmolejo,
1997] and write K(X, (C, (S, η, µ))) for these.
3.2. Theorem. The categories K(X, (C, (S, η, (−)S ))) and K(X, (C, (S, η, µ))) are isomorphic via a functor that identifies the forgetful functors.
Proof. By Lemma 2.2, pasting operators (−)B : K(T, C)(1, B) → K(T, C)(S, B) are in
bijective correspondence with 2-cells β : SB → B. It suffices to show that the equations
for algebras and their homomorphisms in either sense correspond to those in the other
sense. Let (B, (−)B ) be an (S, η, (−)S )-algebra and consider (B, 1B B ), where 1B B arises
from (−)B as in Lemma 2.2. We have 1B B · ηB = 1B by (8), and
1B B · S 1B B = 1B B · (ηB · 1B B )S = (1B B · ηB · 1B B )B = (1B B )B
= 1B B · (1SB )S = 1B B · 1S S B = 1B B · µB,
by (7), (9), (8), (9) and (2). If p : (B, (−)B ) → (A, (−)A ) is a homomorphism of (S, η, (−)S )algebras then we have
1A A · Sp = 1A A · (ηA · p)S = (1A A · ηA · p)A = pA = p · 1B B ,
by (7), (9), (8), and (10), showing that we also have p : (B, (1B )B ) → (A, (1A )A ), a homomorphism of (S, η, µ)-algebras.
On the other hand, if (B, β) is an (S, η, µ)-algebra then, for h : Y → BD : Y → C,
define hB = SY
h, and (9) is

Sh

/

SBD

βD

/

BD. Now (8) is hB ·ηY = βD·Sh·ηY = βD·ηBD·h =

(hB · k)B = βD · SβD · S 2 h · Sk = βD · µBD · S 2 h · Sk
= βD · Sh · µY · Sk = hB · k S .
If p : (B, β) → (A, α) is an (S, η, µ)-homomorphism, then (p ·h)A = α ·Sp ·Sh = p ·β ·Sh =
p · hB establishes (10) showing that we also have an (S, η, (−)S )-homomorphism.
Thus we do not need to distinguish between (S, η, (−)S )-algebras and (S, η, µ)-algebras
and speak simply of S-algebras, freely using all the equations now at hand.

4. The 2-category Mnd(K)
Let K be a 2-category. Recall from [Street, 1972] that an object of the 2-category Mnd(K)
consists of a pair (C, S) where C is an object of K and S is a monad on C, that a 1-cell
from (D, T) to (C, S) consists of a 1-cell F : D → C and a 2-cell λ : SF → F T in K such

90

F. MARMOLEJO AND R. J. WOOD

that the diagrams

ηS F {{{
{
{{
}{{

SF

λ



S 2F

F CC

CC F ηT
CC
CC
!
/ FT

/ SF T

λT

FT2
/

F µT

µS F



SF

/

λ



FT

commute, and that a 2-cell (F, λ) → (F ′ , λ′ ) : (D, T) → (C, S) consists of a 2-cell ϕ : F →
F ′ in K such that the diagram
SF

λ

/ FT
ϕT





SF ′

λ′

/



F ′T

commutes.
In the spirit of Proposition 3.4 in [Marmolejo, Rosebrugh, Wood, 2002] (where it is
done for distributive laws), we have the following lemma.
4.1. Lemma. Given F : D → C, there is a bijection between 2-cells λ : SF → F T making
(F, λ) : (D, T) → (C, S) a 1-cell of Mnd(K) and 2-cells α : SF T → F T making (F T, α)
an S-algebra satisfying the equation
SF T 2

αT

FT2
/

SF µT

F µT



SF T

α

/



F T.

Moreover, if under the given bijection λ and α correspond, given F : D → C, and λ′ and α′
correspond, given F ′ : D → C, then a 2-cell ϕ : F → F ′ gives a 2-cell ϕ : (F, λ) → (F ′ , λ′ )
of Mnd(K) if and only if ϕT : F T → F ′ T is an S-homomorphism.
Proof. If we start with α, then λ = α · SF ηT . In the opposite direction, given λ, define
α = F µT · λT .
Denote the 2-category implicitly defined by the above lemma with 1-cells (F, α) :
(D, T) → (C, S) by Mnd′ (K). Observe that the composition of 1-cells (G, β) : (E, U) →
(D, T) and (F, α) : (D, T) → (C, S) is given by F G together with
SF GU

SF ηT GU

/

SF T GU

αGU

/

F T GU



/

F GU.

4.2. Corollary. The correspondences above define an identity-on-objects isomorphism
of 2-categories Mnd(K) → Mnd′ (K), so that Mnd′ (K) can be regarded as Mnd(K).

MONADS AS EXTENSION SYSTEMS —NO ITERATION IS NECESSARY

91

4.3. Theorem. Let T = (T, ηT , (−)T ) be a monad on D, and let S = (S, ηS , (−)S ) be
a monad on C. A 1-cell in Mnd(K) from (D, T) to (C, S) can equivalently be defined as
follows: (F, (−)λ ) : (D, T) → (C, S) where F : D → C, and (F T, (−)λ ) is an S-algebra,
such that for every u : U → T V : X → D and h : X → F T U : X → C, the diagram


(11)

/ FTU
HH
HH
F uT
H
(F uT ·h)λ HH# 

SX HH

FTV

commutes.

Furthermore, given (F, (−)λ ), (F ′ , (−)λ ) : (D, T) → (C, S), then ϕ : F → F ′ is a 2-cell

in Mnd(K) if and only if ϕT : (F T, (−)λ ) → (F ′ T, (−)λ ) is a morphism of S-algebras.
Proof. According to Theorem 3.2 we have that pasting operators (−)λ : K(X, C)(1, F T )
→ K(X, C)(S, F T ) that make (F T, (−)λ ) an S-algebra are in bijective correspondence
with 2-cells α : SF T → F T that make (F T, α) an S-algebra. So we must show that the
extra equation given in the statement of the theorem is satisfied if and only if the extra
equation given in Lemma 4.1 is satisfied.
Given (F, (−)λ ) as in the statement of the theorem, we have that
α := (1F T )λ : SF T → F T.
The extra equation is F µT · αT = F (1T T ) · (1F T 2 )λ = F (1T T )λ = (1F T λ · ηS F T · F (1T T ))λ =
1F T λ · (ηS F T · F (1T T ))S = α · SF µT . Thus (F, α) : (D, T) → (C, S) is a 1-cell in Mnd′ (K).
In the opposite direction, assume that (F, α) : (D, T) → (C, S) is a 1-cell in Mnd′ (K).
Then for h : X → F T U : X → C we have that
hλ := SX

Sh

αU

/ SF T U

/

F T U.

(12)

For u : U → T V , the commutative diagram
SX

Sh

/

SF T U

αU

/

FTU
FTu

SF T u



SF T 2 V
S(F (uT )·h)

αT V

/



F T 2V
F µT V

SF µT V

%



SF T V



αV

/ FTV

gives us (11).
4.4. Remark. Observe that in the previous theorem we can obtain λ : ST → T S directly
from the pasting operator (−)λ as (F ηT )λ to obtain a 1-cell (F, λ) : (D, T) → (C, S) as
described at the beginning of this section.

92

F. MARMOLEJO AND R. J. WOOD

5. The 2-category EM(K)
Recall from [Lack & Street, 2002] that the 2-category EM(K) has the same objects and 1cells as Mnd(K), but the 2-cells (F, λ) → (F ′ , λ′ ) : (D, T) → (C, S) are 2-cells ρ : F → F ′ T
in K such that the diagram
λ

SF

/

ρT

FT

F ′T 2
/

F ′ µT





SF ′ T

/

λ′ T

F ′T 2

F ′µ



F ′T
/

T

commutes.
5.1. Lemma. If under the bijection given in Lemma 4.1, λ and α correspond, given
F : D → C, and λ′ and α′ correspond, given F ′ : D → C, then a 2-cell ρ : F → F ′ T is a
2-cell ρ : (F, λ) → (F ′ , λ′ ) of EM(K) if and only if the diagram
α

SF T

ρT

/ FT

/ F ′T 2
F ′ µT

SρT



SF ′ T 2

α′ T

/

F ′T 2

/

F ′ µT



F ′T

commutes.
We present the following description of the 2-cells in EM(K).


5.2. Theorem. Given 1-cells (F, (−)λ ), (F ′ , (−)λ ) : (D, T) → (C, S) in EM(K), a 2-cell

(F, (−)λ ) → (F, (−)λ ) in EM(K) can be defined as an S-algebra morphism β : (F T, (−)λ ) →

(F ′ T, (−)λ ) such that for every u : U → T V : X → D, the diagram
FTU

βU

/ F ′T U

F uT

F ′ uT





FTV

βV

/ F ′T V

commutes.
Proof. Assume we have β : F T → F ′ T as in the statement of the theorem. Define
ρ=(F

F ηT

/

FT

β

/ F ′T

).

(13)

MONADS AS EXTENSION SYSTEMS —NO ITERATION IS NECESSARY

93

The commutative diagram
α

F ηT T

βT

/ FT2
77
KKK
77
KK
77
1SF T KKK
%
771F T
SF ηT T
F µT
SF
9s TJJJ 777
s
J
s
7
J
s
JJ 7
F ′ µT
sss
α JJJ77
 sss SF µT
%  
SF T 2KK αT / F T 2 JJF µ / F T HH
HH β
JJ T
KK
HH
JJ
KK
HH
J
K
SβT KK%
βT JJ$
H# 
/
/ F ′T
′ 2
′ 2
SF T
FT

SF TKK

/

F T7

/ FT2

α′ T

F ′ µT

gives us the equation in Lemma 5.1.
In the opposite direction, assume that ρ : (F, λ) → (F ′ , λ) : (D, T) → (C, S) satisfies
the equation in Lemma 5.1. Define
ρT

β := (F T

/

F ′T 2

F ′ µT

/ F ′ T ).

(14)

Then the commutative diagram
α

SF T

ρT

/ FT

/

F ′T 2
F ′ µT

SρT



SF ′ T 2JJ

α′ T

F ′µ



T

/ F ′T
u:
u
u
uu
uu α′
u
u

/ F ′T 2

JJ
JJ
J
SF ′ µT JJ%

SF ′ T

tells us that β : (F T, α) → (F ′ T, α′ ) is a morphism of S-algebras, and for u : U → T V the
commutative diagram
FTU
FTu



F T 2V
F µT V

ρT U

ρT 2 V

F ′T 2u

ρT V



/ F ′T 3V

F ′ T µT



FTV

/ F ′T 2U

V

F ′ µT U
F ′ µT T V



/ F ′T 2V

F ′ µT V

/

F ′T U

 F Tu

F ′T 2V
/
/



F ′ µT V

F ′T V

tells us that βV · F uT = F ′ uT · βU .

6. Distributive laws
We recall the characterization of distributive laws given in Proposition 3.5 of [Marmolejo,
Rosebrugh, Wood, 2002].

94

F. MARMOLEJO AND R. J. WOOD

6.1. Proposition. Given monads T and S on C in a 2-category K, there is a bijective correspondence between distributive laws λ : ST → T S of S over T and S-algebras
α : ST S → T S that satisfy the commutativity of the diagrams
ST S 2

ST µS

/ ST S
α

αS



T S2

T µS

/

S2

/

T S,

S
λS

/

ηT S

T S2

/



ST ST S

αT S

/ T ST S T α /

T 2S
µT S



T S,
T µS

/

SµT S

α



ST ηS T S

ST 2 S

ST S

µS



given by λ 7→ (ST S

SηT S

/

ST S

/

α

T S) with inverse α 7→ (ST

ST ηS

/

ST S



T S,

α

/

T S).

6.2. Theorem. Let T = (T, ηT , (−)T ) and S = (S, ηS , (−)S ) be monads on C. A distributive law of S over T can equivalently be given as follows. An S-algebra (T S, (−)λ ),
such that
(T ηS · ηT )λ = ηT S,
(15)
and the commutativity of the diagram:
SX GG



/ T SU

GG
GG
GG
λ
T
((r ) ·h)λ G#

(16)

(rλ )T



T SV,

for every h : X → T SU and r : U → T SV .
Proof. Assume (T S, (−)λ ) given with the stated properties. We show first that (T, (−)λ ) :
(C, S) → (C, S) is a 1-cell in Mnd(K). Indeed, for u : U → SV we have
T (uS ) = (ηT SV · uS )T = ((T ηS V · ηT V )λ · uS )T = (((T ηS V · ηT V )λ · u)λ )T ,
using (7), (15) and (9). Now a direct use of (16) produces (11).
The corresponding 2-cell α = 1T S λ is, according to Theorem 4.3, an S-algebra and it
satisfies the first of the equations in Proposition 6.1. The second one is given by
α · SηT S = 1T S λ · (ηS T S · ηT S)S = (1T S λ · ηS T S · ηT S)λ = (ηT S)λ
= ((T ηS · ηT )λ )λ = (T ηS · ηT )λ · 1S S = ηT S · µS ,
whereas the third is
α · SµT S = 1T S λ · (ηS T S · µT S)S = (1T S λ · ηS T S · µT S)λ = (µT S)λ = (1T S T )λ
= ((1T S λ · ηS T S)T )λ = (((1T S λ )T · ηT ST S · ηS T S)T )λ
= ((1T S λ )T · (ηT ST S · ηS T S)T )λ = ((1T S λ )T · T ηS T S)λ
= (((1T S λ )T )λ · ηS T ST S · T ηS T S)λ = ((1T S λ )T )λ · (ηS T ST S · T ηS T S)S
= ((1T S λ )T )λ · ST ηS T S = (1F T λ )T · 1T ST S λ · ST ηS T S = αT · αT S · ST ηS T S
= (1T S T · ηT T S · α)T · αT S · ST ηS T S = 1T S T · (ηT T S · α)T · αT S · ST ηS T S
= µT S · T α · αT S · ST ηS T S.

95

MONADS AS EXTENSION SYSTEMS —NO ITERATION IS NECESSARY

In the opposite direction, assume we have an S-algebra α : ST S → T S that satisfies
the conditions of Proposition 6.1. Its corresponding pasting operator in h : X → T SU is
given by
Sh /
αU /
T SU,
SX
ST SU
and produces a 1-cell (T, (−)λ ) : (C, S) → (C, S). Then
(T ηS · ηT )λ = α · ST ηS · SηT = α · SηT S · SηS = ηT S · µS · SηS = ηT S,
and for h : X → T SU and r : U → T SV , the commutative diagram
SX

Sh

/

αU

ST SU
1ST ST SV

ST Sr



ST ST SV
S((rλ )T ·h)

ST αV



/

ST ST SV UUU

ST µS T SVhhhh4

/

ST ηS ST SV ST S
ST SαV

ST 2 SV
" 

/ T SU

SµT SV

/

ST ηS T SV

2

T SV

hhh
hhhh

αST SV

T S 2 T SV
/

T SαV



ST ST SV

αT SV

/

T Sr

UαT
UUUSV
UUUU
*

/ T ST SV

T µS T SV



T ST SV

T αV

T αV

µT SV

ST SV

αV



T 2 SV
/
/



T SV,

tells us that (rλ )T · hλ = ((rλ )T · h)λ .
The proofs of the next two propositions are left to the reader.
6.3. Proposition. Given a distributive law λ of S over T, the composite monad is
given by T ◦λ S = (T S, T ηS · ηT , ((−)λ )T ).
There is also a result closer to “compatible structures”:
6.4. Proposition. Let S and T be monads on C. There is a bijection between distributive laws of S over T and monad structures (T S, T ηS ·ηT , (−)(TS) ) on T S such that for every
k : Y → SX, T (k S ) = (ηT SX · k)(TS) , and for every m : Y → T SX and h : X → T SU ,
h(TS) = (h(TS) · ηT SX)T , and the diagram
mT

/ T SX
HH
HH
h(TS)
H
(h(TS) ·m)T HH# 

T Y HH

T SU

commutes.

96

F. MARMOLEJO AND R. J. WOOD

7. Wreaths
Recall from [Lack & Street, 2002] that given a monad S = (S, η, µ) on an object C of K
and a 1-cell T : C → C, a wreath consists of 2-cells
σ : 1C → T S,

ν : T 2 → T S,

λ : ST → T S,

that satisfy the commutativity of the following diagrams:

ST

|
ηT ||
|
|
|
}||

BB T η
BB
BB
!
/ TS

λ
σS

S


ST S

/

λS


/

T S2
T 2S o

/




/

T S2




ST

/ TS

λ
λT

ST 2



/ T ST

νS

/ T 2S

T S2
/









TS

ST S
σT

T ST o

/ T S2

λS


T3

xT
11
xx
x
11
νS
xx
11
xx

x
1
xx
2
xxT η
T η 11 T S
x
11
x
11 T µ xxxx
x
1  |xx

T1

λS

ST S







/

µT

T S2
/



S 2T

T BB

/



νS

T 2S
/



TS

T S2
/

νT



T ST







2

TS

T S

νS

/

T S2

/





TS

7.1. Proposition. Let S be a monad on C and T : C → C be a 1-cell in K. Fix a
2-cell σ : 1C → T S. There is a bijective correspondence between pairs of 2-cells (λ : ST →
T S, ν : T 2 → T S) making (σ, λ, ν) a wreath, and pairs (α : ST S → T S, γ : T 2 S → T S)
such that (T S, α) is an S-algebra and the following diagrams commute:
ST S 2

αS

T S2
/



ST µ



ST S
T BB



/ T 2S

BB
BB
γ
T η BB! 

T S,

α

/

σS

S

T S2
/



T S,

ST S

T ST
O S



α

/ T 2S
γ

σT S

TS

1T S

T 2 ST S

/



αT S

ST 2 S

T ST S



/



T 2S
γ

T 3S



/

T S,

/ T ST S T α /

T 2S
γ



T 2α



γ



ST α



/

T 2S

ST ST S

T S,

γT S

/ T S2




T S,
/

γS

T 2µ







T 2S 2

/

T 2S



γ

/ TS

/

ST S

α

/



T S,

97

MONADS AS EXTENSION SYSTEMS —NO ITERATION IS NECESSARY

7.2. Theorem. Given a monad S = (S, η, (−)S ) on C in K and a 1-cell T : C → C, a
wreath can be equivalently defined as follows:
1. A 2-cell σ : 1C → T S in K.
2. A 1-cell (T, (−)s ) : (C, S) → (C, S) in Mnd(K).
3. A pasting operator (−)t : K(X, C)(1, T S) → K(X, C)(T, T S).
4. For every A, (σA)t = T ηA, and for every f : B → T SA, h : B → SA the diagrams
B

σB

/

σB

B EE / T SB
EE
EE
(f s )t
E
f EE" 
T SA

T SB
T hS

h



SA

(σA)s

/



T SA

(17)

commute.
5. For every g : C → T SB, h : B → SA, k : C → B and f : B → T SA the diagrams
gt

(18)

/ T SB
GG
GG
T hS
G
(T hS ·g)t GG# 

T C GG

T SA

commute.
6. For every f : B → T SA and g : C → T SB, the diagrams
SC GG

gs

/

T SB

GG
GG
(f s )t
G
s
t
((f ) g)s GG# 

T SA

gt

/ T SB
GG
GG
(f s )t
G
((f s )t g)t GG# 

T C GG

(19)

T SA

commute.
Proof. We know that 2-cells α : ST S → T S correspond to the pasting operators (−)s ,
and that 2-cells γ : T 2 S → T S correspond to the pasting operators (−)t according to
Lemma 2.2.
Assume that we have the conditions of the statement of the theorem. Then α = 1T S s
and γ = 1T S t . We check that the conditions of Proposition 7.1 are satisfied. The fact that
(T, (−)s ) : (C, S) → (C, S) is a 1-cell in Mnd(K) means, according to Theorem 4.3, that
(T S, α) is an S-algebra and that the first of the diagrams in Proposition 7.1 commutes.
The second is T µ · σS = T (1S S ) · σS = σ s = (1T S s · ηT S · σ)s = 1T S s · (ηT S · σ)S = α · Sσ,
using (17). The third is T µ · γS = T (1S S ) · 1T S 2 t = (T µ)t = 1T S t · T 2 µ = γ · T 2 µ, using (18)
and the fact that (−)t respects blistering. The fourth is γ ·T σ = 1T S t ·T σ = σ t = T η using

98

F. MARMOLEJO AND R. J. WOOD

the fact that (−)t respects blistering. The fifth is γ · T α · σT S = 1T S t · T (1T S s ) · σT S =
(1T S s )t · σT S = 1T S , using (17). The sixth is γ · T α · αT S = (1T S s )t · 1T ST S s = ((1T S s )t )s =
(αt )s = (γ · T α)s = (γ s · ηT 2 S · T α)s = γ s · (ηT 2 S · T α)S = α · Sγ · ST α. And the last is
γ · T α · γT S = αt · 1T ST S t = (1T S s )t · 1T ST S t = ((1T S s )t )t = (αt )t = (γ · T α)t = γ t · T 2 α =
γ · T γ · T 2 α.
In the opposite direction assume we have σ : 1C → T S, α : ST S → T S and γ : T 2 S →
T S that satisfy the conditions of Proposition 7.1. Then for f : B → T SA we have that
f s = αA · Sf , and f t = γA · T f , that is, (−)s is the pasting operator corresponding
to α and (−)t is the pasting operator corresponding to γ. The fact that (T S, α) is an
S-algebra together with the first commutative diagram of Proposition 7.1 means that
(T, (−)s ) : (C, S) → (C, S) is a 1-cell in Mnd(K). Now, (σA)t = γA · T σA = T ηA, using
the triangle from Proposition 7.1. Furthermore
T (hS ) · σB = T µA · T Sh · σB = T µA · σSA · h = αA · SσA · h = (σA)s · h,
using the second commutative diagram from Proposition 7.1, and
(f s )t · σB = γA · T αA · T Sf · σB = γA · T αA · σT SA · f = f,
using the fifth commutative diagram of Proposition 7.1 give us (17). (18) is given by
T (hS ) · g t = T µA · T Sh · γB · T g = T µA · γSA · T 2 Sh · T g
= γA · T 2 µA · T 2 Sh · T g = (T (hS ) · g)t
using the third commutative diagram from Proposition 7.1. Finally, the commutative
diagrams
SC

Sg

/ ST SB

αB

/ T SB

ST ST SA

αT SA /

T 2 SB


T ST SA

T 2 ST SA

T αA





ST 2 SA

T 2 SA

SγA

T ((f s )t ·g)

αA

/



T SA,

γB

/

T SB
T Sf

γT SA

/



T ST SA

T 2 αA

T αA





T 3 SA

γA

 

ST SA

/

T 2 Sf



ST αA
S((f s )t ·g)

Tg

T Sf

ST Sf



TC

T 2 SA

T γA

γA

 

T 2 SA

γA

/



T SA,

give us (19).

8. Monads, algebras, distributive laws and wreaths in Cat
What we have been calling extension systems were first described by E. Manes as an
alternative definition for monads on categories in [Manes, 1976]. Manes recognized, in

MONADS AS EXTENSION SYSTEMS —NO ITERATION IS NECESSARY

99

giving a monad S on a category C as an extension system, that a mere function |S| : |C| →
|C| and a mere C-arrow valued function η, defined on |C| with no a priori naturality
requirement, sufficed in the presence of an extension operator. Thus fewer axioms are
required for extension systems on categories but we do have to show the naturality of
the transformations that we introduce. However, formally it is very similar to what we
have done so far in a general 2-category, and most of the proofs are similar to the proofs
already given. Thus, in this section we present the precise statements for this important
particular case and give the extra arguments necessary for the naturality of the various
transformations. In the next section, we analyze the extra structure on Cat that enables
the description of extension systems as functions, in terms of profunctors.
First we recall Exercise 1.3.12, page 32, of [Manes, 1976]:
8.1. Theorem. A monad S on a category C can be defined as follows: A function
|S| : |C| → |C|, for every A ∈ C, an arrow ηA : A → SA, and for every morphism
f : B → SA in C, an S-extension f S : SB → SA subject to the axioms: for every A in C,
(ηA)S = 1SA ,
for every f : B → SA in C and g : C → SB, the diagrams
ηB

B CC / SB
CC
CC
fS
f CC! 
SA,

gS

/ SB
EE
S
EE
E f
(f S ·g)S E" 

SC EE

SA

commute.
Recall then that for ℓ : B → A, we can define S on ℓ by the formula Sℓ = (ηA · ℓ)S ,
and that this makes S : C → C a functor and η : 1C → S a natural transformation. And
the definition of µA is given by µA = 1SA S .
8.2. Theorem. Given a monad S = (S, η, (−)S ) on the category C, an S-algebra can be
defined as follows: B = (B, (−)B ), where B is an object of C, and (−)B assigns to every
arrow of the form h : X → B in C, an extension hB : SX → B subject to the commutativity
of the following diagrams (with h : X → B and y : Y → SX):
ηX

X CC / SX
CC
CC
hB
h CC! 
B,

SY FF

yS

/ SX

FF
FF
B
FF h
" 

(hB y)B

B.

A morphism of S-algebras (B, (−)B ) to (A, (−)A ) can be defined as an arrow ℓ : B → A in
C subject to the commutativity of the diagram (where h : X → B):
hB

/B
DD
DD
D ℓ
(ℓ·h)A D" 

SXDD

A.

100

F. MARMOLEJO AND R. J. WOOD

Proof. Given (B, (−)B ) define the action by 1B B : SB → B. On the other hand, given
an S-algebra (B, β) and h : X → B in C, define hB = β · Sh.
8.3. Theorem. Let S = (S, ηS , (−)S ) and T = (T, ηT , (−)T ) be monads on the category
C. A distributive law of S over T can be defined as follows. For every A in C an Salgebra (T SA, (−)λ ) such that for every A in C, (T ηS A · ηT A)λ = ηT SA, and for every
f : B → T SA, (f λ )T : (T SB, (−)λ ) → (T SA, (−)λ ) is a morphism of S-algebras.
Proof. Given the conditions of the theorem define αA = 1T SA λ . We show that α : ST S →
T S is natural. So take ℓ : B → A. Observe that
T Sℓ = (ηT SA · Sℓ)T = ((T ηS A · ηT A)λ · (ηS A · ℓ)S )T
= ((T ηS A · ηT A)λ · ηS A · ℓ)λ )T = ((T ηS A · ηT A · ℓ)λ )T .
Thus
T Sℓ · αB = ((T ηS A · ηT A · ℓ)λ )T · 1T SB λ = (((T ηS A · ηT A · ℓ)λ )T )λ = (T Sℓ)λ
= (1T SA λ · ηS T SA · T Sℓ)λ = 1T SA λ · (ηS T SA · T Sℓ)S = αA · ST Sℓ,
and α is natural.
8.4. Theorem. Given a monad S = (S, η, (−)S ) on a category C and an endofunctor
T : C → C, a wreath can be equivalently given as follows:
1. For every A in C, an arrow σA : A → T SA.
2. For every A, B in C, functions
C(SB, T SA) o

(−)s

C(B, T SA)

(−)t

/

C(T B, T SA)

3. For every A, (T SA, (−)s ) is an S-algebra and T (hS ) : (T SB, (−)s ) → (T SA, (−)s )
is a morphism of S-algebras for every h : B → SA. That is, the diagrams
B EE

ηB

/ SB

SC GG

kS

/

SB

GG
GG
fs
G
s
(f k)s GG# 

EE
EE
fs
f EE" 

T SA

T SA

gs

/ T SB
GG
GG
T (hS )
G
(T (hS )g)s GG# 

SC GG

(20)

T SA

commute for every f : B → T SA, g : C → T SB, and k : C → SB.
4. For every A we have that (σA)t = T ηA, and for every f : B → T SA, h : B → SA
the diagrams
σB /
σB
(21)
T SB
B EE / T SB
B
T (hS )

h



SA
commute.

(σA)s

/



T SA

EE
EE
(f s )t
E
f EE" 

T SA

MONADS AS EXTENSION SYSTEMS —NO ITERATION IS NECESSARY

101

5. For every g : C → T SB, h : B → SA, k : C → B and f : B → T SA, the diagrams
T C GG

gt

/

T SB

GG
GG
T (hS )
G
(T (hS )g)t GG# 

Tk

/ TB
GG
GG
ft
G
(f ·k)t GG# 

T C GG

T SA

(22)

T SA

commute.
6. For every f : B → T SA and g : C → T SB, the diagrams
SC GG

gs

/

T SB

GG
GG
(f s )t
G
s
t
((f ) g)s GG# 

T SA

gt

/ T SB
GG
GG
(f s )t
G
((f s )t g)t GG# 

T C GG

(23)

T SA

commute.
Proof. For A ∈ C, take σA as given and define αA := 1T SA s and γA := 1T SA t . We show
first that σ is natural. Take ℓ : B → A in A, then
T Sℓ · σB = T ((ηA · ℓ)S ) · σB = (σA)s · ηA · ℓ = σA · ℓ,
using (21) and (20). For the naturality of α we have:
T Sℓ · αB = T ((ηS A · ℓ)S ) · 1T SA s = (T Sℓ)s = (1T SA s · ηS T SA · T Sℓ)s
= 1T SA s · (ηS T SA · T Sℓ)S = αA · ST Sℓ,
using the equations of (20). And for the naturality of γ we have
T Sℓ · γB = T ((ηS A · ℓ)S ) · 1T SB t = (T Sℓ)t = γA · T 2 Sℓ.

8.5. Example. Beck’s original example [Beck, 1969] has S the free monoid monad and
T the free abelian group monad. Thus SA is the underlying set of the free monoid in A,
SA = {[a1 , . . . , an ]|n ∈ N, aj ∈ A, j = 1, . . . , n},
ηS : A → SA is such that
ηS (a) = [a],
and for h : A → SB, we have that
hS ([a1 , . . . , an ]) = h(a1 ) ∼ h(a2 ) ∼ · · · ∼ h(an ),

102

F. MARMOLEJO AND R. J. WOOD

where ∼ denotes concatenation ([b1 , . . . , bk ] ∼ [c1 , . . . , cℓ ] = [b1 , . . . , bk , c1 , . . . , cℓ ]). On
the other hand, T A is the underlying set of the free group with A generators. Thus the
elements of T A are formal sums
X
na · a
a∈A

with na ∈ Z for every a ∈ A, and only a finite number of the na are non-zero. ηT A : A →
T A is such that
ηT A(c) = 1 · c,

and for k : A → T B, k T : T A → T B is
kT

X

!

na · a

a∈A

=

X

na k(a),

a∈A

where this last sum is taken in the abelian group T B.
Now, T SB has a monoid structure given by
!
!
X
X
X
mw · w ∗
nw · w =
w∈SB

w∈SB

w∈SB

X

mu nu

u∼v=w

!

· w.

Thus, given f : A → T SB, we define f λ the unique monoid morphism f λ : SA → T SB
such that
ηS A

/ SA
EE
EE

E
f EE" 

A EE

T SB

λ

commutes. That is, f ([a1 , . . . , an ]) = f (a1 ) ∗ f (a2 ) ∗ · · · ∗ f (an ). Let g : C → T SB and
P
(i)
take [c1 , . . . , cn ] ∈ SC. Assume that g(ci ) = w∈SB kw · w for i = 1, . . . , n. Then
!
!
X
X
λ T λ
(n) λ
(1) λ
kw f (w) .
kw f (w) ∗ · · · ∗
((f ) g) ([c1 , . . . , cn ]) =
w∈SB

w∈SB

On the other hand

(f λ )T (g λ ([c1 , . . . , cn ])) =

X

w∈SB

X

w1 ∼···∼wn =w

kw(1)1 · · · kw(n)
n

!

f λ (w).

It takes just a moment to realize that to see that these are the same, it suffices to show
that the operation ∗ distributes over the addition in T SA, but this is easy.
Then the calculation
(ηT SA · ηS A)λ ([a1 , . . . , an ]) = ηT SA · ηS A(a1 ) ∗ · · · ∗ ηT SA · ηS A(an )
= (1 · [a1 ]) ∗ · · · ∗ (1 · [an ])
= 1 · [a1 , . . . , an ]
= ηT SA([a1 , . . . , an ])

MONADS AS EXTENSION SYSTEMS —NO ITERATION IS NECESSARY

103

shows that we have a distributive law.
We have that λA = (T ηS A)λ : ST A → T SA,
"
#!
!
!
X
X
X
X
λA
n(1)
n(r)
= T ηS A
n(1)
∗ · · · ∗ T ηS A
n(r)
a · a, . . . ,
a ·a
a ·a
a ·a
a∈A

a∈A

a∈A

X

=

!

n(1)
a · [a]

a∈A

X

=

a∈A

X

∗ ··· ∗

n(r)
a · [a]

a∈A

!

(r)
n(1)
a1 · · · nar · [a1 , . . . , ar ]

[a1 ,...,ar ]

as expected.
8.6. Example. Another example from [Beck, 1969] has T arbitrary on C with coproducts, and S the constants monad. (It is done for the category of sets in Beck’s paper but
it works in the given context.) That is, take a fixed object C in C, define for every A,
SA = A + C, ηS A = iA : A → A + C the canonical injection of the first summand, and for
h : A → SB define hS : SA → SB as the unique arrow such that the diagram
ηS A

A+C o

/

iC

C
FF
ww
w
S
FF
w
h
w
F
ww
h FF#  w
{ w iC

A FF

B+C

commutes.
Given f : A → T SB = T (B + C), define f λ : A + C → T SB as the unique arrow that
makes the diagram
A OOO

ηS A

/A+C o

OOO
OOO
O
f OOO'

iC

C



iC



T (B + C) o



ηT (B+C)

B+C

commute. The commutative diagram
A

ηS A

/

ηS A



A+C

ηT (A+C)

/

iC

A+C o


C

(ηT (A+C)·ηS A)λ

T (A + C) o η

iC



T

(A+C)

A+C

tells us that (ηT (A + C) · ηS A)λ = ηT (A + C). For h : A → SB and g : B → T (D + C),

104

F. MARMOLEJO AND R. J. WOOD

the commutative diagram
A JJ

ηS A

/A+C o

JJ
JJ
JJ
h JJ%

hS



pC
ppp
p
p
iC
ppp

xppp iC

B+C

gλ h





$

iC

D+C

q
qqq
q
q
q
xqqqηT (D+C)

T (D + C)

tells us that (g λ · h)λ = g λ · hS . And the commutative diagram
ηS A

iC

/A+C o
PPP
PPP

P
f PPP'


A PPPP

T (B + C) o

(g λ )T f

nC
nnn

iC nnnn

ηT (B+C)

mm
mmm
m
m
λ
T
m
(g )
mmm
vmmm gλ

&
T (D + C) o

B+C

n
nnn
vnnn

iC



D+C

ηT (D+C)

tells us that ((g λ )T · f )λ = (g λ )T · f λ . Therefore we have a distributive law, where
λA : ST A → T SA is the unique arrow that makes the diagram
T A PPP

iT A

/

TA + C o

PPP
PPP
T iA PPP'

iC

C
iC

λA



T (A + C) o



ηT (A+C)

A+C

commute.
8.7. Example. Another example from [Beck, 1969] is to take a monoid M and the
monad M it defines on Set. That is, to every set A we assign the set M × A, ηM A : A →
M ×A is ηM (a) = (e, a), where e is the unit element of M , and for f = hf1 , f2 i : B → M ×A
we define
f M (m, b) = (m ∗ f1 (b), f2 (b))
where ∗ : M × M → M is the multiplication of the monoid. It is clear that f M · ηM B = f ,
and if g = hg1 , g2 i : C → M × B and (m, c) ∈ M × C, we have that
f M (g M (m, c)) = f M (m ∗ g1 (c), g2 (c)) = ((m ∗ g1 (c)) ∗ f1 g2 (c), f2 g2 (c)),
whereas (f M g)M (m, c) = (m ∗ (g1 (c) ∗ f1 g2 (c)), f2 g2 (c)), so g M f M = (g M f )M . Given any
monad T on Set and f : A → T (M × B) define f λ : M × A → T (M × B) as
f λ (m, a) = T (m ∗ (−) × B)(f (a)).

MONADS AS EXTENSION SYSTEMS —NO ITERATION IS NECESSARY

105

By the naturality of ηT , we have
(ηT (M × A) · ηM A)λ (m, a) = T (m ∗ (−) × A)((ηT (M × A) · ηM A)(a))
= (T (m ∗ (−) × A) · ηT (M × A))(e, a)
= ηT (M × A)(m ∗ (−) × A)(e, a)
= ηT (M × A)(m, a).
Furthermore (f λ ·ηM A)(a) = f λ (e, a) = T (e∗(−)×B)(f (a)) = f (a). For g = hg1 , g2 i : C →
M × A and (m, c) ∈ M × C we have
(f λ g M )(m, c) = f λ (g M (m, c)) = f λ (m ∗ g1 (c), g2 (c)) = T (m ∗ g1 (c) ∗ (−) × A)(f (g2 (c)))
= T (m ∗ (−) × A)(T (g1 (c) ∗ (−) × A)(f (g2 (c))))
= T (m ∗ (−) × A)((f λ g)(c)) = (f λ g)λ (m, c).
It is not hard to show that for any m ∈ M , f λ ◦ (m ∗ (−) × B) = T (m ∗ (−) × A) ◦ f λ .
Then for h : C → T (M × A) and (m, c) ∈ M × C we have
((f λ )T h)λ (m, c) = (T (m ∗ (−) × A) · (f λ )T )(h(c))
= ((ηT (M × A) · (m ∗ (−) × A))T · (f λ )T )(h(c))
= (((ηT (M × A) · (m ∗ (−) × A))T · f λ )T )(h(c))
= ((T (m ∗ (−) × A) · f λ )T )(h(c)) = (f λ · (m ∗ (−) × B))T (h(c))
= ((f λ )T · ηT (M × B) · (m ∗ (−) × B))T (h(c))
= ((f λ )T · T (m ∗ (−) × B))(h(c)) = ((f λ )T · hλ )(m, c).
We thus have a distributive law of M over T.
8.8. Example. An example taken from [Varacca, 2003] has the monad P on Set of
finite non-empty subsets, whose structure is given by, for any set X, P X = {X0 ⊆ X|X0
finite non-empty},
ηP X : X → P X is ηP X(x) = {x}, and for any function f : Y → P X,
S
f P (Y0 ) = y∈Y0 f (y).
On the other hand we have the monad V on Set of indexed valuations, whose structure is given as follows. For a set X, V (X) has as elements equivalent classes of spans
(0, ∞) o
(0, ∞) o

r
r′

K
K′

χ
χ′

/

/X

in Set with K finite, and the given span is equivalent to the span

X iff there is a bijection κ : K → K ′ such that the diagram
rkk K PP χ
PPP
ukkkk
P(
κ
(0, ∞) iS
6X
n
SSS  nnn n
S
n χ′
r′

K′

commutes. The arrow ηV X : X → V (X) is such that the span associated to x ∈ X is
(0, ∞) o

p1q

1

pxq

/ X.

106

F. MARMOLEJO AND R. J. WOOD

Take a function f : Y → V (X). For y ∈ Y denote the span f (y) by (0, ∞) o
q

Define f V : V (Y ) → V (X) on the span (0, ∞) o
`

r

(0, ∞) o

j∈J

ψ

J

Kψ(j)

χ

/

ry

Ky

χy

/

X.

as the span

/Y

X,

where r and χ are the unique functions such that the diagram
rψ(j)

(0, ∞) o

Kψ(j)
incj

q(j)·−



(0, ∞) o

r

`


j∈J

LLL
LLχLψ(j)
LLL
LLL
/&

Kψ(j)

X

χ

commutes for every i ∈ I. Thus for k ∈ Kψ(j) we have χ(k) = χψ(j) (k) and r(k) =
q(j) · rψ(j) (k).
It is clear that f V ◦ ηV Y = f , and for g : Z → V (Y ) write g(z) as
qz

(0, ∞) o
Then f V g V on the span (0, ∞) o

p

ζ

I
r

(0, ∞) o

j∈

/

a

`

i∈I

ψz

Jz

(24)

/ Y.

Z is the span
Kψζ(i) (j)

χ

X,
/

Jζ(i)

where for a k ∈ Kψ(j) with j ∈ Jζ(i) we have
ξ(k) = ξ ψ

ζ(i) (j)

(k)

and

r(k) = p(i) · q ζ(i) (j) · rψ

ζ(i) (j)

(k).

On the other hand, (f V g)V on the same span gives us
(0, ∞) o

r′

a a

Kψζ(i) (j)

χ′

i∈I j∈Jζ(i)

/

X

where for a k ∈ Kψζ(i) (j) with j ∈ Jζ(i) and i ∈ I we have
ξ ′ (k) = ξ ψ

ζ(i) (j)

(k)

and

r′ (k) = p(i) · q ζ(i) (j) · rψ

ζ(i) (j)

Then the canonical isomorphism

j∈

a

`

Kψζ(i) (j)

i∈I Jζ(i)



/

a a

i∈I j∈Jζ(i)

Kψζ(i) (j)

(k).

MONADS AS EXTENSION SYSTEMS —NO ITERATION IS NECESSARY

107

shows that these spans are the same element of V (X). That is, the diagram
V (Z)H

gV

/ V (Y )
HH
HH
HH
fV
V
(f g)V HH$


V (X)

commutes. We have then shown that we have a monad V.
We now give the distributive law. Take h : Y → P (V (X)), and take a span
ψ

q

/ Y.
(0, ∞) o
J
S
For every choice function ℓ : J → j∈J h(ψ(j)) (that is, ℓ(j) ∈ h(ψ(j))), if ℓ(j) is the span

(0, ∞) o

rj

χj

Kj

/ X,

for j ∈ J, we form the span S(ℓ, q, ψ) as
(0, ∞) o

r

`

j∈J

Kj

χ

/ X,

where for k ∈ Kj we define χ(k) = χj (k) and r(k) = q(j) · rj (k). We define
[
hλ ((q, ψ)) = {S(ℓ, q, ψ)|ℓ : J →
h(ψ(j)) is a choice function}.
j∈J

We show that this defines a distributive law of V over P. We must show first that
this definition of hλ produces a structure of V-algebra on P (V (X)). We know that
ηV Y (y) = (p1q, pyq). Then a choice function ℓ : 1 → h(y) is simply to pick an element in
h(y). Then S(ℓ, p1q, pyq) is this chosen element, thus hλ ◦ ηV Y = h.
ζ

p

/ Z)) is formed as follows. Assume
Then a typical element in hλ (g V ( (0, ∞) o
I
g(z) is given by (24) for every z ∈ Z. Then for every i ∈ I and every j ∈ Jζ(i) we take an
element
χij
rij
/X
Kij
(0, ∞) o

in h(ψ ζ(i) (j)). Then the element of hλ (g V (p, ζ)) is
`
`
(0, ∞) o
(i,j)∈ i∈I Jζ(i) Kij
r

χ

/

X,

where for k ∈ Kij , χ(k) = χij (k) and r(k) = q ζ(i) (j) · rij (k).
On the other hand, a typical element of (hλ g V )λ (p, ζ) is formed as follows. For every
i ∈ I and j ∈ Jζ(i) take an element
(0, ∞) o

rij

Kij

χij

/

X

108

F. MARMOLEJO AND R. J. WOOD

in h(ψ ζ(i) (j)). Then the element is formed as
` `
(0, ∞) o
i∈I
j∈Jζ(i) Kij

r

/

χ′

X,


ij
where for k ∈ Kij (j ∈ Jζ(i) ) we have
(k) and r′ (k) = p(i) · q ζ(i) (j) · rij (k).
` that
` χ (k) = χ `
The canonical isomorphism i∈I j∈Jζ(i) Kij → (i,j)∈` Jζ(i) Kij then tell us that
i∈I
hλ g V = (hλ g)λ .
The condition (ηP V (X) · ηV X)λ = ηP V (X) is easy, since there is only one possible
choice function for a given element in V (X).
Finally, take k : Z → P (V (Y )) and h : Y → P (V (X)). We must check that (hλ )P k λ =
p

((hλ )P k)λ . Take (0, ∞) o

ζ

I

/

Z in V (Z). Then a typical element of ((hλ )P k λ )(p, ζ)
qi

is formed as follows: for every i ∈ I chose a span (0, ∞) o

Ji

ψi

/

Y in k(ζ(i)), then

χij

r ij

/ X in h(ψ i (j)); then the element in
Kij
for every j ∈ Ji choose a span (0, ∞) o
question is
`
χ
`
/X
(0, ∞) o r
(i,j)∈ i∈I Ji Kij

where for k ∈ Kij , (j ∈ Ji ) we have χ(k) = χij (k) and r(k) = p(i) · q i (j) · rij (k).
On the other hand, a typical element in ((hλ )P k)λ (p, ζ) is formed as follows: for every
i ∈ I we take a span (0, ∞) o
span (0, ∞) o

r ij

Kij

χij

/

qi

Ji

ψi

/

Y in k(ζ(i)), then for every j ∈ Ji we take a

X in h(ψ i (j)); then the element in question is

(0, ∞) o

r′

`

i∈I

`

j∈Ji

Kij

χ′

/

X

where for k ∈ Kij , (j ∈ Ji ) we have χ′ (k) = χij (k) and r′ (k) = p(i) · q i (j) · rij (k).
Therefore, (hλ )P k λ = (hλ k)λ . Thus we have a distributive law.
Compare with the proof given in [Varacca, 2003].
8.9. Example. This one is taken from [Manes & Mulry, 2007]. Let S be the free monoid
monad (described in example 8.5) and let T the submonad of S of nonempty words:
T A = {[a1 , . . . , an ]|n ∈ N\{0}, aj ∈ A, j = 1, . . . , n},
for any set A. Give T SA the following binary operation
[U1 , . . . , Uk ] ∗ [V1 , . . . , Vℓ ] = [U1 , . . . , Uk−1 , Uk ∼ V1 , V2 , . . . , Vℓ ]
where U1 , . . . , Uk , V1 , . . . , Vℓ are elements of SA, and ∼ denotes concatenation. It is immediate to see that T SA with this operation is a monoid. Therefore, if for an f : B → T SA
we define f λ : SA → T SA such that
f λ ([a1 , . . . , an ]) = f (a1 ) ∗ · · · ∗ f (an ),

MONADS AS EXTENSION SYSTEMS —NO ITERATION IS NECESSARY

109

we obtain an S-algebra (T SA, ( )λ ). Now, for [a1 , . . . , ak ] ∈ SA we have
(T ηS A · ηT A)λ ([a1 , . . . , ak ]) = [[a1 ]] ∗ · · · ∗ [[ak ]] = [[a1 , . . . , ak ]] = ηT SA([a1 , . . . , ak ]).
Finally we must show that for f : B → T SA, (f λ )T : T SB → T SA is a monoid morphism
with respect to the operation ∗ on both, T SB and T SA. Let [U1 , . . . , Uk ], [V1 , . . . , Vℓ ] ∈
T SB. Then
(f λ )T ([U1 , . . . , Uk ] ∗ [V1 , . . . , Vℓ ]) = (f λ )T ([U1 , . . . , Uk−1 , Uk ∼ V1 , V2 , . . . , Vℓ ])
= f λ (U1 ) ∼ · · · ∼ f λ (Uk−1 ) ∼ f λ (Uk ∼ V1 ) ∼ f λ (V2 ) ∼ f λ (Vℓ )
and

(f λ )T ([U1 , . . . , Uk ]) ∗ (f λ )T ([V1 , . . . , Vℓ ])
= (f λ (U1 ) ∼ · · · ∼ f λ (Uk )) ∗ (f λ (V1 ) ∼ · · · ∼ f λ (Vℓ ))
= f λ (U1 ) ∼ · · · ∼ (f λ (Uk ) ∗ f λ (V1 )) ∼ · · · ∼ f λ (Vℓ ).

Since it direct to see that f λ (Uk ) ∗ f λ (V1 ) = f λ (Uk ∼ V1 ), we have a distributive law of S
over T.
8.10. Example. We close our set of examples with a wreath from [Lack & Street, 2002].
Take a short exact sequence in the category of groups
1 → A → E → G → 1.
For g ∈ G and a ∈ A denote the action of g on a by ag = g −1 ag ∈ A, and let ρ : G×G → A
be a normalized cocycle corresponding to the extension. Let A be the monad on Set
determined by the group A (as described in example 8.7, there for a monoid M ), and take
the functor T = G × − : Set → Set. For the wreath define σX : X → G × A × X such that
σA(x) = (e, e, x), and for f = hf1 , f2 , f3 i : Y → G × A × X, define f s : A → G × A × X as
f s (a, y) = (f1 (y), af1 (y) · f2 (y), f3 (y)),
and f t : G × Y → G × A × X as
f t (g, y) = (g · f1 (y), ρ(g, f1 (y)) · f2 (y), f3 (y)).
We only verify that the last condition from Theorem 8.4 is satisfied and leave the rest to
the reader. We have that
(f s )t (g, a, y) = (g · f1 (y), ρ(g, f1 (y)) · af1 (y) · f2 (y), f3 (y)).
Thus for ℓ = hℓ1 , ℓ2 , ℓ3 i : Z → G × A × X we have that (f s )t (ℓt (g, z)) is
(g · ℓ1 (z) · f1 ℓ3 (z), ρ(g · ℓ1 (y), f1 ℓ3 (z)) · (ρ(g, ℓ1 (z)) · ℓ2 (z))f1 ℓ3 (z) · f2 ℓ3 (z), f3 ℓ3 (z)),
whereas ((f s )t ℓ)t (g, z) is
(g · ℓ1 (z) · f1 ℓ3 (z), ρ(g, ℓ1 (z) · f1 ℓ3 (z) · ρ(ℓ1 (z), f1 ℓ3 (z)) · ℓ2 (z)f1 ℓ3 (z) · f2 ℓ3 (z), f3 ℓ3 (z)).
The fact that they are equal follows from the cocycle condition
ρ(g · h, k) · ρ(g, h)k = ρ(g, h · k)ρ(h, k)
for g, h, k ∈ G.

110

F. MARMOLEJO AND R. J. WOOD

9. Extension systems in the bicategory of profunctors
In the Introduction we also ment