Kleisli category

From Wikipedia, the free encyclopedia
(Redirected from Kleisli adjunction)
Jump to navigation Jump to search

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.

Formal definition

[edit | edit source]

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

Obj(𝒞T)=Obj(𝒞),Hom𝒞T(X,Y)=Hom𝒞(X,TY).

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

gTf=μZTgf:XTYT2ZTZ

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

idX=ηX.

An alternative way of writing this, which clarifies the category in which each object lives, is used by MacLane.[1] 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 XT, and for each morphism f:XTY in C a morphism f*:XTYT. Together, these objects and morphisms form our category CT, where we define composition, also called Kleisli composition, by

g*Tf*=(μZTgf)*.

Then the identity morphism in CT, the Kleisli identity, is

idXT=(ηX)*.

Extension operators and Kleisli triples

[edit | edit source]

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=μYTf.

Composition in the Kleisli category CT can then be written

gTf=gf.

The extension operator satisfies the identities:

ηX=idTXfηX=f(gf)=gf

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 tripleT, η, (–)#⟩, i.e.

  • A function T:ob(C)ob(C);
  • For each object A in C, a morphism ηA:AT(A);
  • For each morphism f:AT(B) in C, a morphism f:T(A)T(B)

such that the above three equations for extension operators are satisfied.

Kleisli adjunction

[edit | edit source]

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. Using Mac Lane's notation mentioned in the “Formal definition” section above, define a functor FC → CT by

FX=XT
F(f:XY)=(ηYf)*

and a functor G : CTC by

GYT=TY
G(f*:XTYT)=μYTf

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

εYT=(idTY)*:(TY)TYT.

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

Showing that GF = T

[edit | edit source]

For any object X in category C:

(GF)(X)=G(F(X))=G(XT)=TX.

For any f:XY in category C:

(GF)(f)=G(F(f))=G((ηYf)*)=μYT(ηYf)=μYTηYTf=idTYTf=Tf.

Since (GF)(X)=TX is true for any object X in C and (GF)(f)=Tf is true for any morphism f in C, then GF=T. Q.E.D.

References

[edit | edit source]
  1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
[edit | edit source]