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 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 MonoidAlgebra.liftMagma
.
In this file we define MonoidAlgebra k G := G →₀ k
, and AddMonoidAlgebra 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 R := AddMonoidAlgebra R ℕ
MvPolynomial σ α := AddMonoidAlgebra R (σ →₀ ℕ)
When the domain is multiplicative, e.g. a group, this will be used to define the group ring.
Notation #
We introduce the notation R[A]
for AddMonoidAlgebra R A
.
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
k[G] := MonoidAlgebra 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
- MonoidAlgebra k G = (G →₀ k)
Instances For
Equations
- MonoidAlgebra.inhabited k G = inferInstanceAs (Inhabited (G →₀ k))
Equations
- MonoidAlgebra.addCommMonoid k G = inferInstanceAs (AddCommMonoid (G →₀ k))
Equations
- (_ : IsCancelAdd (MonoidAlgebra k G)) = (_ : IsCancelAdd (G →₀ k))
Equations
- MonoidAlgebra.coeFun k G = Finsupp.coeFun
Equations
- MonoidAlgebra.single a b = Finsupp.single a b
Instances For
Equations
Instances For
A non-commutative version of MonoidAlgebra.lift
: given an additive homomorphism f : k →+ R
and a homomorphism g : G → R
, returns the additive homomorphism from
MonoidAlgebra k G
such that liftNC 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 = algebraMap k R
, then the result is an algebra homomorphism called
MonoidAlgebra.lift
.
Equations
- MonoidAlgebra.liftNC f g = Finsupp.liftAddHom fun (x : G) => AddMonoidHom.comp (AddMonoidHom.mulRight (g x)) f
Instances For
The product of f g : MonoidAlgebra 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
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- MonoidAlgebra.nonUnitalSemiring = let src := MonoidAlgebra.nonUnitalNonAssocSemiring; NonUnitalSemiring.mk (_ : ∀ (f g h : MonoidAlgebra k G), f * g * h = f * (g * h))
The unit of the multiplication is single 1 1
, i.e. the function
that is 1
at 1
and zero elsewhere.
Equations
- MonoidAlgebra.one = { one := MonoidAlgebra.single 1 1 }
Equations
- One or more equations did not get rendered due to their size.
Semiring structure #
Equations
- One or more equations did not get rendered due to their size.
liftNC
as a RingHom
, for when f x
and g y
commute
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- MonoidAlgebra.nonUnitalCommSemiring = let src := MonoidAlgebra.nonUnitalSemiring; NonUnitalCommSemiring.mk (_ : ∀ (f g : MonoidAlgebra k G), f * g = g * f)
Equations
- (_ : Nontrivial (MonoidAlgebra k G)) = (_ : Nontrivial (G →₀ k))
Derived instances #
Equations
- MonoidAlgebra.commSemiring = let src := MonoidAlgebra.nonUnitalCommSemiring; let src_1 := MonoidAlgebra.semiring; CommSemiring.mk (_ : ∀ (a b : MonoidAlgebra k G), a * b = b * a)
Equations
- MonoidAlgebra.unique = Finsupp.uniqueOfRight
Equations
- MonoidAlgebra.addCommGroup = Finsupp.addCommGroup
Equations
- One or more equations did not get rendered due to their size.
Equations
- MonoidAlgebra.nonUnitalRing = let src := MonoidAlgebra.addCommGroup; let src_1 := MonoidAlgebra.nonUnitalSemiring; NonUnitalRing.mk (_ : ∀ (a b c : MonoidAlgebra k G), a * b * c = a * (b * c))
Equations
- One or more equations did not get rendered due to their size.
Equations
- MonoidAlgebra.nonUnitalCommRing = let src := MonoidAlgebra.nonUnitalCommSemiring; let src_1 := MonoidAlgebra.nonUnitalRing; NonUnitalCommRing.mk (_ : ∀ (a b : MonoidAlgebra k G), a * b = b * a)
Equations
- MonoidAlgebra.commRing = let src := MonoidAlgebra.nonUnitalCommRing; let src_1 := MonoidAlgebra.ring; CommRing.mk (_ : ∀ (a b : MonoidAlgebra k G), a * b = b * a)
Equations
- MonoidAlgebra.smulZeroClass = Finsupp.smulZeroClass
Equations
- MonoidAlgebra.distribSMul = Finsupp.distribSMul G k
Equations
- MonoidAlgebra.distribMulAction = Finsupp.distribMulAction G k
Equations
- MonoidAlgebra.module = Finsupp.module G k
Equations
- (_ : FaithfulSMul R (MonoidAlgebra k G)) = (_ : FaithfulSMul R (G →₀ k))
Equations
- (_ : IsScalarTower R S (MonoidAlgebra k G)) = (_ : IsScalarTower R S (G →₀ k))
Equations
- (_ : SMulCommClass R S (MonoidAlgebra k G)) = (_ : SMulCommClass R S (G →₀ k))
Equations
- (_ : IsCentralScalar R (MonoidAlgebra k G)) = (_ : IsCentralScalar R (G →₀ k))
This is not an instance as it conflicts with MonoidAlgebra.distribMulAction
when G = kˣ
.
Equations
- MonoidAlgebra.comapDistribMulActionSelf = Finsupp.comapDistribMulAction
Instances For
Like Finsupp.mapDomain_zero
, but for the 1
we define in this file
Like Finsupp.mapDomain_add
, but for the convolutive multiplication we define in this file
The embedding of a magma into its magma algebra.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The embedding of a unital magma into its magma algebra.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Finsupp.single
as a MonoidHom
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
- One or more equations did not get rendered due to their size.
Instances For
Non-unital, non-associative algebra structure #
Equations
- (_ : IsScalarTower R (MonoidAlgebra k G) (MonoidAlgebra k G)) = (_ : IsScalarTower R (MonoidAlgebra k G) (MonoidAlgebra k G))
Note that if k
is a CommSemiring
then we have SMulCommClass 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.
Equations
- (_ : SMulCommClass R (MonoidAlgebra k G) (MonoidAlgebra k G)) = (_ : SMulCommClass R (MonoidAlgebra k G) (MonoidAlgebra k G))
Equations
- (_ : SMulCommClass (MonoidAlgebra k G) R (MonoidAlgebra k G)) = (_ : SMulCommClass (MonoidAlgebra k G) R (MonoidAlgebra k G))
A non_unital k
-algebra homomorphism from MonoidAlgebra k G
is uniquely defined by its
values on the functions single a 1
.
See note [partially-applied ext lemmas].
The functor G ↦ MonoidAlgebra 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
- One or more equations did not get rendered due to their size.
Instances For
Algebra structure #
Finsupp.single 1
as a RingHom
Equations
- One or more equations did not get rendered due to their size.
Instances For
If f : G → H
is a multiplicative homomorphism between two monoids, then
Finsupp.mapDomain f
is a ring homomorphism between their monoid algebras.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If two ring homomorphisms from MonoidAlgebra k G
are equal on all single a 1
and single 1 b
, then they are equal.
If two ring homomorphisms from MonoidAlgebra k G
are equal on all single a 1
and single 1 b
, then they are equal.
See note [partially-applied ext lemmas].
The instance Algebra k (MonoidAlgebra A G)
whenever we have Algebra k A
.
In particular this provides the instance Algebra k (MonoidAlgebra k G)
.
Equations
- One or more equations did not get rendered due to their size.
Finsupp.single 1
as an AlgHom
Equations
- One or more equations did not get rendered due to their size.
Instances For
liftNCRingHom
as an AlgHom
, for when f
is an AlgHom
Equations
- One or more equations did not get rendered due to their size.
Instances For
A k
-algebra homomorphism from MonoidAlgebra k G
is uniquely defined by its
values on the functions single a 1
.
See note [partially-applied ext lemmas].
Any monoid homomorphism G →* A
can be lifted to an algebra homomorphism
MonoidAlgebra k G →ₐ[k] A
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Decomposition of a k
-algebra homomorphism from MonoidAlgebra k G
by
its values on F (single a 1)
.
If f : G → H
is a homomorphism between two magmas, then
Finsupp.mapDomain f
is a non-unital algebra homomorphism between their magma algebras.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If f : G → H
is a multiplicative homomorphism between two monoids, then
Finsupp.mapDomain f
is an algebra homomorphism between their monoid algebras.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If e : G ≃* H
is a multiplicative equivalence between two monoids, then
MonoidAlgebra.domCongr e
is an algebra equivalence between their monoid algebras.
Equations
- One or more equations did not get rendered due to their size.
Instances For
When V
is a k[G]
-module, multiplication by a group element g
is a k
-linear map.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build a k[G]
-linear map from a k
-linear map and evidence that it is G
-equivariant.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The opposite of a MonoidAlgebra R I
equivalent as a ring to
the MonoidAlgebra Rᵐᵒᵖ Iᵐᵒᵖ
over the opposite ring, taking elements to their opposite.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A submodule over k
which is stable under scalar multiplication by elements of G
is a
submodule over MonoidAlgebra k G
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
- AddMonoidAlgebra k G = (G →₀ k)
Instances For
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
- One or more equations did not get rendered due to their size.
Instances For
Equations
- AddMonoidAlgebra.inhabited k G = inferInstanceAs (Inhabited (G →₀ k))
Equations
- AddMonoidAlgebra.addCommMonoid k G = inferInstanceAs (AddCommMonoid (G →₀ k))
Equations
- (_ : IsCancelAdd (AddMonoidAlgebra k G)) = (_ : IsCancelAdd (G →₀ k))
Equations
- AddMonoidAlgebra.coeFun k G = Finsupp.coeFun
Equations
- AddMonoidAlgebra.single a b = Finsupp.single a b
Instances For
Equations
Instances For
A non-commutative version of AddMonoidAlgebra.lift
: given an additive homomorphism
f : k →+ R
and a map g : Multiplicative G → R
, returns the additive
homomorphism from k[G]
such that liftNC 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 = algebraMap k R
, then the result is an algebra
homomorphism called AddMonoidAlgebra.lift
.
Equations
- AddMonoidAlgebra.liftNC f g = Finsupp.liftAddHom fun (x : G) => AddMonoidHom.comp (AddMonoidHom.mulRight (g (Multiplicative.ofAdd x))) f
Instances For
The product of f g : 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
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
The unit of the multiplication is single 1 1
, i.e. the function
that is 1
at 0
and zero elsewhere.
Equations
- AddMonoidAlgebra.one = { one := AddMonoidAlgebra.single 0 1 }
Equations
- AddMonoidAlgebra.nonUnitalSemiring = let src := AddMonoidAlgebra.nonUnitalNonAssocSemiring; NonUnitalSemiring.mk (_ : ∀ (f g h : AddMonoidAlgebra k G), f * g * h = f * (g * h))
Equations
- One or more equations did not get rendered due to their size.
Semiring structure #
Equations
- AddMonoidAlgebra.smulZeroClass = Finsupp.smulZeroClass
Equations
- One or more equations did not get rendered due to their size.
liftNC
as a RingHom
, for when f
and g
commute
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- AddMonoidAlgebra.nonUnitalCommSemiring = let src := AddMonoidAlgebra.nonUnitalSemiring; NonUnitalCommSemiring.mk (_ : ∀ (a b : MonoidAlgebra k (Multiplicative G)), a * b = b * a)
Equations
- (_ : Nontrivial (AddMonoidAlgebra k G)) = (_ : Nontrivial (G →₀ k))
Derived instances #
Equations
- AddMonoidAlgebra.commSemiring = let src := AddMonoidAlgebra.nonUnitalCommSemiring; let src_1 := AddMonoidAlgebra.semiring; CommSemiring.mk (_ : ∀ (a b : AddMonoidAlgebra k G), a * b = b * a)
Equations
- AddMonoidAlgebra.unique = Finsupp.uniqueOfRight
Equations
- AddMonoidAlgebra.addCommGroup = Finsupp.addCommGroup
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- AddMonoidAlgebra.commRing = let src := AddMonoidAlgebra.nonUnitalCommRing; let src_1 := AddMonoidAlgebra.ring; CommRing.mk (_ : ∀ (a b : AddMonoidAlgebra k G), a * b = b * a)
Equations
- AddMonoidAlgebra.distribSMul = Finsupp.distribSMul G k
Equations
- AddMonoidAlgebra.distribMulAction = Finsupp.distribMulAction G k
Equations
- (_ : FaithfulSMul R (AddMonoidAlgebra k G)) = (_ : FaithfulSMul R (G →₀ k))
Equations
- AddMonoidAlgebra.module = Finsupp.module G k
Equations
- (_ : IsScalarTower R S (AddMonoidAlgebra k G)) = (_ : IsScalarTower R S (G →₀ k))
Equations
- (_ : SMulCommClass R S (AddMonoidAlgebra k G)) = (_ : SMulCommClass R S (G →₀ k))
Equations
- (_ : IsCentralScalar R (AddMonoidAlgebra k G)) = (_ : IsCentralScalar R (G →₀ k))
It is hard to state the equivalent of DistribMulAction G k[G]
because we've never discussed actions of additive groups.
Like Finsupp.mapDomain_zero
, but for the 1
we define in this file
Like Finsupp.mapDomain_add
, but for the convolutive multiplication we define in this file
The embedding of an additive magma into its additive magma algebra.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Embedding of a magma with zero into its magma algebra.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Embedding of a magma with zero G
, into its magma algebra, having G
as source.
Equations
- AddMonoidAlgebra.of' k G a = AddMonoidAlgebra.single a 1
Instances For
Finsupp.single
as a MonoidHom
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
- One or more equations did not get rendered due to their size.
Instances For
If f : G → H
is an additive homomorphism between two additive monoids, then
Finsupp.mapDomain f
is a ring homomorphism between their add monoid algebras.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Conversions between AddMonoidAlgebra
and MonoidAlgebra
#
We have not defined k[G] = MonoidAlgebra 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 construct the ring isomorphisms using RingEquiv.refl _
.
The equivalence between AddMonoidAlgebra
and MonoidAlgebra
in terms of
Multiplicative
Equations
- One or more equations did not get rendered due to their size.
Instances For
The equivalence between MonoidAlgebra
and AddMonoidAlgebra
in terms of Additive
Equations
- One or more equations did not get rendered due to their size.
Instances For
Non-unital, non-associative algebra structure #
Equations
- (_ : IsScalarTower R (AddMonoidAlgebra k G) (AddMonoidAlgebra k G)) = (_ : IsScalarTower R (MonoidAlgebra k (Multiplicative G)) (MonoidAlgebra k (Multiplicative G)))
Note that if k
is a CommSemiring
then we have SMulCommClass 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.
Equations
- (_ : SMulCommClass R (AddMonoidAlgebra k G) (AddMonoidAlgebra k G)) = (_ : SMulCommClass R (MonoidAlgebra k (Multiplicative G)) (MonoidAlgebra k (Multiplicative G)))
Equations
- (_ : SMulCommClass (AddMonoidAlgebra k G) R (AddMonoidAlgebra k G)) = (_ : SMulCommClass (MonoidAlgebra k (Multiplicative G)) R (MonoidAlgebra k (Multiplicative G)))
A non_unital k
-algebra homomorphism from k[G]
is uniquely defined by its
values on the functions single a 1
.
See note [partially-applied ext lemmas].
The functor G ↦ 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
- One or more equations did not get rendered due to their size.
Instances For
Algebra structure #
Finsupp.single 0
as a RingHom
Equations
- One or more equations did not get rendered due to their size.
Instances For
If two ring homomorphisms from k[G]
are equal on all single a 1
and single 0 b
, then they are equal.
If two ring homomorphisms from k[G]
are equal on all single a 1
and single 0 b
, then they are equal.
See note [partially-applied ext lemmas].
The opposite of an R[I]
is ring equivalent to
the AddMonoidAlgebra Rᵐᵒᵖ I
over the opposite ring, taking elements to their opposite.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The instance Algebra R k[G]
whenever we have Algebra R k
.
In particular this provides the instance Algebra k k[G]
.
Equations
- One or more equations did not get rendered due to their size.
Finsupp.single 0
as an AlgHom
Equations
- One or more equations did not get rendered due to their size.
Instances For
liftNCRingHom
as an AlgHom
, for when f
is an AlgHom
Equations
- One or more equations did not get rendered due to their size.
Instances For
A k
-algebra homomorphism from k[G]
is uniquely defined by its
values on the functions single a 1
.
See note [partially-applied ext lemmas].
Any monoid homomorphism G →* A
can be lifted to an algebra homomorphism
k[G] →ₐ[k] A
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Decomposition of a k
-algebra homomorphism from MonoidAlgebra k G
by
its values on F (single a 1)
.
If f : G → H
is a homomorphism between two additive magmas, then Finsupp.mapDomain f
is a
non-unital algebra homomorphism between their additive magma algebras.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If f : G → H
is an additive homomorphism between two additive monoids, then
Finsupp.mapDomain f
is an algebra homomorphism between their add monoid algebras.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If e : G ≃* H
is a multiplicative equivalence between two monoids, then
AddMonoidAlgebra.domCongr e
is an algebra equivalence between their monoid algebras.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The algebra equivalence between AddMonoidAlgebra
and MonoidAlgebra
in terms of
Multiplicative
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The algebra equivalence between MonoidAlgebra
and AddMonoidAlgebra
in terms of
Additive
.
Equations
- One or more equations did not get rendered due to their size.