Summary
In , a branch of mathematics, a monad (also triple, triad, standard construction and fundamental construction) is a in the of endofunctors of some fixed category. An endofunctor is a functor mapping a category to itself, and a monad is an endofunctor together with two natural transformations required to fulfill certain coherence conditions. Monads are used in the theory of pairs of adjoint functors, and they generalize closure operators on partially ordered sets to arbitrary categories. Monads are also useful in the theory of datatypes, the denotational semantics of imperative programming languages, and in functional programming languages, allowing languages with non-mutable states to do things such as simulate for-loops; see Monad (functional programming). A monad is a certain type of endofunctor. For example, if and are a pair of adjoint functors, with left adjoint to , then the composition is a monad. If and are inverse functors, the corresponding monad is the identity functor. In general, adjunctions are not 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 , is discussed under the dual theory of comonads. Throughout this article denotes a . A monad on consists of an endofunctor together with two natural transformations: (where denotes the identity functor on ) and (where is the functor from to ). These are required to fulfill the following conditions (sometimes called coherence conditions): (as natural transformations ); here and are formed by "horizontal composition" (as natural transformations ; here denotes the identity transformation from to ). We can rewrite these conditions using the following commutative diagrams: See the article on natural transformations for the explanation of the notations and , or see below the commutative diagrams not using these notions: The first axiom is akin to the associativity in if we think of 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 ).
About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.