mathlib3 documentation


The Kleisli construction on the Type category #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

Define the Kleisli category for (control) monads. category_theory/monad/kleisli defines the general version for a monad on C, and demonstrates the equivalence between the two.


Generalise this to work with category_theory.monad

def category_theory.Kleisli (m : Type u Type v) :
Type (u+1)

The Kleisli category on the (type-)monad m. Note that the monad is not assumed to be lawful yet.

Instances for category_theory.Kleisli

Construct an object of the Kleisli category from a type.

Instances for
@[protected, instance]
theorem category_theory.Kleisli.comp_def {m : Type u_1 Type u_2} [monad m] (α β γ : category_theory.Kleisli m) (xs : α β) (ys : β γ) (a : α) :
(xs ys) a = xs a >>= ys