\[ \require{mathtools} \let\DeclarePairedDelimiter\DeclarePairedDelimiters % MathJax typo % sup \newcommand{\op}{^\mathrm{op}} \newcommand{\inv}{^{-1}} % rm \newcommand{\compL}{\mathbin{\circ}} \newcommand{\Kl}{\mathrm{Kl}} % arrow \newcommand{\xto}{\xrightarrow} \newcommand{\xot}{\xleftarrow} \newcommand{\toot}{\rightleftarrows} \newcommand{\klto}{\rightsquigarrow} \newcommand{\comma}{\downarrow} \newcommand{\incl}{\hookrightarrow} \newcommand{\mono}{\rightarrowtail} \newcommand{\epi}{\twoheadrightarrow} \newcommand{\iso}{\cong} \newcommand{\nat}{\Rightarrow} \newcommand{\adj}{\dashv} % delimiter \DeclarePairedDelimiter{\parens}{(}{)} % parentheses ( ) \DeclarePairedDelimiter{\bracks}{[}{]} % brackets [ ] \DeclarePairedDelimiter{\braces}{\{}{\}} % braces { } \DeclarePairedDelimiter{\angles}{\langle}{\rangle} % angles \newcommand{\set}{\braces} % operator \DeclareMathOperator{\Obj}{Obj} \DeclareMathOperator{\Hom}{Hom} \DeclareMathOperator{\Eq}{Eq} \DeclareMathOperator{\Coeq}{Coeq} \DeclareMathOperator{\Pull}{Pull} \DeclareMathOperator{\Push}{Push} \DeclareMathOperator{\Lan}{Lan} \DeclareMathOperator{\Ran}{Ran} \DeclareMathOperator{\Lift}{Lift} \DeclareMathOperator{\Rift}{Rift} % \DeclareMathOperator{\id}{id} \DeclareMathOperator{\act}{act} \DeclareMathOperator{\colim}{colim} % exponential \DeclareMathOperator{\partf}{partial} \DeclareMathOperator{\curry}{curry} % natural number \DeclareMathOperator{\zero}{zero} \DeclareMathOperator{\successor}{succ} % list \DeclareMathOperator{\nil}{nil} \DeclareMathOperator{\cons}{cons} \newcommand{\concat}{\mathbin{{+}\mspace{-8mu}{+}}} % fold \DeclareMathOperator{\fold}{fold} \DeclareMathOperator{\map}{map} \DeclareMathOperator{\filter}{filter} % bool \DeclareMathOperator{\cond}{cond} % cd \DeclareMathOperator{\copy}{copy} \DeclareMathOperator{\del}{del} % sets \newcommand{\N}{\mathbb{N}} % natural numbers \newcommand{\Z}{\mathbb{Z}} % integers \newcommand{\Q}{\mathbb{Q}} % rational numbers \newcommand{\R}{\mathbb{R}} % real numbers % category \newcommand{\catf}[1]{{\mathbf{#1}}} \newcommand{\cA}{\catf{A}} \newcommand{\cB}{\catf{B}} \newcommand{\cC}{\catf{C}} \newcommand{\cD}{\catf{D}} \newcommand{\cE}{\catf{E}} \newcommand{\cI}{\catf{I}} \newcommand{\cJ}{\catf{J}} \newcommand{\cS}{\catf{S}} \newcommand{\cT}{\catf{T}} \newcommand{\cV}{\catf{V}} \newcommand{\cZero}{\catf{0}} \newcommand{\cOne}{\catf{1}} \newcommand{\cTwo}{\catf{2}} % \newcommand{\cArr}{\catf{Arr}} % arrow \newcommand{\cPSh}{\catf{PSh}} % presheaf \newcommand{\cCone}{\catf{Cone}} % cone \newcommand{\cCocone}{\catf{Cocone}} % cocone % \newcommand{\cFin}{\catf{Fin}} % finite prefix \newcommand{\cSet}{\catf{Set}} % functions \newcommand{\cRel}{\catf{Rel}} % relations \newcommand{\cPos}{\catf{Pos}} % posets \newcommand{\cMon}{\catf{Mon}} % monoids \newcommand{\cGrp}{\catf{Grp}} % groups \newcommand{\cAb}{\catf{Ab}} % abelian groups \newcommand{\cCat}{\catf{Cat}} % categories \newcommand{\cGrpd}{\catf{Grpd}} % groupoids \newcommand{\cVect}{\catf{Vect}} % vector spaces \newcommand{\cMeas}{\catf{Meas}} % measurable spaces and measurable functions \newcommand{\cStoch}{\catf{Stoch}} %measurable spaces and stochastic maps \newcommand{\cProb}{\catf{Prob}} % probability measures and measure-preserving functions % logic \newcommand{\lfal}{\bot} \newcommand{\ltru}{\top} \]
A monoidal category is a category where morphisms can be composed in parallel.
1 Monoidal category
A monoidal category is a category \(\cC\) equipped with
- monoidal multiplication: a bifunctor \(\otimes: \cC \times \cC \to \cC\)
- monoidal unit: a \(\cC\)-object \(I\)
- associator: a natural isomorphism \(\alpha_{A, B, C}: (A \otimes B) \otimes C \to A \otimes (B \otimes C)\)
- left unitor: a natural isomorphism \(\lambda_A: I \otimes A \to A\)
- right unitor: a natural isomorphism \(\rho_A: A \otimes I \to A\)
such that the triangle and pentagon diagrams commute.
A monoidal category is strict if \(\alpha\), \(\lambda\), and \(\rho\) are all identity morphisms.
1.1 Braided monoidal category
A braided monoidal category is a monoidal category \((\cC, \otimes, I, \alpha, \lambda, \rho)\) equipped with
- braiding: a natural isomorphism \(\beta_{A, B}: A \otimes B \to B \otimes A\)
such that the hexagon diagram commutes.
1.2 Symmetric monoidal category
A symmetric monoidal category is a braided monoidal category \((\cC, \otimes, I, \alpha, \lambda, \rho, \beta)\) whose braiding \(\beta\) is symmetric: \(\beta_{B, A} \compL \beta_{A, B} = \id_{A \otimes B}\).
2 Monoidal functor
For monoidal categories \(\cC\) and \(\cD\), a lax monoidal functor is a functor \(F: \cC \to \cD\) equipped with
- a natural transformation \(\mu_{A, B}: FA \otimes_\cD FB \to F(A \otimes_\cC B)\)
- a \(\cD\)-morphism \(\eta: I_\cD \to FI_\cC\)
subject to
- associativity: \((F\alpha_\cC) \compL \mu \compL (\mu \otimes \id) = \mu \compL (\id \otimes \mu) \compL \alpha_\cD\)
- identity: \((F \lambda_\cC) \compL \mu \compL (\eta \otimes \id) = \lambda_\cD\) and \((F \rho_\cC) \compL \mu \compL (\id \otimes \eta) = \rho_\cD\)
- lax: morphisms
- strong: isomorphisms
- strict: identity morphisms
-- applicative function application
(<*>) :: Applicative f => f (a -> b) -> f a -> f b
(<*) :: Applicative f => f a -> f b -> f a
(*>) :: Applicative f => f a -> f b -> f b
2.1 Braided monoidal functor
A braided monoidal functor is a monoidal functor that is compatible with
- braiding: \((F\beta_\cC) \compL \mu = \mu \compL \beta_\cD\)
2.2 Symmetric monoidal functor
A symmetric monoidal functor is a braided monoidal functor between symmetric monoidal categories.
3 Monoidal natural transformation
A monoidal natural transformation \(\alpha: F \to G\) between two monoidal categories is a natural transformation that is compatible with
- monoidal multiplication: \(\alpha \compL \mu_F = \mu_G \compL (\alpha \otimes \alpha)\)
- monoidal unit: \(\alpha \compL \eta_F = \eta_G\)
4 Monoid object
A monoid object in a monoidal category \((\cC, \otimes, I, \alpha, \lambda, \rho)\) is an object \(M\) equipped with two morphisms:
- multiplication \(\mu: M \otimes M \to M\)
- unit \(\eta: I \to M\)
subject to
- associativity: \(\mu \compL (\mu \otimes \id) = \mu \compL (\id \otimes \mu) \compL \alpha\)
- identity: \(\mu \compL (\eta \otimes \id) = \lambda\) and \(\mu \compL (\id \otimes \eta) = \rho\)
-- mappend
(<>) :: Monoid m => m -> m -> m
-- unit
mempty :: Monoid a => a
-- associativity
<> (y <> z) = (x <> y) <> z
x -- left identity
mempty <> x = x
-- right identity
<> mempty = x x
- monoid: \(\cSet\)
- ring: \(\cAb\)
- monad: \([\cC, \cC]\)
4.1 Homomorphism
A monoid homomorphism between two monoid objects \(M\) and \(N\) is a morphism \(f: M \to N\) that preserves
- monoidal multiplication: \(f \compL \mu_M = \mu_N \compL (f \otimes f)\)
- monoidal unit: \(f \compL \eta_M = \eta_N\)
- a monoid object = a lax monoidal functor \(M: (\cOne, \otimes, *) \to (\cC, \otimes, I)\)
- a monoid homomorphism = a monoidal natural transformation \(f: M \nat N\)
4.2 Commutative monoid object
A commutative monoid object in a symmetric monoidal category is a monoid object subject to commutativity.
4.3 Comonoid object
A comonoid object in \(\cC\) is a monoid object in \(\cC\op\).
- comultiplication \(\delta: M \to M \otimes M\)
- counit \(\epsilon: M \to I\)
4.4 Group object
A group object \(G\) in a cartesian category is a monoid object \((G, \mu, \eta)\) equipped with an inverse morphism \(\iota: G \to G\) subject to invertibility.
5 M-algebra
For a monoid object \((M, \mu, \eta)\) in a monoidal category \((\cC, \otimes, I, \alpha, \lambda, \rho)\), a (left) algebra over a monoid object (M-algebra) is an F-algebra \((A, \act_A: M \otimes A \to A)\) for the endofunctor
\[\begin{aligned} (M \otimes -): \cC &\to \cC \\ A &\mapsto M \otimes A \\ f &\mapsto \id_M \otimes f \end{aligned}\]
that is compatible with
- monoid multiplication: \(\act \compL (\mu \otimes \id) = \act \compL (\id \otimes \act) \compL \alpha\)
- monoid unit: \(\act \compL (\eta \otimes \id) = \lambda\)
An M-algebra homomorphism is an F-algebra homomorphism.