l3lab/ntp-mathlib huggingface dataset:
/-- The functor which sends a split simplicial object in a preadditive category to
the chain complex which consists of nondegenerate simplices. -/
@[simps]
noncomputable def nondegComplexFunctor : Split C ⥤ ChainComplex C ℕ where
  obj S := S.s.nondegComplex
  map {S₁ S₂} Φ :=
    { f := Φ.f
      comm' := fun i j _ => by
        dsimp
        erw [← ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [i])),
          ((alternatingFaceMapComplex C).map Φ.F).comm_assoc i j]
        simp only [assoc]
        congr 2
        apply S₁.s.hom_ext'
        intro A
        

Proof state:
case e_a.e_a.h
C : Type u_1
inst✝² : Category.{?u.409229, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
S₁ S₂ : Split C
Φ : S₁ ⟶ S₂
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
A : Splitting.IndexSet (op [j])
⊢ Splitting.ιSummand S₁.s A ≫
      HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map Φ.F) j ≫
        Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =
    Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j

Next tactic:
dsimp [alternatingFaceMapComplex]
/-- The functor which sends a split simplicial object in a preadditive category to
the chain complex which consists of nondegenerate simplices. -/
@[simps]
noncomputable def nondegComplexFunctor : Split C ⥤ ChainComplex C ℕ where
  obj S := S.s.nondegComplex
  map {S₁ S₂} Φ :=
    { f := Φ.f
      comm' := fun i j _ => by
        dsimp
        erw [← ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [i])),
          ((alternatingFaceMapComplex C).map Φ.F).comm_assoc i j]
        simp only [assoc]
        congr 2
        apply S₁.s.hom_ext'
        intro A
        dsimp [alternatingFaceMapComplex]
        

Proof state:
case e_a.e_a.h
C : Type u_1
inst✝² : Category.{?u.409229, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
S₁ S₂ : Split C
Φ : S₁ ⟶ S₂
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
A : Splitting.IndexSet (op [j])
⊢ Splitting.ιSummand S₁.s A ≫ Φ.F.app (op [j]) ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =
    Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j

Next tactic:
erw [ιSummand_naturality_symm_assoc Φ A]
/-- The functor which sends a split simplicial object in a preadditive category to
the chain complex which consists of nondegenerate simplices. -/
@[simps]
noncomputable def nondegComplexFunctor : Split C ⥤ ChainComplex C ℕ where
  obj S := S.s.nondegComplex
  map {S₁ S₂} Φ :=
    { f := Φ.f
      comm' := fun i j _ => by
        dsimp
        erw [← ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [i])),
          ((alternatingFaceMapComplex C).map Φ.F).comm_assoc i j]
        simp only [assoc]
        congr 2
        apply S₁.s.hom_ext'
        intro A
        dsimp [alternatingFaceMapComplex]
        erw [ιSummand_naturality_symm_assoc Φ A]
        

Proof state:
case e_a.e_a.h
C : Type u_1
inst✝² : Category.{?u.409229, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
S₁ S₂ : Split C
Φ : S₁ ⟶ S₂
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
A : Splitting.IndexSet (op [j])
⊢ Hom.f Φ (SimplexCategory.len A.fst.unop) ≫
      Splitting.ιSummand S₂.s A ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =
    Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j

Next tactic:
by_cases h : A.EqId
/-- The functor which sends a split simplicial object in a preadditive category to
the chain complex which consists of nondegenerate simplices. -/
@[simps]
noncomputable def nondegComplexFunctor : Split C ⥤ ChainComplex C ℕ where
  obj S := S.s.nondegComplex
  map {S₁ S₂} Φ :=
    { f := Φ.f
      comm' := fun i j _ => by
        dsimp
        erw [← ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [i])),
          ((alternatingFaceMapComplex C).map Φ.F).comm_assoc i j]
        simp only [assoc]
        congr 2
        apply S₁.s.hom_ext'
        intro A
        dsimp [alternatingFaceMapComplex]
        erw [ιSummand_naturality_symm_assoc Φ A]
        by_cases h : A.EqId
        · 

Proof state:
case pos
C : Type u_1
inst✝² : Category.{?u.409229, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
S₁ S₂ : Split C
Φ : S₁ ⟶ S₂
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
A : Splitting.IndexSet (op [j])
h : Splitting.IndexSet.EqId A
⊢ Hom.f Φ (SimplexCategory.len A.fst.unop) ≫
      Splitting.ιSummand S₂.s A ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =
    Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j

Next tactic:
dsimp at h
/-- The functor which sends a split simplicial object in a preadditive category to
the chain complex which consists of nondegenerate simplices. -/
@[simps]
noncomputable def nondegComplexFunctor : Split C ⥤ ChainComplex C ℕ where
  obj S := S.s.nondegComplex
  map {S₁ S₂} Φ :=
    { f := Φ.f
      comm' := fun i j _ => by
        dsimp
        erw [← ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [i])),
          ((alternatingFaceMapComplex C).map Φ.F).comm_assoc i j]
        simp only [assoc]
        congr 2
        apply S₁.s.hom_ext'
        intro A
        dsimp [alternatingFaceMapComplex]
        erw [ιSummand_naturality_symm_assoc Φ A]
        by_cases h : A.EqId
        · dsimp at h
          

Proof state:
case pos
C : Type u_1
inst✝² : Category.{?u.409229, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
S₁ S₂ : Split C
Φ : S₁ ⟶ S₂
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
A : Splitting.IndexSet (op [j])
h : A = Splitting.IndexSet.id (op [j])
⊢ Hom.f Φ (SimplexCategory.len A.fst.unop) ≫
      Splitting.ιSummand S₂.s A ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =
    Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j

Next tactic:
subst h
/-- The functor which sends a split simplicial object in a preadditive category to
the chain complex which consists of nondegenerate simplices. -/
@[simps]
noncomputable def nondegComplexFunctor : Split C ⥤ ChainComplex C ℕ where
  obj S := S.s.nondegComplex
  map {S₁ S₂} Φ :=
    { f := Φ.f
      comm' := fun i j _ => by
        dsimp
        erw [← ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [i])),
          ((alternatingFaceMapComplex C).map Φ.F).comm_assoc i j]
        simp only [assoc]
        congr 2
        apply S₁.s.hom_ext'
        intro A
        dsimp [alternatingFaceMapComplex]
        erw [ιSummand_naturality_symm_assoc Φ A]
        by_cases h : A.EqId
        · dsimp at h
          subst h
          

Proof state:
case pos
C : Type u_1
inst✝² : Category.{?u.409229, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
S₁ S₂ : Split C
Φ : S₁ ⟶ S₂
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
⊢ Hom.f Φ (SimplexCategory.len (Splitting.IndexSet.id (op [j])).fst.unop) ≫
      Splitting.ιSummand S₂.s (Splitting.IndexSet.id (op [j])) ≫
        Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =
    Splitting.ιSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫
      Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j

Next tactic:
simp only [Splitting.ι_πSummand_eq_id, comp_id, Splitting.ι_πSummand_eq_id_assoc]
/-- The functor which sends a split simplicial object in a preadditive category to
the chain complex which consists of nondegenerate simplices. -/
@[simps]
noncomputable def nondegComplexFunctor : Split C ⥤ ChainComplex C ℕ where
  obj S := S.s.nondegComplex
  map {S₁ S₂} Φ :=
    { f := Φ.f
      comm' := fun i j _ => by
        dsimp
        erw [← ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [i])),
          ((alternatingFaceMapComplex C).map Φ.F).comm_assoc i j]
        simp only [assoc]
        congr 2
        apply S₁.s.hom_ext'
        intro A
        dsimp [alternatingFaceMapComplex]
        erw [ιSummand_naturality_symm_assoc Φ A]
        by_cases h : A.EqId
        · dsimp at h
          subst h
          simp only [Splitting.ι_πSummand_eq_id, comp_id, Splitting.ι_πSummand_eq_id_assoc]
          

Proof state:
case pos
C : Type u_1
inst✝² : Category.{?u.409229, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
S₁ S₂ : Split C
Φ : S₁ ⟶ S₂
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
⊢ Hom.f Φ (SimplexCategory.len (Splitting.IndexSet.id (op [j])).fst.unop) = Hom.f Φ j

Next tactic:
rfl
/-- The functor which sends a split simplicial object in a preadditive category to
the chain complex which consists of nondegenerate simplices. -/
@[simps]
noncomputable def nondegComplexFunctor : Split C ⥤ ChainComplex C ℕ where
  obj S := S.s.nondegComplex
  map {S₁ S₂} Φ :=
    { f := Φ.f
      comm' := fun i j _ => by
        dsimp
        erw [← ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [i])),
          ((alternatingFaceMapComplex C).map Φ.F).comm_assoc i j]
        simp only [assoc]
        congr 2
        apply S₁.s.hom_ext'
        intro A
        dsimp [alternatingFaceMapComplex]
        erw [ιSummand_naturality_symm_assoc Φ A]
        by_cases h : A.EqId
        · dsimp at h
          subst h
          simp only [Splitting.ι_πSummand_eq_id, comp_id, Splitting.ι_πSummand_eq_id_assoc]
          rfl
        · 

Proof state:
case neg
C : Type u_1
inst✝² : Category.{?u.409229, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
S₁ S₂ : Split C
Φ : S₁ ⟶ S₂
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
A : Splitting.IndexSet (op [j])
h : ¬Splitting.IndexSet.EqId A
⊢ Hom.f Φ (SimplexCategory.len A.fst.unop) ≫
      Splitting.ιSummand S₂.s A ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =
    Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j

Next tactic:
have h' : Splitting.IndexSet.id (op [j]) ≠ A := by
            rw [ne_comm]
            exact h
/-- The functor which sends a split simplicial object in a preadditive category to
the chain complex which consists of nondegenerate simplices. -/
@[simps]
noncomputable def nondegComplexFunctor : Split C ⥤ ChainComplex C ℕ where
  obj S := S.s.nondegComplex
  map {S₁ S₂} Φ :=
    { f := Φ.f
      comm' := fun i j _ => by
        dsimp
        erw [← ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [i])),
          ((alternatingFaceMapComplex C).map Φ.F).comm_assoc i j]
        simp only [assoc]
        congr 2
        apply S₁.s.hom_ext'
        intro A
        dsimp [alternatingFaceMapComplex]
        erw [ιSummand_naturality_symm_assoc Φ A]
        by_cases h : A.EqId
        · dsimp at h
          subst h
          simp only [Splitting.ι_πSummand_eq_id, comp_id, Splitting.ι_πSummand_eq_id_assoc]
          rfl
        · have h' : Splitting.IndexSet.id (op [j]) ≠ A := by
            

Proof state:
C : Type u_1
inst✝² : Category.{?u.409229, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
S₁ S₂ : Split C
Φ : S₁ ⟶ S₂
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
A : Splitting.IndexSet (op [j])
h : ¬Splitting.IndexSet.EqId A
⊢ Splitting.IndexSet.id (op [j]) ≠ A

Next tactic:
rw [ne_comm]
/-- The functor which sends a split simplicial object in a preadditive category to
the chain complex which consists of nondegenerate simplices. -/
@[simps]
noncomputable def nondegComplexFunctor : Split C ⥤ ChainComplex C ℕ where
  obj S := S.s.nondegComplex
  map {S₁ S₂} Φ :=
    { f := Φ.f
      comm' := fun i j _ => by
        dsimp
        erw [← ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [i])),
          ((alternatingFaceMapComplex C).map Φ.F).comm_assoc i j]
        simp only [assoc]
        congr 2
        apply S₁.s.hom_ext'
        intro A
        dsimp [alternatingFaceMapComplex]
        erw [ιSummand_naturality_symm_assoc Φ A]
        by_cases h : A.EqId
        · dsimp at h
          subst h
          simp only [Splitting.ι_πSummand_eq_id, comp_id, Splitting.ι_πSummand_eq_id_assoc]
          rfl
        · have h' : Splitting.IndexSet.id (op [j]) ≠ A := by
            rw [ne_comm]
            

Proof state:
C : Type u_1
inst✝² : Category.{?u.409229, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
S₁ S₂ : Split C
Φ : S₁ ⟶ S₂
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
A : Splitting.IndexSet (op [j])
h : ¬Splitting.IndexSet.EqId A
⊢ A ≠ Splitting.IndexSet.id (op [j])

Next tactic:
exact h
/-- The functor which sends a split simplicial object in a preadditive category to
the chain complex which consists of nondegenerate simplices. -/
@[simps]
noncomputable def nondegComplexFunctor : Split C ⥤ ChainComplex C ℕ where
  obj S := S.s.nondegComplex
  map {S₁ S₂} Φ :=
    { f := Φ.f
      comm' := fun i j _ => by
        dsimp
        erw [← ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [i])),
          ((alternatingFaceMapComplex C).map Φ.F).comm_assoc i j]
        simp only [assoc]
        congr 2
        apply S₁.s.hom_ext'
        intro A
        dsimp [alternatingFaceMapComplex]
        erw [ιSummand_naturality_symm_assoc Φ A]
        by_cases h : A.EqId
        · dsimp at h
          subst h
          simp only [Splitting.ι_πSummand_eq_id, comp_id, Splitting.ι_πSummand_eq_id_assoc]
          rfl
        · have h' : Splitting.IndexSet.id (op [j]) ≠ A := by
            rw [ne_comm]
            exact h
          

Proof state:
case neg
C : Type u_1
inst✝² : Category.{?u.409229, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
S₁ S₂ : Split C
Φ : S₁ ⟶ S₂
i j : ℕ
x✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j
A : Splitting.IndexSet (op [j])
h : ¬Splitting.IndexSet.EqId A
h' : Splitting.IndexSet.id (op [j]) ≠ A
⊢ Hom.f Φ (SimplexCategory.len A.fst.unop) ≫
      Splitting.ιSummand S₂.s A ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =
    Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j

Next tactic:
rw [S₁.s.ι_πSummand_eq_zero_assoc _ _ h', S₂.s.ι_πSummand_eq_zero _ _ h', zero_comp,
            comp_zero]
/-- The natural isomorphism (in `Karoubi (ChainComplex C ℕ)`) between the chain complex
of nondegenerate simplices of a split simplicial object and the normalized Moore complex
defined as a formal direct factor of the alternating face map complex. -/
@[simps!]
noncomputable def toKaroubiNondegComplexFunctorIsoN₁ :
    nondegComplexFunctor ⋙ toKaroubi (ChainComplex C ℕ) ≅ forget C ⋙ DoldKan.N₁ :=
  NatIso.ofComponents (fun S => S.s.toKaroubiNondegComplexIsoN₁) fun Φ => by
    

Proof state:
C : Type u_1
inst✝² : Category.{?u.452122, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
X✝ Y✝ : Split C
Φ : X✝ ⟶ Y✝
⊢ (nondegComplexFunctor ⋙ toKaroubi (ChainComplex C ℕ)).map Φ ≫
      ((fun S => Splitting.toKaroubiNondegComplexIsoN₁ S.s) Y✝).hom =
    ((fun S => Splitting.toKaroubiNondegComplexIsoN₁ S.s) X✝).hom ≫ (forget C ⋙ N₁).map Φ

Next tactic:
ext n
/-- The natural isomorphism (in `Karoubi (ChainComplex C ℕ)`) between the chain complex
of nondegenerate simplices of a split simplicial object and the normalized Moore complex
defined as a formal direct factor of the alternating face map complex. -/
@[simps!]
noncomputable def toKaroubiNondegComplexFunctorIsoN₁ :
    nondegComplexFunctor ⋙ toKaroubi (ChainComplex C ℕ) ≅ forget C ⋙ DoldKan.N₁ :=
  NatIso.ofComponents (fun S => S.s.toKaroubiNondegComplexIsoN₁) fun Φ => by
    ext n
    

Proof state:
case h.h
C : Type u_1
inst✝² : Category.{?u.452122, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
X✝ Y✝ : Split C
Φ : X✝ ⟶ Y✝
n : ℕ
⊢ HomologicalComplex.Hom.f
      ((nondegComplexFunctor ⋙ toKaroubi (ChainComplex C ℕ)).map Φ ≫
          ((fun S => Splitting.toKaroubiNondegComplexIsoN₁ S.s) Y✝).hom).f
      n =
    HomologicalComplex.Hom.f (((fun S => Splitting.toKaroubiNondegComplexIsoN₁ S.s) X✝).hom ≫ (forget C ⋙ N₁).map Φ).f n

Next tactic:
dsimp
/-- The natural isomorphism (in `Karoubi (ChainComplex C ℕ)`) between the chain complex
of nondegenerate simplices of a split simplicial object and the normalized Moore complex
defined as a formal direct factor of the alternating face map complex. -/
@[simps!]
noncomputable def toKaroubiNondegComplexFunctorIsoN₁ :
    nondegComplexFunctor ⋙ toKaroubi (ChainComplex C ℕ) ≅ forget C ⋙ DoldKan.N₁ :=
  NatIso.ofComponents (fun S => S.s.toKaroubiNondegComplexIsoN₁) fun Φ => by
    ext n
    dsimp
    

Proof state:
case h.h
C : Type u_1
inst✝² : Category.{?u.452122, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
X✝ Y✝ : Split C
Φ : X✝ ⟶ Y✝
n : ℕ
⊢ Hom.f Φ n ≫ Splitting.ιSummand Y✝.s (Splitting.IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n =
    (Splitting.ιSummand X✝.s (Splitting.IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) ≫
      HomologicalComplex.Hom.f PInfty n ≫ Φ.F.app (op [n])

Next tactic:
simp only [Karoubi.comp_f, toKaroubi_map_f, HomologicalComplex.comp_f,
      nondegComplexFunctor_map_f, Splitting.toKaroubiNondegComplexIsoN₁_hom_f_f, N₁_map_f,
      AlternatingFaceMapComplex.map_f, assoc, PInfty_f_idem_assoc]
/-- The natural isomorphism (in `Karoubi (ChainComplex C ℕ)`) between the chain complex
of nondegenerate simplices of a split simplicial object and the normalized Moore complex
defined as a formal direct factor of the alternating face map complex. -/
@[simps!]
noncomputable def toKaroubiNondegComplexFunctorIsoN₁ :
    nondegComplexFunctor ⋙ toKaroubi (ChainComplex C ℕ) ≅ forget C ⋙ DoldKan.N₁ :=
  NatIso.ofComponents (fun S => S.s.toKaroubiNondegComplexIsoN₁) fun Φ => by
    ext n
    dsimp
    simp only [Karoubi.comp_f, toKaroubi_map_f, HomologicalComplex.comp_f,
      nondegComplexFunctor_map_f, Splitting.toKaroubiNondegComplexIsoN₁_hom_f_f, N₁_map_f,
      AlternatingFaceMapComplex.map_f, assoc, PInfty_f_idem_assoc]
    

Proof state:
case h.h
C : Type u_1
inst✝² : Category.{?u.452122, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
X✝ Y✝ : Split C
Φ : X✝ ⟶ Y✝
n : ℕ
⊢ Hom.f Φ n ≫ Splitting.ιSummand Y✝.s (Splitting.IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n =
    Splitting.ιSummand X✝.s (Splitting.IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n ≫ Φ.F.app (op [n])

Next tactic:
erw [← Split.ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [n]))]
/-- The natural isomorphism (in `Karoubi (ChainComplex C ℕ)`) between the chain complex
of nondegenerate simplices of a split simplicial object and the normalized Moore complex
defined as a formal direct factor of the alternating face map complex. -/
@[simps!]
noncomputable def toKaroubiNondegComplexFunctorIsoN₁ :
    nondegComplexFunctor ⋙ toKaroubi (ChainComplex C ℕ) ≅ forget C ⋙ DoldKan.N₁ :=
  NatIso.ofComponents (fun S => S.s.toKaroubiNondegComplexIsoN₁) fun Φ => by
    ext n
    dsimp
    simp only [Karoubi.comp_f, toKaroubi_map_f, HomologicalComplex.comp_f,
      nondegComplexFunctor_map_f, Splitting.toKaroubiNondegComplexIsoN₁_hom_f_f, N₁_map_f,
      AlternatingFaceMapComplex.map_f, assoc, PInfty_f_idem_assoc]
    erw [← Split.ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [n]))]
    

Proof state:
case h.h
C : Type u_1
inst✝² : Category.{?u.452122, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
X✝ Y✝ : Split C
Φ : X✝ ⟶ Y✝
n : ℕ
⊢ Splitting.ιSummand X✝.s (Splitting.IndexSet.id (op [n])) ≫ Φ.F.app (op [n]) ≫ HomologicalComplex.Hom.f PInfty n =
    Splitting.ιSummand X✝.s (Splitting.IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n ≫ Φ.F.app (op [n])

Next tactic:
rw [PInfty_f_naturality]
theorem norm_max_aux₁ [CompleteSpace F] {f : ℂ → F} {z w : ℂ}
    (hd : DiffContOnCl ℂ f (ball z (dist w z)))
    (hz : IsMaxOn (norm ∘ f) (closedBall z (dist w z)) z) : ‖f w‖ = ‖f z‖ := by
  -- Consider a circle of radius `r = dist w z`.
  

Proof state:
E : Type u
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℂ E
F : Type v
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℂ F
inst✝ : CompleteSpace F
f : ℂ → F
z w : ℂ
hd : DiffContOnCl ℂ f (ball z (dist w z))
hz : IsMaxOn (norm ∘ f) (closedBall z (dist w z)) z
⊢ ‖f w‖ = ‖f z‖

Next tactic:
set r : ℝ := dist w z
theorem norm_max_aux₁ [CompleteSpace F] {f : ℂ → F} {z w : ℂ}
    (hd : DiffContOnCl ℂ f (ball z (dist w z)))
    (hz : IsMaxOn (norm ∘ f) (closedBall z (dist w z)) z) : ‖f w‖ = ‖f z‖ := by
  -- Consider a circle of radius `r = dist w z`.
  set r : ℝ := dist w z
  

Proof state:
E : Type u
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℂ E
F : Type v
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℂ F
inst✝ : CompleteSpace F
f : ℂ → F
z w : ℂ
r : ℝ := dist w z
hd : DiffContOnCl ℂ f (ball z r)
hz : IsMaxOn (norm ∘ f) (closedBall z r) z
⊢ ‖f w‖ = ‖f z‖

Next tactic:
have hw : w ∈ closedBall z r := mem_closedBall.2 le_rfl
theorem norm_max_aux₁ [CompleteSpace F] {f : ℂ → F} {z w : ℂ}
    (hd : DiffContOnCl ℂ f (ball z (dist w z)))
    (hz : IsMaxOn (norm ∘ f) (closedBall z (dist w z)) z) : ‖f w‖ = ‖f z‖ := by
  -- Consider a circle of radius `r = dist w z`.
  set r : ℝ := dist w z
  have hw : w ∈ closedBall z r := mem_closedBall.2 le_rfl
  -- Assume the converse. Since `‖f w‖ ≤ ‖f z‖`, we have `‖f w‖ < ‖f z‖`.
  

Proof state:
E : Type u
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℂ E
F : Type v
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℂ F
inst✝ : CompleteSpace F
f : ℂ → F
z w : ℂ
r : ℝ := dist w z
hd : DiffContOnCl ℂ f (ball z r)
hz : IsMaxOn (norm ∘ f) (closedBall z r) z
hw : w ∈ closedBall z r
⊢ ‖f w‖ = ‖f z‖

Next tactic:
refine' (isMaxOn_iff.1 hz _ hw).antisymm (not_lt.1 _)
theorem norm_max_aux₁ [CompleteSpace F] {f : ℂ → F} {z w : ℂ}
    (hd : DiffContOnCl ℂ f (ball z (dist w z)))
    (hz : IsMaxOn (norm ∘ f) (closedBall z (dist w z)) z) : ‖f w‖ = ‖f z‖ := by
  -- Consider a circle of radius `r = dist w z`.
  set r : ℝ := dist w z
  have hw : w ∈ closedBall z r := mem_closedBall.2 le_rfl
  -- Assume the converse. Since `‖f w‖ ≤ ‖f z‖`, we have `‖f w‖ < ‖f z‖`.
  refine' (isMaxOn_iff.1 hz _ hw).antisymm (not_lt.1 _)
  

Proof state:
E : Type u
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℂ E
F : Type v
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℂ F
inst✝ : CompleteSpace F
f : ℂ → F
z w : ℂ
r : ℝ := dist w z
hd : DiffContOnCl ℂ f (ball z r)
hz : IsMaxOn (norm ∘ f) (closedBall z r) z
hw : w ∈ closedBall z r
⊢ ¬(norm ∘ f) w < (norm ∘ f) z

Next tactic:
rintro hw_lt : ‖f w‖ < ‖f z‖
theorem norm_max_aux₁ [CompleteSpace F] {f : ℂ → F} {z w : ℂ}
    (hd : DiffContOnCl ℂ f (ball z (dist w z)))
    (hz : IsMaxOn (norm ∘ f) (closedBall z (dist w z)) z) : ‖f w‖ = ‖f z‖ := by
  -- Consider a circle of radius `r = dist w z`.
  set r : ℝ := dist w z
  have hw : w ∈ closedBall z r := mem_closedBall.2 le_rfl
  -- Assume the converse. Since `‖f w‖ ≤ ‖f z‖`, we have `‖f w‖ < ‖f z‖`.
  refine' (isMaxOn_iff.1 hz _ hw).antisymm (not_lt.1 _)
  rintro hw_lt : ‖f w‖ < ‖f z‖
  

Proof state:
E : Type u
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℂ E
F : Type v
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℂ F
inst✝ : CompleteSpace F
f : ℂ → F
z w : ℂ
r : ℝ := dist w z
hd : DiffContOnCl ℂ f (ball z r)
hz : IsMaxOn (norm ∘ f) (closedBall z r) z
hw : w ∈ closedBall z r
hw_lt : ‖f w‖ < ‖f z‖
⊢ False

Next tactic:
have hr : 0 < r := dist_pos.2 (ne_of_apply_ne (norm ∘ f) hw_lt.ne)