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

Commit 51e03aa

Browse files
kim-emScott Morrison
andcommitted
feat(data/monoid_algebra): the distrib_mul_action (#2417)
Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>
1 parent 036b038 commit 51e03aa

File tree

3 files changed

+78
-1
lines changed

3 files changed

+78
-1
lines changed

src/data/finsupp.lean

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,7 @@ def comap_domain {α₁ α₂ γ : Type*} [has_zero γ]
918918
exact l.mem_support_to_fun (f a),
919919
end }
920920

921+
@[simp]
921922
lemma comap_domain_apply {α₁ α₂ γ : Type*} [has_zero γ]
922923
(f : α₁ → α₂) (l : α₂ →₀ γ) (hf : set.inj_on f (f ⁻¹' l.support.to_set)) (a : α₁) :
923924
comap_domain f l hf a = l (f a) :=
@@ -1323,7 +1324,65 @@ end
13231324
end curry_uncurry
13241325

13251326
section
1327+
variables [group γ] [mul_action γ α] [add_comm_monoid β]
13261328

1329+
/--
1330+
Scalar multiplication by a group element g,
1331+
given by precomposition with the action of g⁻¹ on the domain.
1332+
-/
1333+
def comap_has_scalar : has_scalar γ (α →₀ β) :=
1334+
{ smul := λ g f, f.comap_domain (λ a, g⁻¹ • a)
1335+
(λ a a' m m' h, by simpa [←mul_smul] using (congr_arg (λ a, g • a) h)) }
1336+
1337+
local attribute [instance] comap_has_scalar
1338+
1339+
/--
1340+
Scalar multiplication by a group element,
1341+
given by precomposition with the action of g⁻¹ on the domain,
1342+
is multiplicative in g.
1343+
-/
1344+
def comap_mul_action : mul_action γ (α →₀ β) :=
1345+
{ one_smul := λ f, by { ext, dsimp [(•)], simp, },
1346+
mul_smul := λ g g' f, by { ext, dsimp [(•)], simp [mul_smul], }, }
1347+
1348+
local attribute [instance] comap_mul_action
1349+
1350+
/--
1351+
Scalar multiplication by a group element,
1352+
given by precomposition with the action of g⁻¹ on the domain,
1353+
is additive in the second argument.
1354+
-/
1355+
def comap_distrib_mul_action :
1356+
distrib_mul_action γ (α →₀ β) :=
1357+
{ smul_zero := λ g, by { ext, dsimp [(•)], simp, },
1358+
smul_add := λ g f f', by { ext, dsimp [(•)], simp, }, }
1359+
1360+
/--
1361+
Scalar multiplication by a group element on finitely supported functions on a group,
1362+
given by precomposition with the action of g⁻¹. -/
1363+
def comap_distrib_mul_action_self :
1364+
distrib_mul_action γ (γ →₀ β) :=
1365+
@finsupp.comap_distrib_mul_action γ β γ _ (mul_action.regular γ) _
1366+
1367+
@[simp]
1368+
lemma comap_smul_single (g : γ) (a : α) (b : β) :
1369+
g • single a b = single (g • a) b :=
1370+
begin
1371+
ext a',
1372+
dsimp [(•)],
1373+
by_cases h : g • a = a',
1374+
{ subst h, simp [←mul_smul], },
1375+
{ simp [single_eq_of_ne h], rw [single_eq_of_ne],
1376+
rintro rfl, simpa [←mul_smul] using h, }
1377+
end
1378+
1379+
@[simp]
1380+
lemma comap_smul_apply (g : γ) (f : α →₀ β) (a : α) :
1381+
(g • f) a = f (g⁻¹ • a) := rfl
1382+
1383+
end
1384+
1385+
section
13271386
instance [semiring γ] [add_comm_monoid β] [semimodule γ β] : has_scalar γ (α →₀ β) :=
13281387
⟨λa v, v.map_range ((•) a) (smul_zero _)⟩
13291388

src/data/monoid_algebra.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ finsupp.semimodule G k
159159
instance [ring k] : module k (monoid_algebra k G) :=
160160
finsupp.module G k
161161

162+
instance [group G] [semiring k] :
163+
distrib_mul_action G (monoid_algebra k G) :=
164+
finsupp.comap_distrib_mul_action_self
165+
166+
-- TODO we should prove here that G and k commute;
167+
-- presumably a `linear_mul_action` typeclass is in order
168+
162169
lemma single_mul_single [semiring k] [monoid G] {a₁ a₂ : G} {b₁ b₂ : k} :
163170
(single a₁ b₁ : monoid_algebra k G) * single a₂ b₂ = single (a₁ * a₂) (b₁ * b₂) :=
164171
(sum_single_index (by simp only [_root_.zero_mul, single_zero, sum_zero])).trans
@@ -338,6 +345,9 @@ finsupp.semimodule G k
338345
instance [ring k] : module k (add_monoid_algebra k G) :=
339346
finsupp.module G k
340347

348+
-- It is hard to state the equivalent of `distrib_mul_action G (monoid_algebra k G)`
349+
-- because we've never discussed actions of additive groups.
350+
341351
lemma single_mul_single [semiring k] [add_monoid G] {a₁ a₂ : G} {b₁ b₂ : k}:
342352
(single a₁ b₁ : add_monoid_algebra k G) * single a₂ b₂ = single (a₁ + a₂) (b₁ * b₂) :=
343353
(sum_single_index (by simp only [_root_.zero_mul, single_zero, sum_zero])).trans

src/group_theory/group_action.lean

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,15 @@ end
4646

4747
namespace mul_action
4848

49-
variables (α) [monoid α] [mul_action α β]
49+
variables (α) [monoid α]
50+
51+
/-- The regular action of a monoid on itself by left multiplication. -/
52+
def regular : mul_action α α :=
53+
{ smul := λ a₁ a₂, a₁ * a₂,
54+
one_smul := λ a, one_mul a,
55+
mul_smul := λ a₁ a₂ a₃, mul_assoc _ _ _, }
56+
57+
variables [mul_action α β]
5058

5159
def orbit (b : β) := set.range (λ x : α, x • b)
5260

0 commit comments

Comments
 (0)