ArticleslgStudy

science

Codensity monad

Codensity monad is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Codensity monad rather than just read about it. In short: 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 G:D→C is defined to be the right Kan extension of G along itself, provided that this Kan extension exists.

Key takeaways

  • Codensity monad belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Codensity monad to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Codensity monad from memory before moving on to harder problems.

Reference excerpt

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 G:D→C 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 TG:C→C. The monad structure on TG stems from the universal property of the right Kan extension. The codensity monad exists whenever D is a small category (has only a set, as opposed to a proper class, of morphisms) and C possesses all (small, i.e., set-indexed) 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: TG(c)=∫d∈DG(d)C(c,G(d)), where C(c,G(d)) 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(d), compatible for all the possible d. Thus, as is noted by Avery, 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 G∘F, 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 Kennison and Gildenhuys, though without using the term "codensity". In this formulation, the statement is reviewed by Leinster. A related example is discussed by Leinster: the codensity monad of the inclusion of finite-dimensional vector spaces (over a fixed field k) into all vector spaces is the double dualization monad given by sending a vector space V to its double dual V∗∗=Hom⁡(Hom⁡(V,k),k). Thus, in this example, the end formula mentioned above simplifies to considering (in the notation above) only one object d, namely a one-dimensional vector space, as opposed to considering all objects in D. Adámek and Sousa show that, in a number of situations, the codensity monad of the inclusion D:=Cfp⊆C of finitely presented objects (also known as compact objects) is a double dualization monad with respect to a sufficiently nice cogenerating object. This recovers both the inclusion of finite sets in sets (where a cogenerator is the set of two elements), and also the inclusion of finite-dimensional vector spaces in vector spaces (where the cogenerator is the ground field). Sipoş showed that the algebras over the codensity monad of the inclusion of finite sets (regarded as discrete topological spaces) into topological spaces are equivalent to Stone spaces. Avery 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 Di Liberti shows that the codensity monad is closely related to Isbell duality: for a given small category C, Isbell duality refers to the adjunction 𝒪:SetCop⇄(SetC)op:Spec between the category of presheaves on C (that is, functors from the opposite category of C to sets) and the opposite category of copresheaves on C. The monad Spec∘𝒪 induced by this adjunction is shown to be the codensity monad of the Yoneda embedding y:C→SetCop. Conversely, the codensity monad of a full small dense subcategory K in a cocomplete category C is shown to be induced by Isbell duality.

See also Monadic functor – Operation in algebra and mathematicsPages displaying short descriptions of redirect targets

References

Footnotes

Further reading Codensity Monads at the n-category café.

Worked examples

Example 1 — a first encounter with Codensity monad

Start with the simplest possible case. Write down what Codensity monad claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Codensity monad before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Codensity monad ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Codensity monad

In research
Codensity monad appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Codensity monad in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Codensity monad is common in secondary-school and first-year university syllabi. It links to neighbouring topics Category theory, so understanding it makes those chapters shorter.
In everyday life
Look for Codensity monad outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Codensity monad” →

How to study Codensity monad in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Codensity monad means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Codensity monad out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Codensity monad in simple terms?

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 G:D→C is defined to be the right Kan extension of G along itself, provided that this Kan extension exists.

Why does Codensity monad matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Codensity monad?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Codensity monad.

Tags

  • Category theory

Keep exploring