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

\begin{fclemma}[]
  \label{lemma:5.9}
  % Lemma 5.9
  Assuming:
  - $\mathcal{C} \funcslr FG \mathcal{D}$ is an
  \gls{adjunc} inducing the \gls{monad} $\Tbb$ on
  $\mathcal{C}$
  - for every $\Tbb$ algebra $(A, \alpha)$, the
  pair $FGFA \twofuncs{F\alpha}{\eps_{FA}} FA$ has
  a \gls{coequaler} in $\mathcal{D}$
  Then:
  $K : \mathcal{D} \to \mathcal{C}\emat$ has a
  \gls{ladj} $L$.
\end{fclemma}

\begin{proof}
  Write $FA \stackrel{\lambda_{(A, \alpha)}}{\to}
  L(A, \alpha)$ for the \gls{coequaler}. For any
  homomorphism $f : (A, \alpha) \to (B, \beta)$
  the two left hand squares in
  \begin{picmath}
    \begin{tikzcd}
      FGFA \ar[r, "F\alpha", shift left=3pt]
      \ar[r, "\eps_{FA}", swap, shift right=3pt]
      \ar[d, "FGFf", swap]
      & FA \ar[r, "\lambda_{(A, \alpha)}"]
      \ar[d, "Ff"]
      & L(A, \alpha) \ar[d, dashed, "Lf"] \\
      FGFB \ar[r, "F\beta", shift left=3pt]
      \ar[r, "\eps_{FB}", swap, shift right=3pt]
      & FB \ar[r, "\lambda_{(B, \beta)}"]
      & L(B, \beta)
    \end{tikzcd}
  \end{picmath}
  commute, so we get a unique $Lf$ making the right
  hand square commute. As usual, uniqueness
  implies functoriality of $L$.

  For any $B \in \ob \mathcal{D}$, morphisms $L(A,
  \alpha) \to B$ correspond to morphisms $FA
  \stackrel{f}{\to} B$ satisfying $f(F\alpha) =
  f\eps_{FA}$. If $\ol{f} : A \to GB$ is the
  transpose of $f$ across $(F \adjoint G)$, then
  $f(F\alpha)$ transposes to $\ol{f}\alpha : GFA
  \to GB$, whereas $f\eps_{FA}$ transposes to
  $Gf$. But we can write $f = \eps_B(F\ol{f})$ by
  the proof of \cref{thm:3.7}, so $Gf =
  (G\eps_B)(GF\ol{f})$. So $f(F\alpha) =
  f\eps_{FA}$ if and only if
  \begin{picmath}
    \begin{tikzcd}
      GFA \ar[r, "GF\ol{f}"]
      \ar[d, "\alpha"]
      & GFGB \ar[d, "G\eps_B"] \\
      A \ar[r, "\ol{f}"]
      & GB
    \end{tikzcd}
  \end{picmath}
  commutes, which happens if and only if $\ol{f} :
  (A, \alpha) \to KB$ in $\mathcal{C}\emat$.

  Naturality of the bijection follows from that of
  $f \mapsto \ol{f}$.
\end{proof}

Note that since $G\Tbb K = G$, we have $LF\emat
\cong F$ by \cref{coro:3.6}, and $L$ \gls{preses}
\glspl{coequaler}.

\begin{fcdefn}[Reflexive / split coequaliser diagram / $G$-split]
  \label{defn:5.10}
  \glsadjdefn{pprefl}{reflexive}{parallel pair}%
  \glsnoundefn{splitcoeq}{split coequaliser}{split
  coequalisers}%
  \glsadjdefn{gsplit}{$G$-split}{pair}%
  % Definition 5.10
  \phantom{}
  \begin{cenum}[(a)]
    \item We say a parallel pair $A \twofuncs fg
      B$ is \emph{reflexive} if there exists $r :
      B \to A$ with $fr = gr = \identity{B}$. Note
      that $FGFA \twofuncs{F\alpha}{\eps_{FA}} FA$
      is reflexive, with common right inverse $FA
      \stackrel{F\eta_A}{\to} FGFA$.
    \item By a \emph{split coequaliser diagram},
      we mean a diagram
      \begin{picmath}
        \begin{tikzcd}
          A \ar[r, "f", shift left=3pt]
          \ar[r, "g", swap, shift right=3pt]
          & B \ar[r, "h"] \ar[l, bend left=50, "t"]
          & C \ar[l, bend left=30, "s"]
        \end{tikzcd}
      \end{picmath}
      satisfying $hf = hg$, $hs = \identity{C}$,
      $gt = \identity{B}$ and $ft = sh$. If these
      hold, then $h$ is a \gls{coequaler} of $(f,
      g)$ since if $B \stackrel{k}{\to} D$
      satisfies $kf = kg$ then $k = kgt = kft =
      ksh$, so $k$ factors through $h$, and the
      factorisation is unique since $h$ is
      (\gls{splitme}) \gls{epic}. Note that
      \emph{any} \gls{func} \gls{preses} split
      coequalisers.
    \item Given $G : \mathcal{D} \to \mathcal{C}$,
      we say a pair $A \twofuncs fg B$ in
      $\mathcal{D}$ is \emph{$G$-split} if there's
      a split coequaliser diagram
      \begin{picmath}
        \begin{tikzcd}
          GA \ar[r, "Gf", shift left=3pt]
          \ar[r, "Gg", swap, shift right=3pt]
          & GB \ar[r, "h"] \ar[l, bend left=50, "t"]
          & C \ar[l, bend left=30, "s"]
        \end{tikzcd}
      \end{picmath}
      in $\mathcal{C}$. The pair $(F\alpha,
      \eps_{FA})$ in \cref{lemma:5.9} is
      $G$-split, since
      \begin{picmath}
        \begin{tikzcd}
          GFGFA \ar[r, "GF\alpha", shift left=3pt]
          \ar[r, "G\eps_{FA}", swap, shift right=3pt]
          & GFA \ar[r, "\alpha"]
          \ar[l, bend left=50, "\eta_{GFA}"]
          & A \ar[l, bend left=30, "\eta_A"]
        \end{tikzcd}
      \end{picmath}
      is a split coequaliser diagram in
      $\mathcal{C}$.
  \end{cenum}
\end{fcdefn}

\begin{fcthm}[Precise Monadicity Theorem]
  \label{thm:5.11}
  % Theorem 5.11
  \begin{iffc}
    \lhs
    A \gls{func} $G : \mathcal{D} \to \mathcal{C}$
    is \gls{monadic}
    \rhs
    $G$ has a \gls{ladj} and \gls{creates}
    \gls{coequaler} of \gls{gsplit} pairs in
    $\mathcal{D}$.
  \end{iffc}
\end{fcthm}

\begin{fcthm}[Crude Monadicity Theorem]
  \label{thm:5.12}
  % Theorem 5.12
  Assuming:
  - $G : \mathcal{D} \to \mathcal{C}$ \gls{preses}
  \gls{pprefl} \glspl{coequaler}
  - $G$ has a \gls{ladj}
  - $G$ \gls{reflects} isomorphisms
  Then:
  $G$ is \gls{monadic}.
\end{fcthm}

\begin{proof}
  \phantom{}
  \begin{enumerate}[(5.11 $\Leftarrow$ and 5.12)]
    \item[(\ref{thm:5.11}, $\Rightarrow$)]
      Necessity of $F \adjoint G$ is obvious. For the
      other condition, it's enough to show that
      $G\emat : \mathcal{C}\emat \to \mathcal{C}$
      \gls{creates} \glspl{coequaler} of
      \gsplit{G\emat} pairs. This is a re-run of
      \cref{prop:5.8}(ii): if $(A, \alpha) \twofuncs
      fg (B, \beta)$ are such that
      \begin{picmath}
        \begin{tikzcd}
          A \ar[r, "f", shift left=3pt]
          \ar[r, "g", swap, shift right=3pt]
          & B \ar[r, "h"]
          \ar[l, "t", bend left=50]
          & C \ar[l, "s", bend left=30]
        \end{tikzcd}
      \end{picmath}
      is a \gls{splitcoeq} diagram, the
      \gls{coequaler} is preserved by $T$ and by $TT$,
      so $C$ acquires a unique algebra structure $TC
      \stackrel{\gamma}{\to} C$ making $h$ a
      homomorphism, and $h$ is a \gls{coequaler} in
      $\mathcal{C}\emat$.
    \item[(\ref{thm:5.11} $\Leftarrow$ and
      \ref{thm:5.12})] Either set of hypotheses
      implies that $\mathcal{D}$ has the
      \glspl{coequaler} needed for
      \cref{lemma:5.9}, so $K$ has a \gls{ladj}
      $L$. So we need to show that the \gls{unit}
      and \gls{counit} of $(L \adjoint K)$ are
      isomorphisms.

      The \gls{unit} $(A, \alpha) \to KL(A,
      \alpha)$ is the factorisation of
      $G\lambda_{(A, \alpha)} : GFA \to GL(A,
      \alpha)$ through the (\gsplit{G\emat})
      \gls{coequaler} $GFA \stackrel{\alpha}{\to}
      A$ of $GFGFA \twofuncs{GF\alpha}{G\eps_{FA}}
      GFA$. But either set of hypothesis implies
      that $G$ \gls{preses} the \gls{equaler} of
      $(F\alpha, \eps_{FA})$, so this
      factorisation is an isomorphism.

      The \gls{counit} $LKB \to B$ is the
      factorisation of $FGB
      \stackrel{\eps_B}{\to} B$ through the
      \gls{coequaler} of $FGFGB
      \twofuncs{FG\eps_B}{\eps_{FGB}} FGB$. The
      hypotheses of \cref{thm:5.11} imply that
      $\eps_B$ is a \gls{coequaler} of this pair,
      so the \gls{counit} is an isomorphism. Those
      of \cref{thm:5.12} imply that the
      factorisation is mapped to an isomorphism by
      $G$, so it's an isomorphism. \qedhere
  \end{enumerate}
\end{proof}

\begin{remark}
  \label{remark:5.13}
  % Remark 5.13
  \phantom{}
  \begin{enumerate}[(1)]
    \item \glsref[pprefl]{Reflexive}
      \glspl{coequaler} are \glspl{colim} of shape
      $J$, where $J$ is the \gls{cat}
      \begin{picmath}
        \begin{tikzcd}
          A \ar[r, "f", shift left=6pt]
          \ar[r, "g", swap, shift right=6pt]
          \ar[loop, in=90, out=130, looseness=5, "s"]
          \ar[loop, in=270, out=230, looseness=5,
          "t", swap]
          & B \ar[l, "r", shift right=2pt]
        \end{tikzcd}
      \end{picmath}
      satisfying $fr = gr = \identity{}$, $rf = s$
      and $rg = t$.
    \item All \glspl{colim} can be constructed
      from \glspl{coprod} and \gls{pprefl}
      \glspl{coequaler}. This was proved in
      \cref{prop:4.4}: the pair $P \twofuncs fg Q$
      appearing in that proof is co\gls{pprefl}
      with common left inverse $r : Q \to P$
      defined by $\pi_j r = \pi_{\identity{j}}$
      for all $j$.
