-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
lemma δ_neg_one_cochain (z : Cochain F G (-1)) :
    δ (-1) 0 z = Cochain.ofHom (Homotopy.nullHomotopicMap'
      (fun i j hij => z.v i j (by dsimp at hij; rw [← hij, add_neg_cancel_right])))

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
z : Cochain F G (-1)
p : ℤ
⊢ (δ (-1) 0 z).v p p ⋯ = (Cochain.ofHom (Homotopy.nullHomotopicMap' fun i j hij => z.v i j ⋯)).v p p ⋯

Tactic:
rw [δ_v (-1) 0 (neg_add_cancel 1) _ p p (add_zero p) (p-1) (p+1) rfl rfl]

Result:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
z : Cochain F G (-1)
p : ℤ
⊢ z.v p (p - 1) ⋯ ≫ G.d (p - 1) p + Int.negOnePow 0 • F.d p (p + 1) ≫ z.v (p + 1) p ⋯ =
    (Cochain.ofHom (Homotopy.nullHomotopicMap' fun i j hij => z.v i j ⋯)).v p p ⋯

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m : ℤ
z : Cochain F G (-1)
i j : ℤ
hij : j + 1 = i
⊢ i + -1 = j

Tactic:
rw [← hij, add_neg_cancel_right]

Result:
no goals

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
z : Cochain F G (-1)
p : ℤ
⊢ z.v p (p - 1) ⋯ ≫ G.d (p - 1) p + F.d p (p + 1) ≫ z.v (p + 1) p ⋯ =
    (Homotopy.nullHomotopicMap' fun i j hij => z.v i j ⋯).f p

Tactic:
rw [Homotopy.nullHomotopicMap'_f (show (ComplexShape.up ℤ).Rel (p-1) p by simp)
  (show (ComplexShape.up ℤ).Rel p (p+1) by simp)]

Result:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
z : Cochain F G (-1)
p : ℤ
⊢ z.v p (p - 1) ⋯ ≫ G.d (p - 1) p + F.d p (p + 1) ≫ z.v (p + 1) p ⋯ =
    F.d p (p + 1) ≫ z.v (p + 1) p ⋯ + z.v p (p - 1) ⋯ ≫ G.d (p - 1) p

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
z : Cochain F G (-1)
p : ℤ
⊢ z.v p (p - 1) ⋯ ≫ G.d (p - 1) p + F.d p (p + 1) ≫ z.v (p + 1) p ⋯ =
    F.d p (p + 1) ≫ z.v (p + 1) p ⋯ + z.v p (p - 1) ⋯ ≫ G.d (p - 1) p

Tactic:
abel

Result:
no goals

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
z : Cochain F G (-1)
p : ℤ
⊢ (ComplexShape.up ℤ).Rel (p - 1) p

Tactic:
simp

Result:
no goals

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
z : Cochain F G (-1)
⊢ δ (-1) 0 z = Cochain.ofHom (Homotopy.nullHomotopicMap' fun i j hij => z.v i j ⋯)

Tactic:
ext p

Result:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
z : Cochain F G (-1)
p : ℤ
⊢ (δ (-1) 0 z).v p p ⋯ = (Cochain.ofHom (Homotopy.nullHomotopicMap' fun i j hij => z.v i j ⋯)).v p p ⋯

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
z : Cochain F G (-1)
p : ℤ
⊢ (ComplexShape.up ℤ).Rel p (p + 1)

Tactic:
simp

Result:
no goals

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
z : Cochain F G (-1)
p : ℤ
⊢ z.v p (p - 1) ⋯ ≫ G.d (p - 1) p + Int.negOnePow 0 • F.d p (p + 1) ≫ z.v (p + 1) p ⋯ =
    (Cochain.ofHom (Homotopy.nullHomotopicMap' fun i j hij => z.v i j ⋯)).v p p ⋯

Tactic:
simp only [neg_add_cancel, one_smul, Cochain.ofHom_v, Int.negOnePow_zero]

Result:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
z : Cochain F G (-1)
p : ℤ
⊢ z.v p (p - 1) ⋯ ≫ G.d (p - 1) p + F.d p (p + 1) ≫ z.v (p + 1) p ⋯ =
    (Homotopy.nullHomotopicMap' fun i j hij => z.v i j ⋯).f p

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m : ℤ
z : Cochain F G (-1)
i j : ℤ
hij : (ComplexShape.up ℤ).Rel j i
⊢ i + -1 = j

Tactic:
dsimp at hij

Result:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m : ℤ
z : Cochain F G (-1)
i j : ℤ
hij : j + 1 = i
⊢ i + -1 = j