Theorem: AlgebraicTopology.DoldKan.decomposition_Q
File: Mathlib/AlgebraicTopology/DoldKan/Decomposition.lean

tactic: induction' q with q hq
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
⊢ (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
state_after: case zero
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n : ℕ
⊢ (Q 0).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < 0) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev

case succ
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
⊢ (Q (q + 1)).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev

tactic: simp only [Nat.zero_eq, Q_zero, HomologicalComplex.zero_f_apply, Nat.not_lt_zero,
  Finset.filter_False, Finset.sum_empty]
state_before: case zero
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n : ℕ
⊢ (Q 0).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < 0) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
state_after: no goals

tactic: by_cases hqn : q + 1 ≤ n + 1
state_before: case succ
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
⊢ (Q (q + 1)).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
state_after: case pos
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
⊢ (Q (q + 1)).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev

case neg
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : ¬q + 1 ≤ n + 1
⊢ (Q (q + 1)).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev

tactic: swap
state_before: case pos
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
⊢ (Q (q + 1)).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev

case neg
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : ¬q + 1 ≤ n + 1
⊢ (Q (q + 1)).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
state_after: case neg
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : ¬q + 1 ≤ n + 1
⊢ (Q (q + 1)).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev

case pos
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
⊢ (Q (q + 1)).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev

tactic: rw [Q_is_eventually_constant (show n + 1 ≤ q by omega), hq]
state_before: case neg
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : ¬q + 1 ≤ n + 1
⊢ (Q (q + 1)).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
state_after: case neg
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : ¬q + 1 ≤ n + 1
⊢ ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev

tactic: congr 1
state_before: case neg
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : ¬q + 1 ≤ n + 1
⊢ ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
state_after: case neg.e_s
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : ¬q + 1 ≤ n + 1
⊢ Finset.filter (fun i => ↑i < q) Finset.univ = Finset.filter (fun i => ↑i < q + 1) Finset.univ

tactic: ext ⟨x, hx⟩
state_before: case neg.e_s
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : ¬q + 1 ≤ n + 1
⊢ Finset.filter (fun i => ↑i < q) Finset.univ = Finset.filter (fun i => ↑i < q + 1) Finset.univ
state_after: case neg.e_s.a.mk
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : ¬q + 1 ≤ n + 1
x : ℕ
hx : x < n + 1
⊢ ⟨x, hx⟩ ∈ Finset.filter (fun i => ↑i < q) Finset.univ ↔ ⟨x, hx⟩ ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ

tactic: simp only [Nat.succ_eq_add_one, Finset.mem_filter, Finset.mem_univ, true_and]
state_before: case neg.e_s.a.mk
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : ¬q + 1 ≤ n + 1
x : ℕ
hx : x < n + 1
⊢ ⟨x, hx⟩ ∈ Finset.filter (fun i => ↑i < q) Finset.univ ↔ ⟨x, hx⟩ ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ
state_after: case neg.e_s.a.mk
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : ¬q + 1 ≤ n + 1
x : ℕ
hx : x < n + 1
⊢ x < q ↔ x < q + 1

tactic: omega
state_before: case neg.e_s.a.mk
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : ¬q + 1 ≤ n + 1
x : ℕ
hx : x < n + 1
⊢ x < q ↔ x < q + 1
state_after: no goals

tactic: omega
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : ¬q + 1 ≤ n + 1
⊢ n + 1 ≤ q
state_after: no goals

tactic: cases' Nat.le.dest (Nat.succ_le_succ_iff.mp hqn) with a ha
state_before: case pos
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
⊢ (Q (q + 1)).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
state_after: case pos.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
⊢ (Q (q + 1)).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev

tactic: rw [Q_succ, HomologicalComplex.sub_f_apply, HomologicalComplex.comp_f, hq]
state_before: case pos.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
⊢ (Q (q + 1)).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
state_after: case pos.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
⊢ ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev -
      (P q).f (n + 1) ≫ (Hσ q).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev

tactic: symm
state_before: case pos.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
⊢ ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev -
      (P q).f (n + 1) ≫ (Hσ q).f (n + 1) =
    ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
state_after: case pos.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
⊢ ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev =
    ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev -
      (P q).f (n + 1) ≫ (Hσ q).f (n + 1)

tactic: conv_rhs => rw [sub_eq_add_neg, add_comm]
state_before: case pos.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
⊢ ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev =
    ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev -
      (P q).f (n + 1) ≫ (Hσ q).f (n + 1)
state_after: case pos.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
⊢ ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev =
    -(P q).f (n + 1) ≫ (Hσ q).f (n + 1) +
      ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev

tactic: let q' : Fin (n + 1) := ⟨q, Nat.succ_le_iff.mp hqn⟩
state_before: case pos.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
⊢ ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev =
    -(P q).f (n + 1) ≫ (Hσ q).f (n + 1) +
      ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
state_after: case pos.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
⊢ ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev =
    -(P q).f (n + 1) ≫ (Hσ q).f (n + 1) +
      ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev

tactic: rw [← @Finset.add_sum_erase _ _ _ _ _ _ q' (by simp)]
state_before: case pos.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
⊢ ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev =
    -(P q).f (n + 1) ≫ (Hσ q).f (n + 1) +
      ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
state_after: case pos.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
⊢ (P ↑q').f (n + 1) ≫ X.δ q'.rev.succ ≫ X.σ q'.rev +
      ∑ x ∈ (Finset.filter (fun i => ↑i < q + 1) Finset.univ).erase q', (P ↑x).f (n + 1) ≫ X.δ x.rev.succ ≫ X.σ x.rev =
    -(P q).f (n + 1) ≫ (Hσ q).f (n + 1) +
      ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev

tactic: congr
state_before: case pos.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
⊢ (P ↑q').f (n + 1) ≫ X.δ q'.rev.succ ≫ X.σ q'.rev +
      ∑ x ∈ (Finset.filter (fun i => ↑i < q + 1) Finset.univ).erase q', (P ↑x).f (n + 1) ≫ X.δ x.rev.succ ≫ X.σ x.rev =
    -(P q).f (n + 1) ≫ (Hσ q).f (n + 1) +
      ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
state_after: case pos.intro.e_a
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
⊢ (P ↑q').f (n + 1) ≫ X.δ q'.rev.succ ≫ X.σ q'.rev = -(P q).f (n + 1) ≫ (Hσ q).f (n + 1)

case pos.intro.e_a.e_s
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
⊢ (Finset.filter (fun i => ↑i < q + 1) Finset.univ).erase q' = Finset.filter (fun i => ↑i < q) Finset.univ

tactic: simp
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
⊢ q' ∈ Finset.filter (fun i => ↑i < q + 1) Finset.univ
state_after: no goals

tactic: have hnaq' : n = a + q := by omega
state_before: case pos.intro.e_a
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
⊢ (P ↑q').f (n + 1) ≫ X.δ q'.rev.succ ≫ X.σ q'.rev = -(P q).f (n + 1) ≫ (Hσ q).f (n + 1)
state_after: case pos.intro.e_a
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
hnaq' : n = a + q
⊢ (P ↑q').f (n + 1) ≫ X.δ q'.rev.succ ≫ X.σ q'.rev = -(P q).f (n + 1) ≫ (Hσ q).f (n + 1)

tactic: simp only [Fin.val_mk, (HigherFacesVanish.of_P q n).comp_Hσ_eq hnaq',
  q'.rev_eq hnaq', neg_neg]
state_before: case pos.intro.e_a
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
hnaq' : n = a + q
⊢ (P ↑q').f (n + 1) ≫ X.δ q'.rev.succ ≫ X.σ q'.rev = -(P q).f (n + 1) ≫ (Hσ q).f (n + 1)
state_after: case pos.intro.e_a
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
hnaq' : n = a + q
⊢ (P q).f (n + 1) ≫ X.δ ⟨a, ⋯⟩.succ ≫ X.σ ⟨a, ⋯⟩ = (P q).f (n + 1) ≫ X.δ ⟨a + 1, ⋯⟩ ≫ X.σ ⟨a, ⋯⟩

tactic: rfl
state_before: case pos.intro.e_a
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
hnaq' : n = a + q
⊢ (P q).f (n + 1) ≫ X.δ ⟨a, ⋯⟩.succ ≫ X.σ ⟨a, ⋯⟩ = (P q).f (n + 1) ≫ X.δ ⟨a + 1, ⋯⟩ ≫ X.σ ⟨a, ⋯⟩
state_after: no goals

tactic: omega
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
⊢ n = a + q
state_after: no goals

tactic: ext ⟨i, hi⟩
state_before: case pos.intro.e_a.e_s
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
⊢ (Finset.filter (fun i => ↑i < q + 1) Finset.univ).erase q' = Finset.filter (fun i => ↑i < q) Finset.univ
state_after: case pos.intro.e_a.e_s.a.mk
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
i : ℕ
hi : i < n + 1
⊢ ⟨i, hi⟩ ∈ (Finset.filter (fun i => ↑i < q + 1) Finset.univ).erase q' ↔
    ⟨i, hi⟩ ∈ Finset.filter (fun i => ↑i < q) Finset.univ

tactic: simp only [q', Nat.succ_eq_add_one, Nat.lt_succ_iff_lt_or_eq, Finset.mem_univ,
  forall_true_left, Finset.mem_filter, lt_self_iff_false, or_true, and_self, not_true,
  Finset.mem_erase, ne_eq, Fin.mk.injEq, true_and]
state_before: case pos.intro.e_a.e_s.a.mk
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
i : ℕ
hi : i < n + 1
⊢ ⟨i, hi⟩ ∈ (Finset.filter (fun i => ↑i < q + 1) Finset.univ).erase q' ↔
    ⟨i, hi⟩ ∈ Finset.filter (fun i => ↑i < q) Finset.univ
state_after: case pos.intro.e_a.e_s.a.mk
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
i : ℕ
hi : i < n + 1
⊢ ¬i = q ∧ (i < q ∨ i = q) ↔ i < q

tactic: aesop
state_before: case pos.intro.e_a.e_s.a.mk
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X X' : SimplicialObject C
n q : ℕ
hq : (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev
hqn : q + 1 ≤ n + 1
a : ℕ
ha : q + a = n
q' : Fin (n + 1) := ⟨q, ⋯⟩
i : ℕ
hi : i < n + 1
⊢ ¬i = q ∧ (i < q ∨ i = q) ↔ i < q
state_after: no goals