Theorem: AlgebraicTopology.DoldKan.HigherFacesVanish.comp_Hσ_eq_zero
File: Mathlib/AlgebraicTopology/DoldKan/Faces.lean

tactic: simp only [Hσ, Homotopy.nullHomotopicMap'_f (c_mk (n + 2) (n + 1) rfl) (c_mk (n + 1) n rfl)]
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
⊢ φ ≫ HomologicalComplex.Hom.f (Hσ q) (n + 1) = 0

tactic: rw [hσ'_eq_zero hqn (c_mk (n + 1) n rfl), comp_zero, zero_add]
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
⊢ φ ≫
      (HomologicalComplex.d (AlternatingFaceMapComplex.obj X) (n + 1) n ≫
          hσ' q n (n + 1) (_ : ComplexShape.Rel c (n + 1) n) +
        hσ' q (n + 1) (n + 2) (_ : ComplexShape.Rel c (n + 2) (n + 1)) ≫
          HomologicalComplex.d (AlternatingFaceMapComplex.obj X) (n + 2) (n + 1)) =
    0

tactic: by_cases hqn' : n + 1 < q
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
⊢ φ ≫
      hσ' q (n + 1) (n + 2) (_ : ComplexShape.Rel c (n + 2) (n + 1)) ≫
        HomologicalComplex.d (AlternatingFaceMapComplex.obj X) (n + 2) (n + 1) =
    0

tactic: rw [hσ'_eq_zero hqn' (c_mk (n + 2) (n + 1) rfl), zero_comp, comp_zero]
state_before: case pos
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : n + 1 < q
⊢ φ ≫
      hσ' q (n + 1) (n + 2) (_ : ComplexShape.Rel c (n + 2) (n + 1)) ≫
        HomologicalComplex.d (AlternatingFaceMapComplex.obj X) (n + 2) (n + 1) =
    0

tactic: simp only [hσ'_eq (show n + 1 = 0 + q by linarith) (c_mk (n + 2) (n + 1) rfl), pow_zero,
  Fin.mk_zero, one_zsmul, eqToHom_refl, comp_id, comp_sum,
  AlternatingFaceMapComplex.obj_d_eq]
state_before: case neg
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
⊢ φ ≫
      hσ' q (n + 1) (n + 2) (_ : ComplexShape.Rel c (n + 2) (n + 1)) ≫
        HomologicalComplex.d (AlternatingFaceMapComplex.obj X) (n + 2) (n + 1) =
    0

tactic: rw [← Fin.sum_congr' _ (show 2 + (n + 1) = n + 1 + 2 by linarith), Fin.sum_trunc]
state_before: case neg
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
⊢ (Finset.sum Finset.univ fun j => φ ≫ σ X 0 ≫ ((-1) ^ ↑j • δ X j)) = 0

tactic: linarith
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
⊢ n + 1 = 0 + q

tactic: linarith
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
⊢ 2 + (n + 1) = n + 1 + 2

tactic: simp only [Fin.sum_univ_castSucc, Fin.sum_univ_zero, zero_add, Fin.last, Fin.castLE_mk,
  Fin.cast_mk, Fin.castSucc_mk]
state_before: case neg
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
⊢ (Finset.sum Finset.univ fun i =>
      φ ≫
        σ X 0 ≫
          ((-1) ^ ↑(↑(Fin.cast (_ : 2 + (n + 1) = n + 1 + 2)) (↑(Fin.castLE (_ : 2 ≤ 2 + (n + 1))) i)) •
            δ X (↑(Fin.cast (_ : 2 + (n + 1) = n + 1 + 2)) (↑(Fin.castLE (_ : 2 ≤ 2 + (n + 1))) i)))) =
    0

tactic: simp only [Fin.mk_zero, Fin.val_zero, pow_zero, one_zsmul, Fin.mk_one, Fin.val_one, pow_one,
  neg_smul, comp_neg]
state_before: case neg
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
⊢ φ ≫ σ X 0 ≫ ((-1) ^ 0 • δ X { val := 0, isLt := (_ : 0 < n + 1 + 2) }) +
      φ ≫ σ X 0 ≫ ((-1) ^ 1 • δ X { val := 1, isLt := (_ : 1 < n + 1 + 2) }) =
    0

tactic: erw [δ_comp_σ_self, δ_comp_σ_succ, add_right_neg]
state_before: case neg
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
⊢ φ ≫ σ X 0 ≫ δ X 0 + -φ ≫ σ X 0 ≫ δ X 1 = 0

tactic: intro j
state_before: case neg.hf
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
⊢ ∀ (j : Fin (n + 1)),
    φ ≫
        σ X 0 ≫
          ((-1) ^ ↑(↑(Fin.cast (_ : 2 + (n + 1) = n + 1 + 2)) (↑(Fin.natAdd 2) j)) •
            δ X (↑(Fin.cast (_ : 2 + (n + 1) = n + 1 + 2)) (↑(Fin.natAdd 2) j))) =
      0

tactic: dsimp [Fin.cast, Fin.castLE, Fin.castLT]
state_before: case neg.hf
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ φ ≫
      σ X 0 ≫
        ((-1) ^ ↑(↑(Fin.cast (_ : 2 + (n + 1) = n + 1 + 2)) (↑(Fin.natAdd 2) j)) •
          δ X (↑(Fin.cast (_ : 2 + (n + 1) = n + 1 + 2)) (↑(Fin.natAdd 2) j))) =
    0

tactic: rw [comp_zsmul, comp_zsmul, δ_comp_σ_of_gt', v.comp_δ_eq_zero_assoc, zero_comp, zsmul_zero]
state_before: case neg.hf
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ φ ≫ σ X 0 ≫ ((-1) ^ (2 + ↑j) • δ X { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) }) = 0

tactic: . simp only [Fin.lt_iff_val_lt_val]
  dsimp [Fin.succ]
  linarith
state_before: case neg.hf.H
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ Fin.succ 0 < { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) }

case neg.hf.hj₁
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ Fin.pred { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) }
      (_ : { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) } = 0 → False) ≠
    0

case neg.hf.hj₂
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ n + 2 ≤
    ↑(Fin.pred { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) }
          (_ : { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) } = 0 → False)) +
      q

case neg.hf.H
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ Fin.succ 0 < { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) }

case neg.hf.H
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ Fin.succ 0 < { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) }

tactic: . intro h
  simp only [Fin.pred, Fin.ext_iff, Nat.pred_eq_sub_one, Nat.succ_add_sub_one, Fin.val_zero,
    add_eq_zero, false_and] at h
state_before: case neg.hf.hj₁
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ Fin.pred { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) }
      (_ : { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) } = 0 → False) ≠
    0

case neg.hf.hj₂
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ n + 2 ≤
    ↑(Fin.pred { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) }
          (_ : { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) } = 0 → False)) +
      q

tactic: . simp only [Fin.pred, Nat.pred_eq_sub_one, Nat.succ_add_sub_one]
  linarith
state_before: case neg.hf.hj₂
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ n + 2 ≤
    ↑(Fin.pred { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) }
          (_ : { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) } = 0 → False)) +
      q

tactic: simp only [Fin.lt_iff_val_lt_val]
state_before: case neg.hf.H
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ Fin.succ 0 < { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) }

tactic: dsimp [Fin.succ]
state_before: case neg.hf.H
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ ↑(Fin.succ 0) < 2 + ↑j

tactic: linarith
state_before: case neg.hf.H
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ 0 + 1 < 2 + ↑j

tactic: intro h
state_before: case neg.hf.hj₁
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ Fin.pred { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) }
      (_ : { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) } = 0 → False) ≠
    0

tactic: simp only [Fin.pred, Fin.ext_iff, Nat.pred_eq_sub_one, Nat.succ_add_sub_one, Fin.val_zero,
  add_eq_zero, false_and] at h
state_before: case neg.hf.hj₁
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
h :
  Fin.pred { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) }
      (_ : { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) } = 0 → False) =
    0
⊢ False

tactic: simp only [Fin.pred, Nat.pred_eq_sub_one, Nat.succ_add_sub_one]
state_before: case neg.hf.hj₂
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ n + 2 ≤
    ↑(Fin.pred { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) }
          (_ : { val := 2 + ↑j, isLt := (_ : ↑(↑(Fin.natAdd 2) j) < n + 1 + 2) } = 0 → False)) +
      q

tactic: linarith
state_before: case neg.hf.hj₂
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y : C
n q : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
hqn : n < q
hqn' : ¬n + 1 < q
j : Fin (n + 1)
⊢ n + 2 ≤ 1 + ↑j + q