l3lab/ntp-mathlib huggingface dataset:
/-- If `0 ⟶ X₁ ⟶ X₂ ⟶ X₃` is an exact sequence of homological complex, then
`0 ⟶ X₁.cycles i ⟶ X₂.cycles i ⟶ X₃.cycles i` is exact. This lemma states
the exactness at `X₂.cycles i`, while the fact that `X₁.cycles i ⟶ X₂.cycles i`
is a mono is an instance. -/
lemma cycles_left_exact (S : ShortComplex (HomologicalComplex C c)) (hS : S.Exact) [Mono S.f]
    (i : ι) [S.X₁.HasHomology i] [S.X₂.HasHomology i] [S.X₃.HasHomology i] :
    (ShortComplex.mk (cyclesMap S.f i) (cyclesMap S.g i)
      (by rw [← cyclesMap_comp, S.zero, cyclesMap_zero])).Exact := by
  have : Mono (ShortComplex.map S (eval C c i)).f := by dsimp; infer_instance
  have hi := (hS.map (HomologicalComplex.eval C c i)).fIsKernel
  apply ShortComplex.exact_of_f_is_kernel
  exact KernelFork.IsLimit.ofι' _ _ (fun {A} k hk => by
    dsimp at k hk ⊢
    have H := KernelFork.IsLimit.lift' hi (k ≫ S.X₂.iCycles i) (by
      

Proof state:
C : Type u_1
ι : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.Exact S
inst✝³ : Mono S.f
i : ι
inst✝² : HasHomology S.X₁ i
inst✝¹ : HasHomology S.X₂ i
inst✝ : HasHomology S.X₃ i
this : Mono (ShortComplex.map S (eval C c i)).f
hi :
  IsLimit
    (KernelFork.ofι (ShortComplex.map S (eval C c i)).f
      (_ : (ShortComplex.map S (eval C c i)).f ≫ (ShortComplex.map S (eval C c i)).g = 0))
A : C
k : A ⟶ cycles S.X₂ i
hk : k ≫ cyclesMap S.g i = 0
⊢ (k ≫ iCycles S.X₂ i) ≫ (ShortComplex.map S (eval C c i)).g = 0

Next tactic:
dsimp
/-- If `0 ⟶ X₁ ⟶ X₂ ⟶ X₃` is an exact sequence of homological complex, then
`0 ⟶ X₁.cycles i ⟶ X₂.cycles i ⟶ X₃.cycles i` is exact. This lemma states
the exactness at `X₂.cycles i`, while the fact that `X₁.cycles i ⟶ X₂.cycles i`
is a mono is an instance. -/
lemma cycles_left_exact (S : ShortComplex (HomologicalComplex C c)) (hS : S.Exact) [Mono S.f]
    (i : ι) [S.X₁.HasHomology i] [S.X₂.HasHomology i] [S.X₃.HasHomology i] :
    (ShortComplex.mk (cyclesMap S.f i) (cyclesMap S.g i)
      (by rw [← cyclesMap_comp, S.zero, cyclesMap_zero])).Exact := by
  have : Mono (ShortComplex.map S (eval C c i)).f := by dsimp; infer_instance
  have hi := (hS.map (HomologicalComplex.eval C c i)).fIsKernel
  apply ShortComplex.exact_of_f_is_kernel
  exact KernelFork.IsLimit.ofι' _ _ (fun {A} k hk => by
    dsimp at k hk ⊢
    have H := KernelFork.IsLimit.lift' hi (k ≫ S.X₂.iCycles i) (by
      dsimp
      

Proof state:
C : Type u_1
ι : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.Exact S
inst✝³ : Mono S.f
i : ι
inst✝² : HasHomology S.X₁ i
inst✝¹ : HasHomology S.X₂ i
inst✝ : HasHomology S.X₃ i
this : Mono (ShortComplex.map S (eval C c i)).f
hi :
  IsLimit
    (KernelFork.ofι (ShortComplex.map S (eval C c i)).f
      (_ : (ShortComplex.map S (eval C c i)).f ≫ (ShortComplex.map S (eval C c i)).g = 0))
A : C
k : A ⟶ cycles S.X₂ i
hk : k ≫ cyclesMap S.g i = 0
⊢ (k ≫ iCycles S.X₂ i) ≫ Hom.f S.g i = 0

Next tactic:
rw [assoc, ← cyclesMap_i, reassoc_of% hk, zero_comp]
/-- If `0 ⟶ X₁ ⟶ X₂ ⟶ X₃` is an exact sequence of homological complex, then
`0 ⟶ X₁.cycles i ⟶ X₂.cycles i ⟶ X₃.cycles i` is exact. This lemma states
the exactness at `X₂.cycles i`, while the fact that `X₁.cycles i ⟶ X₂.cycles i`
is a mono is an instance. -/
lemma cycles_left_exact (S : ShortComplex (HomologicalComplex C c)) (hS : S.Exact) [Mono S.f]
    (i : ι) [S.X₁.HasHomology i] [S.X₂.HasHomology i] [S.X₃.HasHomology i] :
    (ShortComplex.mk (cyclesMap S.f i) (cyclesMap S.g i)
      (by rw [← cyclesMap_comp, S.zero, cyclesMap_zero])).Exact := by
  have : Mono (ShortComplex.map S (eval C c i)).f := by dsimp; infer_instance
  have hi := (hS.map (HomologicalComplex.eval C c i)).fIsKernel
  apply ShortComplex.exact_of_f_is_kernel
  exact KernelFork.IsLimit.ofι' _ _ (fun {A} k hk => by
    dsimp at k hk ⊢
    have H := KernelFork.IsLimit.lift' hi (k ≫ S.X₂.iCycles i) (by
      dsimp
      rw [assoc, ← cyclesMap_i, reassoc_of% hk, zero_comp])
    

Proof state:
C : Type u_1
ι : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.Exact S
inst✝³ : Mono S.f
i : ι
inst✝² : HasHomology S.X₁ i
inst✝¹ : HasHomology S.X₂ i
inst✝ : HasHomology S.X₃ i
this : Mono (ShortComplex.map S (eval C c i)).f
hi :
  IsLimit
    (KernelFork.ofι (ShortComplex.map S (eval C c i)).f
      (_ : (ShortComplex.map S (eval C c i)).f ≫ (ShortComplex.map S (eval C c i)).g = 0))
A : C
k : A ⟶ cycles S.X₂ i
hk : k ≫ cyclesMap S.g i = 0
H :
  { l //
    l ≫
        Fork.ι
          (KernelFork.ofι (ShortComplex.map S (eval C c i)).f
            (_ : (ShortComplex.map S (eval C c i)).f ≫ (ShortComplex.map S (eval C c i)).g = 0)) =
      k ≫ iCycles S.X₂ i }
⊢ { l // l ≫ cyclesMap S.f i = k }

Next tactic:
dsimp at H
/-- If `0 ⟶ X₁ ⟶ X₂ ⟶ X₃` is an exact sequence of homological complex, then
`0 ⟶ X₁.cycles i ⟶ X₂.cycles i ⟶ X₃.cycles i` is exact. This lemma states
the exactness at `X₂.cycles i`, while the fact that `X₁.cycles i ⟶ X₂.cycles i`
is a mono is an instance. -/
lemma cycles_left_exact (S : ShortComplex (HomologicalComplex C c)) (hS : S.Exact) [Mono S.f]
    (i : ι) [S.X₁.HasHomology i] [S.X₂.HasHomology i] [S.X₃.HasHomology i] :
    (ShortComplex.mk (cyclesMap S.f i) (cyclesMap S.g i)
      (by rw [← cyclesMap_comp, S.zero, cyclesMap_zero])).Exact := by
  have : Mono (ShortComplex.map S (eval C c i)).f := by dsimp; infer_instance
  have hi := (hS.map (HomologicalComplex.eval C c i)).fIsKernel
  apply ShortComplex.exact_of_f_is_kernel
  exact KernelFork.IsLimit.ofι' _ _ (fun {A} k hk => by
    dsimp at k hk ⊢
    have H := KernelFork.IsLimit.lift' hi (k ≫ S.X₂.iCycles i) (by
      dsimp
      rw [assoc, ← cyclesMap_i, reassoc_of% hk, zero_comp])
    dsimp at H
    

Proof state:
C : Type u_1
ι : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.Exact S
inst✝³ : Mono S.f
i : ι
inst✝² : HasHomology S.X₁ i
inst✝¹ : HasHomology S.X₂ i
inst✝ : HasHomology S.X₃ i
this : Mono (ShortComplex.map S (eval C c i)).f
hi :
  IsLimit
    (KernelFork.ofι (ShortComplex.map S (eval C c i)).f
      (_ : (ShortComplex.map S (eval C c i)).f ≫ (ShortComplex.map S (eval C c i)).g = 0))
A : C
k : A ⟶ cycles S.X₂ i
hk : k ≫ cyclesMap S.g i = 0
H : { l // l ≫ Hom.f S.f i = k ≫ iCycles S.X₂ i }
⊢ { l // l ≫ cyclesMap S.f i = k }

Next tactic:
refine' ⟨S.X₁.liftCycles H.1 _ rfl _, _⟩
/-- If `0 ⟶ X₁ ⟶ X₂ ⟶ X₃` is an exact sequence of homological complex, then
`0 ⟶ X₁.cycles i ⟶ X₂.cycles i ⟶ X₃.cycles i` is exact. This lemma states
the exactness at `X₂.cycles i`, while the fact that `X₁.cycles i ⟶ X₂.cycles i`
is a mono is an instance. -/
lemma cycles_left_exact (S : ShortComplex (HomologicalComplex C c)) (hS : S.Exact) [Mono S.f]
    (i : ι) [S.X₁.HasHomology i] [S.X₂.HasHomology i] [S.X₃.HasHomology i] :
    (ShortComplex.mk (cyclesMap S.f i) (cyclesMap S.g i)
      (by rw [← cyclesMap_comp, S.zero, cyclesMap_zero])).Exact := by
  have : Mono (ShortComplex.map S (eval C c i)).f := by dsimp; infer_instance
  have hi := (hS.map (HomologicalComplex.eval C c i)).fIsKernel
  apply ShortComplex.exact_of_f_is_kernel
  exact KernelFork.IsLimit.ofι' _ _ (fun {A} k hk => by
    dsimp at k hk ⊢
    have H := KernelFork.IsLimit.lift' hi (k ≫ S.X₂.iCycles i) (by
      dsimp
      rw [assoc, ← cyclesMap_i, reassoc_of% hk, zero_comp])
    dsimp at H
    refine' ⟨S.X₁.liftCycles H.1 _ rfl _, _⟩
    · 

Proof state:
case refine'_1
C : Type u_1
ι : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.Exact S
inst✝³ : Mono S.f
i : ι
inst✝² : HasHomology S.X₁ i
inst✝¹ : HasHomology S.X₂ i
inst✝ : HasHomology S.X₃ i
this : Mono (ShortComplex.map S (eval C c i)).f
hi :
  IsLimit
    (KernelFork.ofι (ShortComplex.map S (eval C c i)).f
      (_ : (ShortComplex.map S (eval C c i)).f ≫ (ShortComplex.map S (eval C c i)).g = 0))
A : C
k : A ⟶ cycles S.X₂ i
hk : k ≫ cyclesMap S.g i = 0
H : { l // l ≫ Hom.f S.f i = k ≫ iCycles S.X₂ i }
⊢ ↑H ≫ d S.X₁ i (ComplexShape.next c i) = 0

Next tactic:
rw [← cancel_mono (S.f.f _), assoc, zero_comp, ← Hom.comm, reassoc_of% H.2,
        iCycles_d, comp_zero]
/-- If `0 ⟶ X₁ ⟶ X₂ ⟶ X₃` is an exact sequence of homological complex, then
`0 ⟶ X₁.cycles i ⟶ X₂.cycles i ⟶ X₃.cycles i` is exact. This lemma states
the exactness at `X₂.cycles i`, while the fact that `X₁.cycles i ⟶ X₂.cycles i`
is a mono is an instance. -/
lemma cycles_left_exact (S : ShortComplex (HomologicalComplex C c)) (hS : S.Exact) [Mono S.f]
    (i : ι) [S.X₁.HasHomology i] [S.X₂.HasHomology i] [S.X₃.HasHomology i] :
    (ShortComplex.mk (cyclesMap S.f i) (cyclesMap S.g i)
      (by rw [← cyclesMap_comp, S.zero, cyclesMap_zero])).Exact := by
  have : Mono (ShortComplex.map S (eval C c i)).f := by dsimp; infer_instance
  have hi := (hS.map (HomologicalComplex.eval C c i)).fIsKernel
  apply ShortComplex.exact_of_f_is_kernel
  exact KernelFork.IsLimit.ofι' _ _ (fun {A} k hk => by
    dsimp at k hk ⊢
    have H := KernelFork.IsLimit.lift' hi (k ≫ S.X₂.iCycles i) (by
      dsimp
      rw [assoc, ← cyclesMap_i, reassoc_of% hk, zero_comp])
    dsimp at H
    refine' ⟨S.X₁.liftCycles H.1 _ rfl _, _⟩
    · rw [← cancel_mono (S.f.f _), assoc, zero_comp, ← Hom.comm, reassoc_of% H.2,
        iCycles_d, comp_zero]
    · 

Proof state:
case refine'_2
C : Type u_1
ι : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.Exact S
inst✝³ : Mono S.f
i : ι
inst✝² : HasHomology S.X₁ i
inst✝¹ : HasHomology S.X₂ i
inst✝ : HasHomology S.X₃ i
this : Mono (ShortComplex.map S (eval C c i)).f
hi :
  IsLimit
    (KernelFork.ofι (ShortComplex.map S (eval C c i)).f
      (_ : (ShortComplex.map S (eval C c i)).f ≫ (ShortComplex.map S (eval C c i)).g = 0))
A : C
k : A ⟶ cycles S.X₂ i
hk : k ≫ cyclesMap S.g i = 0
H : { l // l ≫ Hom.f S.f i = k ≫ iCycles S.X₂ i }
⊢ liftCycles S.X₁ (↑H) (ComplexShape.next c i) (_ : ComplexShape.next c i = ComplexShape.next c i)
        (_ : ↑H ≫ d S.X₁ i (ComplexShape.next c i) = 0) ≫
      cyclesMap S.f i =
    k

Next tactic:
rw [← cancel_mono (S.X₂.iCycles i), liftCycles_comp_cyclesMap, liftCycles_i, H.2]
/-- Given a short exact short complex `S : HomologicalComplex C c`, and degrees `i` and `j`
such that `c.Rel i j`, this is the snake diagram whose four lines are respectively
obtained by applying the functors `homologyFunctor C c i`, `opcyclesFunctor C c i`,
`cyclesFunctor C c j`, `homologyFunctor C c j` to `S`. Applying the snake lemma to this
gives the homology sequence of `S`. -/
noncomputable def snakeInput : ShortComplex.SnakeInput C where
  L₀ := (homologyFunctor C c i).mapShortComplex.obj S
  L₁ := (opcyclesFunctor C c i).mapShortComplex.obj S
  L₂ := (cyclesFunctor C c j).mapShortComplex.obj S
  L₃ := (homologyFunctor C c j).mapShortComplex.obj S
  v₀₁ := S.mapNatTrans (natTransHomologyι C c i)
  v₁₂ := S.mapNatTrans (natTransOpCyclesToCycles C c i j)
  v₂₃ := S.mapNatTrans (natTransHomologyπ C c j)
  h₀ := by
    

Proof state:
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{?u.134129, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
⊢ IsLimit
    (KernelFork.ofι (ShortComplex.mapNatTrans S (natTransHomologyι C c i))
      (_ :
        ShortComplex.mapNatTrans S (natTransHomologyι C c i) ≫
            ShortComplex.mapNatTrans S (natTransOpCyclesToCycles C c i j) =
          0))

Next tactic:
apply ShortComplex.isLimitOfIsLimitπ
/-- Given a short exact short complex `S : HomologicalComplex C c`, and degrees `i` and `j`
such that `c.Rel i j`, this is the snake diagram whose four lines are respectively
obtained by applying the functors `homologyFunctor C c i`, `opcyclesFunctor C c i`,
`cyclesFunctor C c j`, `homologyFunctor C c j` to `S`. Applying the snake lemma to this
gives the homology sequence of `S`. -/
noncomputable def snakeInput : ShortComplex.SnakeInput C where
  L₀ := (homologyFunctor C c i).mapShortComplex.obj S
  L₁ := (opcyclesFunctor C c i).mapShortComplex.obj S
  L₂ := (cyclesFunctor C c j).mapShortComplex.obj S
  L₃ := (homologyFunctor C c j).mapShortComplex.obj S
  v₀₁ := S.mapNatTrans (natTransHomologyι C c i)
  v₁₂ := S.mapNatTrans (natTransOpCyclesToCycles C c i j)
  v₂₃ := S.mapNatTrans (natTransHomologyπ C c j)
  h₀ := by
    apply ShortComplex.isLimitOfIsLimitπ
    

Proof state:
case h₁
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{?u.134129, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
⊢ IsLimit
    (ShortComplex.π₁.mapCone
      (KernelFork.ofι (ShortComplex.mapNatTrans S (natTransHomologyι C c i))
        (_ :
          ShortComplex.mapNatTrans S (natTransHomologyι C c i) ≫
              ShortComplex.mapNatTrans S (natTransOpCyclesToCycles C c i j) =
            0)))
case h₂
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{?u.134129, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
⊢ IsLimit
    (ShortComplex.π₂.mapCone
      (KernelFork.ofι (ShortComplex.mapNatTrans S (natTransHomologyι C c i))
        (_ :
          ShortComplex.mapNatTrans S (natTransHomologyι C c i) ≫
              ShortComplex.mapNatTrans S (natTransOpCyclesToCycles C c i j) =
            0)))
case h₃
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{?u.134129, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
⊢ IsLimit
    (ShortComplex.π₃.mapCone
      (KernelFork.ofι (ShortComplex.mapNatTrans S (natTransHomologyι C c i))
        (_ :
          ShortComplex.mapNatTrans S (natTransHomologyι C c i) ≫
              ShortComplex.mapNatTrans S (natTransOpCyclesToCycles C c i j) =
            0)))

Next tactic:
all_goals
      exact (KernelFork.isLimitMapConeEquiv _ _).symm
        ((composableArrows₃_exact _ i j hij).exact 0).fIsKernel
/-- Given a short exact short complex `S : HomologicalComplex C c`, and degrees `i` and `j`
such that `c.Rel i j`, this is the snake diagram whose four lines are respectively
obtained by applying the functors `homologyFunctor C c i`, `opcyclesFunctor C c i`,
`cyclesFunctor C c j`, `homologyFunctor C c j` to `S`. Applying the snake lemma to this
gives the homology sequence of `S`. -/
noncomputable def snakeInput : ShortComplex.SnakeInput C where
  L₀ := (homologyFunctor C c i).mapShortComplex.obj S
  L₁ := (opcyclesFunctor C c i).mapShortComplex.obj S
  L₂ := (cyclesFunctor C c j).mapShortComplex.obj S
  L₃ := (homologyFunctor C c j).mapShortComplex.obj S
  v₀₁ := S.mapNatTrans (natTransHomologyι C c i)
  v₁₂ := S.mapNatTrans (natTransOpCyclesToCycles C c i j)
  v₂₃ := S.mapNatTrans (natTransHomologyπ C c j)
  h₀ := by
    apply ShortComplex.isLimitOfIsLimitπ
    all_goals
      

Proof state:
case h₁
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{?u.134129, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
⊢ IsLimit
    (ShortComplex.π₁.mapCone
      (KernelFork.ofι (ShortComplex.mapNatTrans S (natTransHomologyι C c i))
        (_ :
          ShortComplex.mapNatTrans S (natTransHomologyι C c i) ≫
              ShortComplex.mapNatTrans S (natTransOpCyclesToCycles C c i j) =
            0)))

Next tactic:
exact (KernelFork.isLimitMapConeEquiv _ _).symm
        ((composableArrows₃_exact _ i j hij).exact 0).fIsKernel
/-- Given a short exact short complex `S : HomologicalComplex C c`, and degrees `i` and `j`
such that `c.Rel i j`, this is the snake diagram whose four lines are respectively
obtained by applying the functors `homologyFunctor C c i`, `opcyclesFunctor C c i`,
`cyclesFunctor C c j`, `homologyFunctor C c j` to `S`. Applying the snake lemma to this
gives the homology sequence of `S`. -/
noncomputable def snakeInput : ShortComplex.SnakeInput C where
  L₀ := (homologyFunctor C c i).mapShortComplex.obj S
  L₁ := (opcyclesFunctor C c i).mapShortComplex.obj S
  L₂ := (cyclesFunctor C c j).mapShortComplex.obj S
  L₃ := (homologyFunctor C c j).mapShortComplex.obj S
  v₀₁ := S.mapNatTrans (natTransHomologyι C c i)
  v₁₂ := S.mapNatTrans (natTransOpCyclesToCycles C c i j)
  v₂₃ := S.mapNatTrans (natTransHomologyπ C c j)
  h₀ := by
    apply ShortComplex.isLimitOfIsLimitπ
    all_goals
      

Proof state:
case h₂
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{?u.134129, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
⊢ IsLimit
    (ShortComplex.π₂.mapCone
      (KernelFork.ofι (ShortComplex.mapNatTrans S (natTransHomologyι C c i))
        (_ :
          ShortComplex.mapNatTrans S (natTransHomologyι C c i) ≫
              ShortComplex.mapNatTrans S (natTransOpCyclesToCycles C c i j) =
            0)))

Next tactic:
exact (KernelFork.isLimitMapConeEquiv _ _).symm
        ((composableArrows₃_exact _ i j hij).exact 0).fIsKernel
/-- Given a short exact short complex `S : HomologicalComplex C c`, and degrees `i` and `j`
such that `c.Rel i j`, this is the snake diagram whose four lines are respectively
obtained by applying the functors `homologyFunctor C c i`, `opcyclesFunctor C c i`,
`cyclesFunctor C c j`, `homologyFunctor C c j` to `S`. Applying the snake lemma to this
gives the homology sequence of `S`. -/
noncomputable def snakeInput : ShortComplex.SnakeInput C where
  L₀ := (homologyFunctor C c i).mapShortComplex.obj S
  L₁ := (opcyclesFunctor C c i).mapShortComplex.obj S
  L₂ := (cyclesFunctor C c j).mapShortComplex.obj S
  L₃ := (homologyFunctor C c j).mapShortComplex.obj S
  v₀₁ := S.mapNatTrans (natTransHomologyι C c i)
  v₁₂ := S.mapNatTrans (natTransOpCyclesToCycles C c i j)
  v₂₃ := S.mapNatTrans (natTransHomologyπ C c j)
  h₀ := by
    apply ShortComplex.isLimitOfIsLimitπ
    all_goals
      

Proof state:
case h₃
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{?u.134129, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
⊢ IsLimit
    (ShortComplex.π₃.mapCone
      (KernelFork.ofι (ShortComplex.mapNatTrans S (natTransHomologyι C c i))
        (_ :
          ShortComplex.mapNatTrans S (natTransHomologyι C c i) ≫
              ShortComplex.mapNatTrans S (natTransOpCyclesToCycles C c i j) =
            0)))

Next tactic:
exact (KernelFork.isLimitMapConeEquiv _ _).symm
        ((composableArrows₃_exact _ i j hij).exact 0).fIsKernel
/-- Given a short exact short complex `S : HomologicalComplex C c`, and degrees `i` and `j`
such that `c.Rel i j`, this is the snake diagram whose four lines are respectively
obtained by applying the functors `homologyFunctor C c i`, `opcyclesFunctor C c i`,
`cyclesFunctor C c j`, `homologyFunctor C c j` to `S`. Applying the snake lemma to this
gives the homology sequence of `S`. -/
noncomputable def snakeInput : ShortComplex.SnakeInput C where
  L₀ := (homologyFunctor C c i).mapShortComplex.obj S
  L₁ := (opcyclesFunctor C c i).mapShortComplex.obj S
  L₂ := (cyclesFunctor C c j).mapShortComplex.obj S
  L₃ := (homologyFunctor C c j).mapShortComplex.obj S
  v₀₁ := S.mapNatTrans (natTransHomologyι C c i)
  v₁₂ := S.mapNatTrans (natTransOpCyclesToCycles C c i j)
  v₂₃ := S.mapNatTrans (natTransHomologyπ C c j)
  h₀ := by
    apply ShortComplex.isLimitOfIsLimitπ
    all_goals
      exact (KernelFork.isLimitMapConeEquiv _ _).symm
        ((composableArrows₃_exact _ i j hij).exact 0).fIsKernel
  h₃ := by
    

Proof state:
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{?u.134129, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
⊢ IsColimit
    (CokernelCofork.ofπ (ShortComplex.mapNatTrans S (natTransHomologyπ C c j))
      (_ :
        ShortComplex.mapNatTrans S (natTransOpCyclesToCycles C c i j) ≫
            ShortComplex.mapNatTrans S (natTransHomologyπ C c j) =
          0))

Next tactic:
apply ShortComplex.isColimitOfIsColimitπ
/-- Given a short exact short complex `S : HomologicalComplex C c`, and degrees `i` and `j`
such that `c.Rel i j`, this is the snake diagram whose four lines are respectively
obtained by applying the functors `homologyFunctor C c i`, `opcyclesFunctor C c i`,
`cyclesFunctor C c j`, `homologyFunctor C c j` to `S`. Applying the snake lemma to this
gives the homology sequence of `S`. -/
noncomputable def snakeInput : ShortComplex.SnakeInput C where
  L₀ := (homologyFunctor C c i).mapShortComplex.obj S
  L₁ := (opcyclesFunctor C c i).mapShortComplex.obj S
  L₂ := (cyclesFunctor C c j).mapShortComplex.obj S
  L₃ := (homologyFunctor C c j).mapShortComplex.obj S
  v₀₁ := S.mapNatTrans (natTransHomologyι C c i)
  v₁₂ := S.mapNatTrans (natTransOpCyclesToCycles C c i j)
  v₂₃ := S.mapNatTrans (natTransHomologyπ C c j)
  h₀ := by
    apply ShortComplex.isLimitOfIsLimitπ
    all_goals
      exact (KernelFork.isLimitMapConeEquiv _ _).symm
        ((composableArrows₃_exact _ i j hij).exact 0).fIsKernel
  h₃ := by
    apply ShortComplex.isColimitOfIsColimitπ
    

Proof state:
case h₁
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{?u.134129, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
⊢ IsColimit
    (ShortComplex.π₁.mapCocone
      (CokernelCofork.ofπ (ShortComplex.mapNatTrans S (natTransHomologyπ C c j))
        (_ :
          ShortComplex.mapNatTrans S (natTransOpCyclesToCycles C c i j) ≫
              ShortComplex.mapNatTrans S (natTransHomologyπ C c j) =
            0)))
case h₂
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{?u.134129, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
⊢ IsColimit
    (ShortComplex.π₂.mapCocone
      (CokernelCofork.ofπ (ShortComplex.mapNatTrans S (natTransHomologyπ C c j))
        (_ :
          ShortComplex.mapNatTrans S (natTransOpCyclesToCycles C c i j) ≫
              ShortComplex.mapNatTrans S (natTransHomologyπ C c j) =
            0)))
case h₃
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{?u.134129, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortComplex.ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
⊢ IsColimit
    (ShortComplex.π₃.mapCocone
      (CokernelCofork.ofπ (ShortComplex.mapNatTrans S (natTransHomologyπ C c j))
        (_ :
          ShortComplex.mapNatTrans S (natTransOpCyclesToCycles C c i j) ≫
              ShortComplex.mapNatTrans S (natTransHomologyπ C c j) =
            0)))

Next tactic:
all_goals
      exact (CokernelCofork.isColimitMapCoconeEquiv _ _).symm
        ((composableArrows₃_exact _ i j hij).exact 1).gIsCokernel