Questions tagged [monads]

A monad is a functor from a category to itself together with two natural transformations, commonly called μ (the "multiplication") and η (the "unit"), satisfying conditions that make μ monoidal and η an identity for it.

A monad $\Bbb T = (T,\eta,\mu)$ on a category $\mathcal C$ is a functor $T:\mathcal C \to \mathcal C$ together with natural transformations:

  • $\eta : 1_{\mathcal C} \to T$, called the unit,
  • $\mu : TT \to T$, called the multiplication,

such that:

  • (left identity) $T\eta \circ \mu = 1_T$,
  • (right identity) $\mu \circ \eta_T = 1_T$,
  • (associativity) $\mu \circ T\mu = \mu \circ \mu_T$.
266 questions
54
votes
3 answers

Simple explanation of a monad

I have been learning some functional programming recently and I so I have come across monads. I understand what they are in programming terms, but I would like to understand what they are mathematically. Can anyone explain what a monad is using as…
22
votes
1 answer

What are the algebras of the double powerset monad?

Let $\mathscr{P} : \textbf{Set} \to \textbf{Set}^\textrm{op}$ be the (contravariant) powerset functor, taking a set $X$ to its powerset $\mathscr{P}(X)$ and a map $f : X \to Y$ to the inverse image map $f^* : \mathscr{P}(Y) \to \mathscr{P}(X)$. By…
21
votes
1 answer

Is there a way to make tangent bundle a monad?

The tangent bundle functor $T: \mathbf{Diff} \to \mathbf{Diff}$ together with the bundle projection $\pi: T \Rightarrow 1_\mathbf{Diff}$ basically screams 'monad' at me, especially because both $\pi T$ and $T \pi$ satisfy the associativity axiom,…
19
votes
5 answers

Examples of Monads and their Algebras

I'd like to get some examples of monads; specifically, I'd love a big list of different monads and a description of what their algebras are. Alternatively, online resources and especially exercices on monads and their algebras. A recent question…
18
votes
3 answers

Theory of promonads

I'm led to define a promonad in $\bf D$ as a monoid in the category of endo-profunctors of a category $\bf D$, where the product of two profunctors is their composition as profunctors: $$ F\odot G := \int^D F(-,D)\times G(D,-) $$ Is this theory…
fosco
  • 12,564
18
votes
1 answer

Continuations in mathematics: nice examples?

I wondered whether continuations, used in computer science, occur as natural and interesting mathematical structures, perhaps as algebraic (in the theory of monoids?), model-theoretic or type theoretic structures, of some kind. Continuations as I…
16
votes
1 answer

Details in applying the Barr-Beck monadicity theorem to Tannakian reconstruction

The Barr-Beck monadicity theorem gives necessary and sufficient conditions for a category $\mathcal{C}$ to be equivalent to a category of (co)algebras over a (co)monad. A functor $F:\mathcal{C}\to\mathcal{D}$ is said to be comonadic if it has a…
14
votes
2 answers

Examples of a monad in a monoid (i.e. category with one object)?

I've been trying to figure out what having a monad in a monoid (i.e. a category with one object) would mean. As far as I can tell it would be a homomorphism (functor) $T : M → M$, with two elements (natural transformation components) $\eta, \mu :…
Shachaf
  • 355
13
votes
1 answer

Morita theory for algebras for a monad $T$

There are convincing arguments that support the claim that universal algebra is essentially the theory of $\lambda$-accessible monads $T$ over Set. Now, given two equivalent categories of algebras for two different monads $$ \text{Alg}(T) \cong…
13
votes
1 answer

When is the Kleisli category equivalent to the Eilenberg-Moore?

We know that, for any monad $T$, the Kleisli category $\mathcal{C}_T$ embeds into the Eilenberg-Moore category of $T$-algebras $\mathcal{C}^T$ as the full subcategory of free $T$-algebras. In the case of the monad for vector spaces, for example,…
13
votes
1 answer

Do probability distributions form a comonad?

$\def\unit{{\rm unit}}\def\join{{\rm join}}$It's well known that (discrete) probability distributions form a monad. Specifically, if we let $PX$ be the set of discrete probability distributions on elements of $X$, and notate them as a set of pairs…
13
votes
1 answer

Is "polynomials in $x$" a monad?

The construction of polynomials $R \mapsto R[x]$ gives a functor $P: \mathbf{Ring} \to \mathbf{Ring}$ on the category of possibly noncommutative rings. Choosing a ring $R$ for the moment, there is a nice homomorphism $R \to P(R)$ which embeds in…
Hew Wolff
  • 4,550
11
votes
1 answer

Group freely generated by monoid

There are several ways to define the group freely generated by a monoid, all of which (necessarily) produce isomorphic groups. One way starts with a presentation of the monoid, and simply reinterprets this as a presentation of the group. Another way…
10
votes
3 answers

Do adjoint functors really define monads?

It is often claimed as "obvious" that a pair of adjoint functors: $L\colon{\cal V}\to {\cal M}$ and $R\colon{\cal M}\to {\cal V}$ defines a cotriple $(\bot, \epsilon, \delta)$ and a monad. What is wrong with the following counterexample? Let ${\cal…
student
  • 290
  • 2
  • 10
10
votes
1 answer

Category of adjunctions inducing a particular monad

Every pair $F \dashv G$ of adjoint functors $F: \mathcal C \to \mathcal D$, $G: \mathcal D \to \mathcal C$ induces a monad $\mathbb T = (T,\eta,\mu)$ on $\mathcal C$. Given a monad $\mathbb T = (T,\eta,\mu)$ on $\mathcal C$, we define…
marlu
  • 14,264
1
2 3
17 18