Definitions
Transfors between 2-categories
Morphisms in 2-categories
Structures in 2-categories
Limits in 2-categories
Structures on 2-categories
symmetric monoidal (∞,1)-category of spectra
Formally dually to how a monad has a Kleisli category so also a comonad $P \colon \mathcal{C}\to\mathcal{C}$ has a (co-)Kleisli category: its objects are the objects of $\mathcal{C}$, a morphism $f \colon c_1 \to c_2$ in the co-Kleisli category is a morphism
in $\mathcal{C}$, and the composition of two such in the co-Kleisli category is represented by the morphism in $\mathcal{C}$ given by
For an idempotent comonad the co-Kleisli category is the coreflective subcategory of its modal types.
In typed functional programming, the Kleisli category of a comonad can be used to model call-by-name? programming languages. Dually, the Kleisli category of a monad may be used to model call-by-value?-programming, see there.
Generally, see at monad (in computer science) for more on this.
(matrix multiplication as (co-)Kleisli composition)
For
$k$ a field
$B$ be a finite set
consider the base change adjoint triple of $B$-indexed sets of $k$-vector spaces ($k$-vector bundles over $B$):
By the assumption that $B$ is finite and since Vect has biproducts, the colimit/coproduct
agree (we have an ambidextrous adjunction) and are both equivalent to the direct sum:
Accordingly, the underlying endofunctors of the induced monad and comonad on $k Vec_B$
agree, to make a self-adjoint functor
which carries the structure both of a monad and of a comonad.
We claim that
the categories of
co-free $(p_B)^\ast \oplus_B$-coalgebras
are both equivalent to the category $k Vec$ of $k$-vector spaces,
where:
the Kleisli category of $\bigoplus_B$ exhibits such linear maps as $B$-tuples of columns of $B \times B$-block matrices;
the coKleisli category of $\bigoplus_B$ exhibits such linear maps as $B$-tuples of rows of $B \times B$-block matrices
with (co)Kleisli composition expressing the operation of block-matrix multiplication.
In particular, on the (co)free algebras of the form $\bigotimes_B (p_B)^\ast k$ this statement holds in the sense of actual $B \times B$-matrices with entries in $k$ (as opposed to block matrices).
Since every linear map admits some $B \times B$-block matrix representation, the second statement implies the first by the Kleisli theorem (see here).
Moreover, the second statement follows by direct inspection of the Kleisli morphisms (and dually for the coKleisli morphisms):
For this, identify a coKleisli morphism (where our notation now borrows from dependent linear type theory in order to express morphisms between $B$-indexed sets of vector spaces)
with the $B$-tuple of “block $B \times 1$” matrices $(F_b)_{b \colon B}$ that it evidently encodes.
Observe that the comultiplication on the $\bigotimes_B$-comonad is given by the diagonal map into the biproduct, coming from the “randomness unit” (terminology from modal quantum logic):
Using this, one readily sees that the Kleisli construction indeed sends such $B$-tuples $(F_b)_{b \colon B}$ of block-matrix rows to the linear map $F$ which is given by the corresponding full matrix, and that the Kleisli composite with any other
is indeed the row-decomposition of the corresponding matrix product:
The formally dual argument (now using the “definiteness counit”) shows the analogous statement for Kleisli morphisms and column-decomposition of block matrices:
For $P= Jet$ a jet comonad, then morphisms in its coKleisli category are differential operators (see there).
The equivalence of categories between the co-Kleisli category over a given comonad with the Kleisli category of an adjoint monad (if it exists):
Volume 133 1 (1990) 79-82 [doi:10.1016/0021-8693(90)90069-Z]
Some introductory material on comonads, coalgebras and co-Kleisli morphisms:
Last revised on November 3, 2022 at 11:31:43. See the history of this page for a list of all contributions to it.