Codensity monad


In mathematics, especially in category theory, the codensity monad is a fundamental construction associating a monad to a wide class of functors.

Definition

The codensity monad of a functor is defined to be the right Kan extension of G along itself, provided that this Kan extension exists. Thus, by definition it is in particular a functor
The codensity monad exists whenever D is a small category and C possesses all limits. It also exists whenever G has a left adjoint.
By the general formula computing right Kan extensions in terms of ends, the codensity monad is given by the following formula:
where denotes the set of morphisms in C between the indicated objects and the integral denotes the end. The codensity monad therefore amounts to considering maps from c to an object in the image of G, and maps from the set of such morphisms to G, compatible for all the possible d. Thus, as is noted by, codensity monads share some kinship with the concept of integration and double dualization.

Examples

Codensity monads of right adjoints

If the functor G admits a left adjoint F, the codensity monad is given by the composite, together with the standard unit and multiplication maps.

Concrete examples for functors not admitting a left adjoint

In several interesting cases, the functor G is an inclusion of a full subcategory not admitting a left adjoint. For example, the codensity monad of the inclusion of FinSet into Set is the ultrafilter monad associating to any set M the set of ultrafilters on M. This was proven by, though without using the term "codensity". In this formulation, the statement is reviewed by.
A related example is discussed by : the codensity monad of the inclusion of finite-dimensional vector spaces into all vector spaces is the double dualization monad given by sending a vector space V to its double dual
Thus, in this example, the end formula mentioned above simplifies to considering only one object d, namely a one-dimensional vector space, as opposed to considering all objects in D. show that, in a number of situations, the codensity monad of the inclusion
of finitely presented objects is a double dualization monad with respect to a sufficiently nice cogenerating object. This recovers both the inclusion of finite sets in sets, and also the inclusion of finite-dimensional vector spaces in vector spaces.
showed that the algebras over the codensity monad of the inclusion of finite sets into topological spaces are equivalent to Stone spaces.
shows that the Giry monad arises as the codensity monad of natural forgetful functors between certain categories of convex vector spaces to measurable spaces.

Relation to Isbell duality

shows that the codensity monad is closely related to Isbell duality: for a given small category C, Isbell duality refers to the adjunction
between the category of presheaves on C and the opposite category of copresheaves on C. The monad
induced by this adjunction is shown to be the codensity monad of the Yoneda embedding
Conversely, the codensity monad of a full small dense subcategory K in a cocomplete category C is shown to be induced by Isbell duality.