Let be a cartesian closed category, and an object of . Then the Kleisli category of the comonad , denoted , is also a cartesian closed category.
Remark: The Kleisli category of the comonad on is canonically equivalent to the Kleisli category of the monad on .
Let and be objects of . Claim: the product in , considered as an object of , is the product of and in , according to the following series of natural bijections:
Claim: the exponential in , considered as an object of , is the exponential of and in , according to the following series of natural bijections:
where in the last step, we used the prior claim that the product of objects in , when viewed as an object of , gives the product in .
Observe that the object in has an element , corresponding to the canonical isomorphism in . We call this element the “generic element” of in , according to the following theorem. This theorem can be viewed as saying that in the doctrine? of cartesian closed categories, is the result of freely adjoining an arrow to .
Let and be cartesian closed categories, and let be a cartesian closed functor. Let be an object of , and let be an element in . Then there exists an extension of to a cartesian closed functor that takes the generic element in to the element , and this extension is unique up to isomorphism.
On objects, . Let be a map of , i.e., let be the corresponding map in , and define to be the composite
It is straightforward to check that is a cartesian closed functor and is, up to isomorphism, the unique cartesian closed functor taking to .