@@ -918,6 +918,7 @@ def comap_domain {α₁ α₂ γ : Type*} [has_zero γ]
918
918
exact l.mem_support_to_fun (f a),
919
919
end }
920
920
921
+ @[simp]
921
922
lemma comap_domain_apply {α₁ α₂ γ : Type *} [has_zero γ]
922
923
(f : α₁ → α₂) (l : α₂ →₀ γ) (hf : set.inj_on f (f ⁻¹' l.support.to_set)) (a : α₁) :
923
924
comap_domain f l hf a = l (f a) :=
@@ -1323,7 +1324,65 @@ end
1323
1324
end curry_uncurry
1324
1325
1325
1326
section
1327
+ variables [group γ] [mul_action γ α] [add_comm_monoid β]
1326
1328
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
1327
1386
instance [semiring γ] [add_comm_monoid β] [semimodule γ β] : has_scalar γ (α →₀ β) :=
1328
1387
⟨λa v, v.map_range ((•) a) (smul_zero _)⟩
1329
1388
0 commit comments