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
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
revert i hi
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

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
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
induction' q with q hq
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
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
intro i (hi : n + 1 ≤ i)
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
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
exfalso
no goals
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
linarith [Fin.is_lt i]
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
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
intro i (hi : n + 1 ≤ i + q + 1)
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

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
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
by_cases n + 1 ≤ (i : ℕ) + q
no goals
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
rw [P_succ, HomologicalComplex.comp_f, ← assoc, hq i h, zero_comp]
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
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
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]
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

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
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
rcases n with _|n
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
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
obtain ⟨j, hj⟩ := le_iff_exists_add.mp hi
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
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
rw [← Nat.lt_succ_iff, Nat.succ_eq_add_one, hj, not_lt, add_le_iff_nonpos_right,
  nonpos_iff_eq_zero] at h
no goals
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
rw [← add_left_inj 1, hj, self_eq_add_right, h]
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
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
fin_cases i
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
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
dsimp at h hi
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
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
rw [show q = 0 by linarith]
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
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
change X.σ 0 ≫ (P 1).f 1 = 0
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
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
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]
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
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
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]
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
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
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]
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
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
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]
no goals
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
simp only [add_right_neg, add_zero, zero_add]
no goals
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
linarith
no goals
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
rw [Fin.castSucc_zero]
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
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
rw [← id_comp (X.σ i), ← (P_add_Q_f q n.succ : _ = 𝟙 (X.obj _)), add_comp, add_comp,
  P_succ]
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
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
have v : HigherFacesVanish q ((P q).f n.succ ≫ X.σ i) :=
  (HigherFacesVanish.of_P q n).comp_σ hi
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
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
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]
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
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
intro j hj
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
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
simp only [true_and_iff, Finset.mem_univ, Finset.mem_filter] at hj
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
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
simp only [Nat.succ_eq_add_one] at hi
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
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
obtain ⟨k, hk⟩ := Nat.le.dest (Nat.lt_succ_iff.mp (Fin.is_lt j))
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
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
rw [add_comm] at hk
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
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
have hi' : i = Fin.castSucc ⟨i, by linarith⟩ := by
  ext
  simp only [Fin.castSucc_mk, Fin.eta]
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
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
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)
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
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
rw [HomologicalComplex.comp_f, assoc, assoc, assoc, hi',
  SimplicialObject.σ_comp_σ_assoc, reassoc_of% eq, zero_comp, comp_zero, comp_zero,
  comp_zero]
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
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
simp only [Fin.rev_eq j hk.symm, Fin.le_iff_val_le_val, Fin.val_mk]
no goals
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
linarith
no goals
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
linarith
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) })
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) }
ext
no goals
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) })
simp only [Fin.castSucc_mk, Fin.eta]
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
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
simp only [← hk, Fin.rev_eq j hk.symm, Nat.succ_eq_add_one, Fin.succ_mk, Fin.val_mk]
no goals
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
linarith