Documentation

Mathlib.CategoryTheory.Limits.Presheaf

Colimit of representables #

All the definitions in this file are deprecated. The results from this file are now in the folder Mathlib/CategoryTheory/Functor/KanExtension/. In particular, the fact that any presheaf of types is a colimit of representable presheaves is now proven in the fil Mathlib/CategoryTheory/Functor/KanExtension/DenseAtYoneda.lean.

In this file, We show that every presheaf of types on a category C (with Category.{v₁} C) is a colimit of representables. This result is also known as the density theorem, the co-Yoneda lemma and the Ninja Yoneda lemma. Three formulations are given:

In this file, we also study the left Kan extensions of functors A : C ⥤ ℰ along the Yoneda embedding uliftYoneda : C ⥤ Cᵒᵖ ⥤ Type max w v₁ v₂ (when Category.{v₂} ℰ and w is an auxiliary universe). In particular, the definition uliftYonedaAdjunction shows that such a pointwise left Kan extension (which exists when ℰ has colimits) is a left adjoint to the functor restrictedULiftYoneda : ℰ ⥤ Cᵒᵖ ⥤ Type max w v₁ v₂.

In the lemma isLeftKanExtension_along_uliftYoneda_iff, we show that if L : (Cᵒᵖ ⥤ Type max w v₁ v₂) ⥤ ℰ and α : A ⟶ uliftYoneda ⋙ L, then α makes L the left Kan extension of L along yoneda if and only if α is an isomorphism (i.e. L extends A) and L preserves colimits. uniqueExtensionAlongULiftYoneda shows uliftYoneda.leftKanExtension A is unique amongst functors preserving colimits with this property, establishing the presheaf category as the free cocompletion of a category.

Given a functor F : C ⥤ D, we also show construct an isomorphism compULiftYonedaIsoULiftYonedaCompLan : F ⋙ uliftYoneda ≅ uliftYoneda ⋙ F.op.lan, and show that it makes F.op.lan a left Kan extension of F ⋙ uliftYoneda.

Tags #

colimit, representable, presheaf, free cocompletion

References #

@[deprecated "use `restrictedShrinkYonedaHomEquivAux` instead." (since := "2026-08-17")]

Auxiliary definition for restrictedULiftYonedaHomEquiv.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    @[deprecated "Use `restrictedShrinkYonedaHomEquiv_symm_naturality_right` instead." (since := "2026-08-17")]
    @[deprecated "Use `restrictedShrinkYonedaHomEquiv_symm_naturality_left`" (since := "2026-08-17")]
    @[deprecated "Use `restrictedULiftYonedaAdjunction`" (since := "2026-08-27")]

    Auxiliary definition for uliftYonedaAdjunction.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[deprecated CategoryTheory.Presheaf.restrictedULiftYonedaAdjunction (since := "2026-08-17")]

      If L : (Cᵒᵖ ⥤ Type max w v₁ v₂) ⥤ ℰ is a pointwise left Kan extension of a functor A : C ⥤ ℰ along the Yoneda embedding, then L is a left adjoint of restrictedULiftYoneda A : ℰ ⥤ Cᵒᵖ ⥤ Type max w v₁ v₂

      Equations
      Instances For
        @[deprecated CategoryTheory.Presheaf.restrictedULiftYonedaAdjunction_unit_app_app (since := "2026-08-17")]

        Alias of CategoryTheory.Presheaf.restrictedULiftYonedaAdjunction_unit_app_app.

        @[deprecated CategoryTheory.Presheaf.restrictedULiftYonedaAdjunction_homEquiv_app (since := "2026-08-17")]

        Alias of CategoryTheory.Presheaf.restrictedULiftYonedaAdjunction_homEquiv_app.

        @[deprecated "See `denseAtUliftYoneda`" (since := "2026-08-17")]

        Given P : Cᵒᵖ ⥤ Type max w v₁, this is the functor from the opposite category of the category of elements of X which sends an element in P.obj (op X) to the presheaf represented by X. The definition coconeOfRepresentable gives a cocone for this functor which is a colimit and has point P.

        Equations
        Instances For
          @[deprecated "See `denseAtUliftYoneda`" (since := "2026-08-17")]

          This is a cocone with point P for the functor functorToRepresentables P. It is shown in colimitOfRepresentable P that this cocone is a colimit: that is, we have exhibited an arbitrary presheaf P as a colimit of representables.

          The construction of [MLM92], Chapter I, Section 5, Corollary 3.

          Equations
          Instances For
            @[deprecated "No replacement" (since := "2026-08-17")]

            The legs of the cocone coconeOfRepresentable are natural in the choice of presheaf.

            @[deprecated CategoryTheory.denseAtUliftYoneda (since := "2026-08-17")]

            The cocone with point P given by coconeOfRepresentable is a colimit: that is, we have exhibited an arbitrary presheaf P as a colimit of representables.

            The result of [MLM92], Chapter I, Section 5, Corollary 3.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[deprecated "No replacement" (since := "2026-08-17")]

              Show that uliftYoneda.leftKanExtension A is the unique colimit-preserving functor which extends A to the presheaf category.

              The second part of [MLM92], Chapter I, Section 5, Corollary 4. See Property 3 of https://ncatlab.org/nlab/show/Yoneda+extension#properties.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                @[deprecated "No replacement." (since := "2026-08-23")]

                Auxiliary definition for presheafHom.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  @[simp, deprecated "No replacement." (since := "2026-08-23")]
                  @[deprecated "No replacement" (since := "2026-09-20")]

                  Given functors F : C ⥤ D and G : (Cᵒᵖ ⥤ Type max w v₁ v₂) ⥤ (Dᵒᵖ ⥤ Type max w v₁ v₂), and a natural transformation φ : F ⋙ uliftYoneda ⟶ uliftYoneda ⋙ G, this is the (natural) morphism P ⟶ F.op ⋙ G.obj P for all P : Cᵒᵖ ⥤ Type max w v₁ v₂ that is determined by φ.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    @[deprecated "No replacement" (since := "2026-09-20")]
                    @[deprecated "No replacement" (since := "2026-08-23")]

                    Given functors F : C ⥤ D and G : (Cᵒᵖ ⥤ Type max w v₁ v₂) ⥤ (Dᵒᵖ ⥤ Type max w v₁ v₂), and a natural transformation φ : F ⋙ uliftYoneda ⟶ uliftYoneda ⋙ G, this is the canonical natural transformation F.op.lan ⟶ G, which is part of the fact that F.op.lan : (Cᵒᵖ ⥤ Type max w v₁ v₂) ⥤ Dᵒᵖ ⥤ Type max w v₁ v₂ is the left Kan extension of F ⋙ uliftYoneda : C ⥤ Dᵒᵖ ⥤ Type max w v₁ v₂ along uliftYoneda : C ⥤ Cᵒᵖ ⥤ Type max w v₁ v₂.

                    Equations
                    Instances For
                      @[deprecated "No replacement" (since := "2026-08-23")]
                      noncomputable def CategoryTheory.Presheaf.compULiftYonedaIsoULiftYonedaCompLan.presheafHom' {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {F : Functor C D} {G : Functor (Functor Cᵒᵖ (Type (max w v₁ v₂))) (Functor Dᵒᵖ (Type (max w v₁ v₂)))} (φ : F.comp uliftYoneda.{max w v₁, v₂, u₂} ⟶ uliftYoneda.{max w v₂, v₁, u₁}.comp G) [∀ (P : Functor Cᵒᵖ (Type (max w v₁ v₂))), F.op.HasLeftKanExtension P] (P : Functor Cᵒᵖ (Type (max w v₁ v₂))) :
                      P ⟶ F.op.comp (G.obj P)

                      Given functors F : C ⥤ D and G : (Cᵒᵖ ⥤ Type max w v₁ v₂) ⥤ (Dᵒᵖ ⥤ Type max w v₁ v₂), and a natural transformation φ : F ⋙ uliftYoneda ⟶ uliftYoneda ⋙ G, this is the (natural) morphism P ⟶ F.op ⋙ G.obj P for all P : Cᵒᵖ ⥤ Type max w v₁ v₂ that is determined by φ.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        @[deprecated "No replacement" (since := "2026-08-23")]

                        Given a functor F : C ⥤ D, this definition is part of the verification that Functor.LeftExtension.mk F.op.lan (compULiftYonedaIsoULiftYonedaCompLan F).hom is universal, i.e. that F.op.lan : (Cᵒᵖ ⥤ Type max w v₁ v₂) ⥤ Dᵒᵖ ⥤ Type max w v₁ v₂ is the left Kan extension of F ⋙ uliftYoneda : C ⥤ Dᵒᵖ ⥤ Type max w v₁ v₂ along uliftYoneda : C ⥤ Cᵒᵖ ⥤ Type max w v₁ v₂.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          @[deprecated "See `denseAtUliftYoneda`" (since := "2026-09-20")]

                          For a presheaf P, consider the forgetful functor from the category of representable presheaves over P to the category of presheaves. There is a tautological cocone over this functor whose leg for a natural transformation V ⟶ P with V representable is just that natural transformation. (In this version, we allow the presheaf P to have values in a larger universe.)

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            @[deprecated "denseAtUliftYoneda" (since := "2026-09-20")]

                            The tautological cocone with point P is a colimit cocone, exhibiting P as a colimit of representables. (In this version, we allow the presheaf P to have values in a larger universe.)

                            Proposition 2.6.3(i) in [KS06]

                            Equations
                            Instances For
                              @[deprecated "See `denseAtYoneda`" (since := "2026-09-20")]

                              For a presheaf P, consider the forgetful functor from the category of representable presheaves over P to the category of presheaves. There is a tautological cocone over this functor whose leg for a natural transformation V ⟶ P with V representable is just that natural transformation.

                              Equations
                              Instances For
                                @[deprecated "See `denseAtYoneda`" (since := "2026-09-20")]

                                The tautological cocone with point P is a colimit cocone, exhibiting P as a colimit of representables.

                                Proposition 2.6.3(i) in [KS06]

                                Equations
                                Instances For
                                  @[deprecated "Use shrinkCoyonedaCocone" (since := "2026-09-20")]

                                  If F : C ⥤ Type w and C is locally w-small, then for any X : C, this is the colimit cocone which identifies F.obj X to the colimit of (CategoryOfElements.π F).op ⋙ shrinkYoneda.obj X.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    @[deprecated CategoryTheory.Functor.Elements.isColimitShrinkCoyonedaCoconeObj (since := "2026-09-20")]

                                    If F : C ⥤ Type w and C is locally w-small, then for any X : C, F.obj X identifies to the colimit of (CategoryOfElements.π F).op ⋙ shrinkYoneda.obj X.

                                    Equations
                                    Instances For
                                      @[simp, deprecated CategoryTheory.Functor.Elements.shrinkYoneda_map_app_shrinkCoyonedaCocone_ι_app_app (since := "2026-09-20")]
                                      @[deprecated CategoryTheory.Functor.Elements.shrinkCoyonedaCocone (since := "2026-09-20")]

                                      If C is a locally w-small category, this is a (colimit) cocone expressing F : C ⥤ Type w as a colimit of corepresentable functors.

                                      Equations
                                      Instances For
                                        @[deprecated CategoryTheory.Functor.Elements.isColimitShrinkCoyonedaCocone (since := "2026-09-20")]

                                        If F : C ⥤ Type w and C is locally w-small, then F identifies to the colimit of (CategoryOfElements.π F).op ⋙ shrinkYoneda.{w}.flip.

                                        Equations
                                        Instances For