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.

  • (a) Let M be a monoid. The functor M×(∙):Set→Set has a monad structure: ηA:A→M×A is a↦(1,a) and μA:M×M×A→M×A sends (m,m′,a) to (mm′,a). The three diagrams ‘are’ the unit and associative laws in M.
  • (b) The functor P:Set→Set has a monad structure: the unit ηA:A→PA is the mapping a↦{a} (Example 1.7(c)) and the multiplication μA:PPA→PA sends a set of subsets of A to their union.

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.

  • (i) Suppose given D:J→C𝕋; write D(j)=(GD(j),δj), and let (L,(λj:L→GD(j)|j∈ob⁡J)) be a limit for GD. The composites TL→TλjTGD(j)→δjGD(j) form a cone over GB. So they induce a unique λ:TL→L. And λ is a 𝕋-algebra structure on L, since the identities ληL=1L and λ(Tλ)=λμL follow from uniqueness of factorisations through limits and it’s the unique lifting of the limit cone in C to a cone in C𝕋. The fact that it’s a limit cone is straightforward.
  • (ii) If G𝕋 creates colimits then it preserves them, but so does F𝕋 since it’s a left adjoint, so T preserves them too.

    Conversely, given D:J→C𝕋 and a colimit cone (GD(j)→λjL|j∈ob⁡J) under GD, we need to know that (TGD(j)→TλjTL|j∈ob⁡J) is a colimit cone to obtain TL→λL (and that TTL is a colimit to verify that λ is a 𝕋-algebra structure). Otherwise, the argument is as before. □

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.

  • (5.11, ⇒) Necessity of F⊣G is obvious. For the other condition, it’s enough to show that G𝕋:C𝕋→C creates coequalisers of G𝕋-split pairs. This is a re-run of Proposition 5.8(ii): if (A,α)⇉gf(B,β) are such that
    fghts A      B       C
    is a split coequaliser diagram, the coequaliser is preserved by T and by TT, so C acquires a unique algebra structure TC→γC making h a homomorphism, and h is a coequaliser in C𝕋.
  • (5.11 ⇐ and 5.12) Either set of hypotheses implies that D has the coequalisers needed for Lemma 5.9, so K has a left adjoint L. So we need to show that the unit and counit of (L⊣K) are isomorphisms.

    The unit (A,α)→KL(A,α) is the factorisation of Gλ(A,α):GFA→GL(A,α) through the (G𝕋-split) coequaliser GFA→αA of GFGFA⇉G𝜀FAGFαGFA. But either set of hypothesis implies that G preserves the equaliser of (Fα,𝜀FA), so this factorisation is an isomorphism.

    The counit LKB→B is the factorisation of FGB→𝜀BB through the coequaliser of FGFGB⇉𝜀FGBFG𝜀BFGB. The hypotheses of Theorem 5.11 imply that 𝜀B is a coequaliser of this pair, so the counit is an isomorphism. Those of Theorem 5.12 imply that the factorisation is mapped to an isomorphism by G, so it’s an isomorphism. □

Remark 5.13.

Example 5.14.

  • (a) The forgetful functor Gp→Set is monadic, and satisfies the hypotheses of Theorem 5.12. If G⇉gfH is a reflexive pair in Gp, with coequaliser H→hK in Set, then G×G⇉H×H→K×K is a coequaliser, so the multiplication H×H→H induces a binary operation K×K→K, which is the unique group multiplication on K making h a homomorphism, and it makes h into a coequaliser in Gp.

    The same argument works for AbGp, Rng, Lat, DLat, ….

    It doesn’t work for categories like CSLat or CLat, but here we can use Theorem 5.11 provided the forgetful functor has a left adjoint.

  • (b) Any reflection is monadic: this can be proved using Theorem 5.11. If D⊆C is a reflective subcategory, and A⇉gfB is a pair in D for which there exists
    fghts A       B      C
    in C satisfying the equaitions of Definition 5.10(b), then t∈mor⁡D since D is full, so ft=sh is in D, but D is closed under splittings of idempotents by Example 4.7(d), so h belongs to it.
  • (c) Consider the composite adjunction
    FLGI  Set       AbGp         tfAbGp
    where (L⊣I) is the adjunction of Example 3.11(b). The two factors are monadic, but the composite isn’t since free abelian groups are torsion free, so GILF≃GF and its category of algebras is ≅AbGp.
  • (d) The contravariant power-set functor P∗:Setop→Set is monadic, and satisfies the hypotheses of Theorem 5.12. Its left adjoint is P∗:Set→Setop by Example 3.2(i), and it reflects isomorphisms by Example 2.9(a).

    Let E→eA⇉gfB be a coreflexive equaliser diagram in Set. Then

      E       A


eefg A       B
    is a pullback by Remark 5.13(c), so
      P E       PA


PPPPe∗f∗Peg A       PB
    commutes. But we also have (P∗e)(Pe)=1PE and (P∗f)(Pf)=1PB since e and f are injective, so
      ∗∗∗           ∗
PPPPP gfefePA       P  B      PE
    is a split coequaliser diagram.

  • (e) The fogetful functor Top→USet is not monadic; the monad on Set induced by (D⊣U) is (1Set,11Set,11Set) so its category of algebras is ≅Set.
  • (f) The composite adjunction
    DBUI  Set      Top         KHaus
    is monadic. We’ll prove this using Theorem 5.11: suppose given X⇉gfY in KHaus and a split coequaliser
    UUhtsfg UX       U Y      Z
    in Set. The quotient topology on Z is the unique topology making h into a coequaliser in Top, and it’s compact, so h will be a coequaliser in KHaus provided Z is Hausdorff. It is also the unique topology that could make h into a morphism of KHaus.

    But, given an equivalence relation S on a compact Hausdorff space Y, Y∕S is Hausdorff if and only if S is closed in Y×Y.

    In our case, if (y1,y2)∈S (i.e. h(y1)=h(y2)) then x1=t(y1) and x=t(y2) satisfy g(t1)=y1, g(x2)=y2 and f(x1)=f(x2).

    Conversely, if we have x1 and x2 as above, then h(y1)=h(y2), so S=g×g(R) where R⊆X×X is {(x1,x2)|f(x1)=f(x2)}. But R is closed in X×X since it’s the equaliser of X×X⇉fπ2fπ1Y. So R is compact, so S is compact, so S is closed in Y×Y.

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.