§ What is a monad

T^3(x) --T(@mu@x)--> T^2@x|                   |mu@(T@x)          mu@x|                   |v                   vT^2(x)---mu@x-----> T(x)
(Tx) --eta@(T@x)--> T^2(x)|EQ                 ||                   |T@(eta@x)         mu@x|                   |v                 EQvT^2(x)---mu@x---> T(x)

§ Monad from adjunction

§ Algebra for a monad CTC^T.

Tc -T arr-> Td|           |f           g|           |v           vc   -arr->  d

§ Factoring of forgetful functor of adjunction

H -Stx-> L^T -forget-> L

§ Monadic adjunction

H -Stx-> L^T -forget-> L

§ Category of models for an algebraic theory

§ Limits and colimits in categories of algebras

§ Riehl: Limits and colimits in categories of algebras

Here, we learn theorems about limits and colimits in L^T.

§ Lemma 5.6.1: If U is monadic over F, then U reflects isos

Tl-Tg->Tl'|      |a      a'|      |v      vl--g-->l'
Tl<-Tg'-Tl'|      |a      a'|      |v      vl<-g'--l'

§ Corollary 5.6.2: Bijective continuous functions in CHaus are isos

§ Corollary 5.6.4: Any bijective homomorphism arising from a monadic adjunction which forgets to Set will be iso

§ Thm 5.6.5.i A monadic functor U: H -> L creates any limits that L has.

§ Corollary 5.6.6: The inclusion of a reflective subcategory creates all limits

§ Corollary 5.6.7: Any category monadic over Set is complete

§ Corollary 5.6.9: Set is cocomplete

§ Category of models for alg. theory is complete

TODO

§ Category of algebras has coproducts

import Control.Monad(join)-- |(a*|b*)* ~~simplify~~> (a|b)*eval :: Monoid a => Monoid b => [Either [a] [b]] -> [Either a b]eval = map (either (Left . mconcat) (Right . mconcat))-- | a*|b* -> (a|b)* with no simplificationtranspose :: Either [a] [b] -> [Either a b]transpose = either (map Left) (map Right)-- | (a*|b*)* -> (a|b)* with no simplificationflatten :: [Either [a] [b]] -> [Either a b]flatten = join . map transpose-- force: eval = flatten | via coequallizer

§ If T:CCT: C \to C is finitary and CC is complete and cocomplete, then so is CTC^T

(A,α)f,g(B,β)q(Q,u) (A, \alpha) \xrightarrow{f, g} (B, \beta) \xrightarrow{q} (Q, u)