%! TEX root = CT.tex
% vim: tw=50
% 11/11/2024 09AM

Does every \gls{monad} come from an \gls{adjunc}?

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

Note that the \gls{monad} of \cref{eg:5.2}(a) is
induced by $\Set \funcslr{M \times (\bullet)}U
\funccat[M, \Set]$ and that of \cref{eg:5.2}(b) is
induced by $\Set \funcslr PU \mathbf{CSLatt}$,
where $\mathbf{CSLatt}$ is the \gls{cat} of
\emph{complete semilattices} (posets, with
arbitrary joins). The free complete semilattice on
$A$ is $\mathcal{P}(A)$: every $f : A \to US$
extends uniquely to $\ol{f} : \mathcal{P}(A) \to
S$ where $\ol{f}(A') = \bigvee \{f(a) \mid a \in
A'\}$.

An $M$-set (respectively a complete semilattice)
is a set $A$ equipped with a suitable mapping $M
\times A \to A$ (respectively $\mathcal{P}(A)
\stackrel{\vee}{\to} A$).

\glsnoundefn{emtid4}{(4)}{NA}%
\glsnoundefn{emtid5}{(5)}{NA}%
\glsnoundefn{emtid6}{(6)}{NA}%
\begin{fcdefn}[Eilenberg-Moore algebra]
  \glsnoundefn{EMa}{Eilenberg-Moore
  algebra}{Eilenberg-Moore algebras}%
  \glsadjdefn{emoo}{Eilenberg-Moore}{NA}%
  \glssymboldefn{EMaT}%
  % Definition 5.3
  Let $\Tbb = (T, \eta, \mu)$ be a \gls{monad} on
  $\mathcal{C}$. By an \emph{Eilenberg-Moore
  algebra} for $\Tbb$ we mean a pair $(A, \alpha)$
  where $A \in \ob \mathcal{C}$ and $\alpha : TA
  \to A$ satisfies
  \begin{picmath}
    (4):~\begin{tikzcd}
      A \ar[r, "\eta_A"]
      \ar[rd, swap, "\identity{A}"]
      & TA \ar[d, "\alpha"] \\
      & A
    \end{tikzcd}
    \qquad
    (5):~
    \begin{tikzcd}
      TTA \ar[r, "T\alpha"] \ar[d, "\mu_A"]
      & TA \ar[d, "\alpha"] \\
      TA \ar[r, "\alpha"]
      &A
    \end{tikzcd}
  \end{picmath}
  A \emph{homomorphism} $f : (A, \alpha) \to (B,
  \beta)$ is a morphism $f : A \to B$ satisfying
  \begin{picmath}
    (6):~\begin{tikzcd}
      TA \ar[r, "Tf"] \ar[d, "\alpha"]
      & TB \ar[d, "\beta"] \\
      A \ar[r, "f"]
      & B
    \end{tikzcd}
  \end{picmath}
  We write $\mathcal{C}^{\mathbb{T}}$ for the
  \gls{cat} of $\Tbb$-algebras and homomorphisms.
\end{fcdefn}

\begin{fcprop}[]
  % Proposition 5.4
  Assuming:
  - $\mathcal{C}$ a \gls{cat}
  - $\Tbb$ a \gls{monad}
  Then:
  the forgetful functor $\mathcal{C}\EMaT
  \stackrel{G\EMaT}{\to} \mathcal{C}$ has a
  \gls{ladj} $F\EMaT$, and the \gls{adjunc}
  induces the \gls{monad} $\Tbb$.
\end{fcprop}

\begin{proof} 
  We define $F\EMaT A = (TA, \mu_A)$ (an algebra
  by \gls{mtid2} and \gls{mtid3}) and $F\EMaT(A
  \stackrel{f}{\to} B) = Tf$ (a homomorphism by
  \gls{naty} of $\mu$). Clearly, $F\EMaT$ is
  \gls{funcal} and $G\EMaT F\EMaT = T$.

  We establish the \gls{adjunc} using
  \cref{thm:3.7}: its \gls{unit} is $\eta$, and
  the \gls{counit} $\eps_{(A, \alpha)}$ is just
  $\alpha$ (a homomorphism $F\EMaT A \to (A,
  \alpha)$, by \gls{emtid5}, and natural by
  \gls{emtid6}).

  The triangular identity
  \begin{picmath}
    \begin{tikzcd}
      F\EMaT \ar[r] \ar[rd, "\identity{}", swap]
      & F\EMaT G\EMaT F\EMaT \ar[d] \\
      & F\EMaT
    \end{tikzcd}
  \end{picmath}
  is just \gls{mtid1}, and
  \begin{picmath}
    \begin{tikzcd}
      G\EMaT \ar[r] \ar[rd, "\identity{}", swap]
      & G\EMaT F\EMaT G\EMaT \ar[d] \\
      & G\EMaT
    \end{tikzcd}
  \end{picmath}
  is \gls{emtid4}.
  
  Finally, $G \eps_{F\EMaT A} = \mu$ by definition
  of $F\EMaT A$. So the \gls{adjunc} induces $(T,
  \eta, \mu)$.
\end{proof}

Note: $\mathcal{C} \funcslr FG \mathcal{D}$
induces $\Tbb$, we can replace $\mathcal{D}$ by
its \gls{full} sub\gls{cat} on objects $FA$.

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

\begin{fcdefn}[Kleisli category]
  \glsnoundefn{kcat}{Kleisli category}{Kleisli
  categories}%
  \glsadjdefn{kls}{Kleisli}{NA}%
  \glssymboldefn{KcT}%
  % Definition 5.5
  Let $\Tbb$ be a \gls{monad} on $\mathcal{C}$.
  The \emph{Kleisli category}
  $\mathcal{C}_{\mathbb{T}}$ is defined by $\ob
  \mathcal{C}_{\mathbb{T}} = \ob \mathcal{C}$,
  morphsims $A \kto[f] B$ in
  $\mathcal{C}_{\mathbb{T}}$ are morphisms $A
  \stackrel{f}{\to} TB$ in $\mathcal{C}$. The
  identity $A \kto A$ is $A \stackrel{\eta_A}{\to}
  TA$, and the composite of $A \kto[f]
  B \kto[g] C$ is $A \stackrel{f}{\to}
  TB \stackrel{Tg}{\to} TTC \stackrel{\mu_C}{\to}
  TC$.

  For the \gls{unit} and associative laws,
  consider the \glspl{diag}
  \begin{picmath}
    \begin{tikzcd}
      A \ar[r, "f"]
      & TB \ar[r, "T\eta_B"] \ar[rd, swap,
      "\identity{TB}"]
      & TTB \ar[d, "\mu_B"] \\
      &
      & TB
    \end{tikzcd}
  \end{picmath}
  \begin{picmath}
    \begin{tikzcd}
      A \ar[r, "\mu_A"] \ar[d, "f"]
      & TA \ar[d, "Tf"] \\
      TB \ar[r, "\eta_{TB}"] \ar[rd, swap,
      "\identity{TB}"]
      & TTB \ar[d, "\mu_B"] \\
      & TB
    \end{tikzcd}
  \end{picmath}
  \begin{picmath}
    \begin{tikzcd}
      A \ar[r, "f"]
      & TB \ar[r, "Tg"]
      & TTC \ar[r, "TTh"] \ar[d, "\mu_C"]
      & TTTD \ar[r, "T\mu_D"] \ar[d, "\mu_{TD}"]
      & TTD \ar[d, "\mu_D"] \\
      &
      & TC \ar[r, "Th"]
      & TTD \ar[r, "\mu_D"]
      & TD
    \end{tikzcd}
  \end{picmath}
\end{fcdefn}

\begin{fcprop}[]
  \label{prop:5.6}
  % Proposition 5.6
  Assuming:
  - $\mathcal{C}$ a \gls{cat}
  - $\Tbb$ a \gls{monad}
  Then:
  there is an \gls{adjunc} $\mathcal{C}
  \funcslr{F\kct}{G\kct} \mathcal{C}\kct$ inducing
  the \gls{monad} $\Tbb$.
\end{fcprop}

\begin{proof}
  We define $F\kct A = A$ and $F\kct(A
  \stackrel{f}{\to} B) = A \stackrel{f}{\to} B
  \stackrel{\eta_B}{\to} TB$. $F\kct$ preserves
  identities by definintion, and preserves
  composition by
  \begin{picmath}
    \begin{tikzcd}
      A \ar[r, "f"] \ar[rd, swap, "gf"]
      & B \ar[r, "\identity{B}"] \ar[d, "g"]
      & TB \ar[d, "Tg"] \\
      & C \ar[r, "\eta_C"]
      & TC \ar[r, "T\identity{C}"]
      \ar[rd, swap, "\identity{TC}"]
      & TTC \ar[d, "\mu_C"] \\
      &
      &
      & TC
    \end{tikzcd}
  \end{picmath}
  We define $G\kct A = TA$, and $G\kct(A
  \kto[f] B) = TA \stackrel{Tf}{\to}
  TTB \stackrel{\mu_B}{\to} TB$. $G\kct$ preserves
  identities by \gls{mtid1}, and preserves
  composites by
  \begin{picmath}
    \begin{tikzcd}
      TA \ar[r, "Tf"]
      & TTB \ar[r, "TTg"] \ar[d, "\mu_B"]
      & TTTC \ar[r, "T\mu_C"] \ar[d, "\mu_{TC}"]
      & TTC \ar[d, "\mu_C"] \\
      & TB \ar[r, "Tg"]
      & TTC \ar[r, "\mu_C"]
      & TC
    \end{tikzcd}
  \end{picmath}
  We verify the \gls{adjunc} using \cref{thm:3.7}:
  $G\kct F\kct(f) = Tf$ by \gls{mtid1} so $G\kct
  F\kct = T$ and we take $\eta$ as \gls{unit} of
  the \gls{adjunc}.

  We define $TA \kto[\eps_A] A$ to be
  $TA \stackrel{\identity{TA}}{\to} TA$. To verify
  the \gls{natsq}
  \begin{picmath}
    \begin{tikzcd}
      TA \kar[r, "F\kct G\kct f"] \kar[d,
      "\eps_A"]
      & TB \kar[d, "\eps_B"] \\
      A \kar[r, "f"]
      & B
    \end{tikzcd}
  \end{picmath}
  the lower composite is $TA \stackrel{Tf}{\to}
  TTB \stackrel{\mu_B}{\to} TB$ and the upper one
  is $TA \stackrel{Tf}{\to} TTB
  \stackrel{\mu_B}{\to} TB
  \stackrel{\eta_{TB}}{\to} TTB
  \stackrel{\mu_B}{\to} TB$, which agree since
  \gls{mtid2} tells us that $\mu_B \eta_{TB} =
  \identity{B}$.

  The triangular identities become
  \begin{picmath}
    \begin{tikzcd}
      F\kct A \kar[r, "F\kct \eta_A"]
      & FGFA \kar[r, "\eps_{FA}"]
      & FA
    \end{tikzcd}
    =
    \begin{tikzcd}
      TA \ar[r, "\eta_{TA}"]
      & TTA \ar[r, "\eta_{TTA}"]
      \ar[rr, bend right, "\identity{TTA}", swap]
      & TTTA \ar[r, "\eta_{TA}"]
      & TTA
    \end{tikzcd}
  \end{picmath}
  and
  \begin{picmath}
    \begin{tikzcd}
      GA \ar[r, "\eta_{GA}"]
      & GFGA \ar[r, "G\eps_A"]
      & GA
    \end{tikzcd}
    =
    \begin{tikzcd}
      TA \ar[r, "\eta_{TA}"]
      \ar[rr, bend right, "\identity{TA}", swap]
      & TTA \ar[r, "\eta_{TA}"]
      & TA
    \end{tikzcd}
  \end{picmath}
  Finally, $G\kct \eps_{F\kct A} = \mu_A$, so
  $(F\kct \adjoint G\kct)$ induces the \gls{monad}
  $\Tbb$.
\end{proof}
