Documentation

Mathlib.CategoryTheory.Limits.Shapes.IsTerminal

Initial and terminal objects in a category. #

In this file we define the predicates IsTerminal and IsInitial as well as the class InitialMonoClass.

The classes HasTerminal and HasInitial and the associated notations for terminal and initial objects are defined in Terminal.lean.

References #

Construct a cone for the empty diagram given an object.

Instances For
    @[simp]
    theorem CategoryTheory.Limits.asEmptyCone_π_app {C : Type u₁} [Category.{v₁, u₁} C] (X : C) (X_1 : Discrete PEmpty.{1}) :
    (asEmptyCone X).π.app X_1 = id (Discrete.casesOn X_1 fun (as : PEmpty.{1}) => .elim)

    Construct a cocone for the empty diagram given an object.

    Instances For
      @[simp]
      theorem CategoryTheory.Limits.asEmptyCocone_ι_app {C : Type u₁} [Category.{v₁, u₁} C] (X : C) (X_1 : Discrete PEmpty.{1}) :
      (asEmptyCocone X).ι.app X_1 = id (Discrete.casesOn X_1 fun (as : PEmpty.{1}) => .elim)
      @[reducible, inline]
      abbrev CategoryTheory.Limits.IsTerminal {C : Type u₁} [Category.{v₁, u₁} C] (X : C) :
      Type (max u₁ v₁)

      X is terminal if the cone it induces on the empty diagram is limiting.

      Instances For
        @[reducible, inline]
        abbrev CategoryTheory.Limits.IsInitial {C : Type u₁} [Category.{v₁, u₁} C] (X : C) :
        Type (max u₁ v₁)

        X is initial if the cocone it induces on the empty diagram is colimiting.

        Instances For
          def CategoryTheory.Limits.isTerminalEquivUnique {C : Type u₁} [Category.{v₁, u₁} C] (F : Functor (Discrete PEmpty.{1}) C) (Y : C) :
          IsLimit { pt := Y, π := { app := fun (X : Discrete PEmpty.{1}) => id (Discrete.casesOn X fun (as : PEmpty.{1}) => .elim), naturality := } } ((X : C) → Unique (X Y))

          An object Y is terminal iff for every X there is a unique morphism X ⟶ Y.

          Instances For
            def CategoryTheory.Limits.IsTerminal.ofUnique {C : Type u₁} [Category.{v₁, u₁} C] (Y : C) [h : (X : C) → Unique (X Y)] :

            An object Y is terminal if for every X there is a unique morphism X ⟶ Y (as an instance).

            Instances For
              def CategoryTheory.Limits.IsTerminal.ofUniqueHom {C : Type u₁} [Category.{v₁, u₁} C] {Y : C} (h : (X : C) → X Y) (uniq : ∀ (X : C) (m : X Y), m = h X) :

              An object Y is terminal if for every X there is a unique morphism X ⟶ Y (as explicit arguments).

              Instances For

                If α is a preorder with top, then is a terminal object.

                Instances For

                  Transport a term of type IsTerminal across an isomorphism.

                  Instances For

                    If X and Y are isomorphic, then X is terminal iff Y is.

                    Instances For
                      def CategoryTheory.Limits.isInitialEquivUnique {C : Type u₁} [Category.{v₁, u₁} C] (F : Functor (Discrete PEmpty.{1}) C) (X : C) :
                      IsColimit { pt := X, ι := { app := fun (X_1 : Discrete PEmpty.{1}) => id (Discrete.casesOn X_1 fun (as : PEmpty.{1}) => .elim), naturality := } } ((Y : C) → Unique (X Y))

                      An object X is initial iff for every Y there is a unique morphism X ⟶ Y.

                      Instances For
                        def CategoryTheory.Limits.IsInitial.ofUnique {C : Type u₁} [Category.{v₁, u₁} C] (X : C) [h : (Y : C) → Unique (X Y)] :

                        An object X is initial if for every Y there is a unique morphism X ⟶ Y (as an instance).

                        Instances For
                          def CategoryTheory.Limits.IsInitial.ofUniqueHom {C : Type u₁} [Category.{v₁, u₁} C] {X : C} (h : (Y : C) → X Y) (uniq : ∀ (Y : C) (m : X Y), m = h Y) :

                          An object X is initial if for every Y there is a unique morphism X ⟶ Y (as explicit arguments).

                          Instances For

                            If α is a preorder with bot, then is an initial object.

                            Instances For
                              def CategoryTheory.Limits.IsInitial.ofIso {C : Type u₁} [Category.{v₁, u₁} C] {X Y : C} (hX : IsInitial X) (i : X Y) :

                              Transport a term of type IsInitial across an isomorphism.

                              Instances For

                                If X and Y are isomorphic, then X is initial iff Y is.

                                Instances For
                                  def CategoryTheory.Limits.IsTerminal.from {C : Type u₁} [Category.{v₁, u₁} C] {X : C} (t : IsTerminal X) (Y : C) :
                                  Y X

                                  Give the morphism to a terminal object from any other.

                                  Instances For
                                    theorem CategoryTheory.Limits.IsTerminal.hom_ext {C : Type u₁} [Category.{v₁, u₁} C] {X Y : C} (t : IsTerminal X) (f g : Y X) :
                                    f = g

                                    Any two morphisms to a terminal object are equal.

                                    @[simp]
                                    theorem CategoryTheory.Limits.IsTerminal.comp_from {C : Type u₁} [Category.{v₁, u₁} C] {Z : C} (t : IsTerminal Z) {X Y : C} (f : X Y) :
                                    def CategoryTheory.Limits.IsInitial.to {C : Type u₁} [Category.{v₁, u₁} C] {X : C} (t : IsInitial X) (Y : C) :
                                    X Y

                                    Give the morphism from an initial object to any other.

                                    Instances For
                                      theorem CategoryTheory.Limits.IsInitial.hom_ext {C : Type u₁} [Category.{v₁, u₁} C] {X Y : C} (t : IsInitial X) (f g : X Y) :
                                      f = g

                                      Any two morphisms from an initial object are equal.

                                      @[simp]
                                      theorem CategoryTheory.Limits.IsInitial.to_comp {C : Type u₁} [Category.{v₁, u₁} C] {X : C} (t : IsInitial X) {Y Z : C} (f : Y Z) :
                                      CategoryStruct.comp (t.to Y) f = t.to Z

                                      Any morphism from a terminal object is split mono.

                                      Any morphism to an initial object is split epi.

                                      theorem CategoryTheory.Limits.IsTerminal.mono_from {C : Type u₁} [Category.{v₁, u₁} C] {X Y : C} (t : IsTerminal X) (f : X Y) :

                                      Any morphism from a terminal object is mono.

                                      theorem CategoryTheory.Limits.IsInitial.epi_to {C : Type u₁} [Category.{v₁, u₁} C] {X Y : C} (t : IsInitial X) (f : Y X) :
                                      Epi f

                                      Any morphism to an initial object is epi.

                                      If T and T' are terminal, they are isomorphic.

                                      Instances For
                                        def CategoryTheory.Limits.IsInitial.uniqueUpToIso {C : Type u₁} [Category.{v₁, u₁} C] {I I' : C} (hI : IsInitial I) (hI' : IsInitial I') :
                                        I I'

                                        If I and I' are initial, they are isomorphic.

                                        Instances For
                                          @[simp]
                                          theorem CategoryTheory.Limits.IsInitial.uniqueUpToIso_hom {C : Type u₁} [Category.{v₁, u₁} C] {I I' : C} (hI : IsInitial I) (hI' : IsInitial I') :
                                          (hI.uniqueUpToIso hI').hom = hI.to I'
                                          @[simp]
                                          theorem CategoryTheory.Limits.IsInitial.uniqueUpToIso_inv {C : Type u₁} [Category.{v₁, u₁} C] {I I' : C} (hI : IsInitial I) (hI' : IsInitial I') :
                                          (hI.uniqueUpToIso hI').inv = hI'.to I
                                          def CategoryTheory.Limits.isLimitChangeEmptyCone (C : Type u₁) [Category.{v₁, u₁} C] {F₁ : Functor (Discrete PEmpty.{w + 1}) C} {F₂ : Functor (Discrete PEmpty.{w' + 1}) C} {c₁ : Cone F₁} (hl : IsLimit c₁) (c₂ : Cone F₂) (hi : c₁.pt c₂.pt) :
                                          IsLimit c₂

                                          Being terminal is independent of the empty diagram, its universe, and the cone over it, as long as the cone points are isomorphic.

                                          Instances For
                                            def CategoryTheory.Limits.isLimitEmptyConeEquiv (C : Type u₁) [Category.{v₁, u₁} C] {F₁ : Functor (Discrete PEmpty.{w + 1}) C} {F₂ : Functor (Discrete PEmpty.{w' + 1}) C} (c₁ : Cone F₁) (c₂ : Cone F₂) (h : c₁.pt c₂.pt) :
                                            IsLimit c₁ IsLimit c₂

                                            Replacing an empty cone in IsLimit by another with the same cone point is an equivalence.

                                            Instances For

                                              If F is an empty diagram, then a cone over F is limiting iff the cone point is terminal.

                                              Instances For
                                                def CategoryTheory.Limits.isColimitChangeEmptyCocone (C : Type u₁) [Category.{v₁, u₁} C] {F₁ : Functor (Discrete PEmpty.{w + 1}) C} {F₂ : Functor (Discrete PEmpty.{w' + 1}) C} {c₁ : Cocone F₁} (hl : IsColimit c₁) (c₂ : Cocone F₂) (hi : c₁.pt c₂.pt) :

                                                Being initial is independent of the empty diagram, its universe, and the cocone over it, as long as the cocone points are isomorphic.

                                                Instances For
                                                  def CategoryTheory.Limits.isColimitEmptyCoconeEquiv (C : Type u₁) [Category.{v₁, u₁} C] {F₁ : Functor (Discrete PEmpty.{w + 1}) C} {F₂ : Functor (Discrete PEmpty.{w' + 1}) C} (c₁ : Cocone F₁) (c₂ : Cocone F₂) (h : c₁.pt c₂.pt) :

                                                  Replacing an empty cocone in IsColimit by another with the same cocone point is an equivalence.

                                                  Instances For

                                                    If F is an empty diagram, then a cocone over F is colimiting iff the cocone point is initial.

                                                    Instances For

                                                      An initial object is terminal in the opposite category.

                                                      Instances For

                                                        An initial object in the opposite category is terminal in the original category.

                                                        Instances For

                                                          A terminal object is initial in the opposite category.

                                                          Instances For

                                                            A terminal object in the opposite category is initial in the original category.

                                                            Instances For

                                                              A category is an InitialMonoClass if the canonical morphism of an initial object is a monomorphism. In practice, this is most useful when given an arbitrary morphism out of the chosen initial object, see initial.mono_from. Given a terminal object, this is equivalent to the assumption that the unique morphism from initial to terminal is a monomorphism, which is the second of Freyd's axioms for an AT category.

                                                              TODO: This is a condition satisfied by categories with zero objects and morphisms.

                                                              • isInitial_mono_from {I : C} (X : C) (hI : IsInitial I) : Mono (hI.to X)

                                                                The map from the (any as stated) initial object to any other object is a monomorphism

                                                              Instances
                                                                theorem CategoryTheory.Limits.InitialMonoClass.of_isInitial {C : Type u₁} [Category.{v₁, u₁} C] {I : C} (hI : IsInitial I) (h : ∀ (X : C), Mono (hI.to X)) :

                                                                To show a category is an InitialMonoClass it suffices to give an initial object such that every morphism out of it is a monomorphism.

                                                                To show a category is an InitialMonoClass it suffices to show the unique morphism from an initial object to a terminal object is a monomorphism.

                                                                From a functor F : J ⥤ C, given an initial object of J, construct a cone for J. In limitOfDiagramInitial we show it is a limit cone.

                                                                Instances For
                                                                  @[simp]
                                                                  theorem CategoryTheory.Limits.coneOfDiagramInitial_π_app {C : Type u₁} [Category.{v₁, u₁} C] {J : Type u} [Category.{v, u} J] {X : J} (tX : IsInitial X) (F : Functor J C) (j : J) :
                                                                  (coneOfDiagramInitial tX F).π.app j = F.map (tX.to j)

                                                                  From a functor F : J ⥤ C, given an initial object of J, show the cone coneOfDiagramInitial is a limit.

                                                                  Instances For
                                                                    noncomputable def CategoryTheory.Limits.coneOfDiagramTerminal {C : Type u₁} [Category.{v₁, u₁} C] {J : Type u} [Category.{v, u} J] {X : J} (hX : IsTerminal X) (F : Functor J C) [∀ (i j : J) (f : i j), IsIso (F.map f)] :

                                                                    From a functor F : J ⥤ C, given a terminal object of J, construct a cone for J, provided that the morphisms in the diagram are isomorphisms. In limitOfDiagramTerminal we show it is a limit cone.

                                                                    Instances For
                                                                      @[simp]
                                                                      theorem CategoryTheory.Limits.coneOfDiagramTerminal_π_app {C : Type u₁} [Category.{v₁, u₁} C] {J : Type u} [Category.{v, u} J] {X : J} (hX : IsTerminal X) (F : Functor J C) [∀ (i j : J) (f : i j), IsIso (F.map f)] (x✝ : J) :
                                                                      (coneOfDiagramTerminal hX F).π.app x✝ = inv (F.map (hX.from x✝))
                                                                      @[simp]
                                                                      theorem CategoryTheory.Limits.coneOfDiagramTerminal_pt {C : Type u₁} [Category.{v₁, u₁} C] {J : Type u} [Category.{v, u} J] {X : J} (hX : IsTerminal X) (F : Functor J C) [∀ (i j : J) (f : i j), IsIso (F.map f)] :
                                                                      def CategoryTheory.Limits.limitOfDiagramTerminal {C : Type u₁} [Category.{v₁, u₁} C] {J : Type u} [Category.{v, u} J] {X : J} (hX : IsTerminal X) (F : Functor J C) [∀ (i j : J) (f : i j), IsIso (F.map f)] :

                                                                      From a functor F : J ⥤ C, given a terminal object of J and that the morphisms in the diagram are isomorphisms, show the cone coneOfDiagramTerminal is a limit.

                                                                      Instances For

                                                                        From a functor F : J ⥤ C, given a terminal object of J, construct a cocone for J. In colimitOfDiagramTerminal we show it is a colimit cocone.

                                                                        Instances For
                                                                          @[simp]
                                                                          theorem CategoryTheory.Limits.coconeOfDiagramTerminal_ι_app {C : Type u₁} [Category.{v₁, u₁} C] {J : Type u} [Category.{v, u} J] {X : J} (tX : IsTerminal X) (F : Functor J C) (j : J) :
                                                                          (coconeOfDiagramTerminal tX F).ι.app j = F.map (tX.from j)

                                                                          From a functor F : J ⥤ C, given a terminal object of J, show the cocone coconeOfDiagramTerminal is a colimit.

                                                                          Instances For
                                                                            noncomputable def CategoryTheory.Limits.coconeOfDiagramInitial {C : Type u₁} [Category.{v₁, u₁} C] {J : Type u} [Category.{v, u} J] {X : J} (hX : IsInitial X) (F : Functor J C) [∀ (i j : J) (f : i j), IsIso (F.map f)] :

                                                                            From a functor F : J ⥤ C, given an initial object of J, construct a cocone for J, provided that the morphisms in the diagram are isomorphisms. In colimitOfDiagramInitial we show it is a colimit cocone.

                                                                            Instances For
                                                                              @[simp]
                                                                              theorem CategoryTheory.Limits.coconeOfDiagramInitial_ι_app {C : Type u₁} [Category.{v₁, u₁} C] {J : Type u} [Category.{v, u} J] {X : J} (hX : IsInitial X) (F : Functor J C) [∀ (i j : J) (f : i j), IsIso (F.map f)] (x✝ : J) :
                                                                              (coconeOfDiagramInitial hX F).ι.app x✝ = inv (F.map (hX.to x✝))
                                                                              @[simp]
                                                                              theorem CategoryTheory.Limits.coconeOfDiagramInitial_pt {C : Type u₁} [Category.{v₁, u₁} C] {J : Type u} [Category.{v, u} J] {X : J} (hX : IsInitial X) (F : Functor J C) [∀ (i j : J) (f : i j), IsIso (F.map f)] :
                                                                              def CategoryTheory.Limits.colimitOfDiagramInitial {C : Type u₁} [Category.{v₁, u₁} C] {J : Type u} [Category.{v, u} J] {X : J} (hX : IsInitial X) (F : Functor J C) [∀ (i j : J) (f : i j), IsIso (F.map f)] :

                                                                              From a functor F : J ⥤ C, given an initial object of J and that the morphisms in the diagram are isomorphisms, show the cone coconeOfDiagramInitial is a colimit.

                                                                              Instances For
                                                                                theorem CategoryTheory.Limits.isIso_of_isTerminal {C : Type u₁} [Category.{v₁, u₁} C] {X Y : C} (hX : IsTerminal X) (hY : IsTerminal Y) (f : X Y) :

                                                                                Any morphism between terminal objects is an isomorphism.

                                                                                theorem CategoryTheory.Limits.isIso_of_isInitial {C : Type u₁} [Category.{v₁, u₁} C] {X Y : C} (hX : IsInitial X) (hY : IsInitial Y) (f : X Y) :

                                                                                Any morphism between initial objects is an isomorphism.

                                                                                An initial object is terminal in the opposite category.

                                                                                Instances For

                                                                                  An initial object in the opposite category is terminal in the original category.

                                                                                  Instances For

                                                                                    A terminal object is initial in the opposite category.

                                                                                    Instances For

                                                                                      A terminal object in the opposite category is initial in the original category.

                                                                                      Instances For

                                                                                        The constant functor returning a specific terminal object is indeed terminal.

                                                                                        Instances For
                                                                                          @[simp]
                                                                                          theorem CategoryTheory.Functor.isTerminalConst_from_app (C : Type u_1) [Category.{v_1, u_1} C] {D : Type u_2} [Category.{v_2, u_2} D] {X : D} (hX : Limits.IsTerminal X) (F : Functor C D) (Y : C) :
                                                                                          ((isTerminalConst C hX).from F).app Y = hX.from (F.obj Y)

                                                                                          The constant functor returning a specific initial object is indeed initial.

                                                                                          Instances For
                                                                                            @[simp]
                                                                                            theorem CategoryTheory.Functor.isInitialConst_to_app (C : Type u_1) [Category.{v_1, u_1} C] {D : Type u_2} [Category.{v_2, u_2} D] {X : D} (hX : Limits.IsInitial X) (F : Functor C D) (Y : C) :
                                                                                            ((isInitialConst C hX).to F).app Y = hX.to (F.obj Y)