Every right adjoint functor $F\dashv G:\mathcal{B}\to\mathcal{A}$ yields by a classical result a monad on $\mathcal{A}$ with endofunctor $G\circ F$. The codensity monad $\mathbb{T}^G$ is a generalization of this monad to functors $G:\mathcal{B}\to\mathcal{A}$ merely admitting a right Kan extension $Ran_G G$ of $G$ along itself, with both monads coinciding in case $G:\mathcal{B}\to\mathcal{A}$ is a right adjoint.
The name ‘codensity monad’ stems from the fact that $\mathbb{T}^G$ reduces to the identity monad iff $G:\mathcal{B}\to\mathcal{A}$ is a codense functor. Thus, in general, the codensity monad “measures the failure of $G$ to be codense”.
Let $G:\mathcal{B}\to\mathcal{A}$ be a functor such that the right Kan extension $Ran_G G=(T^G,\;\alpha)$ of $G$ along itself exists with $\alpha :T^G\circ G\Rightarrow G$ the universal 2-cell of the functor $T^G:\mathcal{A}\to\mathcal{A}$. The codensity monad of $G$ is given by the monad
where the unit $\eta^G:id_\mathcal{A}\Rightarrow T^G$ is the natural transformation given by the universal property of $(T^G,\;\alpha)$ with respect to the pair $(id_\mathcal{A},\;1_G)\;$, whereas the multiplication $\mu^G:T^G\circ T^G\Rightarrow T^G$ results from the universal property of $(T^G,\;\alpha)$ with respect to the pair $(T^G\circ T^G,\;\alpha\circ (1_{T^G}\ast\alpha))$.
That this indeed defines a monad follows from the universal properties of the Kan extension. Concerning existence, $Ran_G G$ exists for $G:\mathcal{B}\to\mathcal{A}$ e.g. when $\mathcal{B}$ is small and $\mathcal{A}$ is complete.
In this circumstance, when $\mathcal{B}$ is small and $\mathcal{A}$ is complete, then the codensity monad is equivalently the one that arises from the adjunction
where the left adjoint $hom(-,G):\mathcal{A}\to [\mathcal{B},Set]^{op}$ takes an object $a$ to the functor $hom(a,G-):\mathcal{B}\to Set$. The right adjoint $[\mathcal{B},Set]^{op}\to \mathcal{A}$ is the canonical functor from the free completion of $\mathcal{B}$ to the category $\mathcal{A}$ which has limits. $G$ is codense if and only if the left adjoint is full and faithful.
The Giry monad (as well as a finitely additive version) arise as codensity monads of forgetful functors from subcategories of the category of convex sets to the category of measurable spaces (Avery 14).
The codensity monad of the inclusion FinSet $\hookrightarrow$Set is the ultrafilter monad. Its algebras are compact Hausdorff spaces.
The codensity monad of the inclusion $FinGrp \hookrightarrow$ Grp, is the profinite completion monad, whose algebras may be identified with profinite groups – that is, topological groups whose underlying topological space is profinite (Avery 17, Proposition 2.7.10).
The codensity monad of the inclusion $FinSet \to Top$ computes the Stone spectrum? of the Boolean algebra of clopen subsets of a topological space. Its algebras are precisely the Stone spaces. (Sipoș, Theorem 2).
The codensity monad of the inclusion $N \to Top$, where $N$ denotes the full subcategory of Top consisting of arbitrary small products of the Sierpiński space, is the localic spectrum? of the frame of opens of a topological space. Its algebras are precisely the sober spaces. (Sipoș, Theorem 6)
The codensity monad of the inclusion of countable sets in all sets, $Ctbl \hookrightarrow Set$, assigns to each set $X$ the set of ultrafilters on $X$ closed under countable intersections. This still holds for the inclusion of the full subcategory of $Ctbl$ on the single set $\mathbb{N}$.
More generally, the codensity monad of the inclusion of sets of cardinality less than that of fixed $Y$, $Set_{\lt Y} \hookrightarrow Set$, assigns to each set $X$ the set of $Y$-complete ultrafilters on $X$.
For the codensity monad induced by the inclusion of homotopy types with finite homotopy groups into all homotopy types see there.
….
A very nice overview is provided by
Codensity monads arising from subcategory inclusions are studied in
The role in shape theory is discussed in
Armin Frei, On categorical shape theory , Cah. Top. Géom. Diff. XVII no.3 (1976) pp.261-294. (numdam)
D. Bourn, J.-M. Cordier, Distributeurs et théorie de la forme, Cah. Top. Géom. Diff. Cat. 21 no.2 (1980) pp.161-189. (pdf)
J.-M. Cordier, T. Porter, Shape Theory: Categorical Methods of Approximation , (1989), Mathematics and its Applications, Ellis Horwood. Reprinted Dover (2008).
For a description of the Giry monad and other probability monads as codensity monads, see
Tom Avery?, Codensity and the Giry monad, (arXiv:1410.4432)
Ruben Van Belle, Probability monads as codensity monads. Theory and Applications of Categories 38 (2022), 811–842, (tac)
Other references include
Tom Avery?, Structure and Semantics, (arXiv:1708.01050)
C. Casacuberta, A. Frei, Localizations as idempotent approximations to completions , JPAA 142 (1999) no. 1 pp.25–33. (draft)
Yves Diers, Complétion monadique , Cah. Top. Géom. Diff. Cat. XVII no.4 (1976) pp.362-379. (numdam)
S. Katsumata, T. Sato, T. Uustalu, Codensity lifting of monads and its dual , arXiv:1810.07972 (2012). (abstract)
J. Lambek, B. A. Rattray, Localization and Codensity Triples , Comm. Algebra 1 (1974) pp.145-164.
Jiří Adámek, Lurdes Sousa?, D-Ultrafilters and their Monads, (arXiv:1909.04950)
Andrei Sipos?, Codensity and Stone spaces, (arXiv:1409.1370)
Last revised on July 26, 2022 at 08:47:47. See the history of this page for a list of all contributions to it.