File: Mathlib/CategoryTheory/EpiMono.lean

full_name: CategoryTheory.unop_mono_of_epi
code: instance unop_mono_of_epi {A B : Cᵒᵖ} (f : A ⟶ B) [Epi f] : Mono f.unop 
goal: CategoryTheory.Mono f.unop

full_name: CategoryTheory.unop_epi_of_mono
code: instance unop_epi_of_mono {A B : Cᵒᵖ} (f : A ⟶ B) [Mono f] : Epi f.unop 
goal: CategoryTheory.Epi f.unop

full_name: CategoryTheory.op_mono_of_epi
code: instance op_mono_of_epi {A B : C} (f : A ⟶ B) [Epi f] : Mono f.op 
goal: CategoryTheory.Mono f.op

full_name: CategoryTheory.op_epi_of_mono
code: instance op_epi_of_mono {A B : C} (f : A ⟶ B) [Mono f] : Epi f.op 
goal: CategoryTheory.Epi f.op

full_name: CategoryTheory.SplitMono
code: /-- A split monomorphism is a morphism `f : X ⟶ Y` with a given retraction `retraction f : Y ⟶ X`
such that `f ≫ retraction f = 𝟙 X`.

Every split monomorphism is a monomorphism.
-/
/- Porting note(#5171): removed @[nolint has_nonempty_instance] -/
/- Porting note: `@[ext]` used to accept lemmas like this. Now we add an aesop rule -/
@[ext, aesop apply safe (rule_sets := [CategoryTheory])]
structure SplitMono {X Y : C} (f : X ⟶ Y) where
  /-- The map splitting `f` -/
  retraction : Y ⟶ X
  /-- `f` composed with `retraction` is the identity -/
  id : f ≫ retraction = 𝟙 X := by aesop_cat
goal: Type v₁

full_name: CategoryTheory.SplitMono.id
code: /-- A split monomorphism is a morphism `f : X ⟶ Y` with a given retraction `retraction f : Y ⟶ X`
such that `f ≫ retraction f = 𝟙 X`.

Every split monomorphism is a monomorphism.
-/
/- Porting note(#5171): removed @[nolint has_nonempty_instance] -/
/- Porting note: `@[ext]` used to accept lemmas like this. Now we add an aesop rule -/
@[ext, aesop apply safe (rule_sets := [CategoryTheory])]
structure SplitMono {X Y : C} (f : X ⟶ Y) where
  /-- The map splitting `f` -/
  retraction : Y ⟶ X
  /-- `f` composed with `retraction` is the identity -/
  id : f ≫ retraction = 𝟙 X := by aesop_cat
goal: CategoryTheory.CategoryStruct.comp f self.retraction = CategoryTheory.CategoryStruct.id X

full_name: CategoryTheory.SplitMono.retraction
code: /-- A split monomorphism is a morphism `f : X ⟶ Y` with a given retraction `retraction f : Y ⟶ X`
such that `f ≫ retraction f = 𝟙 X`.

Every split monomorphism is a monomorphism.
-/
/- Porting note(#5171): removed @[nolint has_nonempty_instance] -/
/- Porting note: `@[ext]` used to accept lemmas like this. Now we add an aesop rule -/
@[ext, aesop apply safe (rule_sets := [CategoryTheory])]
structure SplitMono {X Y : C} (f : X ⟶ Y) where
  /-- The map splitting `f` -/
  retraction : Y ⟶ X
  /-- `f` composed with `retraction` is the identity -/
  id : f ≫ retraction = 𝟙 X := by aesop_cat
goal: Y ⟶ X

full_name: CategoryTheory.IsSplitMono.exists_splitMono
code: /-- `IsSplitMono f` is the assertion that `f` admits a retraction -/
class IsSplitMono {X Y : C} (f : X ⟶ Y) : Prop where
  /-- There is a splitting -/
  exists_splitMono : Nonempty (SplitMono f)
goal: Nonempty (CategoryTheory.SplitMono f)

full_name: CategoryTheory.IsSplitMono
code: /-- `IsSplitMono f` is the assertion that `f` admits a retraction -/
class IsSplitMono {X Y : C} (f : X ⟶ Y) : Prop where
  /-- There is a splitting -/
  exists_splitMono : Nonempty (SplitMono f)
goal: Prop

full_name: CategoryTheory.IsSplitMono.mk'
code: /-- A constructor for `IsSplitMono f` taking a `SplitMono f` as an argument -/
theorem IsSplitMono.mk' {X Y : C} {f : X ⟶ Y} (sm : SplitMono f) : IsSplitMono f 
goal: CategoryTheory.IsSplitMono f

full_name: CategoryTheory.SplitEpi
code: /-- A split epimorphism is a morphism `f : X ⟶ Y` with a given section `section_ f : Y ⟶ X`
such that `section_ f ≫ f = 𝟙 Y`.
(Note that `section` is a reserved keyword, so we append an underscore.)

Every split epimorphism is an epimorphism.
-/
/- Porting note(#5171): removed @[nolint has_nonempty_instance] -/
/- Porting note: `@[ext]` used to accept lemmas like this. Now we add an aesop rule -/
@[ext, aesop apply safe (rule_sets := [CategoryTheory])]
structure SplitEpi {X Y : C} (f : X ⟶ Y) where
  /-- The map splitting `f` -/
  section_ : Y ⟶ X
  /--  `section_` composed with `f` is the identity -/
  id : section_ ≫ f = 𝟙 Y := by aesop_cat
goal: Type v₁

full_name: CategoryTheory.SplitEpi.section_
code: /-- A split epimorphism is a morphism `f : X ⟶ Y` with a given section `section_ f : Y ⟶ X`
such that `section_ f ≫ f = 𝟙 Y`.
(Note that `section` is a reserved keyword, so we append an underscore.)

Every split epimorphism is an epimorphism.
-/
/- Porting note(#5171): removed @[nolint has_nonempty_instance] -/
/- Porting note: `@[ext]` used to accept lemmas like this. Now we add an aesop rule -/
@[ext, aesop apply safe (rule_sets := [CategoryTheory])]
structure SplitEpi {X Y : C} (f : X ⟶ Y) where
  /-- The map splitting `f` -/
  section_ : Y ⟶ X
  /--  `section_` composed with `f` is the identity -/
  id : section_ ≫ f = 𝟙 Y := by aesop_cat
goal: Y ⟶ X

full_name: CategoryTheory.SplitEpi.id
code: /-- A split epimorphism is a morphism `f : X ⟶ Y` with a given section `section_ f : Y ⟶ X`
such that `section_ f ≫ f = 𝟙 Y`.
(Note that `section` is a reserved keyword, so we append an underscore.)

Every split epimorphism is an epimorphism.
-/
/- Porting note(#5171): removed @[nolint has_nonempty_instance] -/
/- Porting note: `@[ext]` used to accept lemmas like this. Now we add an aesop rule -/
@[ext, aesop apply safe (rule_sets := [CategoryTheory])]
structure SplitEpi {X Y : C} (f : X ⟶ Y) where
  /-- The map splitting `f` -/
  section_ : Y ⟶ X
  /--  `section_` composed with `f` is the identity -/
  id : section_ ≫ f = 𝟙 Y := by aesop_cat
goal: CategoryTheory.CategoryStruct.comp self.section_ f = CategoryTheory.CategoryStruct.id Y

full_name: CategoryTheory.IsSplitEpi
code: /-- `IsSplitEpi f` is the assertion that `f` admits a section -/
class IsSplitEpi {X Y : C} (f : X ⟶ Y) : Prop where
  /-- There is a splitting -/
  exists_splitEpi : Nonempty (SplitEpi f)
goal: Prop

full_name: CategoryTheory.IsSplitEpi.exists_splitEpi
code: /-- `IsSplitEpi f` is the assertion that `f` admits a section -/
class IsSplitEpi {X Y : C} (f : X ⟶ Y) : Prop where
  /-- There is a splitting -/
  exists_splitEpi : Nonempty (SplitEpi f)
goal: Nonempty (CategoryTheory.SplitEpi f)

full_name: CategoryTheory.IsSplitEpi.mk'
code: /-- A constructor for `IsSplitEpi f` taking a `SplitEpi f` as an argument -/
theorem IsSplitEpi.mk' {X Y : C} {f : X ⟶ Y} (se : SplitEpi f) : IsSplitEpi f 
goal: CategoryTheory.IsSplitEpi f

full_name: CategoryTheory.retraction
code: /-- The chosen retraction of a split monomorphism. -/
noncomputable def retraction {X Y : C} (f : X ⟶ Y) [hf : IsSplitMono f] : Y ⟶ X 
goal: Y ⟶ X

full_name: CategoryTheory.IsSplitMono.id
code: @[reassoc (attr := simp)]
theorem IsSplitMono.id {X Y : C} (f : X ⟶ Y) [hf : IsSplitMono f] : f ≫ retraction f = 𝟙 X 
goal: CategoryTheory.CategoryStruct.comp f (CategoryTheory.retraction f) = CategoryTheory.CategoryStruct.id X

full_name: CategoryTheory.SplitMono.splitEpi
code: /-- The retraction of a split monomorphism has an obvious section. -/
def SplitMono.splitEpi {X Y : C} {f : X ⟶ Y} (sm : SplitMono f) : SplitEpi sm.retraction 
goal: CategoryTheory.SplitEpi sm.retraction

full_name: CategoryTheory.retraction_isSplitEpi
code: /-- The retraction of a split monomorphism is itself a split epimorphism. -/
instance retraction_isSplitEpi {X Y : C} (f : X ⟶ Y) [IsSplitMono f] :
    IsSplitEpi (retraction f) 
goal: CategoryTheory.IsSplitEpi (CategoryTheory.retraction f)

full_name: CategoryTheory.isIso_of_epi_of_isSplitMono
code: /-- A split mono which is epi is an iso. -/
theorem isIso_of_epi_of_isSplitMono {X Y : C} (f : X ⟶ Y) [IsSplitMono f] [Epi f] : IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.section_
code: /-- The chosen section of a split epimorphism.
(Note that `section` is a reserved keyword, so we append an underscore.)
-/
noncomputable def section_ {X Y : C} (f : X ⟶ Y) [hf : IsSplitEpi f] : Y ⟶ X 
goal: Y ⟶ X

full_name: CategoryTheory.IsSplitEpi.id
code: @[reassoc (attr := simp)]
theorem IsSplitEpi.id {X Y : C} (f : X ⟶ Y) [hf : IsSplitEpi f] : section_ f ≫ f = 𝟙 Y 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.section_ f) f = CategoryTheory.CategoryStruct.id Y

full_name: CategoryTheory.SplitEpi.splitMono
code: /-- The section of a split epimorphism has an obvious retraction. -/
def SplitEpi.splitMono {X Y : C} {f : X ⟶ Y} (se : SplitEpi f) : SplitMono se.section_ 
goal: CategoryTheory.SplitMono se.section_

full_name: CategoryTheory.section_isSplitMono
code: /-- The section of a split epimorphism is itself a split monomorphism. -/
instance section_isSplitMono {X Y : C} (f : X ⟶ Y) [IsSplitEpi f] : IsSplitMono (section_ f) 
goal: CategoryTheory.IsSplitMono (CategoryTheory.section_ f)

full_name: CategoryTheory.isIso_of_mono_of_isSplitEpi
code: /-- A split epi which is mono is an iso. -/
theorem isIso_of_mono_of_isSplitEpi {X Y : C} (f : X ⟶ Y) [Mono f] [IsSplitEpi f] : IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.IsSplitMono.of_iso
code: /-- Every iso is a split mono. -/
instance (priority := 100) IsSplitMono.of_iso {X Y : C} (f : X ⟶ Y) [IsIso f] : IsSplitMono f 
goal: CategoryTheory.IsSplitMono f

full_name: CategoryTheory.IsSplitEpi.of_iso
code: /-- Every iso is a split epi. -/
instance (priority := 100) IsSplitEpi.of_iso {X Y : C} (f : X ⟶ Y) [IsIso f] : IsSplitEpi f 
goal: CategoryTheory.IsSplitEpi f

full_name: CategoryTheory.SplitMono.mono
code: theorem SplitMono.mono {X Y : C} {f : X ⟶ Y} (sm : SplitMono f) : Mono f 
goal: CategoryTheory.Mono f

full_name: CategoryTheory.IsSplitMono.mono
code: /-- Every split mono is a mono. -/
instance (priority := 100) IsSplitMono.mono {X Y : C} (f : X ⟶ Y) [hf : IsSplitMono f] : Mono f 
goal: CategoryTheory.Mono f

full_name: CategoryTheory.SplitEpi.epi
code: theorem SplitEpi.epi {X Y : C} {f : X ⟶ Y} (se : SplitEpi f) : Epi f 
goal: CategoryTheory.Epi f

full_name: CategoryTheory.IsSplitEpi.epi
code: /-- Every split epi is an epi. -/
instance (priority := 100) IsSplitEpi.epi {X Y : C} (f : X ⟶ Y) [hf : IsSplitEpi f] : Epi f 
goal: CategoryTheory.Epi f

full_name: CategoryTheory.IsIso.of_mono_retraction'
code: /-- Every split mono whose retraction is mono is an iso. -/
theorem IsIso.of_mono_retraction' {X Y : C} {f : X ⟶ Y} (hf : SplitMono f) [Mono <| hf.retraction] :
    IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.IsIso.of_mono_retraction
code: /-- Every split mono whose retraction is mono is an iso. -/
theorem IsIso.of_mono_retraction {X Y : C} (f : X ⟶ Y) [hf : IsSplitMono f]
    [hf' : Mono <| retraction f] : IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.IsIso.of_epi_section'
code: /-- Every split epi whose section is epi is an iso. -/
theorem IsIso.of_epi_section' {X Y : C} {f : X ⟶ Y} (hf : SplitEpi f) [Epi <| hf.section_] :
    IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.IsIso.of_epi_section
code: /-- Every split epi whose section is epi is an iso. -/
theorem IsIso.of_epi_section {X Y : C} (f : X ⟶ Y) [hf : IsSplitEpi f] [hf' : Epi <| section_ f] :
    IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.Groupoid.ofTruncSplitMono
code: /-- A category where every morphism has a `Trunc` retraction is computably a groupoid. -/
noncomputable def Groupoid.ofTruncSplitMono
    (all_split_mono : ∀ {X Y : C} (f : X ⟶ Y), Trunc (IsSplitMono f)) : Groupoid.{v₁} C 
goal: CategoryTheory.Groupoid C

full_name: CategoryTheory.SplitMonoCategory.isSplitMono_of_mono
code: /-- A split mono category is a category in which every monomorphism is split. -/
class SplitMonoCategory : Prop where
  /-- All monos are split -/
  isSplitMono_of_mono : ∀ {X Y : C} (f : X ⟶ Y) [Mono f], IsSplitMono f
goal: CategoryTheory.IsSplitMono f

full_name: CategoryTheory.SplitMonoCategory
code: /-- A split mono category is a category in which every monomorphism is split. -/
class SplitMonoCategory : Prop where
  /-- All monos are split -/
  isSplitMono_of_mono : ∀ {X Y : C} (f : X ⟶ Y) [Mono f], IsSplitMono f
goal: Prop

full_name: CategoryTheory.SplitEpiCategory.isSplitEpi_of_epi
code: /-- A split epi category is a category in which every epimorphism is split. -/
class SplitEpiCategory : Prop where
  /-- All epis are split -/
  isSplitEpi_of_epi : ∀ {X Y : C} (f : X ⟶ Y) [Epi f], IsSplitEpi f
goal: CategoryTheory.IsSplitEpi f

full_name: CategoryTheory.SplitEpiCategory
code: /-- A split epi category is a category in which every epimorphism is split. -/
class SplitEpiCategory : Prop where
  /-- All epis are split -/
  isSplitEpi_of_epi : ∀ {X Y : C} (f : X ⟶ Y) [Epi f], IsSplitEpi f
goal: Prop

full_name: CategoryTheory.isSplitMono_of_mono
code: /-- In a category in which every monomorphism is split, every monomorphism splits. This is not an
    instance because it would create an instance loop. -/
theorem isSplitMono_of_mono [SplitMonoCategory C] {X Y : C} (f : X ⟶ Y) [Mono f] : IsSplitMono f 
goal: CategoryTheory.IsSplitMono f

full_name: CategoryTheory.isSplitEpi_of_epi
code: /-- In a category in which every epimorphism is split, every epimorphism splits. This is not an
    instance because it would create an instance loop. -/
theorem isSplitEpi_of_epi [SplitEpiCategory C] {X Y : C} (f : X ⟶ Y) [Epi f] : IsSplitEpi f 
goal: CategoryTheory.IsSplitEpi f

full_name: CategoryTheory.SplitMono.map_retraction
code: /-- Split monomorphisms are also absolute monomorphisms. -/
@[simps]
def SplitMono.map {X Y : C} {f : X ⟶ Y} (sm : SplitMono f) (F : C ⥤ D) : SplitMono (F.map f) 
goal: (sm.map F).retraction = F.map sm.retraction

full_name: CategoryTheory.SplitMono.map
code: /-- Split monomorphisms are also absolute monomorphisms. -/
@[simps]
def SplitMono.map {X Y : C} {f : X ⟶ Y} (sm : SplitMono f) (F : C ⥤ D) : SplitMono (F.map f) 
goal: CategoryTheory.SplitMono (F.map f)

full_name: CategoryTheory.SplitEpi.map
code: /-- Split epimorphisms are also absolute epimorphisms. -/
@[simps]
def SplitEpi.map {X Y : C} {f : X ⟶ Y} (se : SplitEpi f) (F : C ⥤ D) : SplitEpi (F.map f) 
goal: CategoryTheory.SplitEpi (F.map f)

full_name: CategoryTheory.SplitEpi.map_section_
code: /-- Split epimorphisms are also absolute epimorphisms. -/
@[simps]
def SplitEpi.map {X Y : C} {f : X ⟶ Y} (se : SplitEpi f) (F : C ⥤ D) : SplitEpi (F.map f) 
goal: (se.map F).section_ = F.map se.section_

full_name: CategoryTheory.instIsSplitMonoMap
code: instance {X Y : C} (f : X ⟶ Y) [hf : IsSplitMono f] (F : C ⥤ D) : IsSplitMono (F.map f) 
goal: CategoryTheory.IsSplitMono (F.map f)

full_name: CategoryTheory.instIsSplitEpiMap
code: instance {X Y : C} (f : X ⟶ Y) [hf : IsSplitEpi f] (F : C ⥤ D) : IsSplitEpi (F.map f) 
goal: CategoryTheory.IsSplitEpi (F.map f)