@@ -36,6 +36,7 @@ namespace MonoidAlgebra
3636variable [CommSemiring R] [Semiring A] [Bialgebra R A] [Monoid M] [Monoid N] [Monoid O]
3737
3838variable (R A M) in
39+ @[to_additive (dont_translate := R A) (relevant_arg := M)]
3940instance instBialgebra : Bialgebra R A[M] where
4041 counit_one := by simp only [one_def, counit_single, Bialgebra.counit_one]
4142 mul_compr₂_counit := by ext; simp
@@ -51,70 +52,37 @@ instance instBialgebra : Bialgebra R A[M] where
5152 LinearMap.compl₁₂_apply, LinearMap.coe_sum, Finset.sum_apply,
5253 Finset.sum_comm (s := (Coalgebra.Repr.arbitrary R b).index)]
5354
55+ -- TODO: Generalise to `A[M] →ₐc[R] A[N]` under `Bialgebra R A`
56+ variable (R) [AddMonoid M] [AddMonoid N] in
57+ /-- If `f : M → N` is a monoid hom, then `AddMonoidAlgebra.mapDomain f` is a bialgebra hom between
58+ their additive monoid algebras. -/
59+ noncomputable def _root_.AddMonoidAlgebra.mapDomainBialgHom (f : M →+ N) :
60+ AddMonoidAlgebra R M →ₐc[R] AddMonoidAlgebra R N :=
61+ .ofAlgHom (AddMonoidAlgebra.mapDomainAlgHom R R f) (by ext; simp) (by ext; simp)
62+
5463-- TODO: Generalise to `A[M] →ₐc[R] A[N]` under `Bialgebra R A`
5564variable (R) in
5665/-- If `f : M → N` is a monoid hom, then `MonoidAlgebra.mapDomain f` is a bialgebra hom between
5766their monoid algebras. -/
58- @[simps!]
67+ @[to_additive existing (attr := simps!) ]
5968noncomputable def mapDomainBialgHom (f : M →* N) : R[M] →ₐc[R] R[N] :=
6069 .ofAlgHom (mapDomainAlgHom R R f) (by ext; simp) (by ext; simp)
6170
62- @[simp] lemma mapDomainBialgHom_id : mapDomainBialgHom R (.id M) = .id R R[M] := by ext; simp
71+ @[to_additive (attr := simp)]
72+ lemma mapDomainBialgHom_id : mapDomainBialgHom R (.id M) = .id R R[M] := by ext; simp
6373
64- @[simp]
74+ @[to_additive (attr := simp) ]
6575lemma mapDomainBialgHom_comp (f : N →* O) (g : M →* N) :
6676 mapDomainBialgHom R (f.comp g) = (mapDomainBialgHom R f).comp (mapDomainBialgHom R g) := by
6777 ext; simp [Finsupp.mapDomain_comp]
6878
79+ @[to_additive]
6980lemma mapDomainBialgHom_mapDomainBialgHom (f : N →* O) (g : M →* N) (x : R[M]) :
7081 mapDomainBialgHom R f (mapDomainBialgHom R g x) = mapDomainBialgHom R (f.comp g) x := by
7182 ext; simp
7283
7384end MonoidAlgebra
7485
75- namespace AddMonoidAlgebra
76- variable [CommSemiring R] [Semiring A] [Bialgebra R A] [AddMonoid M] [AddMonoid N] [AddMonoid O]
77-
78- variable (R A M) in
79- instance instBialgebra : Bialgebra R A[M] where
80- counit_one := by simp only [one_def, counit_single, Bialgebra.counit_one]
81- mul_compr₂_counit := by ext; simp [single_mul_single]
82- comul_one := by
83- simp only [one_def, comul_single, Bialgebra.comul_one, Algebra.TensorProduct.one_def,
84- TensorProduct.map_tmul, lsingle_apply]
85- mul_compr₂_comul := by
86- ext a b c d
87- simp only [Function.comp_apply, LinearMap.coe_comp, LinearMap.compr₂_apply,
88- LinearMap.mul_apply', single_mul_single, comul_single, Bialgebra.comul_mul,
89- ← (Coalgebra.Repr.arbitrary R b).eq, ← (Coalgebra.Repr.arbitrary R d).eq, Finset.sum_mul_sum,
90- Algebra.TensorProduct.tmul_mul_tmul, map_sum, TensorProduct.map_tmul, lsingle_apply,
91- LinearMap.compl₁₂_apply, LinearMap.coe_sum, Finset.sum_apply,
92- Finset.sum_comm (s := (Coalgebra.Repr.arbitrary R b).index)]
93-
94- -- TODO: Generalise to `A[M] →ₐc[R] A[N]` under `Bialgebra R A`
95- variable (R) in
96- /-- If `f : M → N` is a monoid hom, then `AddMonoidAlgebra.mapDomain f` is a bialgebra hom between
97- their monoid algebras. -/
98- @[simps]
99- noncomputable def mapDomainBialgHom (f : M →+ N) : R[M] →ₐc[R] R[N] where
100- __ := mapDomainAlgHom R R f
101- map_smul' m x := by simp
102- counit_comp := by ext; simp
103- map_comp_comul := by ext; simp
104-
105- @[simp] lemma mapDomainBialgHom_id : mapDomainBialgHom R (.id M) = .id _ _ := by ext; simp
106-
107- @[simp]
108- lemma mapDomainBialgHom_comp (f : N →+ O) (g : M →+ N) :
109- mapDomainBialgHom R (f.comp g) = (mapDomainBialgHom R f).comp (mapDomainBialgHom R g) := by
110- ext; simp
111-
112- lemma mapDomainBialgHom_mapDomainBialgHom (f : N →+ O) (g : M →+ N) (x : R[M]) :
113- mapDomainBialgHom R f (mapDomainBialgHom R g x) = mapDomainBialgHom R (f.comp g) x := by
114- ext; simp
115-
116- end AddMonoidAlgebra
117-
11886namespace LaurentPolynomial
11987
12088open AddMonoidAlgebra
0 commit comments