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

Commit 873f268

Browse files
committed
chore(group_theory/group_action/*): generalisation linter (#13100)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
1 parent 3a0c034 commit 873f268

File tree

5 files changed

+50
-42
lines changed

5 files changed

+50
-42
lines changed

src/group_theory/group_action/basic.lean

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,20 @@ def stabilizer.submonoid (b : β) : submonoid α :=
103103
orbit α x = set.univ :=
104104
(surjective_smul α x).range_eq
105105

106+
variables {α} {β}
107+
108+
@[to_additive] lemma mem_fixed_points_iff_card_orbit_eq_one {a : β}
109+
[fintype (orbit α a)] : a ∈ fixed_points α β ↔ fintype.card (orbit α a) = 1 :=
110+
begin
111+
rw [fintype.card_eq_one_iff, mem_fixed_points],
112+
split,
113+
{ exact λ h, ⟨⟨a, mem_orbit_self _⟩, λ ⟨b, ⟨x, hx⟩⟩, subtype.eq $ by simp [h x, hx.symm]⟩ },
114+
{ assume h x,
115+
rcases h with ⟨⟨z, hz⟩, hz₁⟩,
116+
calc x • a = z : subtype.mk.inj (hz₁ ⟨x • a, mem_orbit _ _⟩)
117+
... = a : (subtype.mk.inj (hz₁ ⟨a, mem_orbit_self _⟩)).symm }
118+
end
119+
106120
end mul_action
107121

108122
namespace mul_action
@@ -142,18 +156,6 @@ instance (x : β) : is_pretransitive α (orbit α x) :=
142156
orbit α a = orbit α b ↔ a ∈ orbit α b:=
143157
⟨λ h, h ▸ mem_orbit_self _, λ ⟨c, hc⟩, hc ▸ orbit_smul _ _⟩
144158

145-
@[to_additive] lemma mem_fixed_points_iff_card_orbit_eq_one {a : β}
146-
[fintype (orbit α a)] : a ∈ fixed_points α β ↔ fintype.card (orbit α a) = 1 :=
147-
begin
148-
rw [fintype.card_eq_one_iff, mem_fixed_points],
149-
split,
150-
{ exact λ h, ⟨⟨a, mem_orbit_self _⟩, λ ⟨b, ⟨x, hx⟩⟩, subtype.eq $ by simp [h x, hx.symm]⟩ },
151-
{ assume h x,
152-
rcases h with ⟨⟨z, hz⟩, hz₁⟩,
153-
calc x • a = z : subtype.mk.inj (hz₁ ⟨x • a, mem_orbit _ _⟩)
154-
... = a : (subtype.mk.inj (hz₁ ⟨a, mem_orbit_self _⟩)).symm }
155-
end
156-
157159
variables (α) {β}
158160

159161
@[to_additive] lemma mem_orbit_smul (g : α) (a : β) : a ∈ orbit α (g • a) :=

src/group_theory/group_action/defs.lean

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,35 @@ by exact {smul_comm := λ _ n, @smul_comm _ _ _ _ _ _ _ (g n) }
275275

276276
end has_scalar
277277

278+
section
279+
280+
/-- Note that the `smul_comm_class α β β` typeclass argument is usually satisfied by `algebra α β`.
281+
-/
282+
@[to_additive]
283+
lemma mul_smul_comm [has_mul β] [has_scalar α β] [smul_comm_class α β β] (s : α) (x y : β) :
284+
x * (s • y) = s • (x * y) :=
285+
(smul_comm s x y).symm
286+
287+
/-- Note that the `is_scalar_tower α β β` typeclass argument is usually satisfied by `algebra α β`.
288+
-/
289+
lemma smul_mul_assoc [has_mul β] [has_scalar α β] [is_scalar_tower α β β] (r : α) (x y : β) :
290+
(r • x) * y = r • (x * y) :=
291+
smul_assoc r x y
292+
293+
variables [has_scalar M α]
294+
295+
lemma commute.smul_right [has_mul α] [smul_comm_class M α α] [is_scalar_tower M α α]
296+
{a b : α} (h : commute a b) (r : M) :
297+
commute a (r • b) :=
298+
(mul_smul_comm _ _ _).trans ((congr_arg _ h).trans $ (smul_mul_assoc _ _ _).symm)
299+
300+
lemma commute.smul_left [has_mul α] [smul_comm_class M α α] [is_scalar_tower M α α]
301+
{a b : α} (h : commute a b) (r : M) :
302+
commute (r • a) b :=
303+
(h.symm.smul_right r).symm
304+
305+
end
306+
278307
section ite
279308
variables [has_scalar M α] (p : Prop) [decidable p]
280309

@@ -363,36 +392,13 @@ instance is_scalar_tower.left : is_scalar_tower M M α :=
363392

364393
variables {M}
365394

366-
/-- Note that the `smul_comm_class α β β` typeclass argument is usually satisfied by `algebra α β`.
367-
-/
368-
@[to_additive]
369-
lemma mul_smul_comm [has_mul β] [has_scalar α β] [smul_comm_class α β β] (s : α) (x y : β) :
370-
x * (s • y) = s • (x * y) :=
371-
(smul_comm s x y).symm
372-
373-
/-- Note that the `is_scalar_tower α β β` typeclass argument is usually satisfied by `algebra α β`.
374-
-/
375-
lemma smul_mul_assoc [has_mul β] [has_scalar α β] [is_scalar_tower α β β] (r : α) (x y : β) :
376-
(r • x) * y = r • (x * y) :=
377-
smul_assoc r x y
378-
379395
/-- Note that the `is_scalar_tower M α α` and `smul_comm_class M α α` typeclass arguments are
380396
usually satisfied by `algebra M α`. -/
381397
lemma smul_mul_smul [has_mul α] (r s : M) (x y : α)
382398
[is_scalar_tower M α α] [smul_comm_class M α α] :
383399
(r • x) * (s • y) = (r * s) • (x * y) :=
384400
by rw [smul_mul_assoc, mul_smul_comm, ← smul_assoc, smul_eq_mul]
385401

386-
lemma commute.smul_right [has_mul α] [smul_comm_class M α α] [is_scalar_tower M α α]
387-
{a b : α} (h : commute a b) (r : M) :
388-
commute a (r • b) :=
389-
(mul_smul_comm _ _ _).trans ((congr_arg _ h).trans $ (smul_mul_assoc _ _ _).symm)
390-
391-
lemma commute.smul_left [has_mul α] [smul_comm_class M α α] [is_scalar_tower M α α]
392-
{a b : α} (h : commute a b) (r : M) :
393-
commute (r • a) b :=
394-
(h.symm.smul_right r).symm
395-
396402
end
397403

398404
namespace mul_action
@@ -444,8 +450,8 @@ by rw [smul_assoc, one_smul]
444450
(y : N) : (x • 1) * y = x • y :=
445451
smul_one_smul N x y
446452

447-
@[simp, to_additive] lemma mul_smul_one {M N} [monoid N] [has_scalar M N] [smul_comm_class M N N]
448-
(x : M) (y : N) :
453+
@[simp, to_additive] lemma mul_smul_one
454+
{M N} [mul_one_class N] [has_scalar M N] [smul_comm_class M N N] (x : M) (y : N) :
449455
y * (x • 1) = x • y :=
450456
by rw [← smul_eq_mul, ← smul_comm, smul_eq_mul, mul_one]
451457

src/group_theory/group_action/opposite.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ instance comm_semigroup.is_central_scalar [comm_semigroup α] : is_central_scala
106106
one_smul := mul_one,
107107
mul_smul := λ x y r, (mul_assoc _ _ _).symm }
108108

109-
instance is_scalar_tower.opposite_mid {M N} [monoid N] [has_scalar M N]
109+
instance is_scalar_tower.opposite_mid {M N} [has_mul N] [has_scalar M N]
110110
[smul_comm_class M N N] :
111111
is_scalar_tower M Nᵐᵒᵖ N :=
112112
⟨λ x y z, mul_smul_comm _ _ _⟩
113113

114-
instance smul_comm_class.opposite_mid {M N} [monoid N] [has_scalar M N]
114+
instance smul_comm_class.opposite_mid {M N} [has_mul N] [has_scalar M N]
115115
[is_scalar_tower M N N] :
116116
smul_comm_class M Nᵐᵒᵖ N :=
117117
⟨λ x y z, by { induction y using mul_opposite.rec, simp [smul_mul_assoc] }⟩

src/group_theory/group_action/prod.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ instance has_faithful_scalar_right [nonempty α] [has_faithful_scalar M β] :
5959
end
6060

6161
@[to_additive]
62-
instance smul_comm_class_both [monoid N] [monoid P] [has_scalar M N] [has_scalar M P]
62+
instance smul_comm_class_both [has_mul N] [has_mul P] [has_scalar M N] [has_scalar M P]
6363
[smul_comm_class M N N] [smul_comm_class M P P] :
6464
smul_comm_class M (N × P) (N × P) :=
6565
⟨λ c x y, by simp [smul_def, mul_def, mul_smul_comm]⟩
6666

67-
instance is_scalar_tower_both [monoid N] [monoid P] [has_scalar M N] [has_scalar M P]
67+
instance is_scalar_tower_both [has_mul N] [has_mul P] [has_scalar M N] [has_scalar M P]
6868
[is_scalar_tower M N N] [is_scalar_tower M P P] :
6969
is_scalar_tower M (N × P) (N × P) :=
7070
⟨λ c x y, by simp [smul_def, mul_def, smul_mul_assoc]⟩

src/group_theory/group_action/sub_mul_action.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ end sub_mul_action
219219

220220
namespace sub_mul_action
221221

222-
variables [division_ring S] [semiring R] [mul_action R M]
222+
variables [group_with_zero S] [monoid R] [mul_action R M]
223223
variables [has_scalar S R] [mul_action S M] [is_scalar_tower S R M]
224224
variables (p : sub_mul_action R M) {s : S} {x y : M}
225225

0 commit comments

Comments
 (0)