Documentation

Mathlib.CategoryTheory.Limits.Types

Limits in the category of types. #

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

We also give a characterisation of filtered colimits in Type, via colimit.ι F i xi = colimit.ι F j xj ↔ ∃ k (f : i ⟶ k) (g : j ⟶ k), F.map f xi = F.map g xj.

Finally, we prove the category of types has categorical images, and that these agree with the range of a function.

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

The first, in the CategoryTheory.Limits.Types.UnivLE namespace, assumes UnivLE.{v, u} and constructs v-small limits in Type u.

The second, in the CategoryTheory.Limits.Types.TypeMax namespace constructs limits for functors F : J ⥤ TypeMax.{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
    @[simp]
    theorem CategoryTheory.Limits.Types.UnivLE.limitConeIsLimit_lift {J : Type v} [CategoryTheory.SmallCategory J] [UnivLE.{v, u} ] (F : CategoryTheory.Functor J (Type u)) (s : CategoryTheory.Limits.Cone F) (v : s.pt) :
    CategoryTheory.Limits.IsLimit.lift J inst✝ (Type u) CategoryTheory.types F (CategoryTheory.Limits.Types.UnivLE.limitCone F) (CategoryTheory.Limits.Types.UnivLE.limitConeIsLimit F) s v = ↑(equivShrink ↑(CategoryTheory.Functor.sections F)) { val := fun j => J.app inst✝ (Type u) CategoryTheory.types ((CategoryTheory.Functor.const J).obj s.pt) F s j v, property := (_ : ∀ {j j' : J} (f : j j'), CategoryTheory.CategoryStruct.comp (Type u) CategoryTheory.Category.toCategoryStruct (((CategoryTheory.Functor.const J).obj s.pt).obj j) (F.obj j) (F.obj j') (s.app j) (F.map f) v = J.app inst✝ (Type u) CategoryTheory.types ((CategoryTheory.Functor.const J).obj s.pt) F s j' v) }

    (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

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

      Equations
      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

          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.

          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

            The equivalence between the abstract limit of F in TypeMax.{v, u} and the "concrete" definition as the sections of F.

            Equations
            Instances For
              noncomputable def CategoryTheory.Limits.Types.Limit.mk {J : Type v} [CategoryTheory.SmallCategory J] [UnivLE.{v, u} ] (F : CategoryTheory.Functor J (Type u)) (x : (j : J) → F.obj j) (h : ∀ (j j' : J) (f : j j'), J.map CategoryTheory.CategoryStruct.toQuiver (Type u) CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor j j' 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} [CategoryTheory.SmallCategory J] [UnivLE.{v, u} ] (F : CategoryTheory.Functor J (Type u)) (x : (j : J) → F.obj j) (h : ∀ (j j' : J) (f : j j'), J.map CategoryTheory.CategoryStruct.toQuiver (Type u) CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor j j' f (x j) = x j') (j : J) :
                theorem CategoryTheory.Limits.Types.Limit.w_apply {J : Type v} [CategoryTheory.SmallCategory J] [UnivLE.{v, u} ] {F : CategoryTheory.Functor J (Type u)} {j : J} {j' : J} {x : CategoryTheory.Limits.limit F} (f : j j') :
                J.map CategoryTheory.CategoryStruct.toQuiver (Type u) CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor j j' f (CategoryTheory.Limits.limit.π J inst✝ (Type u) CategoryTheory.types F (_ : CategoryTheory.Limits.HasLimit F) j x) = CategoryTheory.Limits.limit.π J inst✝ (Type u) CategoryTheory.types F (_ : CategoryTheory.Limits.HasLimit F) j' x
                @[simp]
                theorem CategoryTheory.Limits.Types.Limit.w_apply' {J : Type v} [CategoryTheory.SmallCategory J] {F : CategoryTheory.Functor J (Type v)} {j : J} {j' : J} {x : CategoryTheory.Limits.limit F} (f : j j') :
                J.map CategoryTheory.CategoryStruct.toQuiver (Type v) CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor j j' f (CategoryTheory.Limits.limit.π J inst✝ (Type v) CategoryTheory.types F (_ : CategoryTheory.Limits.HasLimit F) j x) = CategoryTheory.Limits.limit.π J inst✝ (Type v) CategoryTheory.types F (_ : CategoryTheory.Limits.HasLimit F) j' x

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

                def CategoryTheory.Limits.Types.Quot.Rel {J : Type v} [CategoryTheory.SmallCategory J] (F : CategoryTheory.Functor J TypeMax) :
                (j : J) × F.obj j(j : J) × F.obj jProp

                The relation defining the quotient type which implements the colimit of a functor F : J ⥤ Type u. See CategoryTheory.Limits.Types.Quot.

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

                  A quotient type implementing the colimit of a functor F : J ⥤ Type u, as pairs ⟨j, x⟩ where x : F.obj j, modulo the equivalence relation generated by ⟨j, x⟩ ~ ⟨j', x'⟩ whenever there is a morphism f : j ⟶ j' so F.map f x = x'.

                  Equations
                  Instances For

                    (internal implementation) the colimit cocone of a functor, implemented as a quotient of a sigma type

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

                      (internal implementation) the fact that the proposed colimit cocone is the colimit

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

                        The equivalence between the abstract colimit of F in Type u and the "concrete" definition as a quotient.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          theorem CategoryTheory.Limits.Types.Colimit.w_apply {J : Type v} [CategoryTheory.SmallCategory J] {F : CategoryTheory.Functor J TypeMax} {j : J} {j' : J} {x : F.obj j} (f : j j') :
                          CategoryTheory.Limits.colimit.ι J inst✝ TypeMax CategoryTheory.types F (_ : CategoryTheory.Limits.HasColimit F) j' (J.map CategoryTheory.CategoryStruct.toQuiver TypeMax CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor j j' f x) = CategoryTheory.Limits.colimit.ι J inst✝ TypeMax CategoryTheory.types F (_ : CategoryTheory.Limits.HasColimit F) j x
                          @[simp]
                          theorem CategoryTheory.Limits.Types.Colimit.w_apply' {J : Type v} [CategoryTheory.SmallCategory J] {F : CategoryTheory.Functor J (Type v)} {j : J} {j' : J} {x : F.obj j} (f : j j') :
                          CategoryTheory.Limits.colimit.ι J inst✝ (Type v) CategoryTheory.types F (_ : CategoryTheory.Limits.HasColimit F) j' (J.map CategoryTheory.CategoryStruct.toQuiver (Type v) CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor j j' f x) = CategoryTheory.Limits.colimit.ι J inst✝ (Type v) CategoryTheory.types F (_ : CategoryTheory.Limits.HasColimit F) j x
                          theorem CategoryTheory.Limits.Types.colimit_sound {J : Type v} [CategoryTheory.SmallCategory J] {F : CategoryTheory.Functor J TypeMax} {j : J} {j' : J} {x : F.obj j} {x' : F.obj j'} (f : j j') (w : J.map CategoryTheory.CategoryStruct.toQuiver TypeMax CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor j j' f x = x') :
                          theorem CategoryTheory.Limits.Types.colimit_sound' {J : Type v} [CategoryTheory.SmallCategory J] {F : CategoryTheory.Functor J TypeMax} {j : J} {j' : J} {x : F.obj j} {x' : F.obj j'} {j'' : J} (f : j j'') (f' : j' j'') (w : J.map CategoryTheory.CategoryStruct.toQuiver TypeMax CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor j j'' f x = J.map CategoryTheory.CategoryStruct.toQuiver TypeMax CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor j' j'' f' x') :
                          def CategoryTheory.Limits.Types.FilteredColimit.Rel {J : Type v} [CategoryTheory.SmallCategory J] (F : CategoryTheory.Functor J TypeMax) (x : (j : J) × F.obj j) (y : (j : J) × F.obj j) :

                          An alternative relation on Σ j, F.obj j, which generates the same equivalence relation as we use to define the colimit in Type above, but that is more convenient when working with filtered colimits.

                          Elements in F.obj j and F.obj j' are equivalent if there is some k : J to the right where their images are equal.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            noncomputable def CategoryTheory.Limits.Types.FilteredColimit.isColimitOf {J : Type v} [CategoryTheory.SmallCategory J] (F : CategoryTheory.Functor J TypeMax) (t : CategoryTheory.Limits.Cocone F) (hsurj : ∀ (x : t.pt), i xi, x = J.app inst✝ TypeMax CategoryTheory.types F ((CategoryTheory.Functor.const J).obj t.pt) t i xi) (hinj : ∀ (i j : J) (xi : F.obj i) (xj : F.obj j), J.app inst✝ TypeMax CategoryTheory.types F ((CategoryTheory.Functor.const J).obj t.pt) t i xi = J.app inst✝ TypeMax CategoryTheory.types F ((CategoryTheory.Functor.const J).obj t.pt) t j xjk f g, J.map CategoryTheory.CategoryStruct.toQuiver TypeMax CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor i k f xi = J.map CategoryTheory.CategoryStruct.toQuiver TypeMax CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor j k g xj) :

                            Recognizing filtered colimits of types.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              theorem CategoryTheory.Limits.Types.FilteredColimit.isColimit_eq_iff {J : Type v} [CategoryTheory.SmallCategory J] (F : CategoryTheory.Functor J TypeMax) [CategoryTheory.IsFilteredOrEmpty J] {t : CategoryTheory.Limits.Cocone F} (ht : CategoryTheory.Limits.IsColimit t) {i : J} {j : J} {xi : F.obj i} {xj : F.obj j} :
                              J.app inst✝ TypeMax CategoryTheory.types F ((CategoryTheory.Functor.const J).obj t.pt) t i xi = J.app inst✝ TypeMax CategoryTheory.types F ((CategoryTheory.Functor.const J).obj t.pt) t j xj k f g, J.map CategoryTheory.CategoryStruct.toQuiver TypeMax CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor i k f xi = J.map CategoryTheory.CategoryStruct.toQuiver TypeMax CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor j k g xj
                              theorem CategoryTheory.Limits.Types.FilteredColimit.colimit_eq_iff {J : Type v} [CategoryTheory.SmallCategory J] (F : CategoryTheory.Functor J TypeMax) [CategoryTheory.IsFilteredOrEmpty J] {i : J} {j : J} {xi : F.obj i} {xj : F.obj j} :
                              CategoryTheory.Limits.colimit.ι J inst✝ TypeMax CategoryTheory.types F (_ : CategoryTheory.Limits.HasColimit F) i xi = CategoryTheory.Limits.colimit.ι J inst✝ TypeMax CategoryTheory.types F (_ : CategoryTheory.Limits.HasColimit F) j xj k f g, J.map CategoryTheory.CategoryStruct.toQuiver TypeMax CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor i k f xi = J.map CategoryTheory.CategoryStruct.toQuiver TypeMax CategoryTheory.CategoryStruct.toQuiver F.toPrefunctor j k g xj
                              def CategoryTheory.Limits.Types.Image {α : Type u} {β : Type u} (f : α β) :

                              the image of a morphism in Type is just Set.range f

                              Equations
                              Instances For
                                Equations

                                the inclusion of Image f into the target

                                Equations
                                Instances For

                                  the universal property for the image factorisation

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

                                    the factorisation of any morphism in Type through a mono.

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

                                      the factorisation through a mono has the universal property of the image.

                                      Equations
                                      Instances For