l3lab/ntp-mathlib huggingface dataset:
theorem comp_PInfty_eq_zero_iff {Z : C} {n : ℕ} (f : Z ⟶ X _[n]) :
    f ≫ PInfty.f n = 0 ↔ f ≫ s.πSummand (IndexSet.id (op [n])) = 0 := by
  constructor
  · intro h
    rcases n with _|n
    · dsimp at h
      rw [comp_id] at h
      rw [h, zero_comp]
    · have h' := f ≫= PInfty_f_add_QInfty_f (n + 1)
      dsimp at h'
      rw [comp_id, comp_add, h, zero_add] at h'
      rw [← h', assoc, QInfty_f, decomposition_Q, Preadditive.sum_comp, Preadditive.comp_sum,
        Finset.sum_eq_zero]
      intro i _
      simp only [assoc, σ_comp_πSummand_id_eq_zero, comp_zero]
  · 

Proof state:
case mpr
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj (op [n])
⊢ f ≫ πSummand s (IndexSet.id (op [n])) = 0 → f ≫ HomologicalComplex.Hom.f PInfty n = 0

Next tactic:
intro h
theorem comp_PInfty_eq_zero_iff {Z : C} {n : ℕ} (f : Z ⟶ X _[n]) :
    f ≫ PInfty.f n = 0 ↔ f ≫ s.πSummand (IndexSet.id (op [n])) = 0 := by
  constructor
  · intro h
    rcases n with _|n
    · dsimp at h
      rw [comp_id] at h
      rw [h, zero_comp]
    · have h' := f ≫= PInfty_f_add_QInfty_f (n + 1)
      dsimp at h'
      rw [comp_id, comp_add, h, zero_add] at h'
      rw [← h', assoc, QInfty_f, decomposition_Q, Preadditive.sum_comp, Preadditive.comp_sum,
        Finset.sum_eq_zero]
      intro i _
      simp only [assoc, σ_comp_πSummand_id_eq_zero, comp_zero]
  · intro h
    

Proof state:
case mpr
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj (op [n])
h : f ≫ πSummand s (IndexSet.id (op [n])) = 0
⊢ f ≫ HomologicalComplex.Hom.f PInfty n = 0

Next tactic:
rw [← comp_id f, assoc, s.decomposition_id, Preadditive.sum_comp, Preadditive.comp_sum,
      Fintype.sum_eq_zero]
theorem comp_PInfty_eq_zero_iff {Z : C} {n : ℕ} (f : Z ⟶ X _[n]) :
    f ≫ PInfty.f n = 0 ↔ f ≫ s.πSummand (IndexSet.id (op [n])) = 0 := by
  constructor
  · intro h
    rcases n with _|n
    · dsimp at h
      rw [comp_id] at h
      rw [h, zero_comp]
    · have h' := f ≫= PInfty_f_add_QInfty_f (n + 1)
      dsimp at h'
      rw [comp_id, comp_add, h, zero_add] at h'
      rw [← h', assoc, QInfty_f, decomposition_Q, Preadditive.sum_comp, Preadditive.comp_sum,
        Finset.sum_eq_zero]
      intro i _
      simp only [assoc, σ_comp_πSummand_id_eq_zero, comp_zero]
  · intro h
    rw [← comp_id f, assoc, s.decomposition_id, Preadditive.sum_comp, Preadditive.comp_sum,
      Fintype.sum_eq_zero]
    

Proof state:
case mpr.h
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj (op [n])
h : f ≫ πSummand s (IndexSet.id (op [n])) = 0
⊢ ∀ (a : IndexSet (op [n])), f ≫ (πSummand s a ≫ ιSummand s a) ≫ HomologicalComplex.Hom.f PInfty n = 0

Next tactic:
intro A
theorem comp_PInfty_eq_zero_iff {Z : C} {n : ℕ} (f : Z ⟶ X _[n]) :
    f ≫ PInfty.f n = 0 ↔ f ≫ s.πSummand (IndexSet.id (op [n])) = 0 := by
  constructor
  · intro h
    rcases n with _|n
    · dsimp at h
      rw [comp_id] at h
      rw [h, zero_comp]
    · have h' := f ≫= PInfty_f_add_QInfty_f (n + 1)
      dsimp at h'
      rw [comp_id, comp_add, h, zero_add] at h'
      rw [← h', assoc, QInfty_f, decomposition_Q, Preadditive.sum_comp, Preadditive.comp_sum,
        Finset.sum_eq_zero]
      intro i _
      simp only [assoc, σ_comp_πSummand_id_eq_zero, comp_zero]
  · intro h
    rw [← comp_id f, assoc, s.decomposition_id, Preadditive.sum_comp, Preadditive.comp_sum,
      Fintype.sum_eq_zero]
    intro A
    

Proof state:
case mpr.h
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj (op [n])
h : f ≫ πSummand s (IndexSet.id (op [n])) = 0
A : IndexSet (op [n])
⊢ f ≫ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0

Next tactic:
by_cases hA : A.EqId
theorem comp_PInfty_eq_zero_iff {Z : C} {n : ℕ} (f : Z ⟶ X _[n]) :
    f ≫ PInfty.f n = 0 ↔ f ≫ s.πSummand (IndexSet.id (op [n])) = 0 := by
  constructor
  · intro h
    rcases n with _|n
    · dsimp at h
      rw [comp_id] at h
      rw [h, zero_comp]
    · have h' := f ≫= PInfty_f_add_QInfty_f (n + 1)
      dsimp at h'
      rw [comp_id, comp_add, h, zero_add] at h'
      rw [← h', assoc, QInfty_f, decomposition_Q, Preadditive.sum_comp, Preadditive.comp_sum,
        Finset.sum_eq_zero]
      intro i _
      simp only [assoc, σ_comp_πSummand_id_eq_zero, comp_zero]
  · intro h
    rw [← comp_id f, assoc, s.decomposition_id, Preadditive.sum_comp, Preadditive.comp_sum,
      Fintype.sum_eq_zero]
    intro A
    by_cases hA : A.EqId
    · 

Proof state:
case pos
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj (op [n])
h : f ≫ πSummand s (IndexSet.id (op [n])) = 0
A : IndexSet (op [n])
hA : IndexSet.EqId A
⊢ f ≫ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0

Next tactic:
dsimp at hA
theorem comp_PInfty_eq_zero_iff {Z : C} {n : ℕ} (f : Z ⟶ X _[n]) :
    f ≫ PInfty.f n = 0 ↔ f ≫ s.πSummand (IndexSet.id (op [n])) = 0 := by
  constructor
  · intro h
    rcases n with _|n
    · dsimp at h
      rw [comp_id] at h
      rw [h, zero_comp]
    · have h' := f ≫= PInfty_f_add_QInfty_f (n + 1)
      dsimp at h'
      rw [comp_id, comp_add, h, zero_add] at h'
      rw [← h', assoc, QInfty_f, decomposition_Q, Preadditive.sum_comp, Preadditive.comp_sum,
        Finset.sum_eq_zero]
      intro i _
      simp only [assoc, σ_comp_πSummand_id_eq_zero, comp_zero]
  · intro h
    rw [← comp_id f, assoc, s.decomposition_id, Preadditive.sum_comp, Preadditive.comp_sum,
      Fintype.sum_eq_zero]
    intro A
    by_cases hA : A.EqId
    · dsimp at hA
      

Proof state:
case pos
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj (op [n])
h : f ≫ πSummand s (IndexSet.id (op [n])) = 0
A : IndexSet (op [n])
hA : A = IndexSet.id (op [n])
⊢ f ≫ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0

Next tactic:
subst hA
theorem comp_PInfty_eq_zero_iff {Z : C} {n : ℕ} (f : Z ⟶ X _[n]) :
    f ≫ PInfty.f n = 0 ↔ f ≫ s.πSummand (IndexSet.id (op [n])) = 0 := by
  constructor
  · intro h
    rcases n with _|n
    · dsimp at h
      rw [comp_id] at h
      rw [h, zero_comp]
    · have h' := f ≫= PInfty_f_add_QInfty_f (n + 1)
      dsimp at h'
      rw [comp_id, comp_add, h, zero_add] at h'
      rw [← h', assoc, QInfty_f, decomposition_Q, Preadditive.sum_comp, Preadditive.comp_sum,
        Finset.sum_eq_zero]
      intro i _
      simp only [assoc, σ_comp_πSummand_id_eq_zero, comp_zero]
  · intro h
    rw [← comp_id f, assoc, s.decomposition_id, Preadditive.sum_comp, Preadditive.comp_sum,
      Fintype.sum_eq_zero]
    intro A
    by_cases hA : A.EqId
    · dsimp at hA
      subst hA
      

Proof state:
case pos
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj (op [n])
h : f ≫ πSummand s (IndexSet.id (op [n])) = 0
⊢ f ≫ (πSummand s (IndexSet.id (op [n])) ≫ ιSummand s (IndexSet.id (op [n]))) ≫ HomologicalComplex.Hom.f PInfty n = 0

Next tactic:
rw [assoc, reassoc_of% h, zero_comp]
theorem comp_PInfty_eq_zero_iff {Z : C} {n : ℕ} (f : Z ⟶ X _[n]) :
    f ≫ PInfty.f n = 0 ↔ f ≫ s.πSummand (IndexSet.id (op [n])) = 0 := by
  constructor
  · intro h
    rcases n with _|n
    · dsimp at h
      rw [comp_id] at h
      rw [h, zero_comp]
    · have h' := f ≫= PInfty_f_add_QInfty_f (n + 1)
      dsimp at h'
      rw [comp_id, comp_add, h, zero_add] at h'
      rw [← h', assoc, QInfty_f, decomposition_Q, Preadditive.sum_comp, Preadditive.comp_sum,
        Finset.sum_eq_zero]
      intro i _
      simp only [assoc, σ_comp_πSummand_id_eq_zero, comp_zero]
  · intro h
    rw [← comp_id f, assoc, s.decomposition_id, Preadditive.sum_comp, Preadditive.comp_sum,
      Fintype.sum_eq_zero]
    intro A
    by_cases hA : A.EqId
    · dsimp at hA
      subst hA
      rw [assoc, reassoc_of% h, zero_comp]
    · 

Proof state:
case neg
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj (op [n])
h : f ≫ πSummand s (IndexSet.id (op [n])) = 0
A : IndexSet (op [n])
hA : ¬IndexSet.EqId A
⊢ f ≫ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0

Next tactic:
simp only [assoc, s.ιSummand_comp_PInfty_eq_zero A hA, comp_zero]
@[reassoc (attr := simp)]
theorem PInfty_comp_πSummand_id (n : ℕ) :
    PInfty.f n ≫ s.πSummand (IndexSet.id (op [n])) = s.πSummand (IndexSet.id (op [n])) := by
  

Proof state:
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
⊢ HomologicalComplex.Hom.f PInfty n ≫ πSummand s (IndexSet.id (op [n])) = πSummand s (IndexSet.id (op [n]))

Next tactic:
conv_rhs => rw [← id_comp (s.πSummand _)]
@[reassoc (attr := simp)]
theorem PInfty_comp_πSummand_id (n : ℕ) :
    PInfty.f n ≫ s.πSummand (IndexSet.id (op [n])) = s.πSummand (IndexSet.id (op [n])) := by
  conv_rhs => 

Proof state:
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
| πSummand s (IndexSet.id (op [n]))

Next tactic:
rw [← id_comp (s.πSummand _)]
@[reassoc (attr := simp)]
theorem PInfty_comp_πSummand_id (n : ℕ) :
    PInfty.f n ≫ s.πSummand (IndexSet.id (op [n])) = s.πSummand (IndexSet.id (op [n])) := by
  conv_rhs => rw [← id_comp (s.πSummand _)]
  

Proof state:
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
⊢ HomologicalComplex.Hom.f PInfty n ≫ πSummand s (IndexSet.id (op [n])) =
    𝟙 (X.obj (op [n])) ≫ πSummand s (IndexSet.id (op [n]))

Next tactic:
symm
@[reassoc (attr := simp)]
theorem PInfty_comp_πSummand_id (n : ℕ) :
    PInfty.f n ≫ s.πSummand (IndexSet.id (op [n])) = s.πSummand (IndexSet.id (op [n])) := by
  conv_rhs => rw [← id_comp (s.πSummand _)]
  symm
  

Proof state:
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
⊢ 𝟙 (X.obj (op [n])) ≫ πSummand s (IndexSet.id (op [n])) =
    HomologicalComplex.Hom.f PInfty n ≫ πSummand s (IndexSet.id (op [n]))

Next tactic:
rw [← sub_eq_zero, ← sub_comp, ← comp_PInfty_eq_zero_iff, sub_comp, id_comp, PInfty_f_idem,
    sub_self]
@[reassoc (attr := simp)]
theorem πSummand_comp_ιSummand_comp_PInfty_eq_PInfty (n : ℕ) :
    s.πSummand (IndexSet.id (op [n])) ≫ s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n =
      PInfty.f n := by
  

Proof state:
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
⊢ πSummand s (IndexSet.id (op [n])) ≫ ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n =
    HomologicalComplex.Hom.f PInfty n

Next tactic:
conv_rhs => rw [← id_comp (PInfty.f n)]
@[reassoc (attr := simp)]
theorem πSummand_comp_ιSummand_comp_PInfty_eq_PInfty (n : ℕ) :
    s.πSummand (IndexSet.id (op [n])) ≫ s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n =
      PInfty.f n := by
  conv_rhs => 

Proof state:
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
| HomologicalComplex.Hom.f PInfty n

Next tactic:
rw [← id_comp (PInfty.f n)]
@[reassoc (attr := simp)]
theorem πSummand_comp_ιSummand_comp_PInfty_eq_PInfty (n : ℕ) :
    s.πSummand (IndexSet.id (op [n])) ≫ s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n =
      PInfty.f n := by
  conv_rhs => rw [← id_comp (PInfty.f n)]
  

Proof state:
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
⊢ πSummand s (IndexSet.id (op [n])) ≫ ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n =
    𝟙 (HomologicalComplex.X K[X] n) ≫ HomologicalComplex.Hom.f PInfty n

Next tactic:
erw [s.decomposition_id, Preadditive.sum_comp]
@[reassoc (attr := simp)]
theorem πSummand_comp_ιSummand_comp_PInfty_eq_PInfty (n : ℕ) :
    s.πSummand (IndexSet.id (op [n])) ≫ s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n =
      PInfty.f n := by
  conv_rhs => rw [← id_comp (PInfty.f n)]
  erw [s.decomposition_id, Preadditive.sum_comp]
  

Proof state:
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
⊢ πSummand s (IndexSet.id (op [n])) ≫ ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n =
    ∑ j : IndexSet (op [n]), (πSummand s j ≫ ιSummand s j) ≫ HomologicalComplex.Hom.f PInfty n

Next tactic:
rw [Fintype.sum_eq_single (IndexSet.id (op [n])), assoc]
@[reassoc (attr := simp)]
theorem πSummand_comp_ιSummand_comp_PInfty_eq_PInfty (n : ℕ) :
    s.πSummand (IndexSet.id (op [n])) ≫ s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n =
      PInfty.f n := by
  conv_rhs => rw [← id_comp (PInfty.f n)]
  erw [s.decomposition_id, Preadditive.sum_comp]
  rw [Fintype.sum_eq_single (IndexSet.id (op [n])), assoc]
  

Proof state:
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
⊢ ∀ (x : IndexSet (op [n])),
    x ≠ IndexSet.id (op [n]) → (πSummand s x ≫ ιSummand s x) ≫ HomologicalComplex.Hom.f PInfty n = 0

Next tactic:
rintro A (hA : ¬A.EqId)
@[reassoc (attr := simp)]
theorem πSummand_comp_ιSummand_comp_PInfty_eq_PInfty (n : ℕ) :
    s.πSummand (IndexSet.id (op [n])) ≫ s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n =
      PInfty.f n := by
  conv_rhs => rw [← id_comp (PInfty.f n)]
  erw [s.decomposition_id, Preadditive.sum_comp]
  rw [Fintype.sum_eq_single (IndexSet.id (op [n])), assoc]
  rintro A (hA : ¬A.EqId)
  

Proof state:
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
A : IndexSet (op [n])
hA : ¬IndexSet.EqId A
⊢ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0

Next tactic:
rw [assoc, s.ιSummand_comp_PInfty_eq_zero A hA, comp_zero]
theorem ιSummand_comp_d_comp_πSummand_eq_zero (j k : ℕ) (A : IndexSet (op [j])) (hA : ¬A.EqId) :
    s.ιSummand A ≫ K[X].d j k ≫ s.πSummand (IndexSet.id (op [k])) = 0 := by
  

Proof state:
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
j k : ℕ
A : IndexSet (op [j])
hA : ¬IndexSet.EqId A
⊢ ιSummand s A ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) = 0

Next tactic:
rw [A.eqId_iff_mono] at hA
theorem ιSummand_comp_d_comp_πSummand_eq_zero (j k : ℕ) (A : IndexSet (op [j])) (hA : ¬A.EqId) :
    s.ιSummand A ≫ K[X].d j k ≫ s.πSummand (IndexSet.id (op [k])) = 0 := by
  rw [A.eqId_iff_mono] at hA
  

Proof state:
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
j k : ℕ
A : IndexSet (op [j])
hA : ¬Mono (IndexSet.e A)
⊢ ιSummand s A ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) = 0

Next tactic:
rw [← assoc, ← s.comp_PInfty_eq_zero_iff, assoc, ← PInfty.comm j k, s.ιSummand_eq, assoc,
    degeneracy_comp_PInfty_assoc X j A.e hA, zero_comp, comp_zero]
/-- If `s` is a splitting of a simplicial object `X` in a preadditive category,
`s.nondegComplex` is a chain complex which is given in degree `n` by
the nondegenerate `n`-simplices of `X`. -/
@[simps]
noncomputable def nondegComplex : ChainComplex C ℕ where
  X := s.N
  d := s.d
  shape i j hij := by 

Proof state:
C : Type u_1
inst✝² : Category.{?u.279066, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
i j : ℕ
hij : ¬ComplexShape.Rel (ComplexShape.down ℕ) i j
⊢ d s i j = 0

Next tactic:
simp only [d, K[X].shape i j hij, zero_comp, comp_zero]
/-- If `s` is a splitting of a simplicial object `X` in a preadditive category,
`s.nondegComplex` is a chain complex which is given in degree `n` by
the nondegenerate `n`-simplices of `X`. -/
@[simps]
noncomputable def nondegComplex : ChainComplex C ℕ where
  X := s.N
  d := s.d
  shape i j hij := by simp only [d, K[X].shape i j hij, zero_comp, comp_zero]
  d_comp_d' i j k _ _ := by
    

Proof state:
C : Type u_1
inst✝² : Category.{?u.279066, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
i j k : ℕ
x✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k
⊢ d s i j ≫ d s j k = 0

Next tactic:
simp only [d, assoc]
/-- If `s` is a splitting of a simplicial object `X` in a preadditive category,
`s.nondegComplex` is a chain complex which is given in degree `n` by
the nondegenerate `n`-simplices of `X`. -/
@[simps]
noncomputable def nondegComplex : ChainComplex C ℕ where
  X := s.N
  d := s.d
  shape i j hij := by simp only [d, K[X].shape i j hij, zero_comp, comp_zero]
  d_comp_d' i j k _ _ := by
    simp only [d, assoc]
    

Proof state:
C : Type u_1
inst✝² : Category.{?u.279066, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
i j k : ℕ
x✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k
⊢ ιSummand s (IndexSet.id (op [i])) ≫
      HomologicalComplex.d K[X] i j ≫
        πSummand s (IndexSet.id (op [j])) ≫
          ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0

Next tactic:
have eq : K[X].d i j ≫ 𝟙 (X.obj (op [j])) ≫ K[X].d j k ≫
        s.πSummand (IndexSet.id (op [k])) = 0 := by
      erw [id_comp, HomologicalComplex.d_comp_d_assoc, zero_comp]
/-- If `s` is a splitting of a simplicial object `X` in a preadditive category,
`s.nondegComplex` is a chain complex which is given in degree `n` by
the nondegenerate `n`-simplices of `X`. -/
@[simps]
noncomputable def nondegComplex : ChainComplex C ℕ where
  X := s.N
  d := s.d
  shape i j hij := by simp only [d, K[X].shape i j hij, zero_comp, comp_zero]
  d_comp_d' i j k _ _ := by
    simp only [d, assoc]
    have eq : K[X].d i j ≫ 𝟙 (X.obj (op [j])) ≫ K[X].d j k ≫
        s.πSummand (IndexSet.id (op [k])) = 0 := by
      

Proof state:
C : Type u_1
inst✝² : Category.{?u.279066, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
i j k : ℕ
x✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k
⊢ HomologicalComplex.d K[X] i j ≫
      𝟙 (X.obj (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0

Next tactic:
erw [id_comp, HomologicalComplex.d_comp_d_assoc, zero_comp]
/-- If `s` is a splitting of a simplicial object `X` in a preadditive category,
`s.nondegComplex` is a chain complex which is given in degree `n` by
the nondegenerate `n`-simplices of `X`. -/
@[simps]
noncomputable def nondegComplex : ChainComplex C ℕ where
  X := s.N
  d := s.d
  shape i j hij := by simp only [d, K[X].shape i j hij, zero_comp, comp_zero]
  d_comp_d' i j k _ _ := by
    simp only [d, assoc]
    have eq : K[X].d i j ≫ 𝟙 (X.obj (op [j])) ≫ K[X].d j k ≫
        s.πSummand (IndexSet.id (op [k])) = 0 := by
      erw [id_comp, HomologicalComplex.d_comp_d_assoc, zero_comp]
    

Proof state:
C : Type u_1
inst✝² : Category.{?u.279066, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
i j k : ℕ
x✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k
eq :
  HomologicalComplex.d K[X] i j ≫
      𝟙 (X.obj (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0
⊢ ιSummand s (IndexSet.id (op [i])) ≫
      HomologicalComplex.d K[X] i j ≫
        πSummand s (IndexSet.id (op [j])) ≫
          ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0

Next tactic:
rw [s.decomposition_id] at eq
/-- If `s` is a splitting of a simplicial object `X` in a preadditive category,
`s.nondegComplex` is a chain complex which is given in degree `n` by
the nondegenerate `n`-simplices of `X`. -/
@[simps]
noncomputable def nondegComplex : ChainComplex C ℕ where
  X := s.N
  d := s.d
  shape i j hij := by simp only [d, K[X].shape i j hij, zero_comp, comp_zero]
  d_comp_d' i j k _ _ := by
    simp only [d, assoc]
    have eq : K[X].d i j ≫ 𝟙 (X.obj (op [j])) ≫ K[X].d j k ≫
        s.πSummand (IndexSet.id (op [k])) = 0 := by
      erw [id_comp, HomologicalComplex.d_comp_d_assoc, zero_comp]
    rw [s.decomposition_id] at eq
    

Proof state:
C : Type u_1
inst✝² : Category.{?u.279066, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
i j k : ℕ
x✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k
eq :
  HomologicalComplex.d K[X] i j ≫
      (∑ A : IndexSet (op [j]), πSummand s A ≫ ιSummand s A) ≫
        HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0
⊢ ιSummand s (IndexSet.id (op [i])) ≫
      HomologicalComplex.d K[X] i j ≫
        πSummand s (IndexSet.id (op [j])) ≫
          ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0

Next tactic:
classical
    rw [Fintype.sum_eq_add_sum_compl (IndexSet.id (op [j])), add_comp, comp_add, assoc,
      Preadditive.sum_comp, Preadditive.comp_sum, Finset.sum_eq_zero, add_zero] at eq
    swap
    · intro A hA
      simp only [Finset.mem_compl, Finset.mem_singleton] at hA
      simp only [assoc, ιSummand_comp_d_comp_πSummand_eq_zero _ _ _ _ hA, comp_zero]
    rw [eq, comp_zero]
/-- If `s` is a splitting of a simplicial object `X` in a preadditive category,
`s.nondegComplex` is a chain complex which is given in degree `n` by
the nondegenerate `n`-simplices of `X`. -/
@[simps]
noncomputable def nondegComplex : ChainComplex C ℕ where
  X := s.N
  d := s.d
  shape i j hij := by simp only [d, K[X].shape i j hij, zero_comp, comp_zero]
  d_comp_d' i j k _ _ := by
    simp only [d, assoc]
    have eq : K[X].d i j ≫ 𝟙 (X.obj (op [j])) ≫ K[X].d j k ≫
        s.πSummand (IndexSet.id (op [k])) = 0 := by
      erw [id_comp, HomologicalComplex.d_comp_d_assoc, zero_comp]
    rw [s.decomposition_id] at eq
    classical
    

Proof state:
C : Type u_1
inst✝² : Category.{?u.279066, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
i j k : ℕ
x✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k
eq :
  HomologicalComplex.d K[X] i j ≫
      (∑ A : IndexSet (op [j]), πSummand s A ≫ ιSummand s A) ≫
        HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0
⊢ ιSummand s (IndexSet.id (op [i])) ≫
      HomologicalComplex.d K[X] i j ≫
        πSummand s (IndexSet.id (op [j])) ≫
          ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0

Next tactic:
rw [Fintype.sum_eq_add_sum_compl (IndexSet.id (op [j])), add_comp, comp_add, assoc,
      Preadditive.sum_comp, Preadditive.comp_sum, Finset.sum_eq_zero, add_zero] at eq