Theorem: AlgebraicTopology.DoldKan.σ_comp_P_eq_zero
File: Mathlib/AlgebraicTopology/DoldKan/Degeneracies.lean

tactic: revert i hi
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n q : ℕ
i : Fin (n + 1)
hi : n + 1 ≤ ↑i + q
⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0

tactic: induction' q with q hq
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n q : ℕ
⊢ ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0

tactic: intro i (hi : n + 1 ≤ i)
state_before: case zero
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n : ℕ
⊢ ∀ (i : Fin (n + 1)),
    n + 1 ≤ ↑i + Nat.zero → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P Nat.zero) (n + 1) = 0

tactic: exfalso
state_before: case zero
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n : ℕ
i : Fin (n + 1)
hi : n + 1 ≤ ↑i
⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P Nat.zero) (n + 1) = 0

tactic: linarith [Fin.is_lt i]
state_before: case zero.h
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n : ℕ
i : Fin (n + 1)
hi : n + 1 ≤ ↑i
⊢ False

tactic: intro i (hi : n + 1 ≤ i + q + 1)
state_before: case succ
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n q : ℕ
hq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0
⊢ ∀ (i : Fin (n + 1)),
    n + 1 ≤ ↑i + Nat.succ q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (n + 1) = 0

tactic: by_cases n + 1 ≤ (i : ℕ) + q
state_before: case succ
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n q : ℕ
hq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0
i : Fin (n + 1)
hi : n + 1 ≤ ↑i + q + 1
⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (n + 1) = 0

tactic: rw [P_succ, HomologicalComplex.comp_f, ← assoc, hq i h, zero_comp]
state_before: case pos
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n q : ℕ
hq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0
i : Fin (n + 1)
hi : n + 1 ≤ ↑i + q + 1
h : n + 1 ≤ ↑i + q
⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (n + 1) = 0

tactic: replace hi : n = i + q := by
  obtain ⟨j, hj⟩ := le_iff_exists_add.mp hi
  rw [← Nat.lt_succ_iff, Nat.succ_eq_add_one, hj, not_lt, add_le_iff_nonpos_right,
    nonpos_iff_eq_zero] at h
  rw [← add_left_inj 1, hj, self_eq_add_right, h]
state_before: case neg
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n q : ℕ
hq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0
i : Fin (n + 1)
hi : n + 1 ≤ ↑i + q + 1
h : ¬n + 1 ≤ ↑i + q
⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (n + 1) = 0

tactic: rcases n with _|n
state_before: case neg
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n q : ℕ
hq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0
i : Fin (n + 1)
h : ¬n + 1 ≤ ↑i + q
hi : n = ↑i + q
⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (n + 1) = 0

tactic: obtain ⟨j, hj⟩ := le_iff_exists_add.mp hi
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n q : ℕ
hq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0
i : Fin (n + 1)
hi : n + 1 ≤ ↑i + q + 1
h : ¬n + 1 ≤ ↑i + q
⊢ n = ↑i + q

tactic: rw [← Nat.lt_succ_iff, Nat.succ_eq_add_one, hj, not_lt, add_le_iff_nonpos_right,
  nonpos_iff_eq_zero] at h
state_before: case intro
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n q : ℕ
hq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0
i : Fin (n + 1)
hi : n + 1 ≤ ↑i + q + 1
h : ¬n + 1 ≤ ↑i + q
j : ℕ
hj : ↑i + q + 1 = n + 1 + j
⊢ n = ↑i + q

tactic: rw [← add_left_inj 1, hj, self_eq_add_right, h]
state_before: case intro
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n q : ℕ
hq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0
i : Fin (n + 1)
hi : n + 1 ≤ ↑i + q + 1
j : ℕ
h : j = 0
hj : ↑i + q + 1 = n + 1 + j
⊢ n = ↑i + q

tactic: fin_cases i
state_before: case neg.zero
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
hq :
  ∀ (i : Fin (Nat.zero + 1)),
    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0
i : Fin (Nat.zero + 1)
h : ¬Nat.zero + 1 ≤ ↑i + q
hi : Nat.zero = ↑i + q
⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (Nat.zero + 1) = 0

tactic: dsimp at h hi
state_before: case neg.zero.head
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
hq :
  ∀ (i : Fin (Nat.zero + 1)),
    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0
h : ¬Nat.zero + 1 ≤ ↑{ val := 0, isLt := (_ : 0 < Nat.zero + 1) } + q
hi : Nat.zero = ↑{ val := 0, isLt := (_ : 0 < Nat.zero + 1) } + q
⊢ SimplicialObject.σ X { val := 0, isLt := (_ : 0 < Nat.zero + 1) } ≫
      HomologicalComplex.Hom.f (P (Nat.succ q)) (Nat.zero + 1) =
    0

tactic: rw [show q = 0 by linarith]
state_before: case neg.zero.head
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
hq :
  ∀ (i : Fin (Nat.zero + 1)),
    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0
h : ¬0 + 1 ≤ 0 + q
hi : 0 = 0 + q
⊢ SimplicialObject.σ X { val := 0, isLt := (_ : 0 < Nat.zero + 1) } ≫
      HomologicalComplex.Hom.f (P (Nat.succ q)) (Nat.zero + 1) =
    0

tactic: change X.σ 0 ≫ (P 1).f 1 = 0
state_before: case neg.zero.head
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
hq :
  ∀ (i : Fin (Nat.zero + 1)),
    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0
h : ¬0 + 1 ≤ 0 + q
hi : 0 = 0 + q
⊢ SimplicialObject.σ X { val := 0, isLt := (_ : 0 < Nat.zero + 1) } ≫
      HomologicalComplex.Hom.f (P (Nat.succ 0)) (Nat.zero + 1) =
    0

tactic: simp only [P_succ, HomologicalComplex.add_f_apply, comp_add,
  HomologicalComplex.id_f, AlternatingFaceMapComplex.obj_d_eq, Hσ,
  HomologicalComplex.comp_f, Homotopy.nullHomotopicMap'_f (c_mk 2 1 rfl) (c_mk 1 0 rfl),
  comp_id]
state_before: case neg.zero.head
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
hq :
  ∀ (i : Fin (Nat.zero + 1)),
    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0
h : ¬0 + 1 ≤ 0 + q
hi : 0 = 0 + q
⊢ SimplicialObject.σ X 0 ≫ HomologicalComplex.Hom.f (P 1) 1 = 0

tactic: erw [hσ'_eq' (zero_add 0).symm, hσ'_eq' (add_zero 1).symm, comp_id, Fin.sum_univ_two,
  Fin.sum_univ_succ, Fin.sum_univ_two]
state_before: case neg.zero.head
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
hq :
  ∀ (i : Fin (Nat.zero + 1)),
    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0
h : ¬0 + 1 ≤ 0 + q
hi : 0 = 0 + q
⊢ SimplicialObject.σ X 0 ≫ HomologicalComplex.Hom.f (P 0) 1 +
      (SimplicialObject.σ X 0 ≫
          HomologicalComplex.Hom.f (P 0) 1 ≫
            (Finset.sum Finset.univ fun i => (-1) ^ ↑i • SimplicialObject.δ X i) ≫
              hσ' 0 0 1 (_ : ComplexShape.Rel c 1 0) +
        SimplicialObject.σ X 0 ≫
          HomologicalComplex.Hom.f (P 0) 1 ≫
            hσ' 0 1 2 (_ : ComplexShape.Rel c 2 1) ≫
              Finset.sum Finset.univ fun i => (-1) ^ ↑i • SimplicialObject.δ X i) =
    0

tactic: simp only [Fin.val_zero, pow_zero, pow_one, pow_add, one_smul, neg_smul, Fin.mk_one,
  Fin.val_succ, Fin.val_one, Fin.succ_one_eq_two, P_zero, HomologicalComplex.id_f,
  Fin.val_two, pow_two, mul_neg, one_mul, neg_mul, neg_neg, id_comp, add_comp,
  comp_add, Fin.mk_zero, neg_comp, comp_neg, Fin.succ_zero_eq_one]
state_before: case neg.zero.head
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
hq :
  ∀ (i : Fin (Nat.zero + 1)),
    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0
h : ¬0 + 1 ≤ 0 + q
hi : 0 = 0 + q
⊢ SimplicialObject.σ X 0 +
      (SimplicialObject.σ X 0 ≫
          HomologicalComplex.Hom.f (P 0) 1 ≫
            ((-1) ^ ↑0 • SimplicialObject.δ X 0 + (-1) ^ ↑1 • SimplicialObject.δ X 1) ≫
              ((-1) ^ 0 • SimplicialObject.σ X { val := 0, isLt := (_ : 0 < Nat.succ 0) }) +
        SimplicialObject.σ X 0 ≫
          HomologicalComplex.Hom.f (P 0) 1 ≫
            ((-1) ^ 1 • SimplicialObject.σ X { val := 1, isLt := (_ : 1 < Nat.succ 1) }) ≫
              ((-1) ^ ↑0 • SimplicialObject.δ X 0 +
                ((-1) ^ ↑(Fin.succ 0) • SimplicialObject.δ X (Fin.succ 0) +
                  (-1) ^ ↑(Fin.succ 1) • SimplicialObject.δ X (Fin.succ 1)))) =
    0

tactic: erw [SimplicialObject.δ_comp_σ_self, SimplicialObject.δ_comp_σ_self_assoc,
  SimplicialObject.δ_comp_σ_succ, comp_id,
  SimplicialObject.δ_comp_σ_of_le X
    (show (0 : Fin 2) ≤ Fin.castSucc 0 by rw [Fin.castSucc_zero]),
  SimplicialObject.δ_comp_σ_self_assoc, SimplicialObject.δ_comp_σ_succ_assoc]
state_before: case neg.zero.head
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
hq :
  ∀ (i : Fin (Nat.zero + 1)),
    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0
h : ¬0 + 1 ≤ 0 + q
hi : 0 = 0 + q
⊢ SimplicialObject.σ X 0 +
      (SimplicialObject.σ X 0 ≫ SimplicialObject.δ X 0 ≫ SimplicialObject.σ X 0 +
          -SimplicialObject.σ X 0 ≫ SimplicialObject.δ X 1 ≫ SimplicialObject.σ X 0 +
        (-SimplicialObject.σ X 0 ≫ SimplicialObject.σ X 1 ≫ SimplicialObject.δ X 0 +
          (SimplicialObject.σ X 0 ≫ SimplicialObject.σ X 1 ≫ SimplicialObject.δ X 1 +
            -SimplicialObject.σ X 0 ≫ SimplicialObject.σ X 1 ≫ SimplicialObject.δ X 2))) =
    0

tactic: simp only [add_right_neg, add_zero, zero_add]
state_before: case neg.zero.head
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
hq :
  ∀ (i : Fin (Nat.zero + 1)),
    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0
h : ¬0 + 1 ≤ 0 + q
hi : 0 = 0 + q
⊢ SimplicialObject.σ X 0 +
      (SimplicialObject.σ X 0 + -SimplicialObject.σ X 0 +
        (-SimplicialObject.σ X 0 + (SimplicialObject.σ X 0 + -SimplicialObject.σ X 0))) =
    0

tactic: linarith
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
hq :
  ∀ (i : Fin (Nat.zero + 1)),
    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0
h : ¬0 + 1 ≤ 0 + q
hi : 0 = 0 + q
⊢ q = 0

tactic: rw [Fin.castSucc_zero]
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
hq :
  ∀ (i : Fin (Nat.zero + 1)),
    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0
h : ¬0 + 1 ≤ 0 + q
hi : 0 = 0 + q
⊢ 0 ≤ ↑Fin.castSucc 0

tactic: rw [← id_comp (X.σ i), ← (P_add_Q_f q n.succ : _ = 𝟙 (X.obj _)), add_comp, add_comp,
  P_succ]
state_before: case neg.succ
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : Nat.succ n = ↑i + q
⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (Nat.succ n + 1) = 0

tactic: have v : HigherFacesVanish q ((P q).f n.succ ≫ X.σ i) :=
  (HigherFacesVanish.of_P q n).comp_σ hi
state_before: case neg.succ
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : Nat.succ n = ↑i + q
⊢ (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i) ≫
        HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) +
      (HomologicalComplex.Hom.f (Q q) (Nat.succ n) ≫ SimplicialObject.σ X i) ≫
        HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =
    0

tactic: erw [← assoc, v.comp_P_eq_self, HomologicalComplex.add_f_apply, Preadditive.comp_add,
  comp_id, v.comp_Hσ_eq hi, assoc, SimplicialObject.δ_comp_σ_succ_assoc, Fin.eta,
  decomposition_Q n q, sum_comp, sum_comp, Finset.sum_eq_zero, add_zero, add_neg_eq_zero]
state_before: case neg.succ
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : Nat.succ n = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
⊢ (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i) ≫
        HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) +
      (HomologicalComplex.Hom.f (Q q) (Nat.succ n) ≫ SimplicialObject.σ X i) ≫
        HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =
    0

tactic: intro j hj
state_before: case neg.succ
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : Nat.succ n = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
⊢ ∀ (x : Fin (n + 1)),
    x ∈ Finset.filter (fun i => ↑i < q) Finset.univ →
      ((HomologicalComplex.Hom.f (P ↑x) (n + 1) ≫
              SimplicialObject.δ X (Fin.succ (↑Fin.rev x)) ≫ SimplicialObject.σ X (↑Fin.rev x)) ≫
            SimplicialObject.σ X i) ≫
          HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =
        0

tactic: simp only [true_and_iff, Finset.mem_univ, Finset.mem_filter] at hj
state_before: case neg.succ
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : Nat.succ n = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : j ∈ Finset.filter (fun i => ↑i < q) Finset.univ
⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫
          SimplicialObject.δ X (Fin.succ (↑Fin.rev j)) ≫ SimplicialObject.σ X (↑Fin.rev j)) ≫
        SimplicialObject.σ X i) ≫
      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =
    0

tactic: simp only [Nat.succ_eq_add_one] at hi
state_before: case neg.succ
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : Nat.succ n = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : ↑j < q
⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫
          SimplicialObject.δ X (Fin.succ (↑Fin.rev j)) ≫ SimplicialObject.σ X (↑Fin.rev j)) ≫
        SimplicialObject.σ X i) ≫
      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =
    0

tactic: obtain ⟨k, hk⟩ := Nat.le.dest (Nat.lt_succ_iff.mp (Fin.is_lt j))
state_before: case neg.succ
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : n + 1 = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : ↑j < q
⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫
          SimplicialObject.δ X (Fin.succ (↑Fin.rev j)) ≫ SimplicialObject.σ X (↑Fin.rev j)) ≫
        SimplicialObject.σ X i) ≫
      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =
    0

tactic: rw [add_comm] at hk
state_before: case neg.succ.intro
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : n + 1 = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : ↑j < q
k : ℕ
hk : ↑j + k = n
⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫
          SimplicialObject.δ X (Fin.succ (↑Fin.rev j)) ≫ SimplicialObject.σ X (↑Fin.rev j)) ≫
        SimplicialObject.σ X i) ≫
      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =
    0

tactic: have hi' : i = Fin.castSucc ⟨i, by linarith⟩ := by
  ext
  simp only [Fin.castSucc_mk, Fin.eta]
state_before: case neg.succ.intro
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : n + 1 = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : ↑j < q
k : ℕ
hk : k + ↑j = n
⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫
          SimplicialObject.δ X (Fin.succ (↑Fin.rev j)) ≫ SimplicialObject.σ X (↑Fin.rev j)) ≫
        SimplicialObject.σ X i) ≫
      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =
    0

tactic: have eq := hq j.rev.succ (by
  simp only [← hk, Fin.rev_eq j hk.symm, Nat.succ_eq_add_one, Fin.succ_mk, Fin.val_mk]
  linarith)
state_before: case neg.succ.intro
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : n + 1 = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : ↑j < q
k : ℕ
hk : k + ↑j = n
hi' : i = ↑Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }
⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫
          SimplicialObject.δ X (Fin.succ (↑Fin.rev j)) ≫ SimplicialObject.σ X (↑Fin.rev j)) ≫
        SimplicialObject.σ X i) ≫
      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =
    0

tactic: rw [HomologicalComplex.comp_f, assoc, assoc, assoc, hi',
  SimplicialObject.σ_comp_σ_assoc, reassoc_of% eq, zero_comp, comp_zero, comp_zero,
  comp_zero]
state_before: case neg.succ.intro
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : n + 1 = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : ↑j < q
k : ℕ
hk : k + ↑j = n
hi' : i = ↑Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }
eq : SimplicialObject.σ X (Fin.succ (↑Fin.rev j)) ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫
          SimplicialObject.δ X (Fin.succ (↑Fin.rev j)) ≫ SimplicialObject.σ X (↑Fin.rev j)) ≫
        SimplicialObject.σ X i) ≫
      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =
    0

tactic: simp only [Fin.rev_eq j hk.symm, Fin.le_iff_val_le_val, Fin.val_mk]
state_before: case neg.succ.intro.H
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : n + 1 = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : ↑j < q
k : ℕ
hk : k + ↑j = n
hi' : i = ↑Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }
eq : SimplicialObject.σ X (Fin.succ (↑Fin.rev j)) ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
⊢ { val := ↑i, isLt := (_ : ↑i < n + 1) } ≤ ↑Fin.rev j

tactic: linarith
state_before: case neg.succ.intro.H
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : n + 1 = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : ↑j < q
k : ℕ
hk : k + ↑j = n
hi' : i = ↑Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }
eq : SimplicialObject.σ X (Fin.succ (↑Fin.rev j)) ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
⊢ ↑i ≤ k

tactic: linarith
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : n + 1 = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : ↑j < q
k : ℕ
hk : k + ↑j = n
⊢ ↑i < n + 1

tactic: ext
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : n + 1 = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : ↑j < q
k : ℕ
hk : k + ↑j = n
⊢ i = ↑Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }

tactic: simp only [Fin.castSucc_mk, Fin.eta]
state_before: case h
C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : n + 1 = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : ↑j < q
k : ℕ
hk : k + ↑j = n
⊢ ↑i = ↑(↑Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) })

tactic: simp only [← hk, Fin.rev_eq j hk.symm, Nat.succ_eq_add_one, Fin.succ_mk, Fin.val_mk]
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : n + 1 = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : ↑j < q
k : ℕ
hk : k + ↑j = n
hi' : i = ↑Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }
⊢ Nat.succ n + 1 ≤ ↑(Fin.succ (↑Fin.rev j)) + q

tactic: linarith
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hq :
  ∀ (i : Fin (Nat.succ n + 1)),
    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0
i : Fin (Nat.succ n + 1)
h : ¬Nat.succ n + 1 ≤ ↑i + q
hi : n + 1 = ↑i + q
v : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)
j : Fin (n + 1)
hj : ↑j < q
k : ℕ
hk : k + ↑j = n
hi' : i = ↑Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }
⊢ k + ↑j + 1 + 1 ≤ k + 1 + q