Documentation

Mathlib.CategoryTheory.Limits.Types.Limits

Limits in the category of types. #

We show that the category of types has all limits, by providing the usual concrete models.

def CategoryTheory.Limits.Types.coneOfSection {J : Type v} [Category.{w, v} J] {F : Functor J (Type u)} {s : (j : J) → F.obj j} (hs : s F.sections) :

Given a section of a functor F into Type*, construct a cone over F with PUnit as the cone point.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Given a cone over a functor F into Type* and an element in the cone point, construct a section of F.

    Equations
    Instances For
      theorem CategoryTheory.Limits.Types.isLimit_iff {J : Type v} [Category.{w, v} J] {F : Functor J (Type u)} (c : Cone F) :
      Nonempty (IsLimit c) sF.sections, ∃! x : c.pt, ∀ (j : J), (ConcreteCategory.hom (c.π.app j)) x = s j
      noncomputable def CategoryTheory.Limits.Types.isLimitEquivSections {J : Type v} [Category.{w, v} J] {F : Functor J (Type u)} {c : Cone F} (t : IsLimit c) :
      c.pt F.sections

      The equivalence between a limiting cone of F in Type u and the "concrete" definition as the sections of F.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[simp]
        theorem CategoryTheory.Limits.Types.isLimitEquivSections_apply {J : Type v} [Category.{w, v} J] {F : Functor J (Type u)} {c : Cone F} (t : IsLimit c) (j : J) (x : c.pt) :
        @[simp]

        We now provide two distinct implementations in the category of types.

        The first, in the CategoryTheory.Limits.Types.Small namespace, assumes Small.{u} J and constructs J-indexed limits in Type u.

        The second, in the CategoryTheory.Limits.Types.TypeMax namespace constructs limits for functors F : J ⥤ Type (max v u), for J : Type v. This construction is slightly nicer, as the limit is definitionally just F.sections, rather than Shrink F.sections, which makes an arbitrary choice of u-small representative.

        Hopefully we might be able to entirely remove the TypeMax constructions, but for now they are useful glue for the later parts of the library.

        (internal implementation) the limit cone of a functor, implemented as flat sections of a pi type

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          (internal implementation) the fact that the proposed limit cone is the limit

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            noncomputable def CategoryTheory.Limits.Types.limitCone {J : Type v} [Category.{w, v} J] (F : Functor J (Type (max v u))) :

            (internal implementation) the limit cone of a functor, implemented as flat sections of a pi type

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[simp]
              @[simp]
              theorem CategoryTheory.Limits.Types.limitCone_π_app {J : Type v} [Category.{w, v} J] (F : Functor J (Type (max v u))) (j : J) :
              (limitCone F).π.app j = TypeCat.ofHom fun (u : ((Functor.const J).obj F.sections).obj j) => u j

              (internal implementation) the fact that the proposed limit cone is the limit

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                @[simp]
                theorem CategoryTheory.Limits.Types.limitConeIsLimit_lift {J : Type v} [Category.{w, v} J] (F : Functor J (Type (max v u))) (s : Cone F) :
                (limitConeIsLimit F).lift s = TypeCat.ofHom fun (v : s.pt) => fun (j : J) => (ConcreteCategory.hom (s.π.app j)) v,

                The results in this section have a UnivLE.{v, u} hypothesis, but as they only use the constructions from the CategoryTheory.Limits.Types.UnivLE namespace in their definitions (rather than their statements), we leave them in the main CategoryTheory.Limits.Types namespace.

                @[instance 1300]

                The category of types has all limits.

                More specifically, when UnivLE.{v, u}, the category Type u has all v-small limits.

                The equivalence between the abstract limit of F in Type max v u and the "concrete" definition as the sections of F.

                Equations
                Instances For

                  The limit of a functor F : J ⥤ Type _ is naturally isomorphic to F.sections.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    noncomputable def CategoryTheory.Limits.Types.Limit.mk {J : Type v} [Category.{w, v} J] (F : Functor J (Type u)) [HasLimit F] (x : (j : J) → F.obj j) (h : ∀ (j j' : J) (f : j j'), (ConcreteCategory.hom (F.map f)) (x j) = x j') :

                    Construct a term of limit F : Type u from a family of terms x : Π j, F.obj j which are "coherent": ∀ (j j') (f : j ⟶ j'), F.map f (x j) = x j'.

                    Equations
                    Instances For
                      @[simp]
                      theorem CategoryTheory.Limits.Types.Limit.π_mk {J : Type v} [Category.{w, v} J] (F : Functor J (Type u)) [HasLimit F] (x : (j : J) → F.obj j) (h : ∀ (j j' : J) (f : j j'), (ConcreteCategory.hom (F.map f)) (x j) = x j') (j : J) :
                      (ConcreteCategory.hom (limit.π F j)) (mk F x h) = x j
                      theorem CategoryTheory.Limits.Types.limit_ext {J : Type v} [Category.{w, v} J] (F : Functor J (Type u)) [HasLimit F] (x y : limit F) (w : ∀ (j : J), (ConcreteCategory.hom (limit.π F j)) x = (ConcreteCategory.hom (limit.π F j)) y) :
                      x = y
                      theorem CategoryTheory.Limits.Types.limit_ext' {J : Type v} [Category.{w, v} J] (F' : Functor J (Type v)) (x y : limit F') (w : ∀ (j : J), (ConcreteCategory.hom (limit.π F' j)) x = (ConcreteCategory.hom (limit.π F' j)) y) :
                      x = y
                      @[simp]
                      theorem CategoryTheory.Limits.limit.lift_π_apply {J : Type u₁} [Category.{v₁, u₁} J] {C : Type u} [Category.{v, u} C] {F : Functor J C} [HasLimit F] (c : Cone F) (j : J) {F✝ : CCType uF} {carrier : CType w} {instFunLike : (X Y : C) → FunLike (F✝ X Y) (carrier X) (carrier Y)} [inst : ConcreteCategory C F✝] (x : carrier c.pt) :
                      @[simp]
                      theorem CategoryTheory.Limits.limMap_π_apply {J : Type u₁} [Category.{v₁, u₁} J] {C : Type u} [Category.{v, u} C] {F G : Functor J C} [HasLimit F] [HasLimit G] (α : F G) (j : J) {F✝ : CCType uF} {carrier : CType w} {instFunLike : (X Y : C) → FunLike (F✝ X Y) (carrier X) (carrier Y)} [inst : ConcreteCategory C F✝] (x : carrier (limit F)) :
                      @[simp]
                      theorem CategoryTheory.Limits.limit.w_apply {J : Type u₁} [Category.{v₁, u₁} J] {C : Type u} [Category.{v, u} C] (F : Functor J C) [HasLimit F] {j j' : J} (f : j j') {F✝ : CCType uF} {carrier : CType w} {instFunLike : (X Y : C) → FunLike (F✝ X Y) (carrier X) (carrier Y)} [inst : ConcreteCategory C F✝] (x : carrier (limit F)) :
                      @[deprecated CategoryTheory.Limits.limit.w_apply (since := "2026-02-17")]
                      @[deprecated CategoryTheory.Limits.limit.lift_π_apply (since := "2026-02-17")]
                      @[deprecated CategoryTheory.Limits.limMap_π_apply (since := "2026-02-17")]
                      @[deprecated CategoryTheory.Limits.limit.w_apply (since := "2026-02-17")]
                      theorem CategoryTheory.Limits.Types.Limit.w_apply' {J : Type v} [Category.{w, v} J] {F' : Functor J (Type v)} {j j' : J} {x : limit F'} (f : j j') :
                      @[deprecated CategoryTheory.Limits.limit.lift_π_apply (since := "2026-02-17")]
                      @[deprecated CategoryTheory.Limits.limMap_π_apply (since := "2026-02-17")]

                      In this section we verify that instances are available as expected.