Skip to content

Commit a81865a

Browse files
committed
feat(CategoryTheory/Karoubi): cleanup (#14786)
1 parent 2070757 commit a81865a

File tree

7 files changed

+22
-30
lines changed

7 files changed

+22
-30
lines changed

Mathlib/AlgebraicTopology/DoldKan/NCompGamma.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ theorem identity_N₂_objectwise (P : Karoubi (SimplicialObject C)) :
245245
len_mk, NatTrans.naturality, PInfty_f_idem_assoc,
246246
PInfty_f_naturality_assoc, app_idem_assoc]
247247
erw [P.X.map_id, comp_id]
248-
simp only [Karoubi.comp_f, HomologicalComplex.comp_f, Karoubi.id_eq, N₂_obj_p_f, assoc,
248+
simp only [Karoubi.comp_f, HomologicalComplex.comp_f, Karoubi.id_f, N₂_obj_p_f, assoc,
249249
eq₁, eq₂, PInfty_f_naturality_assoc, app_idem, PInfty_f_idem_assoc]
250250
set_option linter.uppercaseLean3 false in
251251
#align algebraic_topology.dold_kan.identity_N₂_objectwise AlgebraicTopology.DoldKan.identity_N₂_objectwise

Mathlib/AlgebraicTopology/DoldKan/NReflectsIso.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ instance : (N₁ : SimplicialObject C ⥤ Karoubi (ChainComplex C ℕ)).Reflects
4747
have h₃ := fun n =>
4848
Karoubi.HomologicalComplex.p_comm_f_assoc (inv (N₁.map f)) n (f.app (op [n]))
4949
simp only [N₁_map_f, Karoubi.comp_f, HomologicalComplex.comp_f,
50-
AlternatingFaceMapComplex.map_f, N₁_obj_p, Karoubi.id_eq, assoc] at h₁ h₂ h₃
50+
AlternatingFaceMapComplex.map_f, N₁_obj_p, Karoubi.id_f, assoc] at h₁ h₂ h₃
5151
-- we have to construct an inverse to f in degree n, by induction on n
5252
intro n
5353
induction' n with n hn

Mathlib/AlgebraicTopology/DoldKan/Normalized.lean

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ def N₁_iso_normalizedMooreComplex_comp_toKaroubi : N₁ ≅ normalizedMooreCom
149149
hom_inv_id := by
150150
ext X : 3
151151
simp only [PInftyToNormalizedMooreComplex_comp_inclusionOfMooreComplexMap,
152-
NatTrans.comp_app, Karoubi.comp_f, N₁_obj_p, NatTrans.id_app, Karoubi.id_eq]
152+
NatTrans.comp_app, Karoubi.comp_f, N₁_obj_p, NatTrans.id_app, Karoubi.id_f]
153153
inv_hom_id := by
154154
ext X : 3
155155
rw [← cancel_mono (inclusionOfMooreComplexMap X)]
156-
simp only [NatTrans.comp_app, Karoubi.comp_f, assoc, NatTrans.id_app, Karoubi.id_eq,
156+
simp only [NatTrans.comp_app, Karoubi.comp_f, assoc, NatTrans.id_app, Karoubi.id_f,
157157
PInftyToNormalizedMooreComplex_comp_inclusionOfMooreComplexMap,
158158
inclusionOfMooreComplexMap_comp_PInfty]
159159
dsimp only [Functor.comp_obj, toKaroubi]

Mathlib/AlgebraicTopology/DoldKan/SplitSimplicialObject.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ noncomputable def toKaroubiNondegComplexIsoN₁ :
223223
inv_hom_id := by
224224
ext n
225225
simp only [πSummand_comp_cofan_inj_id_comp_PInfty_eq_PInfty, Karoubi.comp_f,
226-
HomologicalComplex.comp_f, N₁_obj_p, Karoubi.id_eq]
226+
HomologicalComplex.comp_f, N₁_obj_p, Karoubi.id_f]
227227
set_option linter.uppercaseLean3 false in
228228
#align simplicial_object.splitting.to_karoubi_nondeg_complex_iso_N₁ SimplicialObject.Splitting.toKaroubiNondegComplexIsoN₁
229229

Mathlib/CategoryTheory/Idempotents/Biproducts.lean

+9-9
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def bicone [HasFiniteBiproducts C] {J : Type} [Finite J] (F : J → Karoubi C) :
6363
split_ifs with h
6464
· subst h
6565
simp only [biproduct.ι_map, biproduct.bicone_π, biproduct.map_π, eqToHom_refl,
66-
id_eq, hom_ext_iff, comp_f, assoc, bicone_ι_π_self_assoc, idem]
66+
id_f, hom_ext_iff, comp_f, assoc, bicone_ι_π_self_assoc, idem]
6767
· dsimp
6868
simp only [biproduct.ι_map, biproduct.map_π, hom_ext_iff, comp_f,
6969
assoc, biproduct.ι_π_ne_assoc _ h, zero_comp, comp_zero, instZero_zero]
@@ -79,7 +79,7 @@ theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproduct
7979
refine biproduct.hom_ext' _ _ (fun j => ?_)
8080
simp only [Biproducts.bicone_pt_X, sum_hom, comp_f, Biproducts.bicone_π_f,
8181
biproduct.bicone_π, biproduct.map_π, Biproducts.bicone_ι_f, biproduct.ι_map, assoc,
82-
idem_assoc, id_eq, Biproducts.bicone_pt_p, comp_sum]
82+
idem_assoc, id_f, Biproducts.bicone_pt_p, comp_sum]
8383
rw [Finset.sum_eq_single j]
8484
· simp only [bicone_ι_π_self_assoc]
8585
· intro b _ hb
@@ -115,9 +115,9 @@ instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
115115
decompId_i_f, complement_p, decompId_p_f, sub_comp, id_comp, idem, sub_self]
116116
inr_snd := P.complement.decompId.symm }
117117
(by
118-
simp only [id_eq, complement_X, comp_f,
119-
decompId_i_f, decompId_p_f, complement_p, instAdd_add, idem,
120-
comp_sub, comp_id, sub_comp, id_comp, sub_self, sub_zero, add_sub_cancel])
118+
ext
119+
simp only [complement_X, comp_f, decompId_i_f, decompId_p_f, complement_p, instAdd_add, idem,
120+
comp_sub, comp_id, sub_comp, id_comp, sub_self, sub_zero, add_sub_cancel, id_f])
121121

122122
attribute [-simp] hom_ext_iff
123123

@@ -142,10 +142,10 @@ def decomposition (P : Karoubi C) : P ⊞ P.complement ≅ (toKaroubi _).obj P.X
142142
simp only [complement_X, comp_f, decompId_i_f, complement_p,
143143
decompId_p_f, sub_comp, id_comp, idem, sub_self, instZero_zero]
144144
inv_hom_id := by
145-
simp only [biprod.lift_desc, instAdd_add, toKaroubi_obj_X, comp_f,
146-
decompId_p_f, decompId_i_f, idem, complement_X, complement_p, comp_sub, comp_id,
147-
sub_comp, id_comp, sub_self, sub_zero, add_sub_cancel,
148-
id_eq, toKaroubi_obj_p]
145+
ext
146+
simp only [toKaroubi_obj_X, biprod.lift_desc, instAdd_add, comp_f, decompId_p_f, decompId_i_f,
147+
idem, complement_X, complement_p, comp_sub, comp_id, sub_comp, id_comp, sub_self, sub_zero,
148+
add_sub_cancel, id_f, toKaroubi_obj_p]
149149
#align category_theory.idempotents.karoubi.decomposition CategoryTheory.Idempotents.Karoubi.decomposition
150150

151151
end Karoubi

Mathlib/CategoryTheory/Idempotents/Karoubi.lean

+5-2
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ theorem comp_f {P Q R : Karoubi C} (f : P ⟶ Q) (g : Q ⟶ R) : (f ≫ g).f = f
121121
#align category_theory.idempotents.karoubi.comp_f CategoryTheory.Idempotents.Karoubi.comp_f
122122

123123
@[simp]
124+
theorem id_f {P : Karoubi C} : Hom.f (𝟙 P) = P.p := rfl
125+
126+
@[deprecated (since := "2024-07-15")]
124127
theorem id_eq {P : Karoubi C} : 𝟙 P = ⟨P.p, by repeat' rw [P.idem]⟩ := rfl
125128
#align category_theory.idempotents.karoubi.id_eq CategoryTheory.Idempotents.Karoubi.id_eq
126129

@@ -143,7 +146,7 @@ theorem coe_p (X : C) : (X : Karoubi C).p = 𝟙 X := rfl
143146
theorem eqToHom_f {P Q : Karoubi C} (h : P = Q) :
144147
Karoubi.Hom.f (eqToHom h) = P.p ≫ eqToHom (congr_arg Karoubi.X h) := by
145148
subst h
146-
simp only [eqToHom_refl, Karoubi.id_eq, comp_id]
149+
simp only [eqToHom_refl, Karoubi.id_f, comp_id]
147150
#align category_theory.idempotents.karoubi.eq_to_hom_f CategoryTheory.Idempotents.Karoubi.eqToHom_f
148151

149152
end Karoubi
@@ -283,7 +286,7 @@ is actually a direct factor in the category `Karoubi C`. -/
283286
@[reassoc]
284287
theorem decompId (P : Karoubi C) : 𝟙 P = decompId_i P ≫ decompId_p P := by
285288
ext
286-
simp only [comp_f, id_eq, P.idem, decompId_i, decompId_p]
289+
simp only [comp_f, id_f, P.idem, decompId_i, decompId_p]
287290
#align category_theory.idempotents.karoubi.decomp_id CategoryTheory.Idempotents.Karoubi.decompId
288291

289292
theorem decomp_p (P : Karoubi C) : (toKaroubi C).map P.p = decompId_p P ≫ decompId_i P := by

Mathlib/CategoryTheory/Idempotents/KaroubiKaroubi.lean

+3-14
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ lemma idem_f (P : Karoubi (Karoubi C)) : P.p.f ≫ P.p.f = P.p.f := by
3737
lemma p_comm_f {P Q : Karoubi (Karoubi C)} (f : P ⟶ Q) : P.p.f ≫ f.f.f = f.f.f ≫ Q.p.f := by
3838
simpa only [hom_ext_iff, comp_f] using p_comm f
3939

40-
attribute [local simp] p_comm_f
41-
4240
/-- The canonical functor `Karoubi (Karoubi C) ⥤ Karoubi C` -/
4341
@[simps]
4442
def inverse : Karoubi (Karoubi C) ⥤ Karoubi C where
@@ -54,21 +52,12 @@ def unitIso : 𝟭 (Karoubi C) ≅ toKaroubi (Karoubi C) ⋙ inverse C :=
5452
eqToIso (Functor.ext (by aesop_cat) (by aesop_cat))
5553
#align category_theory.idempotents.karoubi_karoubi.unit_iso CategoryTheory.Idempotents.KaroubiKaroubi.unitIso
5654

55+
attribute [local simp] p_comm_f in
5756
/-- The counit isomorphism of the equivalence -/
5857
@[simps]
5958
def counitIso : inverse C ⋙ toKaroubi (Karoubi C) ≅ 𝟭 (Karoubi (Karoubi C)) where
60-
hom :=
61-
{ app := fun P =>
62-
{ f :=
63-
{ f := P.p.1
64-
comm := by simp }
65-
comm := by simp } }
66-
inv :=
67-
{ app := fun P =>
68-
{ f :=
69-
{ f := P.p.1
70-
comm := by simp }
71-
comm := by simp } }
59+
hom := { app := fun P => { f := { f := P.p.1 } } }
60+
inv := { app := fun P => { f := { f := P.p.1 } } }
7261
#align category_theory.idempotents.karoubi_karoubi.counit_iso CategoryTheory.Idempotents.KaroubiKaroubi.counitIso
7362

7463
/-- The equivalence `Karoubi C ≌ Karoubi (Karoubi C)` -/

0 commit comments

Comments
 (0)