@@ -548,14 +548,24 @@ lemma single_one_comm [comm_semiring k] [mul_one_class G] (r : k) (f : monoid_al
548
548
by { ext, rw [single_one_mul_apply, mul_single_one_apply, mul_comm] }
549
549
550
550
/-- `finsupp.single 1` as a `ring_hom` -/
551
- @[simps] def single_one_ring_hom [semiring k] [monoid G] : k →+* monoid_algebra k G :=
551
+ @[simps] def single_one_ring_hom [semiring k] [mul_one_class G] : k →+* monoid_algebra k G :=
552
552
{ map_one' := rfl,
553
553
map_mul' := λ x y, by rw [single_add_hom, single_mul_single, one_mul],
554
554
..finsupp.single_add_hom 1 }
555
555
556
+ /-- If `f : G → H` is a multiplicative homomorphism between two monoids, then
557
+ `finsupp.map_domain f` is a ring homomorphism between their monoid algebras. -/
558
+ @[simps]
559
+ def map_domain_ring_hom (k : Type *) {H F : Type *} [semiring k] [monoid G] [monoid H]
560
+ [monoid_hom_class F G H] (f : F) :
561
+ monoid_algebra k G →+* monoid_algebra k H :=
562
+ { map_one' := map_domain_one f,
563
+ map_mul' := λ x y, map_domain_mul f x y,
564
+ ..(finsupp.map_domain.add_monoid_hom f : monoid_algebra k G →+ monoid_algebra k H) }
565
+
556
566
/-- If two ring homomorphisms from `monoid_algebra k G` are equal on all `single a 1`
557
567
and `single 1 b`, then they are equal. -/
558
- lemma ring_hom_ext {R} [semiring k] [monoid G] [semiring R]
568
+ lemma ring_hom_ext {R} [semiring k] [mul_one_class G] [semiring R]
559
569
{f g : monoid_algebra k G →+* R} (h₁ : ∀ b, f (single 1 b) = g (single 1 b))
560
570
(h_of : ∀ a, f (single a 1 ) = g (single a 1 )) : f = g :=
561
571
ring_hom.coe_add_monoid_hom_injective $ add_hom_ext $ λ a b,
@@ -566,7 +576,7 @@ ring_hom.coe_add_monoid_hom_injective $ add_hom_ext $ λ a b,
566
576
and `single 1 b`, then they are equal.
567
577
568
578
See note [partially-applied ext lemmas]. -/
569
- @[ext] lemma ring_hom_ext' {R} [semiring k] [monoid G] [semiring R]
579
+ @[ext] lemma ring_hom_ext' {R} [semiring k] [mul_one_class G] [semiring R]
570
580
{f g : monoid_algebra k G →+* R} (h₁ : f.comp single_one_ring_hom = g.comp single_one_ring_hom)
571
581
(h_of : (f : monoid_algebra k G →* R).comp (of k G) =
572
582
(g : monoid_algebra k G →* R).comp (of k G)) :
@@ -684,6 +694,31 @@ lemma lift_unique (F : monoid_algebra k G →ₐ[k] A) (f : monoid_algebra k G)
684
694
F f = f.sum (λ a b, b • F (single a 1 )) :=
685
695
by conv_lhs { rw lift_unique' F, simp [lift_apply] }
686
696
697
+ /-- If `f : G → H` is a homomorphism between two magmas, then
698
+ `finsupp.map_domain f` is a non-unital algebra homomorphism between their magma algebras. -/
699
+ @[simps]
700
+ def map_domain_non_unital_alg_hom (k A : Type *) [comm_semiring k] [semiring A] [algebra k A]
701
+ {G H F : Type *} [has_mul G] [has_mul H] [mul_hom_class F G H] (f : F) :
702
+ monoid_algebra A G →ₙₐ[k] monoid_algebra A H :=
703
+ { map_mul' := λ x y, map_domain_mul f x y,
704
+ map_smul' := λ r x, map_domain_smul r x,
705
+ ..(finsupp.map_domain.add_monoid_hom f : monoid_algebra A G →+ monoid_algebra A H) }
706
+
707
+ lemma map_domain_algebra_map (k A : Type *) {H F : Type *} [comm_semiring k] [semiring A]
708
+ [algebra k A] [monoid H] [monoid_hom_class F G H] (f : F) (r : k) :
709
+ map_domain f (algebra_map k (monoid_algebra A G) r) =
710
+ algebra_map k (monoid_algebra A H) r :=
711
+ by simp only [coe_algebra_map, map_domain_single, map_one]
712
+
713
+ /-- If `f : G → H` is a multiplicative homomorphism between two monoids, then
714
+ `finsupp.map_domain f` is an algebra homomorphism between their monoid algebras. -/
715
+ @[simps]
716
+ def map_domain_alg_hom (k A : Type *) [comm_semiring k] [semiring A] [algebra k A] {H F : Type *}
717
+ [monoid H] [monoid_hom_class F G H] (f : F) :
718
+ monoid_algebra A G →ₐ[k] monoid_algebra A H :=
719
+ { commutes' := map_domain_algebra_map k A f,
720
+ ..map_domain_ring_hom A f}
721
+
687
722
end lift
688
723
689
724
section
@@ -1211,8 +1246,6 @@ lemma lift_nc_smul {R : Type*} [add_zero_class G] [semiring R] (f : k →+* R)
1211
1246
lift_nc (f : k →+ R) g (c • φ) = f c * lift_nc (f : k →+ R) g φ :=
1212
1247
@monoid_algebra.lift_nc_smul k (multiplicative G) _ _ _ _ f g c φ
1213
1248
1214
- variables {k G}
1215
-
1216
1249
lemma induction_on [add_monoid G] {p : add_monoid_algebra k G → Prop } (f : add_monoid_algebra k G)
1217
1250
(hM : ∀ g, p (of k G (multiplicative.of_add g)))
1218
1251
(hadd : ∀ f g : add_monoid_algebra k G, p f → p g → p (f + g))
@@ -1224,6 +1257,16 @@ begin
1224
1257
simp only [mul_one, to_add_of_add, smul_single', of_apply] },
1225
1258
end
1226
1259
1260
+ /-- If `f : G → H` is an additive homomorphism between two additive monoids, then
1261
+ `finsupp.map_domain f` is a ring homomorphism between their add monoid algebras. -/
1262
+ @[simps]
1263
+ def map_domain_ring_hom (k : Type *) [semiring k] {H F : Type *} [add_monoid G] [add_monoid H]
1264
+ [add_monoid_hom_class F G H] (f : F) :
1265
+ add_monoid_algebra k G →+* add_monoid_algebra k H :=
1266
+ { map_one' := map_domain_one f,
1267
+ map_mul' := λ x y, map_domain_mul f x y,
1268
+ ..(finsupp.map_domain.add_monoid_hom f : monoid_algebra k G →+ monoid_algebra k H) }
1269
+
1227
1270
end misc_theorems
1228
1271
1229
1272
section span
@@ -1503,6 +1546,30 @@ finset.induction_on s rfl $ λ a s has ih, by rw [prod_insert has, ih,
1503
1546
1504
1547
end
1505
1548
1549
+ lemma map_domain_algebra_map {A H F : Type *} [comm_semiring k] [semiring A]
1550
+ [algebra k A] [add_monoid G] [add_monoid H] [add_monoid_hom_class F G H] (f : F) (r : k) :
1551
+ map_domain f (algebra_map k (add_monoid_algebra A G) r) =
1552
+ algebra_map k (add_monoid_algebra A H) r :=
1553
+ by simp only [function.comp_app, map_domain_single, add_monoid_algebra.coe_algebra_map, map_zero]
1554
+
1555
+ /-- If `f : G → H` is a homomorphism between two additive magmas, then `finsupp.map_domain f` is a
1556
+ non-unital algebra homomorphism between their additive magma algebras. -/
1557
+ @[simps]
1558
+ def map_domain_non_unital_alg_hom (k A : Type *) [comm_semiring k] [semiring A] [algebra k A]
1559
+ {G H F : Type *} [has_add G] [has_add H] [add_hom_class F G H] (f : F) :
1560
+ add_monoid_algebra A G →ₙₐ[k] add_monoid_algebra A H :=
1561
+ { map_mul' := λ x y, map_domain_mul f x y,
1562
+ map_smul' := λ r x, map_domain_smul r x,
1563
+ ..(finsupp.map_domain.add_monoid_hom f : monoid_algebra A G →+ monoid_algebra A H) }
1564
+
1565
+ /-- If `f : G → H` is an additive homomorphism between two additive monoids, then
1566
+ `finsupp.map_domain f` is an algebra homomorphism between their add monoid algebras. -/
1567
+ @[simps] def map_domain_alg_hom (k A : Type *) [comm_semiring k] [semiring A] [algebra k A]
1568
+ [add_monoid G] {H F : Type *} [add_monoid H] [add_monoid_hom_class F G H] (f : F) :
1569
+ add_monoid_algebra A G →ₐ[k] add_monoid_algebra A H :=
1570
+ { commutes' := map_domain_algebra_map f,
1571
+ ..map_domain_ring_hom A f}
1572
+
1506
1573
end add_monoid_algebra
1507
1574
1508
1575
variables [comm_semiring R] (k G)
0 commit comments