Harman Patil (Editor)

Kleisli category

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In category theory, a Kleisli category is a category naturally associated to any monad T. It is equivalent to the category of free T-algebras. The Kleisli category is one of two extremal solutions to the question Does every monad arise from an adjunction? The other extremal solution is the Eilenberg–Moore category. Kleisli categories are named for the mathematician Heinrich Kleisli.

Contents

Formal definition

Let 〈T, η, μ〉 be a monad over a category C. The Kleisli category of C is the category CT whose objects and morphisms are given by

O b j ( C T ) = O b j ( C ) , H o m C T ( X , Y ) = H o m C ( X , T Y ) .

That is, every morphism f: X → T Y in C (with codomain TY) can also be regarded as a morphism in CT (but with codomain Y). Composition of morphisms in CT is given by

g T f = μ Z T g f

where f: X → T Y and g: Y → T Z. The identity morphism is given by the monad unit η:

i d X = η X .

An alternative way of writing this, which clarifies the category in which each object lives, is used by Mac Lane. We use very slightly different notation for this presentation. Given the same monad and category C as above, we associate with each object X in  C a new object X T , and for each morphism f : X T Y in  C a morphism f : X T Y T . Together, these objects and morphisms form our category C T , where we define

g T f = ( μ Z T g f ) .

Then the identity morphism in C T is

i d X T = ( η X ) .

Extension operators and Kleisli triples

Composition of Kleisli arrows can be expressed succinctly by means of the extension operator (-)* : Hom(X, TY) → Hom(TX, TY). Given a monad 〈T, η, μ〉 over a category C and a morphism f : XTY let

f = μ Y T f .

Composition in the Kleisli category CT can then be written

g T f = g f .

The extension operator satisfies the identities:

η X = i d T X f η X = f ( g f ) = g f

where f : XTY and g : YTZ. It follows trivially from these properties that Kleisli composition is associative and that ηX is the identity.

In fact, to give a monad is to give a Kleisli triple, i.e.

  • A function T : o b ( C ) o b ( C ) ;
  • For each object A in C , a morphism η A : A T ( A ) ;
  • For each morphism f : A T ( B ) in C , a morphism f : T ( A ) T ( B )
  • such that the above three equations for extension operators are satisfied.

    Kleisli adjunction

    Kleisli categories were originally defined in order to show that every monad arises from an adjunction. That construction is as follows.

    Let 〈T, η, μ〉 be a monad over a category C and let CT be the associated Kleisli category. Define a functor F : CCT by

    F X = X F ( f : X Y ) = η Y f

    and a functor G : CTC by

    G Y = T Y G ( f : X T Y ) = μ Y T f

    One can show that F and G are indeed functors and that F is left adjoint to G. The counit of the adjunction is given by

    ε Y = i d T Y .

    Finally, one can show that T = GF and μ = GεF so that 〈T, η, μ〉 is the monad associated to the adjunction 〈F, G, η, ε〉.

    References

    Kleisli category Wikipedia


    Similar Topics