Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit a4e936c

Browse files
committed
chore(category_theory/idempotents) replaced "idempotence" by "idem" (#12362)
1 parent 1f39ada commit a4e936c

File tree

5 files changed

+36
-36
lines changed

5 files changed

+36
-36
lines changed

src/category_theory/idempotents/basic.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ variables {C}
9292

9393
/-- In a preadditive category, when `p : X ⟶ X` is idempotent,
9494
then `𝟙 X - p` is also idempotent. -/
95-
lemma idempotence_of_id_sub_idempotent [preadditive C]
95+
lemma idem_of_id_sub_idem [preadditive C]
9696
{X : C} (p : X ⟶ X) (hp : p ≫ p = p) :
9797
(𝟙 _ - p) ≫ (𝟙 _ - p) = (𝟙 _ - p) :=
9898
by simp only [comp_sub, sub_comp, id_comp, comp_id, hp, sub_self, sub_zero]
@@ -106,11 +106,11 @@ begin
106106
rw is_idempotent_complete_iff_has_equalizer_of_id_and_idempotent,
107107
split,
108108
{ intros h X p hp,
109-
haveI := h X (𝟙 _ - p) (idempotence_of_id_sub_idempotent p hp),
109+
haveI := h X (𝟙 _ - p) (idem_of_id_sub_idem p hp),
110110
convert has_kernel_of_has_equalizer (𝟙 X) (𝟙 X - p),
111111
rw [sub_sub_cancel], },
112112
{ intros h X p hp,
113-
haveI : has_kernel (𝟙 _ - p) := h X (𝟙 _ - p) (idempotence_of_id_sub_idempotent p hp),
113+
haveI : has_kernel (𝟙 _ - p) := h X (𝟙 _ - p) (idem_of_id_sub_idem p hp),
114114
apply preadditive.has_limit_parallel_pair, },
115115
end
116116

src/category_theory/idempotents/biproducts.lean

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,25 @@ def bicone [has_finite_biproducts C] {J : Type v} [decidable_eq J] [fintype J]
4747
{ X :=
4848
{ X := biproduct (λ j, (F j).X),
4949
p := biproduct.map (λ j, (F j).p),
50-
idempotence := begin
50+
idem := begin
5151
ext j,
5252
simp only [biproduct.ι_map_assoc, biproduct.ι_map],
53-
slice_lhs 1 2 { rw (F j).idempotence, },
53+
slice_lhs 1 2 { rw (F j).idem, },
5454
end, },
5555
π := λ j,
5656
{ f := biproduct.map (λ j, (F j).p) ≫ bicone.π _ j,
5757
comm := by simp only [assoc, biproduct.bicone_π, biproduct.map_π,
58-
biproduct.map_π_assoc, (F j).idempotence], },
58+
biproduct.map_π_assoc, (F j).idem], },
5959
ι := λ j,
6060
{ f := (by exact bicone.ι _ j) ≫ biproduct.map (λ j, (F j).p),
61-
comm := by rw [biproduct.ι_map, ← assoc, ← assoc, (F j).idempotence,
62-
assoc, biproduct.ι_map, ← assoc, (F j).idempotence], },
61+
comm := by rw [biproduct.ι_map, ← assoc, ← assoc, (F j).idem,
62+
assoc, biproduct.ι_map, ← assoc, (F j).idem], },
6363
ι_π := λ j j', begin
6464
split_ifs,
6565
{ subst h,
6666
simp only [biproduct.bicone_ι, biproduct.ι_map, biproduct.bicone_π,
6767
biproduct.ι_π_self_assoc, comp, category.assoc, eq_to_hom_refl, id_eq,
68-
biproduct.map_π, (F j).idempotence], },
68+
biproduct.map_π, (F j).idem], },
6969
{ simpa only [hom_ext, biproduct.ι_π_ne_assoc _ h, assoc,
7070
biproduct.map_π, biproduct.map_π_assoc, zero_comp, comp], },
7171
end, }
@@ -95,7 +95,7 @@ lemma karoubi_has_finite_biproducts [has_finite_biproducts C] :
9595
biproduct.ι_map, assoc, biproducts.bicone_ι_f, biproduct.map_π],
9696
slice_lhs 1 2 { rw biproduct.ι_π, },
9797
split_ifs, swap, { exfalso, exact h rfl, },
98-
simp only [eq_to_hom_refl, id_comp, (F j).idempotence], },
98+
simp only [eq_to_hom_refl, id_comp, (F j).idem], },
9999
end, } }
100100

101101
instance {D : Type*} [category D] [additive_category D] : additive_category (karoubi D) :=
@@ -108,7 +108,7 @@ endomorphism `𝟙 P.X - P.p` -/
108108
def complement (P : karoubi C) : karoubi C :=
109109
{ X := P.X,
110110
p := 𝟙 _ - P.p,
111-
idempotence := idempotence_of_id_sub_idempotent P.p P.idempotence, }
111+
idem := idem_of_id_sub_idem P.p P.idem, }
112112

113113
instance (P : karoubi C) : has_binary_biproduct P P.complement :=
114114
has_binary_biproduct_of_total
@@ -120,12 +120,12 @@ has_binary_biproduct_of_total
120120
inl_fst' := P.decomp_id.symm,
121121
inl_snd' := begin
122122
simp only [decomp_id_i_f, decomp_id_p_f, complement_p, comp_sub, comp,
123-
hom_ext, quiver.hom.add_comm_group_zero_f, P.idempotence],
123+
hom_ext, quiver.hom.add_comm_group_zero_f, P.idem],
124124
erw [comp_id, sub_self],
125125
end,
126126
inr_fst' := begin
127127
simp only [decomp_id_i_f, complement_p, decomp_id_p_f, sub_comp, comp,
128-
hom_ext, quiver.hom.add_comm_group_zero_f, P.idempotence],
128+
hom_ext, quiver.hom.add_comm_group_zero_f, P.idem],
129129
erw [id_comp, sub_self],
130130
end,
131131
inr_snd' := P.complement.decomp_id.symm, }
@@ -145,14 +145,14 @@ def decomposition (P : karoubi C) : P ⊞ P.complement ≅ (to_karoubi _).obj P.
145145
convert zero_comp,
146146
ext,
147147
simp only [decomp_id_i_f, decomp_id_p_f, complement_p, comp_sub, comp,
148-
quiver.hom.add_comm_group_zero_f, P.idempotence],
148+
quiver.hom.add_comm_group_zero_f, P.idem],
149149
erw [comp_id, sub_self], },
150150
{ simp only [← assoc, biprod.inr_desc, biprod.lift_eq, comp_add,
151151
← decomp_id, comp_id, id_comp, add_left_eq_self],
152152
convert zero_comp,
153153
ext,
154154
simp only [decomp_id_i_f, decomp_id_p_f, complement_p, sub_comp, comp,
155-
quiver.hom.add_comm_group_zero_f, P.idempotence],
155+
quiver.hom.add_comm_group_zero_f, P.idem],
156156
erw [id_comp, sub_self], }
157157
end,
158158
inv_hom_id' := begin

src/category_theory/idempotents/functor_categories.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,19 @@ functor `F : J ⥤ C` to the functor `J ⥤ karoubi C` which sends `(j : J)` to
7373
the corresponding direct factor of `F.obj j`. -/
7474
@[simps]
7575
def obj (P : karoubi (J ⥤ C)) : J ⥤ karoubi C :=
76-
{ obj := λ j, ⟨P.X.obj j, P.p.app j, congr_app P.idempotence j⟩,
76+
{ obj := λ j, ⟨P.X.obj j, P.p.app j, congr_app P.idem j⟩,
7777
map := λ j j' φ,
7878
{ f := P.p.app j ≫ P.X.map φ,
7979
comm := begin
8080
simp only [nat_trans.naturality, assoc],
81-
have h := congr_app P.idempotence j,
81+
have h := congr_app P.idem j,
8282
rw [nat_trans.comp_app] at h,
8383
slice_rhs 1 3 { erw [h, h], },
8484
end },
8585
map_id' := λ j, by { ext, simp only [functor.map_id, comp_id, id_eq], },
8686
map_comp' := λ j j' j'' φ φ', begin
8787
ext,
88-
have h := congr_app P.idempotence j,
88+
have h := congr_app P.idem j,
8989
rw [nat_trans.comp_app] at h,
9090
simp only [assoc, nat_trans.naturality_assoc, functor.map_comp, comp],
9191
slice_rhs 1 2 { rw h, },

src/category_theory/idempotents/karoubi.lean

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ one may define a formal direct factor of an object `X : C` : it consists of an i
4242
`p : X ⟶ X` which is thought as the "formal image" of `p`. The type `karoubi C` shall be the
4343
type of the objects of the karoubi enveloppe of `C`. It makes sense for any category `C`. -/
4444
@[nolint has_inhabited_instance]
45-
structure karoubi := (X : C) (p : X ⟶ X) (idempotence : p ≫ p = p)
45+
structure karoubi := (X : C) (p : X ⟶ X) (idem : p ≫ p = p)
4646

4747
namespace karoubi
4848

@@ -80,11 +80,11 @@ end
8080

8181
@[simp, reassoc]
8282
lemma p_comp {P Q : karoubi C} (f : hom P Q) : P.p ≫ f.f = f.f :=
83-
by rw [f.comm, ← assoc, P.idempotence]
83+
by rw [f.comm, ← assoc, P.idem]
8484

8585
@[simp, reassoc]
8686
lemma comp_p {P Q : karoubi C} (f : hom P Q) : f.f ≫ Q.p = f.f :=
87-
by rw [f.comm, assoc, assoc, Q.idempotence]
87+
by rw [f.comm, assoc, assoc, Q.idem]
8888

8989
lemma p_comm {P Q : karoubi C} (f : hom P Q) : P.p ≫ f.f = f.f ≫ Q.p :=
9090
by rw [p_comp, comp_p]
@@ -96,15 +96,15 @@ by rw [assoc, comp_p, ← assoc, p_comp]
9696
/-- The category structure on the karoubi envelope of a category. -/
9797
instance : category (karoubi C) :=
9898
{ hom := karoubi.hom,
99-
id := λ P, ⟨P.p, by { repeat { rw P.idempotence, }, }⟩,
99+
id := λ P, ⟨P.p, by { repeat { rw P.idem, }, }⟩,
100100
comp := λ P Q R f g, ⟨f.f ≫ g.f, karoubi.comp_proof g f⟩, }
101101

102102
@[simp]
103103
lemma comp {P Q R : karoubi C} (f : P ⟶ Q) (g : Q ⟶ R) :
104104
f ≫ g = ⟨f.f ≫ g.f, comp_proof g f⟩ := by refl
105105

106106
@[simp]
107-
lemma id_eq {P : karoubi C} : 𝟙 P = ⟨P.p, by repeat { rw P.idempotence, }⟩ := by refl
107+
lemma id_eq {P : karoubi C} : 𝟙 P = ⟨P.p, by repeat { rw P.idem, }⟩ := by refl
108108

109109
/-- It is possible to coerce an object of `C` into an object of `karoubi C`.
110110
See also the functor `to_karoubi`. -/
@@ -198,7 +198,7 @@ end
198198

199199
instance [is_idempotent_complete C] : ess_surj (to_karoubi C) := ⟨λ P, begin
200200
have h : is_idempotent_complete C := infer_instance,
201-
rcases is_idempotent_complete.idempotents_split P.X P.p P.idempotence
201+
rcases is_idempotent_complete.idempotents_split P.X P.p P.idem
202202
with ⟨Y,i,e,⟨h₁,h₂⟩⟩,
203203
use Y,
204204
exact nonempty.intro
@@ -217,22 +217,22 @@ variables {C}
217217

218218
/-- The split mono which appears in the factorisation `decomp_id P`. -/
219219
@[simps]
220-
def decomp_id_i (P : karoubi C) : P ⟶ P.X := ⟨P.p, by erw [coe_p, comp_id, P.idempotence]⟩
220+
def decomp_id_i (P : karoubi C) : P ⟶ P.X := ⟨P.p, by erw [coe_p, comp_id, P.idem]⟩
221221

222222
/-- The split epi which appears in the factorisation `decomp_id P`. -/
223223
@[simps]
224224
def decomp_id_p (P : karoubi C) : (P.X : karoubi C) ⟶ P :=
225-
⟨P.p, by erw [coe_p, id_comp, P.idempotence]⟩
225+
⟨P.p, by erw [coe_p, id_comp, P.idem]⟩
226226

227227
/-- The formal direct factor of `P.X` given by the idempotent `P.p` in the category `C`
228228
is actually a direct factor in the category `karoubi C`. -/
229229
lemma decomp_id (P : karoubi C) :
230230
𝟙 P = (decomp_id_i P) ≫ (decomp_id_p P) :=
231-
by { ext, simp only [comp, id_eq, P.idempotence, decomp_id_i, decomp_id_p], }
231+
by { ext, simp only [comp, id_eq, P.idem, decomp_id_i, decomp_id_p], }
232232

233233
lemma decomp_p (P : karoubi C) :
234234
(to_karoubi C).map P.p = (decomp_id_p P) ≫ (decomp_id_i P) :=
235-
by { ext, simp only [comp, decomp_id_p_f, decomp_id_i_f, P.idempotence, to_karoubi_map_f], }
235+
by { ext, simp only [comp, decomp_id_p_f, decomp_id_i_f, P.idem, to_karoubi_map_f], }
236236

237237
lemma decomp_id_i_to_karoubi (X : C) : decomp_id_i ((to_karoubi C).obj X) = 𝟙 _ :=
238238
by { ext, refl, }

src/category_theory/idempotents/karoubi_karoubi.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ variables (C : Type*) [category C]
2828
/-- The canonical functor `karoubi (karoubi C) ⥤ karoubi C` -/
2929
@[simps]
3030
def inverse : karoubi (karoubi C) ⥤ karoubi C :=
31-
{ obj := λ P, ⟨P.X.X, P.p.f, by simpa only [hom_ext] using P.idempotence⟩,
31+
{ obj := λ P, ⟨P.X.X, P.p.f, by simpa only [hom_ext] using P.idem⟩,
3232
map := λ P Q f, ⟨f.f.f, by simpa only [hom_ext] using f.comm⟩, }
3333

3434
instance [preadditive C] : functor.additive (inverse C) := { }
@@ -57,12 +57,12 @@ def counit_iso : inverse C ⋙ to_karoubi (karoubi C) ≅ 𝟭 (karoubi (karoubi
5757
{ f :=
5858
{ f := P.p.1,
5959
comm := begin
60-
have h := P.idempotence,
60+
have h := P.idem,
6161
simp only [hom_ext, comp] at h,
6262
erw [← assoc, h, comp_p],
6363
end, },
6464
comm := begin
65-
have h := P.idempotence,
65+
have h := P.idem,
6666
simp only [hom_ext, comp] at h ⊢,
6767
erw [h, h],
6868
end, },
@@ -72,18 +72,18 @@ def counit_iso : inverse C ⋙ to_karoubi (karoubi C) ≅ 𝟭 (karoubi (karoubi
7272
{ f :=
7373
{ f := P.p.1,
7474
comm := begin
75-
have h := P.idempotence,
75+
have h := P.idem,
7676
simp only [hom_ext, comp] at h,
7777
erw [h, p_comp],
7878
end, },
7979
comm := begin
80-
have h := P.idempotence,
80+
have h := P.idem,
8181
simp only [hom_ext, comp] at h ⊢,
8282
erw [h, h],
8383
end, },
8484
naturality' := λ P Q f, by simpa [hom_ext] using (p_comm f).symm, },
85-
hom_inv_id' := by { ext P, simpa only [hom_ext, id_eq] using P.idempotence, },
86-
inv_hom_id' := by { ext P, simpa only [hom_ext, id_eq] using P.idempotence, }, }
85+
hom_inv_id' := by { ext P, simpa only [hom_ext, id_eq] using P.idem, },
86+
inv_hom_id' := by { ext P, simpa only [hom_ext, id_eq] using P.idem, }, }
8787

8888
/-- The equivalence `karoubi C ≌ karoubi (karoubi C)` -/
8989
@[simps]
@@ -96,7 +96,7 @@ def equivalence : karoubi C ≌ karoubi (karoubi C) :=
9696
ext,
9797
simp only [eq_to_hom_f, eq_to_hom_refl, comp_id, counit_iso_hom_app_f_f,
9898
to_karoubi_obj_p, id_eq, assoc, comp, unit_iso_hom, eq_to_hom_app, eq_to_hom_map],
99-
erw [P.idempotence, P.idempotence],
99+
erw [P.idem, P.idem],
100100
end, }
101101

102102
instance equivalence.additive_functor [preadditive C] :

0 commit comments

Comments
 (0)