Documentation

Mathlib.CategoryTheory.Category.KleisliCat

The Kleisli construction on the Type category #

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

TODO #

Generalise this to work with CategoryTheory.Monad

def CategoryTheory.KleisliCat :
(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.

Equations
Instances For
    def CategoryTheory.KleisliCat.mk (m : Type u → Type u_1) (α : Type u) :

    Construct an object of the Kleisli category from a type.

    Equations
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      theorem CategoryTheory.KleisliCat.ext {m : Type u → Type v} [Monad m] (α β : KleisliCat m) (f g : α β) (h : ∀ (x : α), f x = g x) :
      f = g
      theorem CategoryTheory.KleisliCat.ext_iff {m : Type u → Type v} [Monad m] {α β : KleisliCat m} {f g : α β} :
      f = g ∀ (x : α), f x = g x
      Equations
      @[simp]
      theorem CategoryTheory.KleisliCat.comp_def {m : Type u_1 → Type u_2} [Monad m] (α β γ : KleisliCat m) (xs : α β) (ys : β γ) (a : α) :
      CategoryStruct.comp xs ys a = xs a >>= ys