-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
lemma δ_δ (n₀ n₁ n₂ : ℤ) (z : Cochain F G n₀) : δ n₁ n₂ (δ n₀ n₁ z) = 0

Proof state:
case pos
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : n₀ + 1 = n₁
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

Tactic:
ext p q hpq

Result:
case pos.h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : n₀ + 1 = n₁
p q : ℤ
hpq : p + n₂ = q
⊢ (δ n₁ n₂ (δ n₀ n₁ z)).v p q hpq = Cochain.v 0 p q hpq

Proof state:
case pos.h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : n₀ + 1 = n₁
p q : ℤ
hpq : p + n₂ = q
⊢ (δ n₁ n₂ (δ n₀ n₁ z)).v p q hpq = Cochain.v 0 p q hpq

Tactic:
dsimp

Result:
case pos.h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : n₀ + 1 = n₁
p q : ℤ
hpq : p + n₂ = q
⊢ (δ n₁ n₂ (δ n₀ n₁ z)).v p q hpq = 0

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : n₀ + 1 = n₁
p q : ℤ
hpq : p + n₂ = q
⊢ q - 2 = q - 1 - 1

Tactic:
omega

Result:
no goals

Proof state:
case neg
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : ¬n₁ + 1 = n₂
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

Tactic:
rw [δ_shape _ _ h₁₂]

Result:
no goals

Proof state:
case pos
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

Tactic:
by_cases h₀₁ : n₀ + 1 = n₁

Result:
case pos
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : n₀ + 1 = n₁
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

case neg
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : ¬n₀ + 1 = n₁
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

Proof state:
case pos
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

case neg
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : ¬n₁ + 1 = n₂
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

Tactic:
swap

Result:
case neg
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : ¬n₁ + 1 = n₂
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

case pos
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

Tactic:
by_cases h₁₂ : n₁ + 1 = n₂

Result:
case pos
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

case neg
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : ¬n₁ + 1 = n₂
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : n₀ + 1 = n₁
p q : ℤ
hpq : p + n₂ = q
⊢ p + n₁ = q - 1

Tactic:
omega

Result:
no goals

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : n₀ + 1 = n₁
p q : ℤ
hpq : p + n₂ = q
⊢ p + 1 + n₁ = q

Tactic:
omega

Result:
no goals

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : n₀ + 1 = n₁
p q : ℤ
hpq : p + n₂ = q
⊢ p + 1 + 1 = p + 2

Tactic:
omega

Result:
no goals

Proof state:
case pos.h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : n₀ + 1 = n₁
p q : ℤ
hpq : p + n₂ = q
⊢ (δ n₁ n₂ (δ n₀ n₁ z)).v p q hpq = 0

Tactic:
simp only [δ_v n₁ n₂ h₁₂ _ p q hpq _ _ rfl rfl,
  δ_v n₀ n₁ h₀₁ z p (q-1) (by omega) (q-2) _ (by omega) rfl,
  δ_v n₀ n₁ h₀₁ z (p+1) q (by omega) _ (p+2) rfl (by omega),
  ← h₁₂, Int.negOnePow_succ, add_comp, assoc,
  HomologicalComplex.d_comp_d, comp_zero, zero_add, comp_add,
  HomologicalComplex.d_comp_d_assoc, zero_comp, smul_zero,
  add_zero, add_neg_cancel, Units.neg_smul,
  Linear.units_smul_comp, Linear.comp_units_smul]

Result:
no goals

Proof state:
case pos
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : n₀ + 1 = n₁
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

case neg
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : ¬n₀ + 1 = n₁
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

Tactic:
swap

Result:
case neg
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : ¬n₀ + 1 = n₁
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

case pos
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : n₀ + 1 = n₁
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

Proof state:
case neg
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
F G : CochainComplex C ℤ
n₀ n₁ n₂ : ℤ
z : Cochain F G n₀
h₁₂ : n₁ + 1 = n₂
h₀₁ : ¬n₀ + 1 = n₁
⊢ δ n₁ n₂ (δ n₀ n₁ z) = 0

Tactic:
rw [δ_shape _ _ h₀₁, δ_zero]

Result:
no goals