\documentclass[12pt,titlepage]{article} \usepackage{amsmath} \usepackage{mathrsfs} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm} \usepackage{mathtools} \usepackage{graphicx} \usepackage{color} \usepackage{ucs} \usepackage[utf8x]{inputenc} \usepackage{xparse} \usepackage{hyperref} %----Macros---------- % % Unresolved issues: % % \righttoleftarrow % \lefttorightarrow % % \color{} with HTML colorspec % \bgcolor % \array with options (without options, it's equivalent to the matrix environment) % Of the standard HTML named colors, white, black, red, green, blue and yellow % are predefined in the color package. Here are the rest. \definecolor{aqua}{rgb}{0, 1.0, 1.0} \definecolor{fuschia}{rgb}{1.0, 0, 1.0} \definecolor{gray}{rgb}{0.502, 0.502, 0.502} \definecolor{lime}{rgb}{0, 1.0, 0} \definecolor{maroon}{rgb}{0.502, 0, 0} \definecolor{navy}{rgb}{0, 0, 0.502} \definecolor{olive}{rgb}{0.502, 0.502, 0} \definecolor{purple}{rgb}{0.502, 0, 0.502} \definecolor{silver}{rgb}{0.753, 0.753, 0.753} \definecolor{teal}{rgb}{0, 0.502, 0.502} % Because of conflicts, \space and \mathop are converted to % \itexspace and \operatorname during preprocessing. % itex: \space{ht}{dp}{wd} % % Height and baseline depth measurements are in units of tenths of an ex while % the width is measured in tenths of an em. \makeatletter \newdimen\itex@wd% \newdimen\itex@dp% \newdimen\itex@thd% \def\itexspace#1#2#3{\itex@wd=#3em% \itex@wd=0.1\itex@wd% \itex@dp=#2ex% \itex@dp=0.1\itex@dp% \itex@thd=#1ex% \itex@thd=0.1\itex@thd% \advance\itex@thd\the\itex@dp% \makebox[\the\itex@wd]{\rule[-\the\itex@dp]{0cm}{\the\itex@thd}}} \makeatother % \tensor and \multiscript \makeatletter \newif\if@sup \newtoks\@sups \def\append@sup#1{\edef\act{\noexpand\@sups={\the\@sups #1}}\act}% \def\reset@sup{\@supfalse\@sups={}}% \def\mk@scripts#1#2{\if #2/ \if@sup ^{\the\@sups}\fi \else% \ifx #1_ \if@sup ^{\the\@sups}\reset@sup \fi {}_{#2}% \else \append@sup#2 \@suptrue \fi% \expandafter\mk@scripts\fi} \def\tensor#1#2{\reset@sup#1\mk@scripts#2_/} \def\multiscripts#1#2#3{\reset@sup{}\mk@scripts#1_/#2% \reset@sup\mk@scripts#3_/} \makeatother % \slash \makeatletter \newbox\slashbox \setbox\slashbox=\hbox{$/$} \def\itex@pslash#1{\setbox\@tempboxa=\hbox{$#1$} \@tempdima=0.5\wd\slashbox \advance\@tempdima 0.5\wd\@tempboxa \copy\slashbox \kern-\@tempdima \box\@tempboxa} \def\slash{\protect\itex@pslash} \makeatother % math-mode versions of \rlap, etc % from Alexander Perlis, "A complement to \smash, \llap, and lap" % http://math.arizona.edu/~aprl/publications/mathclap/ \def\clap#1{\hbox to 0pt{\hss#1\hss}} \def\mathllap{\mathpalette\mathllapinternal} \def\mathrlap{\mathpalette\mathrlapinternal} \def\mathclap{\mathpalette\mathclapinternal} \def\mathllapinternal#1#2{\llap{$\mathsurround=0pt#1{#2}$}} \def\mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}} \def\mathclapinternal#1#2{\clap{$\mathsurround=0pt#1{#2}$}} % Renames \sqrt as \oldsqrt and redefine root to result in \sqrt[#1]{#2} \let\oldroot\root \def\root#1#2{\oldroot #1 \of{#2}} \renewcommand{\sqrt}[2][]{\oldroot #1 \of{#2}} % Manually declare the txfonts symbolsC font \DeclareSymbolFont{symbolsC}{U}{txsyc}{m}{n} \SetSymbolFont{symbolsC}{bold}{U}{txsyc}{bx}{n} \DeclareFontSubstitution{U}{txsyc}{m}{n} % Manually declare the stmaryrd font \DeclareSymbolFont{stmry}{U}{stmry}{m}{n} \SetSymbolFont{stmry}{bold}{U}{stmry}{b}{n} % Manually declare the MnSymbolE font \DeclareFontFamily{OMX}{MnSymbolE}{} \DeclareSymbolFont{mnomx}{OMX}{MnSymbolE}{m}{n} \SetSymbolFont{mnomx}{bold}{OMX}{MnSymbolE}{b}{n} \DeclareFontShape{OMX}{MnSymbolE}{m}{n}{ <-6> MnSymbolE5 <6-7> MnSymbolE6 <7-8> MnSymbolE7 <8-9> MnSymbolE8 <9-10> MnSymbolE9 <10-12> MnSymbolE10 <12-> MnSymbolE12}{} % Declare specific arrows from txfonts without loading the full package \makeatletter \def\re@DeclareMathSymbol#1#2#3#4{% \let#1=\undefined \DeclareMathSymbol{#1}{#2}{#3}{#4}} \re@DeclareMathSymbol{\neArrow}{\mathrel}{symbolsC}{116} \re@DeclareMathSymbol{\neArr}{\mathrel}{symbolsC}{116} \re@DeclareMathSymbol{\seArrow}{\mathrel}{symbolsC}{117} \re@DeclareMathSymbol{\seArr}{\mathrel}{symbolsC}{117} \re@DeclareMathSymbol{\nwArrow}{\mathrel}{symbolsC}{118} \re@DeclareMathSymbol{\nwArr}{\mathrel}{symbolsC}{118} \re@DeclareMathSymbol{\swArrow}{\mathrel}{symbolsC}{119} \re@DeclareMathSymbol{\swArr}{\mathrel}{symbolsC}{119} \re@DeclareMathSymbol{\nequiv}{\mathrel}{symbolsC}{46} \re@DeclareMathSymbol{\Perp}{\mathrel}{symbolsC}{121} \re@DeclareMathSymbol{\Vbar}{\mathrel}{symbolsC}{121} \re@DeclareMathSymbol{\sslash}{\mathrel}{stmry}{12} \re@DeclareMathSymbol{\bigsqcap}{\mathop}{stmry}{"64} \re@DeclareMathSymbol{\biginterleave}{\mathop}{stmry}{"6} \re@DeclareMathSymbol{\invamp}{\mathrel}{symbolsC}{77} \re@DeclareMathSymbol{\parr}{\mathrel}{symbolsC}{77} \makeatother % \llangle, \rrangle, \lmoustache and \rmoustache from MnSymbolE \makeatletter \def\Decl@Mn@Delim#1#2#3#4{% \if\relax\noexpand#1% \let#1\undefined \fi \DeclareMathDelimiter{#1}{#2}{#3}{#4}{#3}{#4}} \def\Decl@Mn@Open#1#2#3{\Decl@Mn@Delim{#1}{\mathopen}{#2}{#3}} \def\Decl@Mn@Close#1#2#3{\Decl@Mn@Delim{#1}{\mathclose}{#2}{#3}} \Decl@Mn@Open{\llangle}{mnomx}{'164} \Decl@Mn@Close{\rrangle}{mnomx}{'171} \Decl@Mn@Open{\lmoustache}{mnomx}{'245} \Decl@Mn@Close{\rmoustache}{mnomx}{'244} \makeatother % Widecheck \makeatletter \DeclareRobustCommand\widecheck[1]{{\mathpalette\@widecheck{#1}}} \def\@widecheck#1#2{% \setbox\z@\hbox{\m@th$#1#2$}% \setbox\tw@\hbox{\m@th$#1% \widehat{% \vrule\@width\z@\@height\ht\z@ \vrule\@height\z@\@width\wd\z@}$}% \dp\tw@-\ht\z@ \@tempdima\ht\z@ \advance\@tempdima2\ht\tw@ \divide\@tempdima\thr@@ \setbox\tw@\hbox{% \raise\@tempdima\hbox{\scalebox{1}[-1]{\lower\@tempdima\box \tw@}}}% {\ooalign{\box\tw@ \cr \box\z@}}} \makeatother % \mathraisebox{voffset}[height][depth]{something} \makeatletter \NewDocumentCommand\mathraisebox{moom}{% \IfNoValueTF{#2}{\def\@temp##1##2{\raisebox{#1}{$\m@th##1##2$}}}{% \IfNoValueTF{#3}{\def\@temp##1##2{\raisebox{#1}[#2]{$\m@th##1##2$}}% }{\def\@temp##1##2{\raisebox{#1}[#2][#3]{$\m@th##1##2$}}}}% \mathpalette\@temp{#4}} \makeatletter % udots (taken from yhmath) \makeatletter \def\udots{\mathinner{\mkern2mu\raise\p@\hbox{.} \mkern2mu\raise4\p@\hbox{.}\mkern1mu \raise7\p@\vbox{\kern7\p@\hbox{.}}\mkern1mu}} \makeatother %% Fix array \newcommand{\itexarray}[1]{\begin{matrix}#1\end{matrix}} %% \itexnum is a noop \newcommand{\itexnum}[1]{#1} %% Renaming existing commands \newcommand{\underoverset}[3]{\underset{#1}{\overset{#2}{#3}}} \newcommand{\widevec}{\overrightarrow} \newcommand{\darr}{\downarrow} \newcommand{\nearr}{\nearrow} \newcommand{\nwarr}{\nwarrow} \newcommand{\searr}{\searrow} \newcommand{\swarr}{\swarrow} \newcommand{\curvearrowbotright}{\curvearrowright} \newcommand{\uparr}{\uparrow} \newcommand{\downuparrow}{\updownarrow} \newcommand{\duparr}{\updownarrow} \newcommand{\updarr}{\updownarrow} \newcommand{\gt}{>} \newcommand{\lt}{<} \newcommand{\map}{\mapsto} \newcommand{\embedsin}{\hookrightarrow} \newcommand{\Alpha}{A} \newcommand{\Beta}{B} \newcommand{\Zeta}{Z} \newcommand{\Eta}{H} \newcommand{\Iota}{I} \newcommand{\Kappa}{K} \newcommand{\Mu}{M} \newcommand{\Nu}{N} \newcommand{\Rho}{P} \newcommand{\Tau}{T} \newcommand{\Upsi}{\Upsilon} \newcommand{\omicron}{o} \newcommand{\lang}{\langle} \newcommand{\rang}{\rangle} \newcommand{\Union}{\bigcup} \newcommand{\Intersection}{\bigcap} \newcommand{\Oplus}{\bigoplus} \newcommand{\Otimes}{\bigotimes} \newcommand{\Wedge}{\bigwedge} \newcommand{\Vee}{\bigvee} \newcommand{\coproduct}{\coprod} \newcommand{\product}{\prod} \newcommand{\closure}{\overline} \newcommand{\integral}{\int} \newcommand{\doubleintegral}{\iint} \newcommand{\tripleintegral}{\iiint} \newcommand{\quadrupleintegral}{\iiiint} \newcommand{\conint}{\oint} \newcommand{\contourintegral}{\oint} \newcommand{\infinity}{\infty} \newcommand{\bottom}{\bot} \newcommand{\minusb}{\boxminus} \newcommand{\plusb}{\boxplus} \newcommand{\timesb}{\boxtimes} \newcommand{\intersection}{\cap} \newcommand{\union}{\cup} \newcommand{\Del}{\nabla} \newcommand{\odash}{\circleddash} \newcommand{\negspace}{\!} \newcommand{\widebar}{\overline} \newcommand{\textsize}{\normalsize} \renewcommand{\scriptsize}{\scriptstyle} \newcommand{\scriptscriptsize}{\scriptscriptstyle} \newcommand{\mathfr}{\mathfrak} \newcommand{\statusline}[2]{#2} \newcommand{\tooltip}[2]{#2} \newcommand{\toggle}[2]{#2} % Theorem Environments \theoremstyle{plain} \newtheorem{theorem}{Theorem} \newtheorem{lemma}{Lemma} \newtheorem{prop}{Proposition} \newtheorem{cor}{Corollary} \newtheorem*{utheorem}{Theorem} \newtheorem*{ulemma}{Lemma} \newtheorem*{uprop}{Proposition} \newtheorem*{ucor}{Corollary} \theoremstyle{definition} \newtheorem{defn}{Definition} \newtheorem{example}{Example} \newtheorem*{udefn}{Definition} \newtheorem*{uexample}{Example} \theoremstyle{remark} \newtheorem{remark}{Remark} \newtheorem{note}{Note} \newtheorem*{uremark}{Remark} \newtheorem*{unote}{Note} %------------------------------------------------------------------- \begin{document} %------------------------------------------------------------------- \section*{monad} \begin{quote}% This entry is about the notion of \emph{monad} in [[category theory]]. For other notions see \emph{[[monad (disambiguation)]]}. \end{quote} \vspace{.5em} \hrule \vspace{.5em} \hypertarget{context}{}\subsubsection*{{Context}}\label{context} \hypertarget{higher_algebra}{}\paragraph*{{Higher algebra}}\label{higher_algebra} [[!include higher algebra - contents]] \hypertarget{2category_theory}{}\paragraph*{{2-Category theory}}\label{2category_theory} [[!include 2-category theory - contents]] \hypertarget{contents}{}\section*{{Contents}}\label{contents} \noindent\hyperlink{idea}{Idea}\dotfill \pageref*{idea} \linebreak \noindent\hyperlink{definition}{Definition}\dotfill \pageref*{definition} \linebreak \noindent\hyperlink{monads}{Monads}\dotfill \pageref*{monads} \linebreak \noindent\hyperlink{the_bicategory_of_monads}{The bicategory of monads}\dotfill \pageref*{the_bicategory_of_monads} \linebreak \noindent\hyperlink{Algebras}{Algebras/modules over a monad}\dotfill \pageref*{Algebras} \linebreak \noindent\hyperlink{properties}{Properties}\dotfill \pageref*{properties} \linebreak \noindent\hyperlink{RelationToAdjunctionsAndMonadicity}{Relation to adjunctions and monadicity}\dotfill \pageref*{RelationToAdjunctionsAndMonadicity} \linebreak \noindent\hyperlink{examples}{Examples}\dotfill \pageref*{examples} \linebreak \noindent\hyperlink{monads_in_}{Monads in $Set$}\dotfill \pageref*{monads_in_} \linebreak \noindent\hyperlink{algebra}{Algebra}\dotfill \pageref*{algebra} \linebreak \noindent\hyperlink{topology}{Topology}\dotfill \pageref*{topology} \linebreak \noindent\hyperlink{monads_in_cat}{Monads in Cat}\dotfill \pageref*{monads_in_cat} \linebreak \noindent\hyperlink{other_examples}{Other examples}\dotfill \pageref*{other_examples} \linebreak \noindent\hyperlink{monads_in_higher_category_theory}{Monads in higher category theory}\dotfill \pageref*{monads_in_higher_category_theory} \linebreak \noindent\hyperlink{related_concepts}{Related concepts}\dotfill \pageref*{related_concepts} \linebreak \noindent\hyperlink{references}{References}\dotfill \pageref*{references} \linebreak The entry is about monads in the sense of category theory, for another concept see also [[monad in nonstandard analysis]]. \hypertarget{idea}{}\subsection*{{Idea}}\label{idea} A [[monad]] is a structure that is a lot like a \href{https://ncatlab.org/nlab/show/monoid+in+a+monoidal+category}{monoid}, but that lives in a [[bicategory]] rather than a [[monoidal category]]. In other words, the concept of a monad is a [[horizontal categorification]] of that of a monoid. Monads are among the most pervasive structures in [[category theory]] and its applications: for example, they are central to the category-theoretic account of [[universal algebra]], as well as underlying the theory of [[simplicial objects]] and thus, via the [[Dold-Kan correspondence]], much of [[homological algebra]]. \hypertarget{definition}{}\subsection*{{Definition}}\label{definition} \hypertarget{monads}{}\subsubsection*{{Monads}}\label{monads} A \textbf{monad} in a [[bicategory]] $K$ is given by \begin{itemize}% \item an [[object]] $a$, together with \item an [[endomorphism]] $t \colon a \to a$, and \item [[2-cells]] $\eta \colon 1_a \to t$ (the \emph{[[unit of a monad|unit]]} of $t$) and $\mu \colon t \circ t \to t$ (the \emph{multiplication}) \end{itemize} such that the diagrams \begin{displaymath} \itexarray{ t & \stackrel{\eta t}{\to} & t t & \stackrel{t \eta}{\leftarrow} & t \\ & \searrow & \downarrow \mathrlap{\mu} & \swarrow & \\ & & t & & } \qquad \qquad \itexarray{ t t t & \stackrel{\mu t}{\to} & t t \\ \mathllap{t \mu} \downarrow & & \downarrow \mathrlap{\mu} \\ t t & \stackrel{\mu}{\to} & t } \end{displaymath} commute (where certain [[coherence]] [[isomorphism]]s have been omitted). The name ``monad'' and the terms ``unit'', ``multiplication'' and ``associativity'' bear a clear analogy with [[monoids]] (but see also at \emph{[[monad (disambiguation)]]}). Indeed, one can define a monad on an object $a$ of a [[bicategory]] $K$ as just a [[monoid object]] in the endomorphism category $K(a,a)$. Alternatively, monads can be taken as more fundamental, and a [[monoid in a monoidal category]] $C$ can be defined as a monad in $\mathbf{B} C$, the one-object bicategory corresponding to $C$. A third and somewhat less obvious definition says that a monad in $K$ is a \textbf{[[lax 2-functor]]} from the terminal bicategory $1$ to $K$: the unique object $\ast$ of $1$ is sent to the object $a$, the morphism $1_a$ becomes $t$, and $\eta$ and $\mu$ arise from the coherent 2-cells expressing lax functoriality. This in turn is equivalent to saying that a monad is a [[category enriched in a bicategory]] with a single object and single morphism. Among higher-category theorists, it's tempting to suggest that this is the most fundamental definition, and the most basic reason for the ubiquity and importance of monads. Regardless of this, however, the earlier more elementary definitions are both practically and pedagogically essential. Finally, a monad can be defined in terms of the ``Kleisli operation'' taking any map $a \to T b$ to a map $T a \to T b$; see [[extension system]]. We can picture a monad in $K$ as an image of the [[oriental|third oriental]] in $K$. See the remarks at [[monoidal category]]. The data of and axioms for a monad can be expressed graphically as [[string diagrams]]. Writing $T \colon C \to C, \eta, \mu$ for the monad in question (this notation being the standard one when $K = Cat$), these data can be represented as [[monad-data-labeled.png:pic]] Thanks to the distinctive shapes, one can usually omit the labels: [[monad-data-unlabeled.png:pic]] The axioms then appear as: [[monad-axioms-unlabeled.png:pic]] Monads in $Cat$ are sometimes, mostly in older literature, also called \textbf{triple}s (alluding to the triple of data $(A,\mu,i)$), following Eilenberg and Moore. In even older literature, they are also referred to as \textbf{standard constructions}, the original term used by Godement when he introduced the idea. For terminological remarks by Ross Street see category-list \href{http://article.gmane.org/gmane.science.mathematics.categories/225/match=}{here}. \hypertarget{the_bicategory_of_monads}{}\subsubsection*{{The bicategory of monads}}\label{the_bicategory_of_monads} Given the equivalence between monads in $K$ and lax functors $1 \to K$ it is straightforward to define the [[bicategory]] $Mnd(K)$ of monads in $K$ to be the [[lax functor|lax]] [[functor category]] $[1,K]_\ell$, which consists of lax functors, [[lax transformations]] and [[modifications]]. Spelling this out, we see that an object of $Mnd(K)$ is a monad $(a,t,\eta,\mu)$ in $K$. A \textbf{morphism} of monads $(a,t) \to (b,s)$ is given by 1-cell $x \colon a \to b$ together with a 2-cell $\lambda \colon s x \to x t$ satisfying \begin{displaymath} \itexarray{ x & \stackrel{\eta^s x}{\to} & s x \\ \mathllap{x \eta^t} \downarrow & & \downarrow \mathrlap{\lambda} \\ x t & \stackrel{1}{\to} & x t }\qquad \qquad \itexarray{ s s x & \stackrel{s \lambda}{\to} & s x t & \stackrel{\lambda t}{\to} & x t t \\ \mathllap{\mu^s x} \downarrow & & & & \downarrow \mathrlap{x \mu^t} \\ s x & & \stackrel{\lambda}{\to} & & x t } \end{displaymath} Finally, a 2-cell $(x,\lambda) \Rightarrow (y, \kappa)$ is given by a 2-cell $m \colon x \Rightarrow y$ satisfying \begin{displaymath} \itexarray{ s x & \stackrel{s m}{\to} & s y \\ \mathllap{\lambda} \downarrow & & \downarrow \mathrlap{\kappa} \\ x t & \stackrel{m t}{\to} & y t } \end{displaymath} \hypertarget{Algebras}{}\subsubsection*{{Algebras/modules over a monad}}\label{Algebras} Given that a monad in a bicategory $\mathcal{B}$ is nothing but a [[monoid object]] in a hom-category $\mathcal{B}(a,a)$, it is natural to consider a [[module]] over this monoid: a [[module for a monad]]. This notion of module is more general than a module in a [[monoidal category]], however, since it need not live in $\mathcal{B}(a,a)$ but can be in $\mathcal{B}(b,a)$ (for left modules) or $\mathcal{B}(a,c)$ (for right modules). In a [[Cat]]-like [[bicategory]], left modules over a monad are usually called \emph{algebras over the monad}. This terminology is confusing from the point of view of monads as monoids, but is justified because in [[Cat]] itself, such algebras with domain [[terminal category|1]] are just algebras for a monad in the classical sense. Such algebras are a powerful tool to encode general algebraic structures; this is the topic of [[universal algebra]]. The algebras over a monad form its [[Eilenberg-Moore category]], which is characterized by a [[universal property]]. Some monads arise from [[operad]]s, in which case algebras for the monad are the same as algebras for the operad. A [[Lawvere theory]] is another special sort of monad in $Cat$. \hypertarget{properties}{}\subsection*{{Properties}}\label{properties} \hypertarget{RelationToAdjunctionsAndMonadicity}{}\subsubsection*{{Relation to adjunctions and monadicity}}\label{RelationToAdjunctionsAndMonadicity} Every [[adjunction]] $(L \dashv R)$ induces a monad $R \circ L$ and a [[comonad]] $L \circ R$. There is in general more than one adjunction which gives rise to a given monad this way, in fact there is a [[category]] of adjunctions for a given monad. The [[initial object]] in that category is the adjunction over the [[Kleisli category]] of the monad and the [[terminal object]] is that over the [[Eilenberg-Moore category]] of algebras. (e.g. \hyperlink{Borceux}{Borceux, vol. 2, prop. 4.2.2}) The latter is called the \emph{[[monadic adjunction]]}. Moreover, passing from [[adjunctions]] to monads and back to their [[monadic adjunctions]] constitutes itself an [[adjunction]] between adjunctions and monads, called the \emph{[[semantics-structure adjunction]]}. \hypertarget{examples}{}\subsection*{{Examples}}\label{examples} \hypertarget{monads_in_}{}\subsubsection*{{Monads in $Set$}}\label{monads_in_} Many of these monads also have standard usages as [[monad (computer science)|monads in computer science]]. \begin{example} \label{MaybeMonad}\hypertarget{MaybeMonad}{} The free-forgetful [[adjunction]] between [[pointed sets]] and [[sets]] induces an [[endofunctor]] $(-)_* : Set \to Set$ which adds a new disjoint point. This is called the [[maybe monad]] in computer science. \end{example} \begin{example} \label{ListMonad}\hypertarget{ListMonad}{} The free-forgetful [[adjunction]] between [[monoids]] and [[sets]] induces an [[endofunctor]] $T : Set \to Set$ defined by \begin{displaymath} TA := \bigsqcup_{n \ge 0} A^n \end{displaymath} giving the \textbf{free monoid monad}. This also goes by the name [[list monad]] or [[Kleene-Star]] in computer science. The components of the unit $\eta_A : A \to T A$ give inclusions sending each element of $A$ to the corresponding singleton list. The components of the multiplication $\mu_A : T^2 A \to T A$ are the concatenation functions, sending a list of lists to the corresponding list (Known as flattening in computer science). This monad can be defined in any [[monoidal category]] with [[coproducts]] that distribute over the monoidal product. \end{example} \begin{example} \label{StateMonad}\hypertarget{StateMonad}{} For a fixed set of ``states'' $S$, the ($S \times - \dashv (-)^S$)-adjunction induces a monad $(S \times -)^S$ on $Set$ called the [[state monad]]. This is a commonly used monad in computer science. In functional programming languages such as Haskell, states can be used to model ``side effects'' of computations. \end{example} \begin{example} \label{ContinuationMonad}\hypertarget{ContinuationMonad}{} The contravariant [[power set]] functor is its own right adjoint, giving $\Set(A,P B) \cong \Set (B, P A)$. Note that $\hom(A, P B) = \hom(A, \hom(B,\Omega) \cong \hom( A \times B, \Omega) = P(A \times B)$ inducing a \textbf{double power set monad} taking a set $A$ to $P^2 A$. The components of the unit are the [[ultrafilter|principle ultrafilter]] functions $\eta_A : A \to P^2 A$ which send an element $a$ to the set of subsets of $A$ that contain $a$. The components of the multiplication $\mu_A$ is the inverse image function for the map $\mu_{P A} : P A \to P^3 A$. Which can be painfully stated as: the function taking a set of sets of sets of subsets to the set of subsets of $A$ with the property that one of the sets of sets of subsets is the set of all sets of subsets of $A$ that include that particular subset as an element. Replacing the two element [[power object]] $\Omega$ with any other set gives similar monads. In computer science contexts these are known as [[continuation monad|continuation monads]]. This construction can also be generalised for any other [[cartesian closed category]]. For example there is a similar \textbf{double dual monad* on $\Vect_k$.} \end{example} \begin{example} \label{}\hypertarget{}{} [[function monad]] \end{example} \begin{example} \label{}\hypertarget{}{} [[necessity]] [[possibility]] \end{example} \hypertarget{algebra}{}\subsubsection*{{Algebra}}\label{algebra} \begin{example} \label{FreeRModMonad}\hypertarget{FreeRModMonad}{} The free-forgetful [[adjunction]] between [[sets]] and the category of $R$-[[modules]]. This induces the \textbf{free $R$-module monad} $R[-] : Set \to Set$. The \textbf{free abelian group monad} and \textbf{free vector speace monad} are special cases. \end{example} \begin{example} \label{FreeGroupMonad}\hypertarget{FreeGroupMonad}{} The free-forgetful [[adjunction]] between [[sets]] and the category of [[groups]] gives the \textbf{free group monad} $F : Set \to Set$ that sends $A$ to the set $F(A)$ of finite words in the letters $a \in A$ together with inverses $a^{-1}$. \end{example} \hypertarget{topology}{}\subsubsection*{{Topology}}\label{topology} \begin{example} \label{UltrafilterMonad}\hypertarget{UltrafilterMonad}{} There is a [[forgetful functor]] $U : \Top \to \Set$ taking a [[topological space]] to its underlying [[set]]. It is right adjoint to the discrete space functor $D: \Set \to \Top$ taking a set to its [[discrete topology]]. There is also an adjoint pair $\beta \dashv U'$ between the category of [[compact]] [[Hausdorff topological spaces]] and the category of [[topological spaces]], where $\beta$ is the [[Stone-Cech compactification]]. The composites of these two adjoint pairs gives a monad $\beta : \Set \to \Set$ sending a set to its underlying set of the Stone-Cech compactification of its discrete space. It is also known as the [[ultrafilter]] monad as $\beta$ can be thought of as the functor taking a set to its set of ultrafilters. \end{example} \hypertarget{monads_in_cat}{}\subsubsection*{{Monads in Cat}}\label{monads_in_cat} Monads are often considered in the 2-category [[Cat]] where they are given by [[endofunctors]] with a monoid structure on them. In particular, monads \emph{in} [[Cat]] \emph{on} [[Set]] are equivalent to the equational theories studied in universal algebra. In this context, a monad abstracts the concept of an [[algebraic theory]] (such as ``group'' or ``ring''), giving a general notion of [[extra structure]] on an object of a category. Classically, if $\mathbf{T}$ is an algebraic theory (e.g. the theory of groups), a $\mathbf{T}$-structure on a set tells us how to interpret various \emph{terms} (e.g. $(a\cdot c)$) formed from elements of the set, subject to certain \emph{axioms} (e.g. $(a\cdot (b\cdot c))=((a\cdot b)\cdot c)$). A monad collects this up into a functor $T$. For a set $X$, $T X$ is the set of all terms of the theory formed from elements of $X$, with terms identified if axioms force them to be equal. For groups, $T X$ is thus the (underlying set of the) [[free group]] of formal words $a \cdot b \cdot \cdots \cdot s$ from $X$; the fact that $T$ gives [[free object|free]] structures turns out to be [[monadic adjunction|typical]]. To capture the theory fully, we need to include a little more data: a natural map $\eta_X : X \to T X$ recording how each $a \in X$ gives a trivial term $a$, and a map $\mu_X:T T X \to T X$ recording how further terms built from terms are already present as terms in $T X$. Given a monad in [[Cat]] on a category $C$, one can always produce a [[canonical resolution]] of any object of $C$. \hypertarget{other_examples}{}\subsubsection*{{Other examples}}\label{other_examples} \begin{itemize}% \item Monads on [[partial order|posets]] are particularly simple (in particular, they are always [[idempotent monad|idempotent]]). In fact, monads on [[power set]]s are extremely common throughout mathematics; they are known in less categorially-inclined circles as [[Moore closure]]s, and there are many examples there. \item An [[internalization|internal]] monad on the [[subobject classifier]] of a [[topos]] $E$ is a [[Lawvere-Tierney topology]] on $E$. \item If $C$ is a category with [[finite limits]], then a monad in the bicategory of [[spans]] in $C$ is the same thing as an [[internal category]] in $C$. \item A monad in the bicategory [[Prof]] of [[profunctors]] on a category $A$ can be identified with an identity-on-objects functor $A\to B$. \end{itemize} \hypertarget{monads_in_higher_category_theory}{}\subsection*{{Monads in higher category theory}}\label{monads_in_higher_category_theory} There is a [[vertical categorification]] of monads to [[(∞,1)-category|(∞,1)-categories]]. See [[(infinity,1)-monad|(∞,1)-monad]]. in \href{http://arxiv.org/PS_cache/math/pdf/0702/0702299v5.pdf#page=93}{section 3} of \begin{itemize}% \item [[Jacob Lurie]], \emph{Noncommutative algebra} (\href{http://arxiv.org/abs/math/0702299}{arXiv}) \end{itemize} \hypertarget{related_concepts}{}\subsection*{{Related concepts}}\label{related_concepts} \begin{itemize}% \item [[adjunction]], [[comonad]], [[adjoint monad]], [[algebra over a monad]], [[monad with arities]], [[distributive law]], [[monoidal monad]], [[cartesian monad]] \item [[extension system]] \item [[algebraic theory]] / [[Lawvere theory]] / [[(∞,1)-algebraic theory]] \item \textbf{monad} [[2-monad]]/[[doctrine]] / [[(∞,1)-monad]] \begin{itemize}% \item [[monad (in computer science)]], [[monad (in linguistics)]] \item [[Lawvere-Tierney topology]] \item [[idempotent monad]], [[strong monad]] \item [[accessible monad]] \item [[adjoint monad]], [[Frobenius monad]] \item [[finitary monad]] \item [[enriched monad]] \begin{itemize}% \item [[additive monad]] \end{itemize} \item [[strong monad]] \item [[polynomial monad]] \item [[relative monad]] \end{itemize} \item [[operad]] / [[(∞,1)-operad]] \item [[bar construction]] \item [[monadic descent]] \end{itemize} \hypertarget{references}{}\subsection*{{References}}\label{references} Introductions: \begin{itemize}% \item [[The Catsters]], \emph{\href{http://www.youtube.com/view_play_list?p=0E91279846EC843E}{Monads} (five short video lectures)} \item [[John Baez]], \emph{\href{http://math.ucr.edu/home/baez/universal/universal_hyper.pdf}{Universal Algebra and Diagrammatic Reasoning}} (Introductory slides). \item [[Emily Riehl]], \emph{Category theory in context} (p. 154). \end{itemize} Detailed accounts: \begin{itemize}% \item [[Michael Barr]], [[Charles Wells]], \emph{\href{http://www.cwru.edu/artsci/math/wells/pub/ttt.html}{Toposes, Triples and Theories}}. \item [[Francis Borceux|F. Borceux]], \emph{[[Handbook of Categorical Algebra]]}, vol. 2, Ch. 4 ``Monads'' \end{itemize} \begin{itemize}% \item [[Ross Street]], \emph{The formal theory of monads}, J. of Pure and Applied Algebra \textbf{2} (1972), 149--168 () \item [[Ross Street]], [[Steve Lack]], \emph{The formal theory of monads II}, J. Pure Appl. Algebra \textbf{175} (2002), No. 1-3, 243--265, () \item H. Appelgate, [[M. Barr]], [[J. Beck]], [[F. W. Lawvere]], [[F. E. J. Linton]], [[E. Manes]], [[M. Tierney]], [[F. Ulmer]], \emph{Seminar on triples and categorical homology theory}, ETH 1966/67, edited by B.{\tt \symbol{126}}Eckmann, LNM 80, Springer 1969. \end{itemize} Relation to [[universal algebra]]: \begin{itemize}% \item [[Martin Hyland]] and [[John Power]], \emph{The category theoretic understanding of universal algebra: Lawvere theories and monads} (\href{http://www.dpmms.cam.ac.uk/~martin/Research/Publications/2007/hp07.pdf}{pdf}). \item Anthony Voutas, \emph{The basic theory of monads and their connection to universal algebra} (\href{http://cs.anu.edu.au/student/projects/12S1/Reports/Anthony_Voutas_Report.pdf}{pdf}) \end{itemize} In [[higher category theory]]: \begin{itemize}% \item [[T. M. Fiore]], [[N. Gambino]], [[J. Kock]], \emph{Monads in double categories}, \href{http://arxiv.org/abs/1006.0797}{arxiv/1006.0797} \item Gabriella B\"o{}hm, [[Stephen Lack]], [[Ross Street]], \emph{Weak bimonads}, \href{http://arxiv.org/abs/1002.4493}{arxiv/1002.4493} \end{itemize} [[!redirects monad]] [[!redirects monads]] \end{document}