How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Kan Extensions Density and the Free Cocompletion
1 · Prerequisites
- Adjunctions Units and Counits
- Cardinal Arithmetic, Cofinality and the Alephs
- Categories, Functors and Natural Transformations
- Construction of the Natural Numbers
- Countability and Uncountability
- Ends Coends and Weighted Limits
- Filters and Ultrafilters
- Foundations of the Real Numbers for Analysis
- Limits and Colimits
- Monads Comonads and Their Algebras
- Order, Zorn's Lemma, and the Axiom of Choice
- Ordinal Arithmetic and the First Uncountable Ordinal
- Ordinals, Cardinals, and Transfinite Recursion
- Relations, Functions, and Quotients
- Set Theory Beyond Choice: Recorded, Not Proved Here
- Suprema and Infima
- The ZFC Axioms and the Basic Set Constructions
- Universal Properties, Representables and the Yoneda Lemma
2 · Summary
This page uses the published language of functor categories, comma categories, adjunctions, Yoneda, and weighted limits to turn Kan extensions from a universal property into something computable. Restriction along , representables, and categories of elements are the bridges: they let the same object be read as a local extension, a comma-category colimit or limit, and later as a coend or end.
It defines local, global, pointwise, and absolute Kan extensions; proves their uniqueness, the restriction adjunctions, the fully faithful extension theorem, and the coend/end formulas; then reinterprets limits, colimits, adjunctions, and evaluation as Kan extensions. From there it proves density for presheaves, identifies Yoneda as its own pointwise left Kan extension, derives the free-cocompletion theorem for presheaf categories, and closes with the codensity monad and its ultrafilter realization.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Left and right Kan extensions
Definition
Let , , and be categories, let be a functor, and let be a functor (Covariant functor, identity functor, composite functor, and contravariant functor).
A left Kan extension of along is a functor together with a natural transformation
(Natural transformation and its components) such that for every functor and every natural transformation , there exists a unique natural transformation with
Thus is initial among pairs with .
A right Kan extension of along is a functor together with a natural transformation
such that for every functor and every natural transformation , there exists a unique natural transformation with
Thus is terminal among pairs with .
Mac Lane's warning about left and right Kan extensions
Remarks
Mac Lane warns in Chapter X.3 that some authors reverse the names. This library follows Left and right Kan extensions: a left Kan extension comes with a unit , and a right Kan extension comes with a counit .
Nothing mathematical changes with the vocabulary, but the directions of the two structure maps do. This page therefore keeps those arrows visible in every definition and theorem rather than writing only and .
Kan extensions are unique up to unique isomorphism
Statement
Let and be functors.
If and are left Kan extensions of along , then there is a unique natural isomorphism such that
If and are right Kan extensions of along , then there is a unique natural isomorphism such that
So both left and right Kan extensions are unique up to unique compatible isomorphism.
Facts & Assumptions
Given: Functors and ; left Kan extensions and of along ; and right Kan extensions and of along .
A left Kan extension of along is initial among pairs with , and a right Kan extension is terminal among pairs with (Left and right Kan extensions).
Proof
Since is a left Kan extension and is another such pair, [L1] gives a unique natural transformation with ; similarly [L1] gives a unique natural transformation with .
By step 1.1, , while trivially. So the uniqueness clause of [L1] forces ; likewise . Hence is a natural isomorphism, and its compatibility with was built in at step 1.1.
The same argument with the terminal clause of [L1] gives unique and satisfying and , and uniqueness forces and . So right Kan extensions are unique up to unique compatible isomorphism as well.
Global Kan extensions as adjoints to restriction
Definition
Let be a functor with and small, and let be locally small (Small, locally small, and large categories, If is small and is locally small then is locally small; if both are small it is small). Then the functor categories and are legitimate categories (Functor category ).
Precomposition with defines the restriction functor
A global left Kan extension along is a functor
equipped with an adjunction in the sense of Adjunction by unit, counit, and the triangle identities.
Dually, a global right Kan extension along is a functor
equipped with an adjunction .
This is a functor-level notion. It differs from a local Kan extension of one functor in Left and right Kan extensions: forming a global Kan extension requires data for every object of the functor category, not a silent class-indexed choice of one local extension for each .
Lan is left adjoint to restriction, and restriction is left adjoint to Ran
Statement
Let be a functor with and small and locally small, so that the restriction functor
is defined (Global Kan extensions as adjoints to restriction).
Assume that for every functor a local left Kan extension of along is supplied, and for every such a local right Kan extension of along is supplied.
Then the object assignments and admit unique functor structures for which
No class-indexed choice is made inside the proof: the local Kan extensions are part of the data.
Facts & Assumptions
Given: The functor with small and locally small; the restriction functor ; and supplied local left and right Kan extensions for every .
A local left Kan extension of along is a pair initial among natural transformations , and a local right Kan extension is a pair terminal among natural transformations (Left and right Kan extensions).
Chosen universal arrows from each object to a functor assemble uniquely into a left adjoint (Chosen objectwise universal arrows assemble uniquely into a left adjoint).
A left adjoint to a functor is supplied exactly by chosen initial objects in its comma categories, and dually a right adjoint is supplied exactly by chosen terminal objects (A left adjoint exists exactly when chosen initial objects are supplied in every comma category).
Proof
By [F1], each supplied local left Kan extension of a functor is exactly a universal arrow from the object of to the restriction functor , while each supplied local right Kan extension is exactly a terminal object of the corresponding comma category for .
Applying [L1] to the supplied universal arrows of step 1.1 gives a unique functor structure on for which the displayed unit transformations are natural, and with that structure .
Applying the dual clause of [L2] to the supplied terminal objects of step 1.1 gives a unique functor structure on with . Hence .
Comma-category limit and colimit formulae compute Kan extensions
Statement
Let and be functors, and fix .
For the comma category , let
be the diagram sending to .
If has a colimit cocone , then has the objectwise universal property of the left Kan extension value at : for every functor and natural transformation , there is a unique morphism with
Dually, if the diagram
has a limit cone , then has the objectwise universal property of the right Kan extension value at : for every functor and natural transformation , there is a unique morphism with
If such colimits, respectively limits, are supplied for every , then their values and the uniquely forced arrow maps assemble into a functor , respectively . The left unit component is the leg at , and the right counit component is the leg at .
Facts & Assumptions
Given: Functors and ; an object of ; the comma categories and ; and the diagrams and described in the Statement.
The objects of are pairs and the objects of are pairs , with the usual commuting-arrow morphisms (Comma category, slice category, and coslice category).
A colimit is an initial cocone and a limit is a terminal cone: morphisms out of a colimit, and into a limit, are uniquely determined by their composites with the structure maps (Limits and colimits as terminal cones and initial cocones, with existence and uniqueness in their universal properties, Constant diagrams, cones, cocones, and their morphisms).
A left Kan extension of along is initial among pairs with , and a right Kan extension is terminal among pairs with (Left and right Kan extensions).
Proof
Let . For each object of , the morphism is natural in because is natural, so it is a cocone under . By [F2] there is a unique morphism with for every . This is exactly the left objectwise universal property at .
Let . For each object of , the morphism is natural in , hence a cone over . By [F2] there is a unique morphism with for every . This is exactly the right objectwise universal property at .
Suppose the colimits are supplied for all . For , the family is a cocone under , so [F2] gives a unique morphism with ; uniqueness makes identities and composition hold, so the values assemble into a functor, and the leg at is the unit component . The same argument with the cones of step 1.2 assembles the supplied limits into , with counit component the leg at .
Pointwise Kan extensions by the comma-category formula
Definition
Let and be functors.
Suppose is a left Kan extension of along (Left and right Kan extensions). It is pointwise when, for every object of , the value is computed by the comma-category colimit of Comma-category limit and colimit formulae compute Kan extensions: the family of morphisms
indexed by the objects of (Comma category, slice category, and coslice category) is a colimit cocone of the diagram . In particular, at and this leg is .
Suppose instead that is a right Kan extension of along . It is pointwise when, for every object of , the value is computed by the comma-category limit formula: the family
indexed by the objects of is a limit cone of the diagram . In particular, at and this leg is .
Pointwise Kan extensions exist under smallness and completeness hypotheses
Statement
Let and be functors.
If is small, locally small, and cocomplete, then for every the comma category is small and the pointwise left Kan extension value at exists.
If is small, locally small, and complete, then for every the comma category is small and the pointwise right Kan extension value at exists.
These are objectwise existence statements. A global functor or is obtained only when the corresponding colimits or limits are supplied, with chosen universal cones, for every .
Facts & Assumptions
Given: Functors and with small and locally small.
A category is small when its objects and morphisms form sets, and locally small when every hom-collection is a set (Small, locally small, and large categories).
A category is cocomplete when it has all small colimits and complete when it has all small limits (Finite, small, and large limits and colimits; complete and cocomplete categories).
For each object , the comma-category colimit over computes the pointwise left Kan extension value, and the comma-category limit over computes the pointwise right Kan extension value (Comma-category limit and colimit formulae compute Kan extensions, Pointwise Kan extensions by the comma-category formula).
Proof
Because is small and is locally small, the objects of form a set: they are pairs with and , and both pieces are set-sized by [F1]. Its morphisms are arrows of satisfying one extra equation, so they also form a set. The same argument applies to . Thus both comma categories are small.
If is cocomplete, then every small diagram in has a colimit by [F2], so the diagram from into has a colimit for each ; by [L1] that colimit is the pointwise left Kan extension value at . Dually, if is complete, then every diagram from into has a limit, and [L1] makes it the pointwise right Kan extension value at .
The values obtained in step 2.1 exist objectwise. A global pointwise Kan extension functor requires, in addition, that these colimits or limits and their universal cones be supplied for every , because that is the data used in [L1] to assemble the arrow maps of or .
Pointwise Kan extensions as those preserved by representables
Definition
Let and be functors, with and locally small (Small, locally small, and large categories).
Suppose is a right Kan extension of along (Left and right Kan extensions). It is pointwise when, for every object of , the covariant representable functor
(The covariant and contravariant hom-assignments and the hom-bifunctor of a locally small category) sends to a right Kan extension of along .
Suppose is a left Kan extension of along . It is pointwise when, after passage to opposite categories (Opposite category ), the corresponding right Kan extension in is preserved by every covariant representable of , equivalently by every contravariant representable
So the phrase "preserved by representables" is not one definition but two variance-specific ones: covariant representables for right Kan extensions, and contravariant representables after passing to opposites for left Kan extensions.
The comma-category and representable-preservation notions of pointwise Kan extension agree
Statement
Let and be functors, with small and locally small (Small, locally small, and large categories).
For a right Kan extension of along , the two definitions
- pointwise by the comma-category limit formula, and
- pointwise by preservation by all representables,
are equivalent (Pointwise Kan extensions by the comma-category formula, Pointwise Kan extensions as those preserved by representables).
By passage to opposite categories, the same equivalence holds for left Kan extensions.
Facts & Assumptions
Given: Functors and with small and locally small, and a right Kan extension of along .
A right Kan extension is pointwise by the comma-category formula when, for every , the canonical cone with vertex and legs indexed by is a limit cone; it is pointwise by representable preservation when every covariant representable carries it to a right Kan extension in (Pointwise Kan extensions by the comma-category formula, Pointwise Kan extensions as those preserved by representables).
The comma-category formulas compute pointwise Kan extension values (Comma-category limit and colimit formulae compute Kan extensions).
Every covariantly representable functor to preserves all existing small limits (Every covariantly representable functor to Set preserves all existing small limits).
For fixed , the functor is covariantly representable (The covariant and contravariant hom-assignments and the hom-bifunctor of a locally small category).
For a locally small category, evaluation at the identity gives a bijection for every Set-valued functor (Evaluation at the identity gives and proves that the natural-transformation collection is a set).
Proof
Suppose is pointwise by the comma-category formula. Then for each the value is the limit of the diagram on by [F1]. Because is small and locally small, this comma category is small, so [L2] applies to every representable [F2]: is the limit in of the Set-valued diagram obtained by applying to that cone. By [L1], this says carries to a right Kan extension of along . So the comma-category notion implies the representable-preservation notion.
Conversely, suppose every representable carries to a right Kan extension. Fix and . A cone from to the diagram on is equivalently a natural transformation because its component at assigns to each the corresponding leg .
The preserved right Kan universal property gives a bijection from the natural transformations in step 1.2 to By [L3], evaluation at identifies the latter set with . Under these two bijections a morphism is sent to the canonical cone with legs , so the correspondence is natural in . Hence the canonical cone with vertex represents the cone functor and is a limit cone.
Since was arbitrary, is pointwise by the comma-category formula. The left-handed equivalence is the same argument in opposite categories, exactly as encoded in the left definition of [F1].
Absolute Kan extension
Definition
Let be a left Kan extension of along (Left and right Kan extensions). It is absolute when for every functor (Covariant functor, identity functor, composite functor, and contravariant functor), the pair is again a left Kan extension of along .
Dually, a right Kan extension of along is absolute when for every functor , the pair is again a right Kan extension of along .
Pointwise asks for preservation only by representables of the codomain; absolute asks for preservation by every functor out of the codomain and is therefore the stronger condition.
Left adjoints preserve left Kan extensions
Statement
Let and be functors, and let be a left Kan extension of along .
If is left adjoint to , then is a left Kan extension of along .
The right-handed dual is obtained by reversing the arrows, but it is not used as a separate dependency on this page.
Facts & Assumptions
Given: A left Kan extension of along , and an adjunction with unit and counit.
A left Kan extension of along is initial among pairs with (Left and right Kan extensions).
Under an adjunction , the right adjunct of is , and the left adjunct of is (Adjuncts and transposition under an adjunction).
Proof
Let be any natural transformation. By [F2], each component has a right adjunct , and these components form a natural transformation . Since is a left Kan extension, [L1] gives a unique natural transformation with .
Let be the left adjunct of . Then has right adjunct , so by uniqueness of adjuncts it equals . If also satisfied , then its right adjunct would satisfy the same factorization equation as , and [L1] would force that adjunct to equal ; applying [F2] again gives . Therefore is initial among pairs , hence a left Kan extension of along .
A pointwise Kan extension along a fully faithful functor genuinely extends the original functor
Statement
Let be fully faithful.
If is a pointwise left Kan extension of along , then for every object of the unit component
is an isomorphism.
If is a pointwise right Kan extension of along , then for every object the counit component
is an isomorphism.
So a pointwise Kan extension along a fully faithful functor really does restrict back to the original functor.
Facts & Assumptions
Given: A fully faithful functor ; a pointwise left Kan extension of along ; and a pointwise right Kan extension of along .
A functor is fully faithful when every map is bijective (Faithful, full, fully faithful, essentially surjective, and split essentially surjective functors).
The objects of are arrows , and the objects of are arrows (Comma category, slice category, and coslice category).
A pointwise left Kan extension value is the colimit of the diagram over , with leg at equal to ; dually, a pointwise right Kan extension value is the limit over , with leg at equal to (Pointwise Kan extensions by the comma-category formula).
A colimit over a category with a terminal object is the value at that object, and dually a limit over a category with an initial object is the value there, by the universal property of colimits and limits (Limits and colimits as terminal cones and initial cocones, with existence and uniqueness in their universal properties).
Proof
In the object is terminal: for any object , full faithfulness [F1] gives a unique arrow with , and that arrow is exactly the unique morphism in the comma category [F2]. Dually, in the object is initial, by the same full-faithfulness argument.
By [F3], the colimit of the diagram over is the value of the diagram at its terminal object , namely , and the colimit leg there is an isomorphism. Since [L1] identifies with that colimit and with that leg, is an isomorphism. The dual statement for follows from the initial object in and the limit clause of [F3].
Therefore both the left and right pointwise Kan extensions along a fully faithful functor restrict back to the original functor by isomorphism on every object of the image.
Kan extensions as coends and ends
Statement
Let and be functors, with small and locally small (Small, locally small, and large categories).
Suppose functorial choices of the required copowers and powers are supplied, with their universal bijections natural in both index variables, and suppose the resulting coends and ends in exist. Then for each object of :
- the pointwise left Kan extension value of along at is
- the pointwise right Kan extension value of along at is
So pointwise Kan extensions are the coend and end formulas suggested by the hom-weights.
Facts & Assumptions
Given: Functors and with small and locally small, functorial choices of the required powers and copowers, and the resulting ends and coends in .
A weighted colimit represents natural transformations , while a weighted limit represents natural transformations (Set-weighted limits and colimits).
Given functorial choices of powers or copowers whose universal bijections are natural in both index variables, a weighted limit is the corresponding end of powers and a weighted colimit is the corresponding coend of copowers (A weighted limit is an end of powers and a weighted colimit a coend of copowers, The power and the copower of an object by a set).
For fixed , the assignment is a presheaf on , while is a covariant functor on ; both are obtained by composing with the corresponding hom-functor of (The covariant and contravariant hom-assignments and the hom-bifunctor of a locally small category).
The comma-category formulas compute the pointwise left and right Kan extension values (Comma-category limit and colimit formulae compute Kan extensions, Pointwise Kan extensions by the comma-category formula).
Proof
Fix . By [L1], the coend is the weighted colimit of by the presheaf . By [F1], for every morphisms from this object to are in natural bijection with natural transformations . Unwinding the two functors, such a natural transformation is exactly a family of maps indexed by arrows , natural in morphisms of ; that is precisely a cocone under the comma-category diagram at . Therefore the coend has the same objectwise universal property as the pointwise left Kan extension value at , so [L2] identifies them.
Again fix . By [L1], the end is the weighted limit of by the copresheaf . By [F1], for every morphisms from to this object are in natural bijection with natural transformations . Unwinding these data gives exactly a cone over the diagram on with vertex . So this end has the same objectwise universal property as the pointwise right Kan extension value at , and [L2] identifies them.
Since the argument is objectwise in , the displayed coend and end formulas compute the values of the pointwise Kan extensions at every object of .
Limits and colimits are Kan extensions along the functor to the terminal category
Statement
Let be a category, let be the terminal category, and let be the unique functor.
For a diagram :
- a colimit of is a left Kan extension of along ;
- a limit of is a right Kan extension of along .
So the ordinary universal properties of limits and colimits are the Kan extension universal properties for the unique map to the terminal category.
Facts & Assumptions
Given: A diagram and the unique functor .
Limits and colimits are terminal cones and initial cocones (Limits and colimits as terminal cones and initial cocones, with existence and uniqueness in their universal properties).
The comma-category formulas compute left and right Kan extensions (Comma-category limit and colimit formulae compute Kan extensions).
The terminal category has one object and only its identity morphism (Initial object, terminal object, and zero object).
The comma categories and are formed as in Comma category, slice category, and coslice category.
Proof
Let be the unique object of . An object of is an object of together with the unique arrow , and a morphism is exactly a morphism of ; so is canonically just . The same argument shows is also canonically .
Under the identification of step 1.1, the comma-category colimit formula of [L1] says that a left Kan extension value at is an initial cocone under the original diagram . By [F1], that is exactly a colimit of .
Under the same identification, the comma-category limit formula of [L1] says that a right Kan extension value at is a terminal cone over . By [F1], that is exactly a limit of .
Adjunctions as absolute Kan extensions, with the preserved converse
Statement
Let and be functors.
If with unit and counit , then:
- is a left Kan extension of along , and it is absolute;
- is a right Kan extension of along , and it is absolute.
Conversely, if is a left Kan extension of along and is preserved by , then . Dually, if is a right Kan extension of along and is preserved by , then .
The preservation clause in the converse is load-bearing.
Facts & Assumptions
Given: Functors and .
An adjunction consists of a unit and a counit satisfying and (Adjunction by unit, counit, and the triangle identities).
A left Kan extension of along is initial among natural transformations , and a right Kan extension of along is terminal among natural transformations (Left and right Kan extensions).
An absolute Kan extension is one preserved by every functor out of its codomain (Absolute Kan extension, Covariant functor, identity functor, composite functor, and contravariant functor).
Proof
Assume with unit and counit . Let and be given. Define . Naturality of at and the triangle identity give . If also satisfies , then for each naturality of at and the triangle identity force . So is a left Kan extension of along . Dually, for and , the formula gives the unique factorization , so is a right Kan extension of along .
The same formulas prove absoluteness. Let and with . Then gives the unique factorization , so is a left Kan extension of along . Thus is absolute by [F3]. The right-handed argument is dual.
Conversely, suppose is a left Kan extension of along and is preserved by . Applying the preserved Kan-extension property to the identity transformation yields a unique natural transformation with , the first triangle identity. To obtain the second, note that both and are natural transformations whose composites with agree: componentwise, naturality of at and the first triangle identity give By the uniqueness clause in the left Kan universal property, . Hence by [F1]. The right-handed converse is dual.
Evaluation is the limit over the coslice category
Statement
Let be a functor and let be an object of . Then the diagram
has a limit, and that limit is .
The proof is direct: the identity arrow is initial in the coslice category, so no product or equalizer computation is needed.
Facts & Assumptions
Given: A functor and an object of .
The coslice category has objects arrows , and a morphism from to is an arrow with (Comma category, slice category, and coslice category).
A limit is a terminal cone (Limits and colimits as terminal cones and initial cocones, with existence and uniqueness in their universal properties).
The comma-category formulas compute right Kan extensions (Comma-category limit and colimit formulae compute Kan extensions).
Proof
Specialize the right-Kan part of [L1] to . Then the indexing category is exactly the coslice category of [F1].
The object is initial in : for any object , the required morphism from to is itself, and it is unique because its defining equation is . Therefore the image of under the diagram is a limit object. That image is , and its limiting cone has components . By [F2], this says precisely that is the limit of the diagram on .
Evaluation is the colimit over the slice category
Statement
Let be a functor and let be an object of . Then the diagram
has a colimit, and that colimit is .
The proof is again direct: the identity arrow is terminal in the slice category.
Facts & Assumptions
Given: A functor and an object of .
The slice category has objects arrows , and a morphism from to is an arrow with (Comma category, slice category, and coslice category).
A colimit is an initial cocone (Limits and colimits as terminal cones and initial cocones, with existence and uniqueness in their universal properties).
The comma-category formulas compute left Kan extensions (Comma-category limit and colimit formulae compute Kan extensions).
Proof
Specialize the left-Kan part of [L1] to . Then the indexing category is exactly the slice category of [F1].
The object is terminal in : for any object , the required morphism from to is itself, and it is unique because its defining equation is . Therefore the image of under the diagram is a colimit object. That image is , and its colimiting cocone has components . By [F2], this says precisely that is the colimit of the diagram on .
Density theorem for a small category
Statement
Let be small and let be a presheaf. Let
be the diagram sending an object of the category of elements of to the representable presheaf (The category of elements of a covariant functor or a presheaf, The Yoneda assignment and the small-source Yoneda functor, traditionally called the Yoneda embedding).
Then is a colimit of . Equivalently, for every presheaf , cocones from to are in bijection with natural transformations .
Facts & Assumptions
Given: A small category , a presheaf , and the Yoneda embedding .
The category of elements has objects with , and a morphism is an arrow with (The category of elements of a covariant functor or a presheaf).
For small , the Yoneda embedding is the functor sending to (The Yoneda assignment and the small-source Yoneda functor, traditionally called the Yoneda embedding, If is small and is locally small then is locally small; if both are small it is small, Small, locally small, and large categories).
For a presheaf , natural transformations are in bijection with elements of , naturally in both variables (For a presheaf , naturally in and ).
Proof
For each object of , [L1] gives a natural transformation corresponding to the element . If in , then by [F1], so naturality in [L1] gives . Therefore the family is a cocone from to .
Let be any presheaf. By [L1], giving a cocone from to is exactly giving, for each object of , an element such that whenever in , one has . But this is precisely the naturality condition for the assignment to define a natural transformation . Thus cocones from to are exactly natural transformations .
Under the bijection of step 1.2, the canonical cocone of step 1.1 corresponds to the identity transformation . Hence that cocone is universal, and is the colimit of .
The Yoneda embedding is its own pointwise left Kan extension
Statement
Let be small, and let be the Yoneda embedding. Then the identity functor on , together with the identity natural transformation on , is a pointwise left Kan extension of along .
Equivalently, for every presheaf , the comma-category colimit computing at is just itself.
Facts & Assumptions
Given: A small category , its Yoneda embedding , and a presheaf on .
The density theorem expresses as the colimit of the diagram sending to (Density theorem for a small category).
Evaluation at the identity gives a natural bijection between morphisms and elements ; under this bijection the comma category is the category of elements of (For a presheaf , naturally in and , The category of elements of a covariant functor or a presheaf, The Yoneda assignment and the small-source Yoneda functor, traditionally called the Yoneda embedding).
A pointwise left Kan extension at is computed by the colimit over (Pointwise Kan extensions by the comma-category formula).
If comma-category colimits and their universal cocones are supplied at every target object, they assemble uniquely into a left Kan extension functor, with unit given by the identity-indexed legs (Comma-category limit and colimit formulae compute Kan extensions).
Proof
By [F1], the comma category is canonically the category of elements used in [L1], and under that identification its canonical diagram sends an object to the representable presheaf .
The colimit given by [L1] is therefore exactly the comma-category colimit required by [F2] to compute the pointwise left Kan extension of along itself at . That colimit object is .
For a natural transformation , the uniquely forced arrow between the two canonical density colimits is itself, because its composites with all Yoneda legs are the legs indexed by the elements . Thus the assembled arrow maps are those of the identity functor, and the identity-indexed unit legs are identities.
Since these canonical colimits are supplied for every presheaf, [L2] assembles them into a left Kan extension; steps 2.1 and 3.1 identify it with the identity functor and the identity transformation on . By [F2] it is pointwise.
Dense subcategory
Definition
Let be a fully faithful functor with small and locally small (Faithful, full, fully faithful, essentially surjective, and split essentially surjective functors, Small, locally small, and large categories). The functor is dense when the identity functor is a pointwise left Kan extension of along in the sense of Pointwise Kan extensions by the comma-category formula.
Equivalently, for each object of , the canonical diagram indexed by the category of elements of the presheaf (The category of elements of a covariant functor or a presheaf) has colimit . The model case is the Yoneda embedding: it is fully faithful by The Yoneda functor is fully faithful, and it is a full embedding when its object map is injective and satisfies the pointwise self-extension property by The Yoneda embedding is its own pointwise left Kan extension.
When is identified with a full subcategory of and is the inclusion, one also says that is a dense subcategory of .
The presheaf category on a small category is the free cocompletion
Statement
Let be small, let be the Yoneda embedding, let be locally small and cocomplete, and let be a functor.
For each presheaf , choose a colimit in of the canonical density diagram
These chosen colimits assemble into a functor
and this functor is left adjoint to
Conversely, if is any left adjoint, then with one has
More generally, every functor that preserves all small colimits satisfies Every natural transformation between two functors on extends uniquely to a natural transformation between their small-colimit-preserving extensions.
So is the free cocompletion of under small colimits, with the chosen-colimit clause made explicit in the data.
Facts & Assumptions
Given: A small category , the Yoneda embedding , a locally small cocomplete category , and a functor .
The identity functor on the presheaf category is the pointwise left Kan extension of along (The Yoneda embedding is its own pointwise left Kan extension).
A pointwise Kan extension along a fully faithful functor restricts back by isomorphism to the original functor (A pointwise Kan extension along a fully faithful functor genuinely extends the original functor).
For presheaves , cocones from the canonical density diagram of to are exactly natural transformations (Density theorem for a small category).
Natural transformations are naturally in bijection with elements of (For a presheaf , naturally in and ).
Two left adjoints to the same functor are uniquely naturally isomorphic in a way compatible with the adjunction data (Adjoints are unique up to a unique natural isomorphism compatible with the adjunction data).
The comma-category colimit formula computes the pointwise left Kan extension value at each target object (Comma-category limit and colimit formulae compute Kan extensions).
For small , the Yoneda functor is fully faithful (The Yoneda functor is fully faithful, and it is a full embedding when its object map is injective).
Every left adjoint preserves all colimits that exist (Left adjoints preserve every colimit that exists).
Proof
Fix a presheaf . Under the Yoneda bijection [L4], an object of the comma category is exactly a pair with , and the comma-category morphism condition says that a map is precisely an arrow with , exactly as in the category of elements (The category of elements of a covariant functor or a presheaf, The Yoneda assignment and the small-source Yoneda functor, traditionally called the Yoneda embedding). So is canonically , the same indexing category that appears in the self-Kan presentation [L1], and the displayed diagram is the comma-category diagram used by [L6]. Therefore its chosen colimit is the pointwise left Kan extension value of along at . Because these colimits and their universal cocones are supplied for every , [L6] assembles them into a functor . By [L7] the functor is fully faithful, so [L2] shows that this pointwise extension restricts along to up to the canonical isomorphism.
Let , and define the presheaf on . A morphism is, by the chosen colimit universal property, exactly a cocone from the diagram to the constant diagram at . By [L4], giving such a cocone is equivalently giving, for each object of , an element of natural in morphisms of , that is, a cocone from the canonical density diagram of to . By [L3], these cocones are exactly natural transformations . Hence naturally in and , so .
Now let preserve all small colimits and put . By [L3], every presheaf is the colimit of its canonical density diagram of representables. Applying preserves that colimit, so is the colimit of the diagram . By step 1.1 this is exactly , naturally in . Hence .
Since is a left adjoint by step 2.1, [L8] shows that it preserves all small colimits.
Conversely, let with domain the presheaf category, and put . For any and , adjunction and [L4] give , naturally in and . So , and step 2.1 shows is another left adjoint to the same right adjoint. Therefore [L5] gives .
Given , its components induce a morphism between the two chosen density colimits at every presheaf, and the colimit universal properties make these morphisms natural. Conversely, any natural transformation between small-colimit-preserving extensions is determined at by its components on the representables in the canonical density colimit of [L3]. Therefore extension of is unique, which completes the free-cocompletion universal property.
Codensity monad
Definition
Let be a functor, and suppose a right Kan extension of along itself is supplied:
with (Left and right Kan extensions, Natural transformation and its components).
The codensity monad of is the triple on , where the underlying endofunctor is , the unit is the unique natural transformation with
and the multiplication is the unique natural transformation with
The theorem The codensity construction satisfies the monad laws ↗ proves that these data satisfy the axioms of Monad on a category.
The codensity construction satisfies the monad laws
Statement
Let be a functor, and suppose its codensity monad is supplied as in Codensity monad from a right Kan extension of along itself.
Then is a monad on (Monad on a category): the two unit laws and the associativity law all hold.
Facts & Assumptions
Given: A right Kan extension of along itself, and the induced natural transformations and .
In the codensity construction, and (Codensity monad).
A right Kan extension is terminal among natural transformations (Left and right Kan extensions).
A monad is an endofunctor with unit and multiplication satisfying and (Monad on a category).
Proof
The codensity unit is defined by the identity on : by [F1], .
The codensity multiplication is defined by pasting the counit with itself: by [F1], .
To prove the unit laws, compare natural transformations after whiskering with and composing with , which [F2] makes a uniqueness test: by [F1], so ; likewise , where the third equality is naturality of at , so .
For associativity, both composites and are natural transformations . After whiskering with and composing with , the left composite gives by [F1], while the right composite gives , where the third equality is naturality of at and the last uses [F1] again. By the uniqueness clause [F2], the two composites are equal. Thus . Together with step 3.1, this is exactly the monad law package [F3].
The codensity monad of the small skeleton of finite sets is the ultrafilter monad
Statement
Let be the full subcategory of on the standard finite ordinals , and let be the inclusion functor.
Then the codensity monad of exists and is naturally isomorphic to the ultrafilter monad of The ultrafilter endofunctor with principal unit and flattening multiplication. Concretely, for a set the codensity value consists of coherent finite-valued choice operators
satisfying for every map , and these operators are in natural bijection with the ultrafilters on .
Under this bijection, the codensity unit and multiplication agree with the principal unit and flattening multiplication of the ultrafilter monad.
Facts & Assumptions
Given: The inclusion , with the full subcategory on the standard finite ordinals.
Because is small and is locally small and has all small limits, the pointwise right Kan extension of along itself exists; at a set , the comma-category formula identifies its value with the limit of the diagram (Sets and functions form the large locally small category , Pointwise Kan extensions exist under smallness and completeness hypotheses, Set has all small limits, realized as compatible tuples in a set-indexed product, Comma-category limit and colimit formulae compute Kan extensions).
A proper filter is an ultrafilter if and only if for each exactly one of and lies in it; moreover, if a finite union lies in an ultrafilter then one member of that union lies in the ultrafilter (Ultrafilter, Filter on a set, Characterisation of ultrafilters: every set or its complement, Ultrafilters are prime: a union in has a member in ).
The codensity construction gives a monad (Codensity monad, The codensity construction satisfies the monad laws).
The ultrafilter endofunctor with principal unit and flattening multiplication is a monad (The ultrafilter endofunctor with principal unit and flattening multiplication, The ultrafilter endofunctor with principal unit and flattening multiplication is a monad).
Proof
By [L1], an element of is exactly a cone over the diagram . Since an object of is a map , such a cone is exactly a family of chosen elements , one for each , satisfying the compatibility condition for every map .
Given such a coherent family , define , where is the characteristic function of . Let be the unique map, and let be the constant maps with values and . Since and , coherence gives and , so and . If swaps and , then , so exactly one of and lies in for every . If , define by , let recover the first and second bits, and let send only to . Then , , and , so coherence gives and hence . Thus . Finally, if , , and , then , so lies in , contradicting . Therefore is a filter deciding every subset, hence an ultrafilter by [L2].
Conversely, let be an ultrafilter on . For each map , the fibres form a finite partition of , so [L2] gives a unique index with . If , then , so upward closure of the ultrafilter puts into ; uniqueness of the selected partition cell therefore gives . Thus is a coherent family of the kind described in step 1.1.
The two constructions are inverse. Starting from , let be the characteristic function of . Then for any and any , one has exactly when , which by coherence is exactly when , that is, when ; so the ultrafilter selects precisely the fibre of , and step 2.2 recovers . Starting from an ultrafilter , the definition of says exactly when the fibre is the cell selected by in the partition , which is exactly the condition . Hence naturally in .
For , the family is coherent, and the assignment is natural in . On a finite ordinal and an element , the counit of the right Kan extension evaluates at the identity map of , so it returns ; the defining equation in [L3] therefore forces the codensity unit to be . Under step 3.1 this corresponds to the principal ultrafilter at , since exactly when .
Now let be an ultrafilter on , and let be its coherent family from step 2.2. For each , define by sending to the unique index with ; step 2.2 guarantees that this is well-defined. For the flattened ultrafilter of [L4], one has if and only if , so the coherent family attached to by step 2.2 takes the value at . But is exactly the finite-set value produced by in the defining equation of [L3]. Hence the codensity multiplication is identified with ultrafilter flattening. Therefore step 3.1 matches both the codensity unit and multiplication with the principal unit and flattening multiplication of [L4], so the codensity monad of is the ultrafilter monad.
5 · Examples, counterexamples and false statements
FALSE: every Kan extension is pointwise
Statement refuted
That every left or right Kan extension is pointwise.
The witness below is a left Kan extension along a fully faithful functor which is not pointwise.
Facts & Assumptions
Given: The discrete category on two objects ; the category with objects and only the two non-identity arrows and ; the fully faithful inclusion ; the category with objects , identities, and only the two non-identity arrows and ; the functor with and ; and the extension with , , , and the two displayed arrows.
A fully faithful functor is one that is bijective on each hom-set (Faithful, full, fully faithful, essentially surjective, and split essentially surjective functors).
A left Kan extension is initial among pairs with , while pointwise left Kan extensions are computed by the comma-category formula (Left and right Kan extensions, Pointwise Kan extensions by the comma-category formula, The comma-category and representable-preservation notions of pointwise Kan extension agree).
A pointwise left Kan extension along a fully faithful functor would restrict back by isomorphism to the original functor (A pointwise Kan extension along a fully faithful functor genuinely extends the original functor).
An initial object must admit a morphism to every object (Initial object, terminal object, and zero object).
Refutation
The inclusion is fully faithful by [F1], and the pair with and is a left Kan extension of along : if exists, then necessarily and , since has no non-identity arrow out of it and neither does ; and because must carry the arrows and to arrows into and , necessarily , the only object of with arrows to both. Thus and is forced to be the identity on and , so there is exactly one natural transformation .
But is empty: there is no arrow and no arrow in . If were pointwise, [F2] would make the colimit of the empty diagram, hence an initial object of . This is impossible by [F4], since there is no morphism . Therefore is a left Kan extension which is not pointwise.
So the claim that every Kan extension is pointwise is false. The pointwise hypothesis in [F3] is genuinely needed.
FALSE: a left Kan extension along a fully faithful functor always restricts back to the original functor
Statement refuted
That for every fully faithful and every left Kan extension of along , the unit components are automatically isomorphisms.
The published positive theorem A pointwise Kan extension along a fully faithful functor genuinely extends the original functor shows this is true only under the pointwise hypothesis.
Facts & Assumptions
Given: The discrete category with objects and ; the walking span with objects and non-identity arrows and ; the fully faithful inclusion ; the category with objects , identities, and exactly four non-identity arrows , , , and ; the functor with and ; the functor with , , , , and ; and the natural transformation with components and .
A left Kan extension is initial among pairs with (Left and right Kan extensions).
A fully faithful functor is bijective on each hom-set (Faithful, full, fully faithful, essentially surjective, and split essentially surjective functors).
If such a left Kan extension were pointwise, then the unit component at would be an isomorphism (A pointwise Kan extension along a fully faithful functor genuinely extends the original functor).
Refutation
The inclusion is fully faithful because is discrete and has no non-identity arrows between the image objects and , so each hom-set map is bijective as required by [F2].
The pair is a left Kan extension of along . Let and . Because has arrows and , the object must admit arrows to both and . In the only object with arrows to two targets is , via and . Therefore , , , and the two span arrows must be sent to and . So . Then and are forced to be and , whence . Since the only endomorphisms of , , and are identities, the only natural transformation is the identity. Thus satisfies the universal property [F1].
The components and are not isomorphisms, since has no arrows or . Therefore the unrestricted claim is false. By [L1], this also shows that the witness is not pointwise.
FALSE: the free-cocompletion theorem holds for an arbitrary large locally small source category with no change in meaning
Statement refuted
That the statement of The presheaf category on a small category is the free cocompletion remains true with no change in meaning when the source category is merely locally small and may be large.
Under this library's formation rules the smallness hypothesis is not cosmetic: without it, the presheaf category is not a category object on disk, and the Yoneda functor is not a functor into one.
Facts & Assumptions
Given: The large locally small category .
The free-cocompletion theorem is stated for a small source category (The presheaf category on a small category is the free cocompletion).
A functor category is formed only when the source is small; for an arbitrary large locally small , the notation is only metatheoretic shorthand (The Yoneda assignment and the small-source Yoneda functor, traditionally called the Yoneda embedding, If is small and is locally small then is locally small; if both are small it is small).
A category may be locally small without being small (Small, locally small, and large categories).
Refutation
The category is locally small and large, so it satisfies the weakened hypothesis of the false claim by [F2].
But [F1] says that for such a large source the notation is not formed as a category in this library, and [L1] is a theorem about that presheaf category and the Yoneda functor landing in it. So the unchanged large-source sentence is not even a legal instance of the theorem on disk.
Therefore the false claim fails under the house schema: the smallness hypothesis in [L1] is mathematically active here, not removable decoration.
FALSE: the Yoneda embedding preserves colimits
Statement refuted
That the Yoneda embedding (The Yoneda assignment and the small-source Yoneda functor, traditionally called the Yoneda embedding) preserves colimits in general.
The true statement already on disk is the limit half: For a small category, the Yoneda functor preserves and reflects all existing small limits.
Facts & Assumptions
Given: The terminal category with unique object .
In the terminal category, the unique object is in particular initial (Initial object, terminal object, and zero object).
Colimits in a functor category are computed pointwise, so an initial object in has the empty set at (For small source and index categories, chosen target limits and colimits compute the corresponding functor-category limits and colimits pointwise, Sets and functions form the large locally small category ).
The Yoneda embedding sends to the representable presheaf (The Yoneda assignment and the small-source Yoneda functor, traditionally called the Yoneda embedding).
Refutation
By [F1], the object is a colimit of the empty diagram in . If the Yoneda embedding preserved colimits, then would be an initial object of the presheaf category on .
But by [F3], the presheaf takes the value , which is the singleton set . By [F2], an initial presheaf has value at . Therefore is not initial.
So the Yoneda embedding does not preserve colimits in general. The published limit-preservation theorem is not contradicted, because it is about limits, not colimits.
Sources
- E. Riehl, Category Theory in Context, 2nd ed., Definition 6.1.1
- S. Mac Lane, Categories for the Working Mathematician, 2nd ed., Chapter X.3
- B. Richter, From Categories to Homotopy Theory, §§4.1-4.2
- E. Riehl, Category Theory in Context, 2nd ed., Exercise 6.1(ii)
- E. Riehl, Category Theory in Context, 2nd ed., Proposition 6.1.6
- B. Richter, From Categories to Homotopy Theory, §4.1
- E. Riehl, Category Theory in Context, 2nd ed., Theorem 6.2.1
- E. Riehl, Category Theory in Context, 2nd ed., Definition 6.2.6
- S. Mac Lane, Categories for the Working Mathematician, 2nd ed., Chapter X.5
- E. Riehl, Category Theory in Context, 2nd ed., Corollary 6.2.9
- E. Riehl, Category Theory in Context, 2nd ed., Definitions 6.3.5-6.3.6
- E. Riehl, Category Theory in Context, 2nd ed., Theorem 6.3.7
- B. Richter, From Categories to Homotopy Theory, §4.3
- E. Riehl, Category Theory in Context, 2nd ed., Proposition 6.5.2
- E. Riehl, Category Theory in Context, 2nd ed., Lemma 6.3.2
- E. Riehl, Category Theory in Context, 2nd ed., Corollary 6.2.16
- S. Mac Lane, Categories for the Working Mathematician, 2nd ed., Chapter X.4
- F. Loregian, (Co)end Calculus, §2.3
- S. Mac Lane, Categories for the Working Mathematician, 2nd ed., Theorem X.7.1
- E. Riehl, Category Theory in Context, 2nd ed., Proposition 6.5.1
- B. Richter, From Categories to Homotopy Theory, Proposition 4.7.3
- E. Riehl, Category Theory in Context, 2nd ed., Proposition 6.5.4
- B. Richter, From Categories to Homotopy Theory, Proposition 4.7.2
- E. Riehl, Category Theory in Context, 2nd ed., Proposition 6.5.6
- E. Riehl, Category Theory in Context, 2nd ed., Theorem 6.5.9
- T. Leinster, Basic Category Theory, Theorem 6.2.17
- E. Riehl, Category Theory in Context, 2nd ed., Theorem 6.5.10
- B. Richter, From Categories to Homotopy Theory, Corollary 5.4.4
- B. Richter, From Categories to Homotopy Theory, Definition 5.4.1
- E. Riehl, Category Theory in Context, 2nd ed., §6.5
- E. Riehl, Category Theory in Context, 2nd ed., Proposition 6.5.11
- T. Leinster, Basic Category Theory, §6.2
- E. Riehl, Category Theory in Context, 2nd ed., Definition 6.5.12
- T. Leinster, Codensity and the ultrafilter monad, §2
- E. Riehl, Category Theory in Context, 2nd ed., Exercise 6.5(viii)
- E. Riehl, Category Theory in Context, 2nd ed., Example 6.5.14
- T. Leinster, Codensity and the ultrafilter monad, §§2-3
- E. Riehl, Category Theory in Context, 2nd ed., Example 6.2.17
- E. Riehl, Category Theory in Context, 2nd ed., Theorem 6.5.11 and surrounding discussion
- T. Leinster, Basic Category Theory, Warning 6.2.14