Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Monad (category theory)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Introduction and definition == {{quote box |align =right |width =33% |quote = We had some time to talk, and during the course of it I realized I’d become less scared of certain topics involving monads. Monads seem to bother a lot of people. There’s even a YouTube video called The Monads Hurt My Head! ... Shortly thereafter, the woman speaking exclaims: What the heck?! How do you even explain what a monad is? |author = John Baez |source = <ref name="Baez" /> }} A monad is a certain type of [[endofunctor]]. For example, if <math>F</math> and <math>G</math> are a pair of [[adjoint functors]], with <math>F</math> left adjoint to <math>G</math>, then the composition <math>G \circ F</math> is a monad. If <math>F</math> and <math>G</math> are inverse to each other, the corresponding monad is the [[identity functor]]. In general, adjunctions are not [[equivalence of categories|equivalences]]—they relate categories of different natures. The monad theory matters as part of the effort to capture what it is that adjunctions 'preserve'. The other half of the theory, of what can be learned likewise from consideration of <math>F \circ G</math>, is discussed under the dual theory of ''comonads''. ===Formal definition=== Throughout this article, <math>C</math> denotes a [[category (mathematics)|category]]. A ''monad'' on <math>C</math> consists of an endofunctor <math>T \colon C \to C</math> together with two [[natural transformation]]s: <math>\eta \colon 1_{C} \to T</math> (where <math>1_{C}</math> denotes the identity functor on <math>C</math>) and <math>\mu \colon T^{2} \to T</math> (where <math>T^{2}</math> is the functor <math>T \circ T</math> from <math>C</math> to <math>C</math>). These are required to fulfill the following conditions (sometimes called [[coherence condition]]s): * <math>\mu \circ T\mu = \mu \circ \mu T</math> (as natural transformations <math>T^{3} \to T</math>); here <math>T\mu</math> and <math>\mu T</math> are formed by "[[Natural transformation#Operations with natural transformations|horizontal composition]]". * <math>\mu \circ T \eta = \mu \circ \eta T = 1_{T}</math> (as natural transformations <math>T \to T</math>; here <math>1_{T}</math> denotes the identity transformation from <math>T</math> to <math>T</math>). We can rewrite these conditions using the following [[commutative diagrams]]: {|style="margin:1em auto;" | [[Image:Coherence law for the multiplication of a monad.svg|center|150px|class=skin-invert]] | {{spaces|12}} | [[Image:Coherence law for the unit of a monad.svg|center|150px|class=skin-invert]] |} See the article on [[natural transformation#Operations with natural transformations|natural transformations]] for the explanation of the notations <math>T\mu</math> and <math>\mu T</math>, or see below the commutative diagrams not using these notions: {|style="margin:1em auto;" | [[Image:Monad multiplication explicit.svg|class=skin-invert]] | {{spaces|12}} | [[Image:Monad unit explicit.svg|class=skin-invert]] |} The first axiom is akin to the [[associativity]] in [[monoid (category theory)|monoids]] if we think of <math>\mu</math> as the monoid's binary operation, and the second axiom is akin to the existence of an [[identity element]] (which we think of as given by <math>\eta</math>). Indeed, a monad on <math>C</math> can alternatively be defined as a [[monoid (category theory)|monoid]] in the category <math>\mathbf{End}_{C}</math> whose objects are the endofunctors of <math>C</math> and whose morphisms are the natural transformations between them, with the [[monoidal category|monoidal structure]] induced by the composition of endofunctors. ===The power set monad=== The ''power set monad'' is a monad <math>\mathcal{P}</math> on the category <math>\mathbf{Set}</math>: For a set <math>A</math> let <math>T(A)</math> be the [[power set]] of <math>A</math> and for a function <math>f \colon A \to B</math> let <math>T(f)</math> be the function between the power sets induced by taking [[Image (mathematics)|direct images]] under <math>f</math>. For every set <math>A</math>, we have a map <math>\eta_{A} \colon A \to T(A)</math>, which assigns to every <math>a\in A</math> the [[singleton (mathematics)|singleton]] <math>\{a\}</math>. The function :<math>\mu_{A} \colon T(T(A)) \to T(A)</math> takes a set of sets to its [[Union (set theory)|union]]. These data describe a monad. ===Remarks=== The axioms of a monad are formally similar to the [[monoid]] axioms. In fact, monads are special cases of monoids, namely they are precisely the monoids among [[endofunctor]]s <math>\operatorname{End}(C)</math>, which is equipped with the multiplication given by composition of endofunctors. Composition of monads is not, in general, a monad. For example, the double power set functor <math>\mathcal{P} \circ \mathcal{P}</math> does not admit any monad structure.<ref>{{Citation|doi= 10.1016/j.entcs.2018.11.013| last1=Klin| last2=Salamanca| title= Iterated Covariant Powerset is not a Monad| journal=[[Electronic Notes in Theoretical Computer Science]]| year=2018| volume=341| pages=261–276| doi-access=free}}</ref> === Comonads === The [[Dual (category theory)|categorical dual]] definition is a formal definition of a ''comonad'' (or ''cotriple''); this can be said quickly in the terms that a comonad for a category <math>C</math> is a monad for the [[opposite category]] <math>C^{\mathrm{op}}</math>. It is therefore a functor <math>U</math> from <math>C</math> to itself, with a set of axioms for ''counit'' and ''comultiplication'' that come from reversing the arrows everywhere in the definition just given. Monads are to monoids as comonads are to ''[[comonoid]]s''. Every set is a comonoid in a unique way, so comonoids are less familiar in [[abstract algebra]] than monoids; however, comonoids in the category of vector spaces with its usual tensor product are important and widely studied under the name of [[coalgebra]]s. ===Terminological history=== The notion of monad was invented by [[Roger Godement]] in 1958 under the name "standard construction". Monad has been called "dual standard construction", "triple", "monoid" and "triad".{{Sfn|MacLane|1978|p=138}} The term "monad" is used at latest 1967, by [[Jean Bénabou]].<ref>{{Cite book |last=Bénabou |first=Jean |title=Reports of the Midwest Category Seminar |chapter=Introduction to bicategories |date=1967 |editor-last=Bénabou |editor-first=J. |editor2-last=Davis |editor2-first=R. |editor3-last=Dold |editor3-first=A. |editor4-last=Isbell |editor4-first=J. |editor5-last=MacLane |editor5-first=S. |editor6-last=Oberst |editor6-first=U. |editor7-last=Roos |editor7-first=J. -E. |chapter-url=https://link.springer.com/chapter/10.1007/BFb0074299 |series=Lecture Notes in Mathematics |volume=47 |language=en |location=Berlin, Heidelberg |publisher=Springer |pages=1–77 |doi=10.1007/BFb0074299 |isbn=978-3-540-35545-8}}</ref><ref>{{Cite web |date=2009-04-04 |title=RE: Monads |url=http://article.gmane.org/gmane.science.mathematics.categories/225/ |url-status=dead |archive-url=https://web.archive.org/web/20150326175332/http://article.gmane.org/gmane.science.mathematics.categories/225/match= |archive-date=2015-03-26 |website=[[Gmane]]}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)