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_polynominal σ α := 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.
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₂)))}
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.semiring = {add := add_comm_monoid.add finsupp.add_comm_monoid, add_assoc := _, zero := add_comm_monoid.zero finsupp.add_comm_monoid, zero_add := _, add_zero := _, add_comm := _, mul := has_mul.mul monoid_algebra.has_mul, mul_assoc := _, one := 1, one_mul := _, mul_one := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _}
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' := _}
Equations
- monoid_algebra.comm_semiring = {add := semiring.add monoid_algebra.semiring, add_assoc := _, zero := semiring.zero monoid_algebra.semiring, zero_add := _, add_zero := _, add_comm := _, mul := semiring.mul monoid_algebra.semiring, mul_assoc := _, one := semiring.one monoid_algebra.semiring, one_mul := _, mul_one := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _, mul_comm := _}
Equations
Equations
- monoid_algebra.ring = {add := semiring.add monoid_algebra.semiring, add_assoc := _, zero := semiring.zero monoid_algebra.semiring, zero_add := _, add_zero := _, neg := has_neg.neg monoid_algebra.has_neg, add_left_neg := _, add_comm := _, mul := semiring.mul monoid_algebra.semiring, mul_assoc := _, one := semiring.one monoid_algebra.semiring, one_mul := _, mul_one := _, 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 := _, neg := ring.neg monoid_algebra.ring, add_left_neg := _, add_comm := _, mul := ring.mul monoid_algebra.ring, mul_assoc := _, one := ring.one monoid_algebra.ring, one_mul := _, mul_one := _, left_distrib := _, right_distrib := _, mul_comm := _}
Equations
Equations
As a preliminary to defining the k
-algebra structure on monoid_algebra k G
,
we define the underlying ring homomorphism.
In fact, we do this in more generality, providing the ring homomorphism
k →+* monoid_algebra A G
given any ring homomorphism k →+* A
.
Equations
- monoid_algebra.algebra_map' f = {to_fun := λ (x : k), finsupp.single 1 (⇑f x), map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
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 := finsupp.has_scalar algebra.to_semimodule, to_ring_hom := {to_fun := (monoid_algebra.algebra_map' (algebra_map k A)).to_fun, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}, commutes' := _, smul_def' := _}
Any monoid homomorphism G →* R
can be lifted to an algebra homomorphism
monoid_algebra k G →ₐ[k] R
.
Equations
- monoid_algebra.lift k G R = {to_fun := λ (F : G →* R), {to_fun := λ (f : monoid_algebra k G), finsupp.sum f (λ (a : G) (b : k), b • ⇑F a), map_one' := _, map_mul' := _, map_zero' := _, map_add' := _, commutes' := _}, inv_fun := λ (f : monoid_algebra k G →ₐ[k] R), ↑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)
.
A k
-algebra homomorphism from monoid_algebra k G
is uniquely defined by its
values on the functions 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 : semimodule.restrict_scalars k (monoid_algebra k G) 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.
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₂)))}
The unit of the multiplication is single 1 1
, i.e. the function
that is 1
at 0
and zero elsewhere.
Equations
Equations
- add_monoid_algebra.semiring = {add := add_comm_monoid.add finsupp.add_comm_monoid, add_assoc := _, zero := add_comm_monoid.zero finsupp.add_comm_monoid, zero_add := _, add_zero := _, add_comm := _, mul := has_mul.mul add_monoid_algebra.has_mul, mul_assoc := _, one := 1, one_mul := _, mul_one := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _}
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' := _}
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 := _, add_comm := _, mul := semiring.mul add_monoid_algebra.semiring, mul_assoc := _, one := semiring.one add_monoid_algebra.semiring, one_mul := _, mul_one := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _, mul_comm := _}
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 := _, neg := has_neg.neg add_monoid_algebra.has_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 := _, 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 := _, neg := ring.neg add_monoid_algebra.ring, 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 := _, left_distrib := _, right_distrib := _, mul_comm := _}
Equations
Equations
As a preliminary to defining the k
-algebra structure on add_monoid_algebra k G
,
we define the underlying ring homomorphism.
In fact, we do this in more generality, providing the ring homomorphism
k →+* add_monoid_algebra A G
given any ring homomorphism k →+* A
.
Equations
- add_monoid_algebra.algebra_map' f = {to_fun := λ (x : k), finsupp.single 0 (⇑f x), map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
The instance algebra k (add_monoid_algebra A G)
whenever we have algebra k A
.
In particular this provides the instance algebra k (add_monoid_algebra k G)
.
Equations
- add_monoid_algebra.algebra = {to_has_scalar := finsupp.has_scalar algebra.to_semimodule, to_ring_hom := {to_fun := (add_monoid_algebra.algebra_map' (algebra_map k A)).to_fun, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}, commutes' := _, smul_def' := _}
Any monoid homomorphism multiplicative G →* R
can be lifted to an algebra homomorphism
add_monoid_algebra k G →ₐ[k] R
.
Equations
- add_monoid_algebra.lift = {to_fun := λ (F : multiplicative G →* R), {to_fun := λ (f : add_monoid_algebra k G), finsupp.sum f (λ (a : G) (b : k), b • ⇑F a), map_one' := _, map_mul' := _, map_zero' := _, map_add' := _, commutes' := _}, inv_fun := λ (f : add_monoid_algebra k G →ₐ[k] R), ↑↑f.comp (add_monoid_algebra.of k G), left_inv := _, right_inv := _}