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

Commit 10f4572

Browse files
committed
refactor(group_theory/group_action/defs): rename has_faithful_scalar (#14515)
This is the first scalar -> smul renaming transition. Discussion: https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/scalar.20smul.20naming.20discrepancy
1 parent 157013d commit 10f4572

File tree

26 files changed

+90
-90
lines changed

26 files changed

+90
-90
lines changed

scripts/nolints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ apply_nolint monoid.to_opposite_mul_action to_additive_doc
413413
-- group_theory/group_action/pi.lean
414414
apply_nolint function.has_scalar to_additive_doc
415415
apply_nolint function.smul_comm_class to_additive_doc
416-
apply_nolint pi.has_faithful_scalar_at to_additive_doc
416+
apply_nolint pi.has_faithful_smul_at to_additive_doc
417417

418418
-- group_theory/group_action/sub_mul_action.lean
419419
apply_nolint sub_mul_action.has_zero fails_quickly

src/algebra/algebra/basic.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ instance apply_mul_semiring_action : mul_semiring_action (A₁ ≃ₐ[R] A₁) A
11571157

11581158
@[simp] protected lemma smul_def (f : A₁ ≃ₐ[R] A₁) (a : A₁) : f • a = f a := rfl
11591159

1160-
instance apply_has_faithful_scalar : has_faithful_scalar (A₁ ≃ₐ[R] A₁) A₁ :=
1160+
instance apply_has_faithful_smul : has_faithful_smul (A₁ ≃ₐ[R] A₁) A₁ :=
11611161
⟨λ _ _, alg_equiv.ext⟩
11621162

11631163
instance apply_smul_comm_class : smul_comm_class R (A₁ ≃ₐ[R] A₁) A₁ :=
@@ -1228,7 +1228,7 @@ This is a stronger version of `mul_semiring_action.to_ring_hom` and
12281228
def to_alg_hom (m : M) : A →ₐ[R] A :=
12291229
alg_hom.mk' (mul_semiring_action.to_ring_hom _ _ m) (smul_comm _)
12301230

1231-
theorem to_alg_hom_injective [has_faithful_scalar M A] :
1231+
theorem to_alg_hom_injective [has_faithful_smul M A] :
12321232
function.injective (mul_semiring_action.to_alg_hom R A : M → A →ₐ[R] A) :=
12331233
λ m₁ m₂ h, eq_of_smul_eq_smul $ λ r, alg_hom.ext_iff.1 h r
12341234

@@ -1246,7 +1246,7 @@ def to_alg_equiv (g : G) : A ≃ₐ[R] A :=
12461246
{ .. mul_semiring_action.to_ring_equiv _ _ g,
12471247
.. mul_semiring_action.to_alg_hom R A g }
12481248

1249-
theorem to_alg_equiv_injective [has_faithful_scalar G A] :
1249+
theorem to_alg_equiv_injective [has_faithful_smul G A] :
12501250
function.injective (mul_semiring_action.to_alg_equiv R A : G → A ≃ₐ[R] A) :=
12511251
λ m₁ m₂ h, eq_of_smul_eq_smul $ λ r, alg_equiv.ext_iff.1 h r
12521252

src/algebra/algebra/subalgebra/basic.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,9 +934,9 @@ instance is_scalar_tower_left
934934
is_scalar_tower S α β :=
935935
S.to_subsemiring.is_scalar_tower
936936

937-
instance [has_scalar A α] [has_faithful_scalar A α] (S : subalgebra R A) :
938-
has_faithful_scalar S α :=
939-
S.to_subsemiring.has_faithful_scalar
937+
instance [has_scalar A α] [has_faithful_smul A α] (S : subalgebra R A) :
938+
has_faithful_smul S α :=
939+
S.to_subsemiring.has_faithful_smul
940940

941941
/-- The action by a subalgebra is the action by the underlying algebra. -/
942942
instance [mul_action A α] (S : subalgebra R A) : mul_action S α :=

src/algebra/group_ring_action.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def mul_semiring_action.to_ring_hom [mul_semiring_action M R] (x : M) : R →+*
5555
{ .. mul_distrib_mul_action.to_monoid_hom R x,
5656
.. distrib_mul_action.to_add_monoid_hom R x }
5757

58-
theorem to_ring_hom_injective [mul_semiring_action M R] [has_faithful_scalar M R] :
58+
theorem to_ring_hom_injective [mul_semiring_action M R] [has_faithful_smul M R] :
5959
function.injective (mul_semiring_action.to_ring_hom M R) :=
6060
λ m₁ m₂ h, eq_of_smul_eq_smul $ λ r, ring_hom.ext_iff.1 h r
6161

src/algebra/hom/aut.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ instance apply_mul_distrib_mul_action {M} [monoid M] : mul_distrib_mul_action (m
8383
@[simp] protected lemma smul_def {M} [monoid M] (f : mul_aut M) (a : M) : f • a = f a := rfl
8484

8585
/-- `mul_aut.apply_mul_action` is faithful. -/
86-
instance apply_has_faithful_scalar {M} [monoid M] : has_faithful_scalar (mul_aut M) M :=
86+
instance apply_has_faithful_smul {M} [monoid M] : has_faithful_smul (mul_aut M) M :=
8787
⟨λ _ _, mul_equiv.ext⟩
8888

8989
/-- Group conjugation, `mul_aut.conj g h = g * h * g⁻¹`, as a monoid homomorphism
@@ -159,7 +159,7 @@ instance apply_distrib_mul_action {A} [add_monoid A] : distrib_mul_action (add_a
159159
@[simp] protected lemma smul_def {A} [add_monoid A] (f : add_aut A) (a : A) : f • a = f a := rfl
160160

161161
/-- `add_aut.apply_distrib_mul_action` is faithful. -/
162-
instance apply_has_faithful_scalar {A} [add_monoid A] : has_faithful_scalar (add_aut A) A :=
162+
instance apply_has_faithful_smul {A} [add_monoid A] : has_faithful_smul (add_aut A) A :=
163163
⟨λ _ _, add_equiv.ext⟩
164164

165165
/-- Additive group conjugation, `add_aut.conj g h = g + h - g`, as an additive monoid

src/algebra/module/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ instance ring_hom.apply_distrib_mul_action [semiring R] : distrib_mul_action (R
297297
f • a = f a := rfl
298298

299299
/-- `ring_hom.apply_distrib_mul_action` is faithful. -/
300-
instance ring_hom.apply_has_faithful_scalar [semiring R] : has_faithful_scalar (R →+* R) R :=
300+
instance ring_hom.apply_has_faithful_smul [semiring R] : has_faithful_smul (R →+* R) R :=
301301
⟨ring_hom.ext⟩
302302

303303
section add_comm_monoid

src/algebra/module/equiv.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ instance apply_distrib_mul_action : distrib_mul_action (M ≃ₗ[R] M) M :=
481481
f • a = f a := rfl
482482

483483
/-- `linear_equiv.apply_distrib_mul_action` is faithful. -/
484-
instance apply_has_faithful_scalar : has_faithful_scalar (M ≃ₗ[R] M) M :=
484+
instance apply_has_faithful_smul : has_faithful_smul (M ≃ₗ[R] M) M :=
485485
⟨λ _ _, linear_equiv.ext⟩
486486

487487
instance apply_smul_comm_class : smul_comm_class R (M ≃ₗ[R] M) M :=

src/algebra/module/linear_map.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ instance apply_module : module (module.End R M) M :=
847847
@[simp] protected lemma smul_def (f : module.End R M) (a : M) : f • a = f a := rfl
848848

849849
/-- `linear_map.apply_module` is faithful. -/
850-
instance apply_has_faithful_scalar : has_faithful_scalar (module.End R M) M :=
850+
instance apply_has_faithful_smul : has_faithful_smul (module.End R M) M :=
851851
⟨λ _ _, linear_map.ext⟩
852852

853853
instance apply_smul_comm_class : smul_comm_class R (module.End R M) M :=

src/algebra/monoid_algebra/basic.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ instance [semiring R] [semiring k] [module R k] :
270270
module R (monoid_algebra k G) :=
271271
finsupp.module G k
272272

273-
instance [monoid R] [semiring k] [distrib_mul_action R k] [has_faithful_scalar R k] [nonempty G] :
274-
has_faithful_scalar R (monoid_algebra k G) :=
275-
finsupp.has_faithful_scalar
273+
instance [monoid R] [semiring k] [distrib_mul_action R k] [has_faithful_smul R k] [nonempty G] :
274+
has_faithful_smul R (monoid_algebra k G) :=
275+
finsupp.has_faithful_smul
276276

277277
instance [monoid R] [monoid S] [semiring k] [distrib_mul_action R k] [distrib_mul_action S k]
278278
[has_scalar R S] [is_scalar_tower R S k] :
@@ -1106,9 +1106,9 @@ instance [monoid R] [semiring k] [distrib_mul_action R k] :
11061106
distrib_mul_action R (add_monoid_algebra k G) :=
11071107
finsupp.distrib_mul_action G k
11081108

1109-
instance [monoid R] [semiring k] [distrib_mul_action R k] [has_faithful_scalar R k] [nonempty G] :
1110-
has_faithful_scalar R (add_monoid_algebra k G) :=
1111-
finsupp.has_faithful_scalar
1109+
instance [monoid R] [semiring k] [distrib_mul_action R k] [has_faithful_smul R k] [nonempty G] :
1110+
has_faithful_smul R (add_monoid_algebra k G) :=
1111+
finsupp.has_faithful_smul
11121112

11131113
instance [semiring R] [semiring k] [module R k] : module R (add_monoid_algebra k G) :=
11141114
finsupp.module G k

src/analysis/normed_space/M_structure.lean

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ lemma Lcomplement {P : M} (h: is_Lprojection X P) : is_Lprojection X (1 - P) :=
9090
lemma Lcomplement_iff (P : M) : is_Lprojection X P ↔ is_Lprojection X (1 - P) :=
9191
⟨Lcomplement, λ h, sub_sub_cancel 1 P ▸ h.Lcomplement⟩
9292

93-
lemma commute [has_faithful_scalar M X] {P Q : M} (h₁ : is_Lprojection X P)
93+
lemma commute [has_faithful_smul M X] {P Q : M} (h₁ : is_Lprojection X P)
9494
(h₂ : is_Lprojection X Q) : commute P Q :=
9595
begin
9696
have PR_eq_RPR : ∀ R : M, is_Lprojection X R → P * R = R * P * R := λ R h₃,
@@ -130,7 +130,7 @@ begin
130130
show P * Q = Q * P, by rw [QP_eq_QPQ, PR_eq_RPR Q h₂]
131131
end
132132

133-
lemma mul [has_faithful_scalar M X] {P Q : M} (h₁ : is_Lprojection X P) (h₂ : is_Lprojection X Q) :
133+
lemma mul [has_faithful_smul M X] {P Q : M} (h₁ : is_Lprojection X P) (h₂ : is_Lprojection X Q) :
134134
is_Lprojection X (P * Q) :=
135135
begin
136136
refine ⟨is_idempotent_elem.mul_of_commute (h₁.commute h₂) h₁.proj h₂.proj, _⟩,
@@ -151,7 +151,7 @@ begin
151151
mul_smul] }
152152
end
153153

154-
lemma join [has_faithful_scalar M X] {P Q : M} (h₁ : is_Lprojection X P) (h₂ : is_Lprojection X Q) :
154+
lemma join [has_faithful_smul M X] {P Q : M} (h₁ : is_Lprojection X P) (h₂ : is_Lprojection X Q) :
155155
is_Lprojection X (P + Q - P * Q) :=
156156
begin
157157
convert (Lcomplement_iff _).mp (h₁.Lcomplement.mul h₂.Lcomplement) using 1,
@@ -164,31 +164,31 @@ instance : has_compl { f : M // is_Lprojection X f } :=
164164
@[simp] lemma coe_compl (P : {P : M // is_Lprojection X P}) :
165165
↑(Pᶜ) = (1 : M) - ↑P := rfl
166166

167-
instance [has_faithful_scalar M X] : has_inf {P : M // is_Lprojection X P} :=
167+
instance [has_faithful_smul M X] : has_inf {P : M // is_Lprojection X P} :=
168168
⟨λ P Q, ⟨P * Q, P.prop.mul Q.prop⟩ ⟩
169169

170-
@[simp] lemma coe_inf [has_faithful_scalar M X] (P Q : {P : M // is_Lprojection X P}) :
170+
@[simp] lemma coe_inf [has_faithful_smul M X] (P Q : {P : M // is_Lprojection X P}) :
171171
↑(P ⊓ Q) = ((↑P : (M)) * ↑Q) := rfl
172172

173-
instance [has_faithful_scalar M X] : has_sup {P : M // is_Lprojection X P} :=
173+
instance [has_faithful_smul M X] : has_sup {P : M // is_Lprojection X P} :=
174174
⟨λ P Q, ⟨P + Q - P * Q, P.prop.join Q.prop⟩ ⟩
175175

176-
@[simp] lemma coe_sup [has_faithful_scalar M X] (P Q : {P : M // is_Lprojection X P}) :
176+
@[simp] lemma coe_sup [has_faithful_smul M X] (P Q : {P : M // is_Lprojection X P}) :
177177
↑(P ⊔ Q) = ((↑P : M) + ↑Q - ↑P * ↑Q) := rfl
178178

179-
instance [has_faithful_scalar M X] : has_sdiff {P : M // is_Lprojection X P} :=
179+
instance [has_faithful_smul M X] : has_sdiff {P : M // is_Lprojection X P} :=
180180
⟨λ P Q, ⟨P * (1 - Q), by exact P.prop.mul Q.prop.Lcomplement ⟩⟩
181181

182-
@[simp] lemma coe_sdiff [has_faithful_scalar M X] (P Q : {P : M // is_Lprojection X P}) :
182+
@[simp] lemma coe_sdiff [has_faithful_smul M X] (P Q : {P : M // is_Lprojection X P}) :
183183
↑(P \ Q) = (↑P : M) * (1 - ↑Q) := rfl
184184

185-
instance [has_faithful_scalar M X] : partial_order {P : M // is_Lprojection X P} :=
185+
instance [has_faithful_smul M X] : partial_order {P : M // is_Lprojection X P} :=
186186
{ le := λ P Q, (↑P : M) = ↑(P ⊓ Q),
187187
le_refl := λ P, by simpa only [coe_inf, ←sq] using (P.prop.proj.eq).symm,
188188
le_trans := λ P Q R h₁ h₂, by { simp only [coe_inf] at ⊢ h₁ h₂, rw [h₁, mul_assoc, ←h₂] },
189189
le_antisymm := λ P Q h₁ h₂, subtype.eq (by convert (P.prop.commute Q.prop).eq) }
190190

191-
lemma le_def [has_faithful_scalar M X] (P Q : {P : M // is_Lprojection X P}) :
191+
lemma le_def [has_faithful_smul M X] (P Q : {P : M // is_Lprojection X P}) :
192192
P ≤ Q ↔ (P : M) = ↑(P ⊓ Q) :=
193193
iff.rfl
194194

@@ -206,16 +206,16 @@ instance : has_one {P : M // is_Lprojection X P} :=
206206
@[simp] lemma coe_one : ↑(1 : {P : M // is_Lprojection X P}) = (1 : M) :=
207207
rfl
208208

209-
instance [has_faithful_scalar M X] : bounded_order {P : M // is_Lprojection X P} :=
209+
instance [has_faithful_smul M X] : bounded_order {P : M // is_Lprojection X P} :=
210210
{ top := 1,
211211
le_top := λ P, (mul_one (P : M)).symm,
212212
bot := 0,
213213
bot_le := λ P, (zero_mul (P : M)).symm, }
214214

215-
@[simp] lemma coe_bot [has_faithful_scalar M X] :
215+
@[simp] lemma coe_bot [has_faithful_smul M X] :
216216
↑(bounded_order.bot : {P : M // is_Lprojection X P}) = (0 : M) := rfl
217217

218-
@[simp] lemma coe_top [has_faithful_scalar M X] :
218+
@[simp] lemma coe_top [has_faithful_smul M X] :
219219
↑(bounded_order.top : {P : M // is_Lprojection X P}) = (1 : M) := rfl
220220

221221
lemma compl_mul {P : {P : M // is_Lprojection X P}} {Q : M} :
@@ -225,7 +225,7 @@ lemma mul_compl_self {P : {P : M // is_Lprojection X P}} :
225225
(↑P : M) * (↑Pᶜ) = 0 :=
226226
by rw [coe_compl, mul_sub, mul_one, P.prop.proj.eq, sub_self]
227227

228-
lemma distrib_lattice_lemma [has_faithful_scalar M X] {P Q R : {P : M // is_Lprojection X P}} :
228+
lemma distrib_lattice_lemma [has_faithful_smul M X] {P Q R : {P : M // is_Lprojection X P}} :
229229
((↑P : M) + ↑Pᶜ * R) * (↑P + ↑Q * ↑R * ↑Pᶜ) = (↑P + ↑Q * ↑R * ↑Pᶜ) :=
230230
by rw [add_mul, mul_add, mul_add, mul_assoc ↑Pᶜ ↑R (↑Q * ↑R * ↑Pᶜ), ← mul_assoc ↑R (↑Q * ↑R) ↑Pᶜ,
231231
← coe_inf Q, (Pᶜ.prop.commute R.prop).eq, ((Q ⊓ R).prop.commute Pᶜ.prop).eq,
@@ -235,7 +235,7 @@ by rw [add_mul, mul_add, mul_add, mul_assoc ↑Pᶜ ↑R (↑Q * ↑R * ↑Pᶜ)
235235
P.prop.proj.eq, R.prop.proj.eq, ← coe_inf Q, mul_assoc, ((Q ⊓ R).prop.commute Pᶜ.prop).eq,
236236
← mul_assoc, Pᶜ.prop.proj.eq]
237237

238-
instance [has_faithful_scalar M X] : distrib_lattice {P : M // is_Lprojection X P} :=
238+
instance [has_faithful_smul M X] : distrib_lattice {P : M // is_Lprojection X P} :=
239239
{ le_sup_left := λ P Q, by rw [le_def, coe_inf, coe_sup, ← add_sub, mul_add, mul_sub, ← mul_assoc,
240240
P.prop.proj.eq, sub_self, add_zero],
241241
le_sup_right := λ P Q,
@@ -277,7 +277,7 @@ instance [has_faithful_scalar M X] : distrib_lattice {P : M // is_Lprojection X
277277
.. is_Lprojection.subtype.has_sup,
278278
.. is_Lprojection.subtype.partial_order }
279279

280-
instance [has_faithful_scalar M X] : boolean_algebra {P : M // is_Lprojection X P} :=
280+
instance [has_faithful_smul M X] : boolean_algebra {P : M // is_Lprojection X P} :=
281281
{ sup_inf_sdiff := λ P Q, subtype.ext $
282282
by rw [coe_sup, coe_inf, coe_sdiff, mul_assoc, ← mul_assoc ↑Q,
283283
(Q.prop.commute P.prop).eq, mul_assoc ↑P ↑Q, ← coe_compl, mul_compl_self, mul_zero, mul_zero,

0 commit comments

Comments
 (0)