Monoid algebras #
When the domain of a finsupp
has a multiplicative or additive structure, we can define
a convolution product. To mathematicians this structure is known as the "monoid algebra",
i.e. the finite formal linear combinations over a given semiring of elements of the monoid.
The "group ring" ℤ[G] or the "group algebra" k[G] are typical uses.
In this file we define monoid_algebra k G := G →₀ k
, and add_monoid_algebra k G
in the same way, and then define the convolution product on these.
When the domain is additive, this is used to define polynomials:
polynomial α := add_monoid_algebra ℕ α
mv_polynomial σ α := add_monoid_algebra (σ →₀ ℕ) α
When the domain is multiplicative, e.g. a group, this will be used to define the group ring.
Implementation note #
Unfortunately because additive and multiplicative structures both appear in both cases,
it doesn't appear to be possible to make much use of to_additive
, and we just settle for
saying everything twice.
Similarly, I attempted to just define
add_monoid_algebra k G := monoid_algebra k (multiplicative G)
, but the definitional equality
multiplicative G = G
leaks through everywhere, and seems impossible to use.
Multiplicative monoids #
The monoid algebra over a semiring k
generated by the monoid G
.
It is the type of finite formal k
-linear combinations of terms of G
,
endowed with the convolution product.
Equations
- monoid_algebra k G = (G →₀ k)
The product of f g : monoid_algebra k G
is the finitely supported function
whose value at a
is the sum of f x * g y
over all pairs x, y
such that x * y = a
. (Think of the group ring of a group.)
Equations
- monoid_algebra.has_mul = {mul := λ (f g : monoid_algebra k G), finsupp.sum f (λ (a₁ : G) (b₁ : k), finsupp.sum g (λ (a₂ : G) (b₂ : k), finsupp.single (a₁ * a₂) (b₁ * b₂)))}
Equations
- monoid_algebra.distrib = {mul := has_mul.mul monoid_algebra.has_mul, add := has_add.add (add_zero_class.to_has_add (monoid_algebra k G)), left_distrib := _, right_distrib := _}
Equations
- monoid_algebra.mul_zero_class = {mul := has_mul.mul monoid_algebra.has_mul, zero := 0, zero_mul := _, mul_zero := _}
Equations
The unit of the multiplication is single 1 1
, i.e. the function
that is 1
at 1
and zero elsewhere.
Equations
- monoid_algebra.has_one = {one := finsupp.single 1 1}
Equations
- monoid_algebra.mul_zero_one_class = {one := 1, mul := has_mul.mul monoid_algebra.has_mul, one_mul := _, mul_one := _, zero := mul_zero_class.zero monoid_algebra.mul_zero_class, zero_mul := _, mul_zero := _}
A non-commutative version of monoid_algebra.lift
: given a additive homomorphism f : k →+ R
and a multiplicative monoid homomorphism g : G →* R
, returns the additive homomorphism from
monoid_algebra k G
such that lift_nc f g (single a b) = f b * g a
. If f
is a ring homomorphism
and the range of either f
or g
is in center of R
, then the result is a ring homomorphism. If
R
is a k
-algebra and f = algebra_map k R
, then the result is an algebra homomorphism called
monoid_algebra.lift
.
Equations
- monoid_algebra.lift_nc f g = ⇑finsupp.lift_add_hom (λ (x : G), (add_monoid_hom.mul_right (⇑g x)).comp f)
Semiring structure #
Equations
- monoid_algebra.semiring = {add := has_add.add (distrib.to_has_add (monoid_algebra k G)), add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul finsupp.add_comm_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul monoid_algebra.has_mul, mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := monoid_with_zero.npow._default 1 has_mul.mul monoid_algebra.semiring._proof_10 monoid_algebra.semiring._proof_11, npow_zero' := _, npow_succ' := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _}
Equations
- monoid_algebra.comm_semiring = {add := semiring.add monoid_algebra.semiring, add_assoc := _, zero := semiring.zero monoid_algebra.semiring, zero_add := _, add_zero := _, nsmul := semiring.nsmul monoid_algebra.semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := semiring.mul monoid_algebra.semiring, mul_assoc := _, one := semiring.one monoid_algebra.semiring, one_mul := _, mul_one := _, npow := semiring.npow monoid_algebra.semiring, npow_zero' := _, npow_succ' := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _, mul_comm := _}
Derived instances #
Equations
Equations
Equations
- monoid_algebra.ring = {add := semiring.add monoid_algebra.semiring, add_assoc := _, zero := semiring.zero monoid_algebra.semiring, zero_add := _, add_zero := _, nsmul := semiring.nsmul monoid_algebra.semiring, nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg (sub_neg_monoid.to_has_neg (monoid_algebra k G)), sub := add_comm_group.sub._default semiring.add monoid_algebra.ring._proof_6 semiring.zero monoid_algebra.ring._proof_7 monoid_algebra.ring._proof_8 semiring.nsmul monoid_algebra.ring._proof_9 monoid_algebra.ring._proof_10 has_neg.neg, sub_eq_add_neg := _, gsmul := add_comm_group.gsmul._default semiring.add monoid_algebra.ring._proof_12 semiring.zero monoid_algebra.ring._proof_13 monoid_algebra.ring._proof_14 semiring.nsmul monoid_algebra.ring._proof_15 monoid_algebra.ring._proof_16 has_neg.neg, gsmul_zero' := _, gsmul_succ' := _, gsmul_neg' := _, add_left_neg := _, add_comm := _, mul := semiring.mul monoid_algebra.semiring, mul_assoc := _, one := semiring.one monoid_algebra.semiring, one_mul := _, mul_one := _, npow := semiring.npow monoid_algebra.semiring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _}
Equations
- monoid_algebra.comm_ring = {add := ring.add monoid_algebra.ring, add_assoc := _, zero := ring.zero monoid_algebra.ring, zero_add := _, add_zero := _, nsmul := ring.nsmul monoid_algebra.ring, nsmul_zero' := _, nsmul_succ' := _, neg := ring.neg monoid_algebra.ring, sub := ring.sub monoid_algebra.ring, sub_eq_add_neg := _, gsmul := ring.gsmul monoid_algebra.ring, gsmul_zero' := _, gsmul_succ' := _, gsmul_neg' := _, add_left_neg := _, add_comm := _, mul := ring.mul monoid_algebra.ring, mul_assoc := _, one := ring.one monoid_algebra.ring, one_mul := _, mul_one := _, npow := ring.npow monoid_algebra.ring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, mul_comm := _}
Equations
Equations
Like finsupp.map_domain_add
, but for the convolutive multiplication we define in this file
Embedding of a monoid into its monoid algebra.
Equations
- monoid_algebra.of k G = {to_fun := λ (a : G), finsupp.single a 1, map_one' := _, map_mul' := _}
Algebra structure #
finsupp.single 1
as a ring_hom
Equations
- monoid_algebra.single_one_ring_hom = {to_fun := (finsupp.single_add_hom 1).to_fun, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
If two ring homomorphisms from monoid_algebra k G
are equal on all single a 1
and single 1 b
, then they are equal.
If two ring homomorphisms from monoid_algebra k G
are equal on all single a 1
and single 1 b
, then they are equal.
The instance algebra k (monoid_algebra A G)
whenever we have algebra k A
.
In particular this provides the instance algebra k (monoid_algebra k G)
.
Equations
- monoid_algebra.algebra = {to_has_scalar := monoid_algebra.has_scalar algebra.to_module, to_ring_hom := {to_fun := (monoid_algebra.single_one_ring_hom.comp (algebra_map k A)).to_fun, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}, commutes' := _, smul_def' := _}
finsupp.single 1
as a alg_hom
A k
-algebra homomorphism from monoid_algebra k G
is uniquely defined by its
values on the functions single a 1
.
Any monoid homomorphism G →* A
can be lifted to an algebra homomorphism
monoid_algebra k G →ₐ[k] A
.
Equations
- monoid_algebra.lift k G A = {to_fun := λ (F : G →* A), monoid_algebra.lift_nc_alg_hom (algebra.of_id k A) F _, inv_fun := λ (f : monoid_algebra k G →ₐ[k] A), ↑f.comp (monoid_algebra.of k G), left_inv := _, right_inv := _}
Decomposition of a k
-algebra homomorphism from monoid_algebra k G
by
its values on F (single a 1)
.
When V
is a k[G]
-module, multiplication by a group element g
is a k
-linear map.
Equations
- monoid_algebra.group_smul.linear_map k V g = {to_fun := λ (v : V), finsupp.single g 1 • v, map_add' := _, map_smul' := _}
Build a k[G]
-linear map from a k
-linear map and evidence that it is G
-equivariant.
An element of monoid_algebra R M
is in the subalgebra generated by its support.
Additive monoids #
The monoid algebra over a semiring k
generated by the additive monoid G
.
It is the type of finite formal k
-linear combinations of terms of G
,
endowed with the convolution product.
Equations
- add_monoid_algebra k G = (G →₀ k)
The product of f g : add_monoid_algebra k G
is the finitely supported function
whose value at a
is the sum of f x * g y
over all pairs x, y
such that x + y = a
. (Think of the product of multivariate
polynomials where α
is the additive monoid of monomial exponents.)
Equations
- add_monoid_algebra.has_mul = {mul := λ (f g : add_monoid_algebra k G), finsupp.sum f (λ (a₁ : G) (b₁ : k), finsupp.sum g (λ (a₂ : G) (b₂ : k), finsupp.single (a₁ + a₂) (b₁ * b₂)))}
Equations
- add_monoid_algebra.distrib = {mul := has_mul.mul add_monoid_algebra.has_mul, add := has_add.add (add_zero_class.to_has_add (add_monoid_algebra k G)), left_distrib := _, right_distrib := _}
Equations
- add_monoid_algebra.mul_zero_class = {mul := has_mul.mul add_monoid_algebra.has_mul, zero := 0, zero_mul := _, mul_zero := _}
The unit of the multiplication is single 1 1
, i.e. the function
that is 1
at 0
and zero elsewhere.
Equations
Equations
Equations
- add_monoid_algebra.mul_zero_one_class = {one := 1, mul := has_mul.mul add_monoid_algebra.has_mul, one_mul := _, mul_one := _, zero := mul_zero_class.zero add_monoid_algebra.mul_zero_class, zero_mul := _, mul_zero := _}
A non-commutative version of add_monoid_algebra.lift
: given a additive homomorphism f : k →+ R
and a multiplicative monoid homomorphism g : multiplicative G →* R
, returns the additive
homomorphism from add_monoid_algebra k G
such that lift_nc f g (single a b) = f b * g a
. If f
is a ring homomorphism and the range of either f
or g
is in center of R
, then the result is a
ring homomorphism. If R
is a k
-algebra and f = algebra_map k R
, then the result is an algebra
homomorphism called add_monoid_algebra.lift
.
Equations
- add_monoid_algebra.lift_nc f g = ⇑finsupp.lift_add_hom (λ (x : G), (add_monoid_hom.mul_right (⇑g (⇑multiplicative.of_add x))).comp f)
Semiring structure #
Equations
Equations
- add_monoid_algebra.semiring = {add := has_add.add (distrib.to_has_add (add_monoid_algebra k G)), add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := λ (n : ℕ) (f : add_monoid_algebra k G), n • f, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul add_monoid_algebra.has_mul, mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := monoid_with_zero.npow._default 1 has_mul.mul add_monoid_algebra.semiring._proof_10 add_monoid_algebra.semiring._proof_11, npow_zero' := _, npow_succ' := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _}
lift_nc
as a ring_hom
, for when f
and g
commute
Equations
- add_monoid_algebra.comm_semiring = {add := semiring.add add_monoid_algebra.semiring, add_assoc := _, zero := semiring.zero add_monoid_algebra.semiring, zero_add := _, add_zero := _, nsmul := semiring.nsmul add_monoid_algebra.semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := semiring.mul add_monoid_algebra.semiring, mul_assoc := _, one := semiring.one add_monoid_algebra.semiring, one_mul := _, mul_one := _, npow := semiring.npow add_monoid_algebra.semiring, npow_zero' := _, npow_succ' := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _, mul_comm := _}
Derived instances #
Equations
Equations
- add_monoid_algebra.ring = {add := semiring.add add_monoid_algebra.semiring, add_assoc := _, zero := semiring.zero add_monoid_algebra.semiring, zero_add := _, add_zero := _, nsmul := semiring.nsmul add_monoid_algebra.semiring, nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg (sub_neg_monoid.to_has_neg (add_monoid_algebra k G)), sub := has_sub.sub (sub_neg_monoid.to_has_sub (add_monoid_algebra k G)), sub_eq_add_neg := _, gsmul := add_comm_group.gsmul._default semiring.add add_monoid_algebra.ring._proof_7 semiring.zero add_monoid_algebra.ring._proof_8 add_monoid_algebra.ring._proof_9 semiring.nsmul add_monoid_algebra.ring._proof_10 add_monoid_algebra.ring._proof_11 has_neg.neg, gsmul_zero' := _, gsmul_succ' := _, gsmul_neg' := _, add_left_neg := _, add_comm := _, mul := semiring.mul add_monoid_algebra.semiring, mul_assoc := _, one := semiring.one add_monoid_algebra.semiring, one_mul := _, mul_one := _, npow := semiring.npow add_monoid_algebra.semiring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _}
Equations
- add_monoid_algebra.comm_ring = {add := ring.add add_monoid_algebra.ring, add_assoc := _, zero := ring.zero add_monoid_algebra.ring, zero_add := _, add_zero := _, nsmul := ring.nsmul add_monoid_algebra.ring, nsmul_zero' := _, nsmul_succ' := _, neg := ring.neg add_monoid_algebra.ring, sub := ring.sub add_monoid_algebra.ring, sub_eq_add_neg := _, gsmul := ring.gsmul add_monoid_algebra.ring, gsmul_zero' := _, gsmul_succ' := _, gsmul_neg' := _, add_left_neg := _, add_comm := _, mul := ring.mul add_monoid_algebra.ring, mul_assoc := _, one := ring.one add_monoid_algebra.ring, one_mul := _, mul_one := _, npow := ring.npow add_monoid_algebra.ring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, mul_comm := _}
Equations
It is hard to state the equivalent of distrib_mul_action G (add_monoid_algebra k G)
because we've never discussed actions of additive groups.
Like finsupp.map_domain_add
, but for the convolutive multiplication we define in this file
Embedding of a monoid into its monoid algebra.
Equations
- add_monoid_algebra.of k G = {to_fun := λ (a : multiplicative G), finsupp.single a 1, map_one' := _, map_mul' := _}
Embedding of a monoid into its monoid algebra, having G
as source.
Equations
- add_monoid_algebra.of' k G = λ (a : G), finsupp.single a 1
An element of add_monoid_algebra R M
is in the submodule generated by its support.
An element of add_monoid_algebra R M
is in the subalgebra generated by its support, using
unbundled inclusion.
Conversions between add_monoid_algebra
and monoid_algebra
#
While we were not able to define add_monoid_algebra k G = monoid_algebra k (multiplicative G)
due
to definitional inconveniences, we can still show the types are isomorphic.
TODO: with the new definitional nsmul
, there is a direct equality here, so this paragraph could be
improved.
The equivalence between add_monoid_algebra
and monoid_algebra
in terms of
multiplicative
Equations
- add_monoid_algebra.to_multiplicative k G = {to_fun := (finsupp.dom_congr multiplicative.of_add).to_fun, inv_fun := (finsupp.dom_congr multiplicative.of_add).inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _}
The equivalence between monoid_algebra
and add_monoid_algebra
in terms of additive
Equations
- monoid_algebra.to_additive k G = {to_fun := (finsupp.dom_congr additive.of_mul).to_fun, inv_fun := (finsupp.dom_congr additive.of_mul).inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _}
Algebra structure #
finsupp.single 0
as a ring_hom
Equations
- add_monoid_algebra.single_zero_ring_hom = {to_fun := (finsupp.single_add_hom 0).to_fun, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
If two ring homomorphisms from add_monoid_algebra k G
are equal on all single a 1
and single 0 b
, then they are equal.
If two ring homomorphisms from add_monoid_algebra k G
are equal on all single a 1
and single 0 b
, then they are equal.
The instance algebra R (add_monoid_algebra k G)
whenever we have algebra R k
.
In particular this provides the instance algebra k (add_monoid_algebra k G)
.
Equations
- add_monoid_algebra.algebra = {to_has_scalar := add_monoid_algebra.has_scalar algebra.to_module, to_ring_hom := {to_fun := (add_monoid_algebra.single_zero_ring_hom.comp (algebra_map R k)).to_fun, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}, commutes' := _, smul_def' := _}
finsupp.single 0
as a alg_hom
A k
-algebra homomorphism from monoid_algebra k G
is uniquely defined by its
values on the functions single a 1
.
Any monoid homomorphism G →* A
can be lifted to an algebra homomorphism
monoid_algebra k G →ₐ[k] A
.
Equations
- add_monoid_algebra.lift k G A = {to_fun := λ (F : multiplicative G →* A), {to_fun := ⇑(add_monoid_algebra.lift_nc_alg_hom (algebra.of_id k A) F _), map_one' := _, map_mul' := _, map_zero' := _, map_add' := _, commutes' := _}, inv_fun := λ (f : add_monoid_algebra k G →ₐ[k] A), ↑f.comp (add_monoid_algebra.of k G), left_inv := _, right_inv := _}
Decomposition of a k
-algebra homomorphism from monoid_algebra k G
by
its values on F (single a 1)
.
The algebra equivalence between add_monoid_algebra
and monoid_algebra
in terms of
multiplicative
.
Equations
- add_monoid_algebra.to_multiplicative_alg_equiv k G = {to_fun := (add_monoid_algebra.to_multiplicative k G).to_fun, inv_fun := (add_monoid_algebra.to_multiplicative k G).inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _, commutes' := _}
The algebra equivalence between monoid_algebra
and add_monoid_algebra
in terms of
additive
.
Equations
- monoid_algebra.to_additive_alg_equiv k G = {to_fun := (monoid_algebra.to_additive k G).to_fun, inv_fun := (monoid_algebra.to_additive k G).inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _, commutes' := _}