Theorem: CategoryTheory.Abelian.epiWithInjectiveKernel_iff
File: Mathlib/CategoryTheory/Abelian/EpiWithInjectiveKernel.lean

tactic: constructor
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
⊢ epiWithInjectiveKernel g ↔
    ∃ I, ∃ (_ : Injective I), ∃ f, ∃ (w : f ≫ g = 0), Nonempty (ShortComplex.mk f g w).Splitting
state_after: case mp
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
⊢ epiWithInjectiveKernel g →
    ∃ I, ∃ (_ : Injective I), ∃ f, ∃ (w : f ≫ g = 0), Nonempty (ShortComplex.mk f g w).Splitting

case mpr
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
⊢ (∃ I, ∃ (_ : Injective I), ∃ f, ∃ (w : f ≫ g = 0), Nonempty (ShortComplex.mk f g w).Splitting) →
    epiWithInjectiveKernel g

tactic: rintro ⟨_, _⟩
state_before: case mp
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
⊢ epiWithInjectiveKernel g →
    ∃ I, ∃ (_ : Injective I), ∃ f, ∃ (w : f ≫ g = 0), Nonempty (ShortComplex.mk f g w).Splitting
state_after: case mp.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
left✝ : Epi g
right✝ : Injective (kernel g)
⊢ ∃ I, ∃ (_ : Injective I), ∃ f, ∃ (w : f ≫ g = 0), Nonempty (ShortComplex.mk f g w).Splitting

tactic: let S := ShortComplex.mk (kernel.ι g) g (by simp)
state_before: case mp.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
left✝ : Epi g
right✝ : Injective (kernel g)
⊢ ∃ I, ∃ (_ : Injective I), ∃ f, ∃ (w : f ≫ g = 0), Nonempty (ShortComplex.mk f g w).Splitting
state_after: case mp.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
left✝ : Epi g
right✝ : Injective (kernel g)
S : ShortComplex C := ShortComplex.mk (kernel.ι g) g ⋯
⊢ ∃ I, ∃ (_ : Injective I), ∃ f, ∃ (w : f ≫ g = 0), Nonempty (ShortComplex.mk f g w).Splitting

tactic: exact ⟨_, inferInstance, _, S.zero,
  ⟨ShortComplex.Splitting.ofExactOfRetraction S
    (S.exact_of_f_is_kernel (kernelIsKernel g)) (Injective.factorThru (𝟙 _) (kernel.ι g))
    (by simp) inferInstance⟩⟩
state_before: case mp.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
left✝ : Epi g
right✝ : Injective (kernel g)
S : ShortComplex C := ShortComplex.mk (kernel.ι g) g ⋯
⊢ ∃ I, ∃ (_ : Injective I), ∃ f, ∃ (w : f ≫ g = 0), Nonempty (ShortComplex.mk f g w).Splitting
state_after: no goals

tactic: simp
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
left✝ : Epi g
right✝ : Injective (kernel g)
⊢ kernel.ι g ≫ g = 0
state_after: no goals

tactic: simp
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
left✝ : Epi g
right✝ : Injective (kernel g)
S : ShortComplex C := ShortComplex.mk (kernel.ι g) g ⋯
⊢ S.f ≫ Injective.factorThru (𝟙 S.X₁) (kernel.ι g) = 𝟙 S.X₁
state_after: no goals

tactic: rintro ⟨I, _,  f, w, ⟨σ⟩⟩
state_before: case mpr
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
⊢ (∃ I, ∃ (_ : Injective I), ∃ f, ∃ (w : f ≫ g = 0), Nonempty (ShortComplex.mk f g w).Splitting) →
    epiWithInjectiveKernel g
state_after: case mpr.intro.intro.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
I : C
w✝ : Injective I
f : I ⟶ X
w : f ≫ g = 0
σ : (ShortComplex.mk f g w).Splitting
⊢ epiWithInjectiveKernel g

tactic: have : IsSplitEpi g := ⟨σ.s, σ.s_g⟩
state_before: case mpr.intro.intro.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
I : C
w✝ : Injective I
f : I ⟶ X
w : f ≫ g = 0
σ : (ShortComplex.mk f g w).Splitting
⊢ epiWithInjectiveKernel g
state_after: case mpr.intro.intro.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
I : C
w✝ : Injective I
f : I ⟶ X
w : f ≫ g = 0
σ : (ShortComplex.mk f g w).Splitting
this : IsSplitEpi g
⊢ epiWithInjectiveKernel g

tactic: let e : I ≅ kernel g :=
  IsLimit.conePointUniqueUpToIso σ.shortExact.fIsKernel (limit.isLimit _)
state_before: case mpr.intro.intro.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
I : C
w✝ : Injective I
f : I ⟶ X
w : f ≫ g = 0
σ : (ShortComplex.mk f g w).Splitting
this : IsSplitEpi g
⊢ epiWithInjectiveKernel g
state_after: case mpr.intro.intro.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
I : C
w✝ : Injective I
f : I ⟶ X
w : f ≫ g = 0
σ : (ShortComplex.mk f g w).Splitting
this : IsSplitEpi g
e : I ≅ kernel g := ⋯.fIsKernel.conePointUniqueUpToIso (limit.isLimit (parallelPair (ShortComplex.mk f g w).g 0))
⊢ epiWithInjectiveKernel g

tactic: exact ⟨inferInstance, Injective.of_iso e inferInstance⟩
state_before: case mpr.intro.intro.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
g : X ⟶ Y
I : C
w✝ : Injective I
f : I ⟶ X
w : f ≫ g = 0
σ : (ShortComplex.mk f g w).Splitting
this : IsSplitEpi g
e : I ≅ kernel g := ⋯.fIsKernel.conePointUniqueUpToIso (limit.isLimit (parallelPair (ShortComplex.mk f g w).g 0))
⊢ epiWithInjectiveKernel g
state_after: no goals