Monoid algebras #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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 fact the construction of the "monoid algebra" makes sense when G
is not even a monoid, but
merely a magma, i.e., when G
carries a multiplication which is not required to satisfy any
conditions at all. In this case the construction yields a not-necessarily-unital,
not-necessarily-associative algebra but it is still adjoint to the forgetful functor from such
algebras to magmas, and we prove this as monoid_algebra.lift_magma
.
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)
Instances for monoid_algebra
- monoid_algebra.inhabited
- monoid_algebra.add_comm_monoid
- monoid_algebra.has_coe_to_fun
- monoid_algebra.has_mul
- monoid_algebra.non_unital_non_assoc_semiring
- monoid_algebra.non_unital_semiring
- monoid_algebra.has_one
- monoid_algebra.non_assoc_semiring
- monoid_algebra.semiring
- monoid_algebra.non_unital_comm_semiring
- monoid_algebra.nontrivial
- monoid_algebra.comm_semiring
- monoid_algebra.unique
- monoid_algebra.add_comm_group
- monoid_algebra.non_unital_non_assoc_ring
- monoid_algebra.non_unital_ring
- monoid_algebra.non_assoc_ring
- monoid_algebra.ring
- monoid_algebra.non_unital_comm_ring
- monoid_algebra.comm_ring
- monoid_algebra.smul_zero_class
- monoid_algebra.distrib_smul
- monoid_algebra.distrib_mul_action
- monoid_algebra.module
- monoid_algebra.has_faithful_smul
- monoid_algebra.is_scalar_tower
- monoid_algebra.smul_comm_class
- monoid_algebra.is_central_scalar
- monoid_algebra.is_scalar_tower_self
- monoid_algebra.smul_comm_class_self
- monoid_algebra.smul_comm_class_symm_self
- monoid_algebra.algebra
- monoid_algebra.finite_type_of_fg
Equations
A non-commutative version of monoid_algebra.lift
: given a additive homomorphism f : k →+ R
and a 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)
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.non_unital_non_assoc_semiring = {add := has_add.add (add_zero_class.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, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _}
Equations
- monoid_algebra.non_unital_semiring = {add := has_add.add (distrib.to_has_add (monoid_algebra k G)), add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := non_unital_non_assoc_semiring.nsmul monoid_algebra.non_unital_non_assoc_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul monoid_algebra.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _}
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.non_assoc_semiring = {add := has_add.add (distrib.to_has_add (monoid_algebra k G)), add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := non_unital_non_assoc_semiring.nsmul monoid_algebra.non_unital_non_assoc_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul monoid_algebra.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, one := 1, one_mul := _, mul_one := _, nat_cast := λ (n : ℕ), finsupp.single 1 ↑n, nat_cast_zero := _, nat_cast_succ := _}
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 := non_unital_semiring.nsmul monoid_algebra.non_unital_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul monoid_algebra.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := 1, one_mul := _, mul_one := _, nat_cast := non_assoc_semiring.nat_cast monoid_algebra.non_assoc_semiring, nat_cast_zero := _, nat_cast_succ := _, npow := monoid_with_zero.npow._default 1 has_mul.mul monoid_algebra.semiring._proof_16 monoid_algebra.semiring._proof_17, npow_zero' := _, npow_succ' := _}
Equations
- monoid_algebra.non_unital_comm_semiring = {add := non_unital_semiring.add monoid_algebra.non_unital_semiring, add_assoc := _, zero := non_unital_semiring.zero monoid_algebra.non_unital_semiring, zero_add := _, add_zero := _, nsmul := non_unital_semiring.nsmul monoid_algebra.non_unital_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := non_unital_semiring.mul monoid_algebra.non_unital_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, mul_comm := _}
Derived instances #
Equations
- monoid_algebra.comm_semiring = {add := non_unital_comm_semiring.add monoid_algebra.non_unital_comm_semiring, add_assoc := _, zero := non_unital_comm_semiring.zero monoid_algebra.non_unital_comm_semiring, zero_add := _, add_zero := _, nsmul := non_unital_comm_semiring.nsmul monoid_algebra.non_unital_comm_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := non_unital_comm_semiring.mul monoid_algebra.non_unital_comm_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := semiring.one monoid_algebra.semiring, one_mul := _, mul_one := _, nat_cast := semiring.nat_cast monoid_algebra.semiring, nat_cast_zero := _, nat_cast_succ := _, npow := semiring.npow monoid_algebra.semiring, npow_zero' := _, npow_succ' := _, mul_comm := _}
Equations
Equations
- monoid_algebra.non_unital_non_assoc_ring = {add := add_comm_group.add monoid_algebra.add_comm_group, add_assoc := _, zero := add_comm_group.zero monoid_algebra.add_comm_group, zero_add := _, add_zero := _, nsmul := add_comm_group.nsmul monoid_algebra.add_comm_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg monoid_algebra.add_comm_group, sub := add_comm_group.sub monoid_algebra.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul monoid_algebra.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := non_unital_non_assoc_semiring.mul monoid_algebra.non_unital_non_assoc_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _}
Equations
- monoid_algebra.non_unital_ring = {add := add_comm_group.add monoid_algebra.add_comm_group, add_assoc := _, zero := add_comm_group.zero monoid_algebra.add_comm_group, zero_add := _, add_zero := _, nsmul := add_comm_group.nsmul monoid_algebra.add_comm_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg monoid_algebra.add_comm_group, sub := add_comm_group.sub monoid_algebra.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul monoid_algebra.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := non_unital_semiring.mul monoid_algebra.non_unital_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _}
Equations
- monoid_algebra.non_assoc_ring = {add := add_comm_group.add monoid_algebra.add_comm_group, add_assoc := _, zero := add_comm_group.zero monoid_algebra.add_comm_group, zero_add := _, add_zero := _, nsmul := add_comm_group.nsmul monoid_algebra.add_comm_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg monoid_algebra.add_comm_group, sub := add_comm_group.sub monoid_algebra.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul monoid_algebra.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := non_assoc_semiring.mul monoid_algebra.non_assoc_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, one := non_assoc_semiring.one monoid_algebra.non_assoc_semiring, one_mul := _, mul_one := _, nat_cast := non_assoc_semiring.nat_cast monoid_algebra.non_assoc_semiring, nat_cast_zero := _, nat_cast_succ := _, int_cast := λ (z : ℤ), finsupp.single 1 ↑z, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _}
Equations
- monoid_algebra.ring = {add := non_assoc_ring.add monoid_algebra.non_assoc_ring, add_assoc := _, zero := non_assoc_ring.zero monoid_algebra.non_assoc_ring, zero_add := _, add_zero := _, nsmul := non_assoc_ring.nsmul monoid_algebra.non_assoc_ring, nsmul_zero' := _, nsmul_succ' := _, neg := non_assoc_ring.neg monoid_algebra.non_assoc_ring, sub := non_assoc_ring.sub monoid_algebra.non_assoc_ring, sub_eq_add_neg := _, zsmul := non_assoc_ring.zsmul monoid_algebra.non_assoc_ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, int_cast := non_assoc_ring.int_cast monoid_algebra.non_assoc_ring, nat_cast := non_assoc_ring.nat_cast monoid_algebra.non_assoc_ring, one := non_assoc_ring.one monoid_algebra.non_assoc_ring, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := non_assoc_ring.mul monoid_algebra.non_assoc_ring, mul_assoc := _, one_mul := _, mul_one := _, npow := semiring.npow monoid_algebra.semiring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _}
Equations
- monoid_algebra.non_unital_comm_ring = {add := non_unital_comm_semiring.add monoid_algebra.non_unital_comm_semiring, add_assoc := _, zero := non_unital_comm_semiring.zero monoid_algebra.non_unital_comm_semiring, zero_add := _, add_zero := _, nsmul := non_unital_comm_semiring.nsmul monoid_algebra.non_unital_comm_semiring, nsmul_zero' := _, nsmul_succ' := _, neg := non_unital_ring.neg monoid_algebra.non_unital_ring, sub := non_unital_ring.sub monoid_algebra.non_unital_ring, sub_eq_add_neg := _, zsmul := non_unital_ring.zsmul monoid_algebra.non_unital_ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := non_unital_comm_semiring.mul monoid_algebra.non_unital_comm_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, mul_comm := _}
Equations
- monoid_algebra.comm_ring = {add := non_unital_comm_ring.add monoid_algebra.non_unital_comm_ring, add_assoc := _, zero := non_unital_comm_ring.zero monoid_algebra.non_unital_comm_ring, zero_add := _, add_zero := _, nsmul := non_unital_comm_ring.nsmul monoid_algebra.non_unital_comm_ring, nsmul_zero' := _, nsmul_succ' := _, neg := non_unital_comm_ring.neg monoid_algebra.non_unital_comm_ring, sub := non_unital_comm_ring.sub monoid_algebra.non_unital_comm_ring, sub_eq_add_neg := _, zsmul := non_unital_comm_ring.zsmul monoid_algebra.non_unital_comm_ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, int_cast := ring.int_cast monoid_algebra.ring, nat_cast := ring.nat_cast monoid_algebra.ring, one := ring.one monoid_algebra.ring, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := non_unital_comm_ring.mul monoid_algebra.non_unital_comm_ring, mul_assoc := _, one_mul := _, mul_one := _, npow := ring.npow monoid_algebra.ring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, mul_comm := _}
Equations
Equations
Equations
This is not an instance as it conflicts with monoid_algebra.distrib_mul_action
when G = kˣ
.
Like finsupp.map_domain_zero
, but for the 1
we define in this file
Like finsupp.map_domain_add
, but for the convolutive multiplication we define in this file
The embedding of a magma into its magma algebra.
Equations
- monoid_algebra.of_magma k G = {to_fun := λ (a : G), finsupp.single a 1, map_mul' := _}
The embedding of a unital magma into its magma algebra.
Equations
- monoid_algebra.of k G = {to_fun := λ (a : G), finsupp.single a 1, map_one' := _, map_mul' := _}
finsupp.single
as a monoid_hom
from the product type into the monoid algebra.
Note the order of the elements of the product are reversed compared to the arguments of
finsupp.single
.
Equations
- monoid_algebra.single_hom = {to_fun := λ (a : k × G), finsupp.single a.snd a.fst, map_one' := _, map_mul' := _}
Non-unital, non-associative algebra structure #
Note that if k
is a comm_semiring
then we have smul_comm_class k k k
and so we can take
R = k
in the below. In other words, if the coefficients are commutative amongst themselves, they
also commute with the algebra multiplication.
A non_unital k
-algebra homomorphism from monoid_algebra k G
is uniquely defined by its
values on the functions single a 1
.
The functor G ↦ monoid_algebra k G
, from the category of magmas to the category of non-unital,
non-associative algebras over k
is adjoint to the forgetful functor in the other direction.
Equations
- monoid_algebra.lift_magma k = {to_fun := λ (f : G →ₙ* A), {to_fun := λ (a : monoid_algebra k G), finsupp.sum a (λ (m : G) (t : k), t • ⇑f m), map_smul' := _, map_zero' := _, map_add' := _, map_mul' := _}, inv_fun := λ (F : monoid_algebra k G →ₙₐ[k] A), F.to_mul_hom.comp (monoid_algebra.of_magma k G), left_inv := _, right_inv := _}
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 f : G → H
is a multiplicative homomorphism between two monoids, then
finsupp.map_domain f
is a ring homomorphism between their monoid algebras.
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_smul := smul_zero_class.to_has_smul monoid_algebra.smul_zero_class, 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)
.
If f : G → H
is a homomorphism between two magmas, then
finsupp.map_domain f
is a non-unital algebra homomorphism between their magma algebras.
If f : G → H
is a multiplicative homomorphism between two monoids, then
finsupp.map_domain f
is an algebra homomorphism between their monoid algebras.
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.
The opposite of an monoid_algebra R I
equivalent as a ring to
the monoid_algebra Rᵐᵒᵖ Iᵐᵒᵖ
over the opposite ring, taking elements to their opposite.
Equations
- monoid_algebra.op_ring_equiv = {to_fun := (mul_opposite.op_add_equiv.symm.trans ((finsupp.map_range.add_equiv mul_opposite.op_add_equiv).trans (finsupp.dom_congr mul_opposite.op_equiv))).to_fun, inv_fun := (mul_opposite.op_add_equiv.symm.trans ((finsupp.map_range.add_equiv mul_opposite.op_add_equiv).trans (finsupp.dom_congr mul_opposite.op_equiv))).inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _}
A submodule over k
which is stable under scalar multiplication by elements of G
is a
submodule over monoid_algebra k G
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)
Instances for add_monoid_algebra
- add_monoid_algebra.inhabited
- add_monoid_algebra.add_comm_monoid
- add_monoid_algebra.has_coe_to_fun
- add_monoid_algebra.has_mul
- add_monoid_algebra.non_unital_non_assoc_semiring
- add_monoid_algebra.has_one
- add_monoid_algebra.non_unital_semiring
- add_monoid_algebra.non_assoc_semiring
- add_monoid_algebra.smul_zero_class
- add_monoid_algebra.semiring
- add_monoid_algebra.non_unital_comm_semiring
- add_monoid_algebra.nontrivial
- add_monoid_algebra.comm_semiring
- add_monoid_algebra.unique
- add_monoid_algebra.add_comm_group
- add_monoid_algebra.non_unital_non_assoc_ring
- add_monoid_algebra.non_unital_ring
- add_monoid_algebra.non_assoc_ring
- add_monoid_algebra.ring
- add_monoid_algebra.non_unital_comm_ring
- add_monoid_algebra.comm_ring
- add_monoid_algebra.distrib_smul
- add_monoid_algebra.distrib_mul_action
- add_monoid_algebra.has_faithful_smul
- add_monoid_algebra.module
- add_monoid_algebra.is_scalar_tower
- add_monoid_algebra.smul_comm_class
- add_monoid_algebra.is_central_scalar
- add_monoid_algebra.is_scalar_tower_self
- add_monoid_algebra.smul_comm_class_self
- add_monoid_algebra.smul_comm_class_symm_self
- add_monoid_algebra.algebra
- add_monoid_algebra.finite_type_of_fg
Equations
A non-commutative version of add_monoid_algebra.lift
: given a additive homomorphism f : k →+ R
and a map 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)
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.non_unital_non_assoc_semiring = {add := has_add.add (add_zero_class.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, left_distrib := _, right_distrib := _, 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
- add_monoid_algebra.non_unital_semiring = {add := has_add.add (distrib.to_has_add (add_monoid_algebra k G)), add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := non_unital_non_assoc_semiring.nsmul add_monoid_algebra.non_unital_non_assoc_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul add_monoid_algebra.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _}
Equations
- add_monoid_algebra.non_assoc_semiring = {add := has_add.add (distrib.to_has_add (add_monoid_algebra k G)), add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := non_unital_non_assoc_semiring.nsmul add_monoid_algebra.non_unital_non_assoc_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul add_monoid_algebra.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, one := 1, one_mul := _, mul_one := _, nat_cast := λ (n : ℕ), finsupp.single 0 ↑n, nat_cast_zero := _, nat_cast_succ := _}
Semiring structure #
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 := non_unital_semiring.nsmul add_monoid_algebra.non_unital_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul add_monoid_algebra.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := 1, one_mul := _, mul_one := _, nat_cast := non_assoc_semiring.nat_cast add_monoid_algebra.non_assoc_semiring, nat_cast_zero := _, nat_cast_succ := _, npow := monoid_with_zero.npow._default 1 has_mul.mul add_monoid_algebra.semiring._proof_16 add_monoid_algebra.semiring._proof_17, npow_zero' := _, npow_succ' := _}
lift_nc
as a ring_hom
, for when f
and g
commute
Equations
- add_monoid_algebra.non_unital_comm_semiring = {add := non_unital_semiring.add add_monoid_algebra.non_unital_semiring, add_assoc := _, zero := non_unital_semiring.zero add_monoid_algebra.non_unital_semiring, zero_add := _, add_zero := _, nsmul := non_unital_semiring.nsmul add_monoid_algebra.non_unital_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := non_unital_semiring.mul add_monoid_algebra.non_unital_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, mul_comm := _}
Derived instances #
Equations
- add_monoid_algebra.comm_semiring = {add := non_unital_comm_semiring.add add_monoid_algebra.non_unital_comm_semiring, add_assoc := _, zero := non_unital_comm_semiring.zero add_monoid_algebra.non_unital_comm_semiring, zero_add := _, add_zero := _, nsmul := non_unital_comm_semiring.nsmul add_monoid_algebra.non_unital_comm_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := non_unital_comm_semiring.mul add_monoid_algebra.non_unital_comm_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := semiring.one add_monoid_algebra.semiring, one_mul := _, mul_one := _, nat_cast := semiring.nat_cast add_monoid_algebra.semiring, nat_cast_zero := _, nat_cast_succ := _, npow := semiring.npow add_monoid_algebra.semiring, npow_zero' := _, npow_succ' := _, mul_comm := _}
Equations
- add_monoid_algebra.non_unital_non_assoc_ring = {add := add_comm_group.add add_monoid_algebra.add_comm_group, add_assoc := _, zero := add_comm_group.zero add_monoid_algebra.add_comm_group, zero_add := _, add_zero := _, nsmul := add_comm_group.nsmul add_monoid_algebra.add_comm_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg add_monoid_algebra.add_comm_group, sub := add_comm_group.sub add_monoid_algebra.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul add_monoid_algebra.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := non_unital_non_assoc_semiring.mul add_monoid_algebra.non_unital_non_assoc_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _}
Equations
- add_monoid_algebra.non_unital_ring = {add := add_comm_group.add add_monoid_algebra.add_comm_group, add_assoc := _, zero := add_comm_group.zero add_monoid_algebra.add_comm_group, zero_add := _, add_zero := _, nsmul := add_comm_group.nsmul add_monoid_algebra.add_comm_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg add_monoid_algebra.add_comm_group, sub := add_comm_group.sub add_monoid_algebra.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul add_monoid_algebra.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := non_unital_semiring.mul add_monoid_algebra.non_unital_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _}
Equations
- add_monoid_algebra.non_assoc_ring = {add := add_comm_group.add add_monoid_algebra.add_comm_group, add_assoc := _, zero := add_comm_group.zero add_monoid_algebra.add_comm_group, zero_add := _, add_zero := _, nsmul := add_comm_group.nsmul add_monoid_algebra.add_comm_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg add_monoid_algebra.add_comm_group, sub := add_comm_group.sub add_monoid_algebra.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul add_monoid_algebra.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := non_assoc_semiring.mul add_monoid_algebra.non_assoc_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, one := non_assoc_semiring.one add_monoid_algebra.non_assoc_semiring, one_mul := _, mul_one := _, nat_cast := non_assoc_semiring.nat_cast add_monoid_algebra.non_assoc_semiring, nat_cast_zero := _, nat_cast_succ := _, int_cast := λ (z : ℤ), finsupp.single 0 ↑z, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _}
Equations
- add_monoid_algebra.ring = {add := non_assoc_ring.add add_monoid_algebra.non_assoc_ring, add_assoc := _, zero := non_assoc_ring.zero add_monoid_algebra.non_assoc_ring, zero_add := _, add_zero := _, nsmul := non_assoc_ring.nsmul add_monoid_algebra.non_assoc_ring, nsmul_zero' := _, nsmul_succ' := _, neg := non_assoc_ring.neg add_monoid_algebra.non_assoc_ring, sub := non_assoc_ring.sub add_monoid_algebra.non_assoc_ring, sub_eq_add_neg := _, zsmul := non_assoc_ring.zsmul add_monoid_algebra.non_assoc_ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, int_cast := non_assoc_ring.int_cast add_monoid_algebra.non_assoc_ring, nat_cast := non_assoc_ring.nat_cast add_monoid_algebra.non_assoc_ring, one := non_assoc_ring.one add_monoid_algebra.non_assoc_ring, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := non_assoc_ring.mul add_monoid_algebra.non_assoc_ring, mul_assoc := _, one_mul := _, mul_one := _, npow := semiring.npow add_monoid_algebra.semiring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _}
Equations
- add_monoid_algebra.non_unital_comm_ring = {add := non_unital_comm_semiring.add add_monoid_algebra.non_unital_comm_semiring, add_assoc := _, zero := non_unital_comm_semiring.zero add_monoid_algebra.non_unital_comm_semiring, zero_add := _, add_zero := _, nsmul := non_unital_comm_semiring.nsmul add_monoid_algebra.non_unital_comm_semiring, nsmul_zero' := _, nsmul_succ' := _, neg := non_unital_ring.neg add_monoid_algebra.non_unital_ring, sub := non_unital_ring.sub add_monoid_algebra.non_unital_ring, sub_eq_add_neg := _, zsmul := non_unital_ring.zsmul add_monoid_algebra.non_unital_ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := non_unital_comm_semiring.mul add_monoid_algebra.non_unital_comm_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, mul_comm := _}
Equations
- add_monoid_algebra.comm_ring = {add := non_unital_comm_ring.add add_monoid_algebra.non_unital_comm_ring, add_assoc := _, zero := non_unital_comm_ring.zero add_monoid_algebra.non_unital_comm_ring, zero_add := _, add_zero := _, nsmul := non_unital_comm_ring.nsmul add_monoid_algebra.non_unital_comm_ring, nsmul_zero' := _, nsmul_succ' := _, neg := non_unital_comm_ring.neg add_monoid_algebra.non_unital_comm_ring, sub := non_unital_comm_ring.sub add_monoid_algebra.non_unital_comm_ring, sub_eq_add_neg := _, zsmul := non_unital_comm_ring.zsmul add_monoid_algebra.non_unital_comm_ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, int_cast := ring.int_cast add_monoid_algebra.ring, nat_cast := ring.nat_cast add_monoid_algebra.ring, one := ring.one add_monoid_algebra.ring, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := non_unital_comm_ring.mul add_monoid_algebra.non_unital_comm_ring, mul_assoc := _, one_mul := _, mul_one := _, npow := ring.npow add_monoid_algebra.ring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, mul_comm := _}
Equations
Equations
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_zero
, but for the 1
we define in this file
Like finsupp.map_domain_add
, but for the convolutive multiplication we define in this file
The embedding of an additive magma into its additive magma algebra.
Equations
- add_monoid_algebra.of_magma k G = {to_fun := λ (a : multiplicative G), finsupp.single a 1, map_mul' := _}
Embedding of a magma with zero into its magma algebra.
Equations
- add_monoid_algebra.of k G = {to_fun := λ (a : multiplicative G), finsupp.single a 1, map_one' := _, map_mul' := _}
Embedding of a magma with zero G
, into its magma algebra, having G
as source.
Equations
- add_monoid_algebra.of' k G = λ (a : G), finsupp.single a 1
finsupp.single
as a monoid_hom
from the product type into the additive monoid algebra.
Note the order of the elements of the product are reversed compared to the arguments of
finsupp.single
.
Equations
- add_monoid_algebra.single_hom = {to_fun := λ (a : k × multiplicative G), finsupp.single (⇑multiplicative.to_add a.snd) a.fst, map_one' := _, map_mul' := _}
If f : G → H
is an additive homomorphism between two additive monoids, then
finsupp.map_domain f
is a ring homomorphism between their add monoid algebras.
Conversions between add_monoid_algebra
and monoid_algebra
#
We have not defined add_monoid_algebra k G = monoid_algebra k (multiplicative G)
because historically this caused problems;
since the changes that have made nsmul
definitional, this would be possible,
but for now we just contruct the ring isomorphisms using ring_equiv.refl _
.
The equivalence between add_monoid_algebra
and monoid_algebra
in terms of
multiplicative
Equations
- add_monoid_algebra.to_multiplicative k G = {to_fun := finsupp.equiv_map_domain multiplicative.of_add, 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.equiv_map_domain additive.of_mul, inv_fun := (finsupp.dom_congr additive.of_mul).inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _}
Non-unital, non-associative algebra structure #
Note that if k
is a comm_semiring
then we have smul_comm_class k k k
and so we can take
R = k
in the below. In other words, if the coefficients are commutative amongst themselves, they
also commute with the algebra multiplication.
A non_unital k
-algebra homomorphism from add_monoid_algebra k G
is uniquely defined by its
values on the functions single a 1
.
The functor G ↦ add_monoid_algebra k G
, from the category of magmas to the category of
non-unital, non-associative algebras over k
is adjoint to the forgetful functor in the other
direction.
Equations
- add_monoid_algebra.lift_magma k = {to_fun := λ (f : multiplicative G →ₙ* A), {to_fun := λ (a : add_monoid_algebra k G), finsupp.sum a (λ (m : G) (t : k), t • ⇑f (⇑multiplicative.of_add m)), map_smul' := _, map_zero' := _, map_add' := _, map_mul' := _}, inv_fun := λ (F : add_monoid_algebra k G →ₙₐ[k] A), F.to_mul_hom.comp (add_monoid_algebra.of_magma k G), left_inv := _, right_inv := _}
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 opposite of an add_monoid_algebra R I
is ring equivalent to
the add_monoid_algebra Rᵐᵒᵖ I
over the opposite ring, taking elements to their opposite.
Equations
- add_monoid_algebra.op_ring_equiv = {to_fun := (mul_opposite.op_add_equiv.symm.trans (finsupp.map_range.add_equiv mul_opposite.op_add_equiv)).to_fun, inv_fun := (mul_opposite.op_add_equiv.symm.trans (finsupp.map_range.add_equiv mul_opposite.op_add_equiv)).inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _}
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_smul := smul_zero_class.to_has_smul add_monoid_algebra.smul_zero_class, 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)
.
If f : G → H
is a homomorphism between two additive magmas, then finsupp.map_domain f
is a
non-unital algebra homomorphism between their additive magma algebras.
If f : G → H
is an additive homomorphism between two additive monoids, then
finsupp.map_domain f
is an algebra homomorphism between their add monoid algebras.
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' := _}