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

\begin{iffproof}
  \rightimpl is \cref{lemma:4.9}.
  \leftimpl Let $A \in \ob \mathcal{C}$. As in
    \cref{gaft}, $(A \darr G)$ inherits
    \gls{comp}ness and \gls{locsm}ness from
    $\mathcal{D}$: it also inherits \gls{wp}ness
    since \glspl{subobj} of $(B, f)$ in $(A
    \darr G)$ are those $B' \stackrel{m}{\monic}
    B$ in $\mathcal{D}$ such that $f$ factors
    through $GB' \stackrel{Gm}{\monic} GB$.
    (Note that the forgetful \gls{func} $(A
    \darr G) \to \mathcal{D}$ preserves
    \glspl{mono} by \cref{remark:4.8}). And if
    $\{S_i \mid i \in I\}$ is a co\gls{seping}
    set for $\mathcal{D}$, then $\{(S_i, f) \mid
    i \in I, f \in \mathcal{C}(A, GS_i)\}$ is a
    co\gls{seping} set for $(A \darr G)$.

    So we need to show: if $\mathcal{A}$ is
    \gls{comp}, \gls{locsm} and \gls{wp} and has
    a co\gls{seping} set $\{S_i \mid i \in I\}$,
    then $\mathcal{A}$ has an \gls{iobj}. First
    form $P = \prod_{i \in I} S_i$; now consider
    the \gls{lim} of the \gls{diag}
    \begin{picmath}
      \begin{tikzcd}
        P'' \ar[rd, tail] \ar[d, dashed, no head]
        & P' \ar[d, tail] \\
        P^{(n)} \ar[r, tail]
        & P
      \end{tikzcd}
    \end{picmath}
    whose edges are a representative set of
    \glspl{subobj} of $P$.

    If $I$ is the apex of the \gls{lim}
    \gls{cone}, the legs $I \to P'$ of the
    \gls{lim} \gls{cone} are all \gls{monic} by
    the argument of \cref{lemma:4.15}, and in
    particular $I \to P$ is \gls{monic}, and
    it's a least \gls{subobj} of $P$.

    If we had $I \twofuncs fg A$, their
    \gls{equaler} $E \to I$ would be a
    \gls{subobj} of $P$ contained in $I \monic
    P$, so $E \to I$ is an isomorphism, and
    hence $f = g$.

    Given any $A \in \ob \mathcal{A}$ form the
    \gls{prod} $Q = \prod_{(i, f)} S_i$ over all
    pairs $(i, f)$ with $f_i A \to S_i$ and the
    morphism $g : A \to Q$ with $\pi_{(i, f)} g
    = f$ for all $(i, f)$. Since the $S_i$ are
    co\gls{seping}, $g$ is \gls{monic}. We also
    have $h : P \to Q$ defined by $\pi_{(i, f)}
    h = \pi_i$ for all $(i, f)$.

    Form the \gls{pullb}
    \begin{picmath}
      \begin{tikzcd}
        B \ar[r, "k"] \ar[d, "l"]
        & A \ar[d, tail, "g"] \\
        P \ar[r, "h"]
        & Q
      \end{tikzcd}
    \end{picmath}
    then $l$ is \gls{monic} by
    \cref{lemma:4.15}, so $I \monic P$ factors
    as $I \to B \stackrel{l}{\monic} P$ and
    hence we have $I \to B \stackrel{k}{\to} A$.
    So $I$ is \gls{initial}. \qedhere
\end{iffproof}

\begin{example}
  % Example 4.17
  Consider the inclusion $\KHaus \stackrel{I}{\to}
  \Top$. Tychonoff's Theorem says $\KHaus$ is
  closed under (\gls{small}) \glspl{prod} in
  $\Top$. It's closed under \glspl{equaler}, since
  \glspl{equaler} of pairs in $\KHaus$ are closed
  inclusions.

  So $\KHaus$ is \gls{comp}, and $I$ \gls{preses}
  \glspl{lim}. $\KHaus$ and $\Top$ are
  \gls{locsm}, and $\KHaus$ is \gls{wp} since
  \glspl{subobj} of $X$ is isomorphic to
  inclusions of closed subspaces. And $\KHaus$ has
  a co\gls{sep} $[0, 1]$, by Uryson's Lemma.

  So by \cref{saft}, $I$ has a \gls{ladj} $\beta$.
\end{example}

\begin{remark}
  % Remark 4.18
  \phantom{}
  \begin{enumerate}[(a)]
    \item The construction in \cref{saft} is
      closely parallel to \v{C}ech's original
      construction of $\beta$.

      Given a space, \v{C}ech constructs $P =
      \prod_{f : x \to [0, 1]} [0, 1]$ and the map
      $g : X \to P$ defined by $\pi_f g = f$. Then
      he takes $\beta X$ to be the closure of the
      image of $g$, i.e. the smallest \gls{subobj}
      of $(P, g)$ in $(X \darr I)$.
    \item We could have constructed $\beta$ using
      \cref{gaft}: to get a \gls{sset} for $I$ at
      an object $X$ of $\Top$, note that any
      continuous $f : X \to IY$ factors as $X \to
      IY' \to IY$ where $Y'$ is the closure of the
      image of $f$, and then since $Y'$ has a
      dense subspace of cardinality $\le \card X$,
      we have $\card Y' \le 2^{2^{\card X}}$.
  \end{enumerate}
\end{remark}

\newpage
\section{Monads}

Suppose we have $C \funcslr FG \mathcal{D}$, $(F
\adjoint G)$. How much of the \gls{adjunc} can we
describe in terms of $\mathcal{C}$ (supposing we
can't know anything about $\mathcal{D}$, or know
very little about it)?

We have:
\begin{itemize}
  \item The \gls{func} $T = GF : \mathcal{C} \to
    \mathcal{C}$.
  \item The \gls{unit} $\eta :
    \identity{\mathcal{C}} \to T$.
  \item The natural transformation $\mu = G\eps_F
    : TT \to T$.
\end{itemize}
\glsnoundefn{mtid1}{(1)}{NA}%
\glsnoundefn{mtid2}{(2)}{NA}%
From the triangular identities of \cref{thm:3.7},
we obtain the commutative triangles:
\begin{picmath}
  (1):~
  \begin{tikzcd}
    T \ar[r, "T\eta"] \ar[rd, "\identity{T}", swap]
    & TT \ar[d, "\mu"] \\
    & T
  \end{tikzcd}
  \qquad
  (2):~
  \begin{tikzcd}
    T \ar[r, "\eta_T"] \ar[rd, "\identity{T}", swap]
    & TT \ar[d, "\mu"] \\
    & T
  \end{tikzcd}
\end{picmath}
\glsnoundefn{mtid3}{(3)}{NA}%
and from \gls{naty} of $\eps$ we obtain
\begin{picmath}
  (3):~
  \begin{tikzcd}
    TTT \ar[r, "T\mu"]
    \ar[d, "\mu_T"]
    & TT \ar[d, "\mu"] \\
    TT \ar[r, "\mu"]
    & T
  \end{tikzcd}
\end{picmath}

\begin{fcdefn}[Monad]
  \glsnoundefn{monad}{monad}{monads}%
  % Definition 5.1
  A \emph{monad} on a \gls{cat} $\mathcal{C}$ is a
  triple $(T, \eta, \mu) = \mathbb{T}$ where $T :
  \mathcal{C} \to \mathcal{C}$, and $\eta :
  \identity{\mathcal{C}} \to T$ and $\mu : TT \to
  T$ satisfy the commutative diagrams
  \begin{picmath}
    \begin{tikzcd}
      T \ar[r, "T\eta"] \ar[rd, "\identity{T}", swap]
      & TT \ar[d, "\mu"] \\
      & T
    \end{tikzcd}
  \end{picmath}
  \begin{picmath}
    \begin{tikzcd}
      T \ar[r, "\eta_T"] \ar[rd, "\identity{T}", swap]
      & TT \ar[d, "\mu"] \\
      & T
    \end{tikzcd}
  \end{picmath}
  \begin{picmath}
    \begin{tikzcd}
      TTT \ar[r, "T\mu"]
      \ar[d, "\mu_T"]
      & TT \ar[d, "\mu"] \\
      TT \ar[r, "\mu"]
      & T
    \end{tikzcd}
  \end{picmath}
\end{fcdefn}

\begin{example}
  \label{eg:5.2}
  % Example 5.2
  \phantom{}
  \begin{enumerate}[(a)]
    \item Let $M$ be a monoid. The \gls{func} $M
      \times (\bullet) : \Set \to \Set$ has a
      \gls{monad} structure: $\eta_A : A \to M
      \times A$ is $a \mapsto (1, a)$ and $\mu_A :
      M \times M \times A \to M \times A$
      sends $(m, m', a)$ to $(mm', a)$. The three
      diagrams `are' the unit and associative
      laws in $M$.
    \item The \gls{func} $P : \Set \to \Set$ has a
      \gls{monad} structure: the \gls{unit} $\eta_A : A
      \to PA$ is the mapping $a \mapsto \{a\}$
      (\cref{eg:1.7}(c)) and the multiplication
      $\mu_A : PPA \to PA$ sends a set of subsets
      of $A$ to their union.
  \end{enumerate}
\end{example}
