l3lab/ntp-mathlib huggingface dataset:
/-- 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
    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
    

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 ≫
      π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
⊢ ι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
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 ≫
        πSummand s (IndexSet.id (op [j])) ≫
          ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) +
      ∑ j_1 in {IndexSet.id (op [j])}ᶜ,
        HomologicalComplex.d K[X] i j ≫
          (πSummand s j_1 ≫ ιSummand s j_1) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0
⊢ ∀ x ∈ {IndexSet.id (op [j])}ᶜ,
    HomologicalComplex.d K[X] i j ≫
        (πSummand s x ≫ ιSummand s x) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
      0

Next tactic:
swap
/-- 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
    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
    · 

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 ≫
        πSummand s (IndexSet.id (op [j])) ≫
          ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) +
      ∑ j_1 in {IndexSet.id (op [j])}ᶜ,
        HomologicalComplex.d K[X] i j ≫
          (πSummand s j_1 ≫ ιSummand s j_1) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0
⊢ ∀ x ∈ {IndexSet.id (op [j])}ᶜ,
    HomologicalComplex.d K[X] i j ≫
        (πSummand s x ≫ ιSummand s x) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
      0

Next tactic:
intro A hA
/-- 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
    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
      

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 ≫
        πSummand s (IndexSet.id (op [j])) ≫
          ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) +
      ∑ j_1 in {IndexSet.id (op [j])}ᶜ,
        HomologicalComplex.d K[X] i j ≫
          (πSummand s j_1 ≫ ιSummand s j_1) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0
A : IndexSet (op [j])
hA : A ∈ {IndexSet.id (op [j])}ᶜ
⊢ HomologicalComplex.d K[X] i j ≫
      (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0

Next tactic:
simp only [Finset.mem_compl, Finset.mem_singleton] at hA
/-- 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
    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
      

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 ≫
        πSummand s (IndexSet.id (op [j])) ≫
          ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) +
      ∑ j_1 in {IndexSet.id (op [j])}ᶜ,
        HomologicalComplex.d K[X] i j ≫
          (πSummand s j_1 ≫ ιSummand s j_1) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0
A : IndexSet (op [j])
hA : ¬A = IndexSet.id (op [j])
⊢ HomologicalComplex.d K[X] i j ≫
      (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =
    0

Next tactic:
simp only [assoc, ιSummand_comp_d_comp_πSummand_eq_zero _ _ _ _ hA, 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
    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]
    

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 ≫
      π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
⊢ ι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 [eq, comp_zero]
/-- The chain complex `s.nondegComplex` attached to a splitting of a simplicial object `X`
becomes isomorphic to the normalized Moore complex `N₁.obj X` defined as a formal direct
factor in the category `Karoubi (ChainComplex C ℕ)`. -/
@[simps]
noncomputable def toKaroubiNondegComplexIsoN₁ :
    (toKaroubi _).obj s.nondegComplex ≅ N₁.obj X where
  hom :=
    { f :=
        { f := fun n => s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n
          comm' := fun i j _ => by
            

Proof state:
C : Type u_1
inst✝² : Category.{?u.338334, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
⊢ (fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) i ≫
      HomologicalComplex.d (N₁.obj X).X i j =
    HomologicalComplex.d ((toKaroubi (ChainComplex C ℕ)).obj (nondegComplex s)).X i j ≫
      (fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) j

Next tactic:
dsimp
/-- The chain complex `s.nondegComplex` attached to a splitting of a simplicial object `X`
becomes isomorphic to the normalized Moore complex `N₁.obj X` defined as a formal direct
factor in the category `Karoubi (ChainComplex C ℕ)`. -/
@[simps]
noncomputable def toKaroubiNondegComplexIsoN₁ :
    (toKaroubi _).obj s.nondegComplex ≅ N₁.obj X where
  hom :=
    { f :=
        { f := fun n => s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n
          comm' := fun i j _ => by
            dsimp
            

Proof state:
C : Type u_1
inst✝² : Category.{?u.338334, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
⊢ (ιSummand s (IndexSet.id (op [i])) ≫ HomologicalComplex.Hom.f PInfty i) ≫ HomologicalComplex.d K[X] i j =
    (ι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.Hom.f PInfty j

Next tactic:
rw [assoc, assoc, assoc, πSummand_comp_ιSummand_comp_PInfty_eq_PInfty,
              HomologicalComplex.Hom.comm]
/-- The chain complex `s.nondegComplex` attached to a splitting of a simplicial object `X`
becomes isomorphic to the normalized Moore complex `N₁.obj X` defined as a formal direct
factor in the category `Karoubi (ChainComplex C ℕ)`. -/
@[simps]
noncomputable def toKaroubiNondegComplexIsoN₁ :
    (toKaroubi _).obj s.nondegComplex ≅ N₁.obj X where
  hom :=
    { f :=
        { f := fun n => s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n
          comm' := fun i j _ => by
            dsimp
            rw [assoc, assoc, assoc, πSummand_comp_ιSummand_comp_PInfty_eq_PInfty,
              HomologicalComplex.Hom.comm] }
      comm := by
        

Proof state:
C : Type u_1
inst✝² : Category.{?u.338334, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
⊢ (HomologicalComplex.Hom.mk fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) =
    ((toKaroubi (ChainComplex C ℕ)).obj (nondegComplex s)).p ≫
      (HomologicalComplex.Hom.mk fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) ≫
        (N₁.obj X).p

Next tactic:
ext n
/-- The chain complex `s.nondegComplex` attached to a splitting of a simplicial object `X`
becomes isomorphic to the normalized Moore complex `N₁.obj X` defined as a formal direct
factor in the category `Karoubi (ChainComplex C ℕ)`. -/
@[simps]
noncomputable def toKaroubiNondegComplexIsoN₁ :
    (toKaroubi _).obj s.nondegComplex ≅ N₁.obj X where
  hom :=
    { f :=
        { f := fun n => s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n
          comm' := fun i j _ => by
            dsimp
            rw [assoc, assoc, assoc, πSummand_comp_ιSummand_comp_PInfty_eq_PInfty,
              HomologicalComplex.Hom.comm] }
      comm := by
        ext n
        

Proof state:
case h
C : Type u_1
inst✝² : Category.{?u.338334, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
n : ℕ
⊢ HomologicalComplex.Hom.f
      (HomologicalComplex.Hom.mk fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) n =
    HomologicalComplex.Hom.f
      (((toKaroubi (ChainComplex C ℕ)).obj (nondegComplex s)).p ≫
        (HomologicalComplex.Hom.mk fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) ≫
          (N₁.obj X).p)
      n

Next tactic:
dsimp
/-- The chain complex `s.nondegComplex` attached to a splitting of a simplicial object `X`
becomes isomorphic to the normalized Moore complex `N₁.obj X` defined as a formal direct
factor in the category `Karoubi (ChainComplex C ℕ)`. -/
@[simps]
noncomputable def toKaroubiNondegComplexIsoN₁ :
    (toKaroubi _).obj s.nondegComplex ≅ N₁.obj X where
  hom :=
    { f :=
        { f := fun n => s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n
          comm' := fun i j _ => by
            dsimp
            rw [assoc, assoc, assoc, πSummand_comp_ιSummand_comp_PInfty_eq_PInfty,
              HomologicalComplex.Hom.comm] }
      comm := by
        ext n
        dsimp
        

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

Next tactic:
rw [id_comp, assoc, PInfty_f_idem]
/-- The chain complex `s.nondegComplex` attached to a splitting of a simplicial object `X`
becomes isomorphic to the normalized Moore complex `N₁.obj X` defined as a formal direct
factor in the category `Karoubi (ChainComplex C ℕ)`. -/
@[simps]
noncomputable def toKaroubiNondegComplexIsoN₁ :
    (toKaroubi _).obj s.nondegComplex ≅ N₁.obj X where
  hom :=
    { f :=
        { f := fun n => s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n
          comm' := fun i j _ => by
            dsimp
            rw [assoc, assoc, assoc, πSummand_comp_ιSummand_comp_PInfty_eq_PInfty,
              HomologicalComplex.Hom.comm] }
      comm := by
        ext n
        dsimp
        rw [id_comp, assoc, PInfty_f_idem] }
  inv :=
    { f :=
        { f := fun n => s.πSummand (IndexSet.id (op [n]))
          comm' := fun i j _ => by
            

Proof state:
C : Type u_1
inst✝² : Category.{?u.338334, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
⊢ (fun n => πSummand s (IndexSet.id (op [n]))) i ≫
      HomologicalComplex.d ((toKaroubi (ChainComplex C ℕ)).obj (nondegComplex s)).X i j =
    HomologicalComplex.d (N₁.obj X).X i j ≫ (fun n => πSummand s (IndexSet.id (op [n]))) j

Next tactic:
dsimp
/-- The chain complex `s.nondegComplex` attached to a splitting of a simplicial object `X`
becomes isomorphic to the normalized Moore complex `N₁.obj X` defined as a formal direct
factor in the category `Karoubi (ChainComplex C ℕ)`. -/
@[simps]
noncomputable def toKaroubiNondegComplexIsoN₁ :
    (toKaroubi _).obj s.nondegComplex ≅ N₁.obj X where
  hom :=
    { f :=
        { f := fun n => s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n
          comm' := fun i j _ => by
            dsimp
            rw [assoc, assoc, assoc, πSummand_comp_ιSummand_comp_PInfty_eq_PInfty,
              HomologicalComplex.Hom.comm] }
      comm := by
        ext n
        dsimp
        rw [id_comp, assoc, PInfty_f_idem] }
  inv :=
    { f :=
        { f := fun n => s.πSummand (IndexSet.id (op [n]))
          comm' := fun i j _ => by
            dsimp
            

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

Next tactic:
slice_rhs 1 1 => rw [← id_comp (K[X].d i j)]
/-- The chain complex `s.nondegComplex` attached to a splitting of a simplicial object `X`
becomes isomorphic to the normalized Moore complex `N₁.obj X` defined as a formal direct
factor in the category `Karoubi (ChainComplex C ℕ)`. -/
@[simps]
noncomputable def toKaroubiNondegComplexIsoN₁ :
    (toKaroubi _).obj s.nondegComplex ≅ N₁.obj X where
  hom :=
    { f :=
        { f := fun n => s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n
          comm' := fun i j _ => by
            dsimp
            rw [assoc, assoc, assoc, πSummand_comp_ιSummand_comp_PInfty_eq_PInfty,
              HomologicalComplex.Hom.comm] }
      comm := by
        ext n
        dsimp
        rw [id_comp, assoc, PInfty_f_idem] }
  inv :=
    { f :=
        { f := fun n => s.πSummand (IndexSet.id (op [n]))
          comm' := fun i j _ => by
            dsimp
            slice_rhs 1 1 => 

Proof state:
case a
C : Type u_1
inst✝² : Category.{?u.338334, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
| HomologicalComplex.d K[X] i j
case a
C : Type u_1
inst✝² : Category.{?u.338334, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
| πSummand s (IndexSet.id (op [j]))

Next tactic:
rw [← id_comp (K[X].d i j)]
/-- The chain complex `s.nondegComplex` attached to a splitting of a simplicial object `X`
becomes isomorphic to the normalized Moore complex `N₁.obj X` defined as a formal direct
factor in the category `Karoubi (ChainComplex C ℕ)`. -/
@[simps]
noncomputable def toKaroubiNondegComplexIsoN₁ :
    (toKaroubi _).obj s.nondegComplex ≅ N₁.obj X where
  hom :=
    { f :=
        { f := fun n => s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n
          comm' := fun i j _ => by
            dsimp
            rw [assoc, assoc, assoc, πSummand_comp_ιSummand_comp_PInfty_eq_PInfty,
              HomologicalComplex.Hom.comm] }
      comm := by
        ext n
        dsimp
        rw [id_comp, assoc, PInfty_f_idem] }
  inv :=
    { f :=
        { f := fun n => s.πSummand (IndexSet.id (op [n]))
          comm' := fun i j _ => by
            dsimp
            slice_rhs 1 1 => rw [← id_comp (K[X].d i j)]
            

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

Next tactic:
erw [s.decomposition_id]
/-- The chain complex `s.nondegComplex` attached to a splitting of a simplicial object `X`
becomes isomorphic to the normalized Moore complex `N₁.obj X` defined as a formal direct
factor in the category `Karoubi (ChainComplex C ℕ)`. -/
@[simps]
noncomputable def toKaroubiNondegComplexIsoN₁ :
    (toKaroubi _).obj s.nondegComplex ≅ N₁.obj X where
  hom :=
    { f :=
        { f := fun n => s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n
          comm' := fun i j _ => by
            dsimp
            rw [assoc, assoc, assoc, πSummand_comp_ιSummand_comp_PInfty_eq_PInfty,
              HomologicalComplex.Hom.comm] }
      comm := by
        ext n
        dsimp
        rw [id_comp, assoc, PInfty_f_idem] }
  inv :=
    { f :=
        { f := fun n => s.πSummand (IndexSet.id (op [n]))
          comm' := fun i j _ => by
            dsimp
            slice_rhs 1 1 => rw [← id_comp (K[X].d i j)]
            erw [s.decomposition_id]
            

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

Next tactic:
rw [sum_comp, sum_comp, Finset.sum_eq_single (IndexSet.id (op [i])), assoc, assoc]
/-- The chain complex `s.nondegComplex` attached to a splitting of a simplicial object `X`
becomes isomorphic to the normalized Moore complex `N₁.obj X` defined as a formal direct
factor in the category `Karoubi (ChainComplex C ℕ)`. -/
@[simps]
noncomputable def toKaroubiNondegComplexIsoN₁ :
    (toKaroubi _).obj s.nondegComplex ≅ N₁.obj X where
  hom :=
    { f :=
        { f := fun n => s.ιSummand (IndexSet.id (op [n])) ≫ PInfty.f n
          comm' := fun i j _ => by
            dsimp
            rw [assoc, assoc, assoc, πSummand_comp_ιSummand_comp_PInfty_eq_PInfty,
              HomologicalComplex.Hom.comm] }
      comm := by
        ext n
        dsimp
        rw [id_comp, assoc, PInfty_f_idem] }
  inv :=
    { f :=
        { f := fun n => s.πSummand (IndexSet.id (op [n]))
          comm' := fun i j _ => by
            dsimp
            slice_rhs 1 1 => rw [← id_comp (K[X].d i j)]
            erw [s.decomposition_id]
            rw [sum_comp, sum_comp, Finset.sum_eq_single (IndexSet.id (op [i])), assoc, assoc]
            · 

Proof state:
case h₀
C : Type u_1
inst✝² : Category.{?u.338334, u_1} C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
⊢ ∀ b ∈ Finset.univ,
    b ≠ IndexSet.id (op [i]) →
      ((πSummand s b ≫ ιSummand s b) ≫ HomologicalComplex.d K[X] i j) ≫ πSummand s (IndexSet.id (op [j])) = 0

Next tactic:
intro A _ hA