5 Monads

Suppose we have C⇄GFD, (F⊣G). How much of the adjunction can we describe in terms of C (supposing we can’t know anything about D, or know very little about it)?

We have:

From the triangular identities of Theorem 3.7, we obtain the commutative triangles:

             T       TT          T       T T


(1) :      T1μηT        T(2) :      ηT1Tμ        T
and from naturality of 𝜀 we obtain
               T TT      TT


(3) :       TμμμμT T T       T

Definition 5.1 (Monad). A monad on a category C is a triple (T,η,μ)=𝕋 where T:C→C, and η:1C→T and μ:TT→T satisfy the commutative diagrams

  T       TT


T1μηT        T
  T       TT


η1μTT        T
   TT T      TT

TμμμμT TT        T

Example 5.2.

Does every monad come from an adjunction?

Answered by Eilenberg-Moore and by Kleisli (1965).

Note that the monad of Example 5.2(a) is induced by Set⇄UM×(∙)[M,Set] and that of Example 5.2(b) is induced by Set⇄UPCSLatt, where CSLatt is the category of complete semilattices (posets, with arbitrary joins). The free complete semilattice on A is P(A): every f:A→US extends uniquely to f¯:P(A)→S where f¯(A′)=∨⁡{f(a)|a∈A′}.

An M-set (respectively a complete semilattice) is a set A equipped with a suitable mapping M×A→A (respectively P(A)→∨A).

Definition 5.3 (Eilenberg-Moore algebra). Let 𝕋=(T,η,μ) be a monad on C. By an Eilenberg-Moore algebra for 𝕋 we mean a pair (A,α) where A∈ob⁡C and α:TA→A satisfies

            A        TA             TTA      T A


(4) :      ηA1Aα         A(5) :        TμαααA TA       A
A homomorphism f:(A,α)→(B,β) is a morphism f:A→B satisfying
              TA       TB

(6) :      Tαβff A        B
We write C𝕋 for the category of 𝕋-algebras and homomorphisms.

Proposition 5.4. Assuming that:

Then the forgetful functor C𝕋→G𝕋C has a left adjoint F𝕋, and the adjunction induces the monad 𝕋.

Proof. We define F𝕋A=(TA,μA) (an algebra by (2) and (3)) and F𝕋(A→fB)=Tf (a homomorphism by naturality of μ). Clearly, F𝕋 is functorial and G𝕋F𝕋=T.

We establish the adjunction using Theorem 3.7: its unit is η, and the counit 𝜀(A,α) is just α (a homomorphism F𝕋A→(A,α), by (5), and natural by (6)).

The triangular identity

  F 𝕋        F 𝕋G𝕋F 𝕋

               𝕋
1            F
is just (1), and
  G 𝕋        G 𝕋F𝕋G 𝕋


1            G 𝕋
is (4).

Finally, G𝜀F𝕋A=μ by definition of F𝕋A. So the adjunction induces (T,η,μ). □

Note: C⇄GFD induces 𝕋, we can replace D by its full subcategory on objects FA.

So in trying to construct D, we may assume F is surjective (indeed, bijective) on objects. The morphisms FA→FB in D must correspond to morphisms A→GFB=TB in C.

Definition 5.5 (Kleisli category). Let 𝕋 be a monad on C. The Kleisli category C𝕋 is defined by ob⁡C𝕋=ob⁡C, morphsims A→fB in C𝕋 are morphisms A→fTB in C. The identity A→A is A→ηATA, and the composite of A→fB→gC is A→fTB→TgTTC→μCTC.

For the unit and associative laws, consider the diagrams

  A       TB        TT B


fT1μηTBBB                 TB
  A         T A


  T B       T TB


μfTη1μAfTTBBB         T B
  A       TB        TTC        TT TD      T TD


fTTμTμμTμgTCμTDhDhDD                 TC         TT D       T D

Proposition 5.6. Assuming that:

Then there is an adjunction C⇄G𝕋F𝕋C𝕋 inducing the monad 𝕋.

Proof. We define F𝕋A=A and F𝕋(A→fB)=A→fB→ηBTB. F𝕋 preserves identities by definintion, and preserves composition by

  A      B        TB

         C        TC       T TC


fg1gTηT1μfBgC1TCCC                        T C
We define G𝕋A=TA, and G𝕋(A→fB)=TA→TfTTB→μBTB. G𝕋 preserves identities by (1), and preserves composites by
  T A       TT B       T TTC      T TC


TTμTμμTμfTBμTCgCgCC         TB         T TC       T C
We verify the adjunction using Theorem 3.7: G𝕋F𝕋(f)=Tf by (1) so G𝕋F𝕋=T and we take η as unit of the adjunction.

We define TA→𝜀AA to be TA→1TATA. To verify the naturality square

  TA       TB

F𝜀𝜀f𝕋ABAG𝕋f      B
the lower composite is TA→TfTTB→μBTB and the upper one is TA→TfTTB→μBTB→ηTBTTB→μBTB, which agree since (2) tells us that μBηTB=1B.

The triangular identities become

F𝜀𝕋FηAFA 𝕋A        F= GF A     FA        ηTηT1TηTATTATAAA        TTA        TTT A      TT A
and
ηGG𝜀GAAA         G=F GA     GA  η1ηTTTTAAA A       T TA      TA
Finally, G𝕋𝜀F𝕋A=μA, so (F𝕋⊣G𝕋) induces the monad 𝕋. □

Given a monad 𝕋 on C, we write Adj⁡(𝕋) for the category whose objects are adjunctions (C⇄GFD) inducing 𝕋, and morphisms (C⇄GFD)→(C⇄G′F′D′) are functors D→KD′ satisfying KF=F′ and G′K=G.

Theorem 5.7. The Kleisli adjunction (C⇄C𝕋) is an initial object of Adj⁡(𝕋), and the Eilenberg-Moore adjunction (C⇄C𝕋 is terminal.

Proof. Suppose given (C⇄GFD) in Adj⁡(𝕋). We define K:D→C𝕋 by KB=(GB,G𝜀B) (an algebra by one of the triangular identities for η and 𝜀, and naturality of 𝜀), K(B→gB′)=Gg (a homomorphism by naturality of 𝜀). K is functorial since G is, G𝕋K=G is obvious, and KFA=(GFA,G𝜀FA)=(TA,μA)=F𝕋A.

So K is a morphism of Adj⁡(𝕋).

Suppose K′:D→C𝕋 is another such: then we must have K′B=(GB,βB) where β:GFG→G is a natural transformation since K′g=Gg is a homomorphism K′B→K′B′ for all g:B→B′. Also, since K′F=F𝕋, we have βFA=μA=G𝜀FA for all A.

For any B, we have naturality squares

     GF GF GB      GF GB


GGβGβGF𝜀F𝜀B𝜀GFGBB𝜀GBBBGF GB         GB
whose left edges are equal, and whose top edge is split epic, so we obtain G𝜀B=βB for all B. So K′=K.

We define H:C𝕋→D by HA=FA and H(A→fB)=FA→FfFGFB→𝜀FBFB. H preserves identities and satisfies HF𝕋=F, by the first triangular identity for η and 𝜀.

H preserves the composite A→fB→gC by

  F A        FGF B         FGF GF C     F GF C


FF𝜀F𝜀𝜀F𝜀fGFGFFgFFB𝜀GCCFFgCC        FB            FGF C        F C
Also GHA=GFA=TA=G𝕋A and

GH(A→fB)=(TA→TfTTB→μBTB)=G𝕋(A→fB).

So H is a morphism of Adj⁡(𝕋). Note that H is full and faithful, since it sends A→fGFB to its traspose across (F⊣G).

If H′:C𝕋→D is any morphism of Adj⁡(𝕋), we must have H′A=FA=HA for all A, and since GH′=G𝕋 and the adjunctions have the same unit, H′ must send the transpose A→fB of A→fGFB to its transpose across (F⊣G). So H′=H. □

C𝕋 has coproducts if C does, but has few other limits or colimits. In contrast, we have:

Proposition 5.8. Assuming that:

Then

Proof.

Given (C⇄GFD), (F⊣G), how can we tell when K:D→C𝕋 is part of an equivalence?

Note: H:C𝕋→D is an equivalence if and only if F is essentially surjective.

We call (F⊣F) (or the functor G) monadic if K:D→C𝕋 is part of an equivalence.

Lemma 5.9. Assuming that:

  • C⇄GFD is an adjunction inducing the monad 𝕋 on C

  • for every 𝕋 algebra (A,α), the pair FGFA⇉𝜀FAFαFA has a coequaliser in D

Then K:D→C𝕋 has a left adjoint L.

Proof. Write FA→λ(A,α)L(A,α) for the coequaliser. For any homomorphism f:(A,α)→(B,β) the two left hand squares in

    FGF A     F A        L (A, α)


F𝜀FFλFLF𝜀FλαAG(AffβB(BF,,fα)β)FGF B     F B        L (B, β)
commute, so we get a unique Lf making the right hand square commute. As usual, uniqueness implies functoriality of L.

For any B∈ob⁡D, morphisms L(A,α)→B correspond to morphisms FA→fB satisfying f(Fα)=f𝜀FA. If f¯:A→GB is the transpose of f across (F⊣G), then f(Fα) transposes to f¯α:GFA→GB, whereas f𝜀FA transposes to Gf. But we can write f=𝜀B(Ff¯) by the proof of Theorem 3.7, so Gf=(G𝜀B)(GFf¯). So f(Fα)=f𝜀FA if and only if

   GF A       GF GB


GαGfF𝜀fBA          GB
commutes, which happens if and only if f¯:(A,α)→KB in C𝕋.

Naturality of the bijection follows from that of f↦f¯. □

Note that since G𝕋K=G, we have LF𝕋≅F by Corollary 3.6, and L preserves coequalisers.

Definition 5.10 (Reflexive / split coequaliser diagram / G-split).

  • (a)
    We say a parallel pair A⇉gfB is reflexive if there exists r:B→A with fr=gr=1B. Note that FGFA⇉𝜀FAFαFA is reflexive, with common right inverse FA→FηAFGFA.
  • (b)
    By a split coequaliser diagram, we mean a diagram
    fghts A       B      C
    satisfying hf=hg, hs=1C, gt=1B and ft=sh. If these hold, then h is a coequaliser of (f,g) since if B→kD satisfies kf=kg then k=kgt=kft=ksh, so k factors through h, and the factorisation is unique since h is (split) epic. Note that any functor preserves split coequalisers.
  • (c)
    Given G:D→C, we say a pair A⇉gfB in D is G-split if there’s a split coequaliser diagram
    GGhtsfg GA       GB      C
    in C. The pair (Fα,𝜀FA) in Lemma 5.9 is G-split, since
    GGαηηFGA𝜀FFαAA GF GF A     GF A     A
    is a split coequaliser diagram in C.

Theorem 5.11 (Precise Monadicity Theorem). A functor G:D→C is monadic if and only if G has a left adjoint and creates coequaliser of G-split pairs in D.

Theorem 5.12 (Crude Monadicity Theorem). Assuming that:

Then G is monadic.

Proof.

Remark 5.13.

Example 5.14.

Definition 5.15 (Monadic tower). Let C⇄GFD be an adjunction where D has reflexive coequalisers. The monadic tower of (F⊣G) is the diagram

           ..
           .

           (𝒞𝕋)𝕊


  𝒟        𝒞𝕋


GKLF          𝒞
where 𝕋 is the monad induced by (F⊣G), and K and L are as in Theorem 5.7 and Lemma 5.9, and 𝕊 is the monad induced by (L⊣K) and so on.

We say (F⊣G) has monadic length n if we reach an equivalence after n steps.