Kleisli category
{{Short description|Category theory}}
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
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
:
\mathrm{Hom}_{\mathcal{C}_T}(X,Y) &= \mathrm{Hom}_{\mathcal{C}}(X,TY).\end{align}
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
:
where f: X → T Y and g: Y → T Z. The identity morphism is given by the monad unit η:
:.
An alternative way of writing this, which clarifies the category in which each object lives, is used by Mac Lane.{{cite book| last= Mac Lane | date=1998|title= Categories for the Working Mathematician|page=147}} We use very slightly different notation for this presentation. Given the same monad and category as above, we associate with each object in a new object , and for each morphism in a morphism . Together, these objects and morphisms form our category , where we define composition, also called Kleisli composition, by
:
Then the identity morphism in , the Kleisli identity, is
:
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 : X → TY let
:
Composition in the Kleisli category CT can then be written
:
The extension operator satisfies the identities:
:
f^\sharp\circ\eta_X &= f\\
(g^\sharp\circ f)^\sharp &= g^\sharp \circ f^\sharp\end{align}
where f : X → TY and g : Y → TZ. 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 〈T, η, (–)#〉, i.e.
- A function ;
- For each object in , a morphism ;
- For each morphism in , a morphism
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. Using Mac Lane's notation mentioned in the “Formal definition” section above, define a functor F: C → CT by
:
:
and a functor G : CT → C by
:
:
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
:
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''=
For any object X in category C:
:
(G \circ F)(X) &= G(F(X)) \\
&= G(X_T) \\
&= TX.
\end{align}
For any in category C:
:
(G \circ F)(f) &= G(F(f)) \\
&= G((\eta_Y \circ f)^*) \\
&= \mu_Y \circ T(\eta_Y \circ f) \\
&= \mu_Y \circ T\eta_Y \circ Tf \\
&= \text{id}_{TY} \circ Tf \\
&= Tf.
\end{align}
Since is true for any object X in C and is true for any morphism f in C, then . Q.E.D.
References
{{reflist}}
- {{cite book | last=Mac Lane | first=Saunders | authorlink=Saunders Mac Lane | title=Categories for the Working Mathematician | edition=2nd | series=Graduate Texts in Mathematics | volume=5 | publisher=Springer | year=1998 | isbn=0-387-98403-8 | zbl=0906.18001 }}
- {{cite book | editor1-last=Pedicchio | editor1-first=Maria Cristina | editor2-last=Tholen | editor2-first=Walter | title=Categorical foundations. Special topics in order, topology, algebra, and sheaf theory | series=Encyclopedia of Mathematics and Its Applications | volume=97 | publisher=Cambridge University Press | year=2004 | isbn=0-521-83414-7 | zbl=1034.18001 }}
- {{cite book|title=Category Theory in Context|last=Riehl|first=Emily|authorlink=Emily Riehl|publisher=Dover Publications|year=2016|isbn=978-0-486-80903-8|oclc=1006743127|url=https://math.jhu.edu/~eriehl/context.pdf#page=153}}
- {{cite journal |first1=Jacques |last1=Riguet |author1-link=Jacques Riguet |first2=Rene |last2=Guitart |year=1992 |url=http://www.numdam.org/item/CTGDC_1992__33_3_261_0 |title=Enveloppe Karoubienne et categorie de Kleisli |journal=Cahiers de Topologie et Géométrie Différentielle Catégoriques |volume=33 |issue=3 |pages=261–6 |mr=1186950 |zbl=0767.18008 }}
External links
- {{nlab|id=Kleisli+category|title=Kleisli category}}
{{Category theory}}