File: Mathlib/CategoryTheory/Subterminal.lean

full_name: CategoryTheory.IsSubterminal
code: /-- An object `A` is subterminal iff for any `Z`, there is at most one morphism `Z ⟶ A`. -/
def IsSubterminal (A : C) : Prop 
goal: Prop

full_name: CategoryTheory.IsSubterminal.def
code: theorem IsSubterminal.def : IsSubterminal A ↔ ∀ ⦃Z : C⦄ (f g : Z ⟶ A), f = g 
goal: CategoryTheory.IsSubterminal A ↔ ∀ ⦃Z : C⦄ (f g : Z ⟶ A), f = g

full_name: CategoryTheory.IsSubterminal.mono_isTerminal_from
code: /-- If `A` is subterminal, the unique morphism from it to a terminal object is a monomorphism.
The converse of `isSubterminal_of_mono_isTerminal_from`.
-/
theorem IsSubterminal.mono_isTerminal_from (hA : IsSubterminal A) {T : C} (hT : IsTerminal T) :
    Mono (hT.from A) 
goal: CategoryTheory.Mono (hT.from A)

full_name: CategoryTheory.IsSubterminal.mono_terminal_from
code: /-- If `A` is subterminal, the unique morphism from it to the terminal object is a monomorphism.
The converse of `isSubterminal_of_mono_terminal_from`.
-/
theorem IsSubterminal.mono_terminal_from [HasTerminal C] (hA : IsSubterminal A) :
    Mono (terminal.from A) 
goal: CategoryTheory.Mono (CategoryTheory.Limits.terminal.from A)

full_name: CategoryTheory.isSubterminal_of_mono_isTerminal_from
code: /-- If the unique morphism from `A` to a terminal object is a monomorphism, `A` is subterminal.
The converse of `IsSubterminal.mono_isTerminal_from`.
-/
theorem isSubterminal_of_mono_isTerminal_from {T : C} (hT : IsTerminal T) [Mono (hT.from A)] :
    IsSubterminal A 
goal: CategoryTheory.IsSubterminal A

full_name: CategoryTheory.isSubterminal_of_mono_terminal_from
code: /-- If the unique morphism from `A` to the terminal object is a monomorphism, `A` is subterminal.
The converse of `IsSubterminal.mono_terminal_from`.
-/
theorem isSubterminal_of_mono_terminal_from [HasTerminal C] [Mono (terminal.from A)] :
    IsSubterminal A 
goal: CategoryTheory.IsSubterminal A

full_name: CategoryTheory.isSubterminal_of_isTerminal
code: theorem isSubterminal_of_isTerminal {T : C} (hT : IsTerminal T) : IsSubterminal T 
goal: CategoryTheory.IsSubterminal T

full_name: CategoryTheory.isSubterminal_of_terminal
code: theorem isSubterminal_of_terminal [HasTerminal C] : IsSubterminal (⊤_ C) 
goal: CategoryTheory.IsSubterminal (⊤_ C)

full_name: CategoryTheory.IsSubterminal.isIso_diag
code: /-- If `A` is subterminal, its diagonal morphism is an isomorphism.
The converse of `isSubterminal_of_isIso_diag`.
-/
theorem IsSubterminal.isIso_diag (hA : IsSubterminal A) [HasBinaryProduct A A] : IsIso (diag A) 
goal: CategoryTheory.IsIso (CategoryTheory.Limits.diag A)

full_name: CategoryTheory.isSubterminal_of_isIso_diag
code: /-- If the diagonal morphism of `A` is an isomorphism, then it is subterminal.
The converse of `isSubterminal.isIso_diag`.
-/
theorem isSubterminal_of_isIso_diag [HasBinaryProduct A A] [IsIso (diag A)] : IsSubterminal A 
goal: CategoryTheory.IsSubterminal A

full_name: CategoryTheory.IsSubterminal.isoDiag_inv
code: /-- If `A` is subterminal, it is isomorphic to `A ⨯ A`. -/
@[simps!]
def IsSubterminal.isoDiag (hA : IsSubterminal A) [HasBinaryProduct A A] : A ⨯ A ≅ A 
goal: hA.isoDiag.inv = CategoryTheory.Limits.diag A

full_name: CategoryTheory.IsSubterminal.isoDiag
code: /-- If `A` is subterminal, it is isomorphic to `A ⨯ A`. -/
@[simps!]
def IsSubterminal.isoDiag (hA : IsSubterminal A) [HasBinaryProduct A A] : A ⨯ A ≅ A 
goal: A ⨯ A ≅ A

full_name: CategoryTheory.IsSubterminal.isoDiag_hom
code: /-- If `A` is subterminal, it is isomorphic to `A ⨯ A`. -/
@[simps!]
def IsSubterminal.isoDiag (hA : IsSubterminal A) [HasBinaryProduct A A] : A ⨯ A ≅ A 
goal: hA.isoDiag.hom = CategoryTheory.inv (CategoryTheory.Limits.diag A)

full_name: CategoryTheory.Subterminals
code: /-- The (full sub)category of subterminal objects.
TODO: If `C` is the category of sheaves on a topological space `X`, this category is equivalent
to the lattice of open subsets of `X`. More generally, if `C` is a topos, this is the lattice of
"external truth values".
-/
def Subterminals (C : Type u₁) [Category.{v₁} C] 
goal: Type u₁

full_name: CategoryTheory.instCategorySubterminals
code: instance (C : Type u₁) [Category.{v₁} C] :
  Category (Subterminals C) 
goal: CategoryTheory.Category.{v₁, u₁} (CategoryTheory.Subterminals C)

full_name: CategoryTheory.instInhabitedSubterminalsOfHasTerminal
code: instance [HasTerminal C] : Inhabited (Subterminals C) 
goal: Inhabited (CategoryTheory.Subterminals C)

full_name: CategoryTheory.subterminalInclusion_obj
code: /-- The inclusion of the subterminal objects into the original category. -/
@[simps!]
def subterminalInclusion : Subterminals C ⥤ C 
goal: (CategoryTheory.subterminalInclusion C).obj self = self.obj

full_name: CategoryTheory.subterminalInclusion_map
code: /-- The inclusion of the subterminal objects into the original category. -/
@[simps!]
def subterminalInclusion : Subterminals C ⥤ C 
goal: ∀ {X Y : CategoryTheory.InducedCategory C CategoryTheory.FullSubcategory.obj} (f : X ⟶ Y),
  (CategoryTheory.subterminalInclusion C).map f = f

full_name: CategoryTheory.subterminalInclusion
code: /-- The inclusion of the subterminal objects into the original category. -/
@[simps!]
def subterminalInclusion : Subterminals C ⥤ C 
goal: CategoryTheory.Functor (CategoryTheory.Subterminals C) C

full_name: CategoryTheory.instFullSubterminalsSubterminalInclusion
code: instance (C : Type u₁) [Category.{v₁} C] : (subterminalInclusion C).Full 
goal: (CategoryTheory.subterminalInclusion C).Full

full_name: CategoryTheory.instFaithfulSubterminalsSubterminalInclusion
code: instance (C : Type u₁) [Category.{v₁} C] : (subterminalInclusion C).Faithful 
goal: (CategoryTheory.subterminalInclusion C).Faithful

full_name: CategoryTheory.subterminals_thin
code: instance subterminals_thin (X Y : Subterminals C) : Subsingleton (X ⟶ Y) 
goal: Subsingleton (X ⟶ Y)

full_name: CategoryTheory.subterminalsEquivMonoOverTerminal_functor_map
code: /--
The category of subterminal objects is equivalent to the category of monomorphisms to the terminal
object (which is in turn equivalent to the subobjects of the terminal object).
-/
@[simps]
def subterminalsEquivMonoOverTerminal [HasTerminal C] : Subterminals C ≌ MonoOver (⊤_ C) 
goal: ∀ {X Y : CategoryTheory.Subterminals C} (f : X ⟶ Y),
  (CategoryTheory.subterminalsEquivMonoOverTerminal C).functor.map f = CategoryTheory.MonoOver.homMk f ⋯

full_name: CategoryTheory.subterminalsEquivMonoOverTerminal
code: /--
The category of subterminal objects is equivalent to the category of monomorphisms to the terminal
object (which is in turn equivalent to the subobjects of the terminal object).
-/
@[simps]
def subterminalsEquivMonoOverTerminal [HasTerminal C] : Subterminals C ≌ MonoOver (⊤_ C) 
goal: CategoryTheory.Subterminals C ≌ CategoryTheory.MonoOver (⊤_ C)

full_name: CategoryTheory.subterminalsEquivMonoOverTerminal_functor_obj_obj
code: /--
The category of subterminal objects is equivalent to the category of monomorphisms to the terminal
object (which is in turn equivalent to the subobjects of the terminal object).
-/
@[simps]
def subterminalsEquivMonoOverTerminal [HasTerminal C] : Subterminals C ≌ MonoOver (⊤_ C) 
goal: ((CategoryTheory.subterminalsEquivMonoOverTerminal C).functor.obj X).obj =
  CategoryTheory.Over.mk (CategoryTheory.Limits.terminal.from X.obj)

full_name: CategoryTheory.subterminalsEquivMonoOverTerminal_inverse_map
code: /--
The category of subterminal objects is equivalent to the category of monomorphisms to the terminal
object (which is in turn equivalent to the subobjects of the terminal object).
-/
@[simps]
def subterminalsEquivMonoOverTerminal [HasTerminal C] : Subterminals C ≌ MonoOver (⊤_ C) 
goal: ∀ {X Y : CategoryTheory.MonoOver (⊤_ C)} (f : X ⟶ Y),
  (CategoryTheory.subterminalsEquivMonoOverTerminal C).inverse.map f = f.left

full_name: CategoryTheory.subterminalsEquivMonoOverTerminal_inverse_obj_obj
code: /--
The category of subterminal objects is equivalent to the category of monomorphisms to the terminal
object (which is in turn equivalent to the subobjects of the terminal object).
-/
@[simps]
def subterminalsEquivMonoOverTerminal [HasTerminal C] : Subterminals C ≌ MonoOver (⊤_ C) 
goal: ((CategoryTheory.subterminalsEquivMonoOverTerminal C).inverse.obj X).obj = X.obj.left

full_name: CategoryTheory.subterminalsEquivMonoOverTerminal_unitIso
code: /--
The category of subterminal objects is equivalent to the category of monomorphisms to the terminal
object (which is in turn equivalent to the subobjects of the terminal object).
-/
@[simps]
def subterminalsEquivMonoOverTerminal [HasTerminal C] : Subterminals C ≌ MonoOver (⊤_ C) 
goal: (CategoryTheory.subterminalsEquivMonoOverTerminal C).unitIso =
  CategoryTheory.NatIso.ofComponents (fun X => CategoryTheory.Iso.refl X) ⋯

full_name: CategoryTheory.subterminalsEquivMonoOverTerminal_counitIso
code: /--
The category of subterminal objects is equivalent to the category of monomorphisms to the terminal
object (which is in turn equivalent to the subobjects of the terminal object).
-/
@[simps]
def subterminalsEquivMonoOverTerminal [HasTerminal C] : Subterminals C ≌ MonoOver (⊤_ C) 
goal: (CategoryTheory.subterminalsEquivMonoOverTerminal C).counitIso =
  CategoryTheory.NatIso.ofComponents
    (fun X =>
      CategoryTheory.MonoOver.isoMk
        (CategoryTheory.Iso.refl
          (({ obj := fun X => { obj := X.obj.left, property := ⋯ }, map := fun {X Y} f => f.left, map_id := ⋯,
                        map_comp := ⋯ }.comp
                    {
                      obj := fun X =>
                        { obj := CategoryTheory.Over.mk (CategoryTheory.Limits.terminal.from X.obj), property := ⋯ },
                      map := fun {X Y} f => CategoryTheory.MonoOver.homMk f ⋯, map_id := ⋯, map_comp := ⋯ }).obj
                X).obj.left)
        ⋯)
    ⋯

full_name: CategoryTheory.subterminals_to_monoOver_terminal_comp_forget
code: @[simp]
theorem subterminals_to_monoOver_terminal_comp_forget [HasTerminal C] :
    (subterminalsEquivMonoOverTerminal C).functor ⋙ MonoOver.forget _ ⋙ Over.forget _ =
      subterminalInclusion C 
goal: (CategoryTheory.subterminalsEquivMonoOverTerminal C).functor.comp
    ((CategoryTheory.MonoOver.forget (⊤_ C)).comp (CategoryTheory.Over.forget (⊤_ C))) =
  CategoryTheory.subterminalInclusion C

full_name: CategoryTheory.monoOver_terminal_to_subterminals_comp
code: @[simp]
theorem monoOver_terminal_to_subterminals_comp [HasTerminal C] :
    (subterminalsEquivMonoOverTerminal C).inverse ⋙ subterminalInclusion C =
      MonoOver.forget _ ⋙ Over.forget _ 
goal: (CategoryTheory.subterminalsEquivMonoOverTerminal C).inverse.comp (CategoryTheory.subterminalInclusion C) =
  (CategoryTheory.MonoOver.forget (⊤_ C)).comp (CategoryTheory.Over.forget (⊤_ C))