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 a monoid M.
The "group ring" ℤ[G] or the "group algebra" k[G] are typical uses.
In fact the construction of the "monoid algebra" makes sense when M is not even a monoid, but
merely a magma, i.e., when M 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 R M := M →₀ R, and AddMonoidAlgebra R M
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 (σ →₀ ℕ)
Note: Polynomial R is currently a wrapper around AddMonoidAlgebra R ℕ and not defeq to it.
There is ongoing work to make it defeq.
See https://github.com/leanprover-community/mathlib4/pull/25273
When the domain is multiplicative, e.g. a group, this will be used to define the group ring.
Notation #
We introduce the notation R[M] for both MonoidAlgebra R M and AddMonoidAlgebra R M.
The notations are scoped to their respective namespaces, and which one R[M] resolves to therefore
depends on which of the two namespaces is open.
The monoid algebra over a semiring R generated by the monoid M.
It is the type of finite formal R-linear combinations of terms of M,
endowed with the convolution product.
Equations
Instances For
The additive monoid algebra over a semiring R generated by the additive monoid M.
It is the type of finite formal R-linear combinations of terms of M,
endowed with the convolution product.
Equations
Instances For
The additive monoid algebra over a semiring R generated by the additive monoid M.
It is the type of finite formal R-linear combinations of terms of M,
endowed with the convolution product.
Equations
Instances For
The monoid algebra over a semiring R generated by the monoid M.
It is the type of finite formal R-linear combinations of terms of M,
endowed with the convolution product.
Equations
Instances For
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
A copy of Finsupp.ext for MonoidAlgebra.
A copy of Finsupp.ext for AddMonoidAlgebra.
MonoidAlgebra.single m r for m : M, r : R is the element rm : R[M].
Equations
Instances For
AddMonoidAlgebra.single m r for m : M, r : R is the element rm : R[M].
Equations
Instances For
Basic scalar multiplication instances #
This section collects instances needed for the algebraic structure of Polynomial,
which is defined in terms of MonoidAlgebra.
Further results on scalar multiplication can be found in
Mathlib/Algebra/MonoidAlgebra/Module.lean.
Equations
Equations
Equations
Equations
MonoidAlgebra.single as an AddMonoidHom.
TODO: Rename to singleAddMonoidHom.
Equations
Instances For
AddMonoidAlgebra.single as an AddMonoidHom.
TODO: Rename to singleAddMonoidHom.
Equations
Instances For
If two additive homomorphisms from R[M] are equal on each single r m,
then they are equal.
We formulate this using equality of AddMonoidHoms so that ext tactic can apply a type-specific
extensionality lemma after this one. E.g., if the fiber M is ℕ or ℤ, then it suffices to
verify f (single a 1) = g (single a 1).
TODO: Rename to addMonoidHom_ext'.
If two additive homomorphisms from R[M] are equal on each single r m, then they are equal.
We formulate this using equality of AddMonoidHoms so that ext tactic can apply a type-specific
extensionality lemma after this one. E.g., if the fiber M is ℕ or ℤ, then it suffices to
verify f (single a 1) = g (single a 1).
TODO: Rename to addMonoidHom_ext'.
The unit of the multiplication is single 1 1,
i.e. the function that is 1 at 1 and 0 elsewhere.
Equations
The unit of the multiplication is single 1 1,
i.e. the function that is 1 at 1 and 0 elsewhere.
Equations
The multiplication in a monoid algebra.
We make it irreducible so that Lean doesn't unfold it when trying to unify two different things.
Equations
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
The product of x y : R[M] is the finitely supported function whose value at m
is the sum of x m₁ * y m₂ over all pairs m₁, m₂ such that m₁ * m₂ = m.
(Think of the group ring of a group.)
Equations
Equations
Equations
The embedding of a magma into its magma algebra.
Equations
Instances For
Equations
Equations
Equations
Equations
The embedding of a unital magma into its magma algebra.
Equations
Instances For
MonoidAlgebra.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
MonoidAlgebra.single.
Equations
Instances For
MonoidAlgebra.single 1 as a RingHom
Equations
Instances For
AddMonoidAlgebra.single 1 as a RingHom
Equations
Instances For
If two ring homomorphisms from R[M] are equal on all single m 1 and
single 1 r, then they are equal.
If two ring homomorphisms from R[M] are equal on all single m 1 and single 0 r,
then they are equal.
If two ring homomorphisms from R[M] are equal on all single m 1
and single 1 r, then they are equal.
See note [partially-applied ext lemmas].
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Additive monoids #
The embedding of an additive magma into its additive magma algebra.
Equations
Instances For
Embedding of a magma with zero into its magma algebra.
Equations
Instances For
Embedding of a magma with zero M, into its magma algebra, having M as source.
Equations
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
Instances For
If two ring homomorphisms from R[M] are equal on all single m 1
and single 0 r, then they are equal.
See note [partially-applied ext lemmas].