mathlib documentation

data.​monoid_algebra

data.​monoid_algebra

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.

@[instance]
def monoid_algebra.​add_comm_monoid (k : Type u₁) (G : Type u₂) [semiring k] :

@[instance]
def monoid_algebra.​inhabited (k : Type u₁) (G : Type u₂) [semiring k] :

def monoid_algebra (k : Type u₁) (G : Type u₂) [semiring k] :
Type (max u₁ u₂)

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
@[instance]
def monoid_algebra.​has_mul {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] :

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
theorem monoid_algebra.​mul_def {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] {f g : monoid_algebra k G} :
f * g = finsupp.sum f (λ (a₁ : G) (b₁ : k), finsupp.sum g (λ (a₂ : G) (b₂ : k), finsupp.single (a₁ * a₂) (b₁ * b₂)))

theorem monoid_algebra.​mul_apply {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] (f g : monoid_algebra k G) (x : G) :
(f * g) x = finsupp.sum f (λ (a₁ : G) (b₁ : k), finsupp.sum g (λ (a₂ : G) (b₂ : k), ite (a₁ * a₂ = x) (b₁ * b₂) 0))

theorem monoid_algebra.​mul_apply_antidiagonal {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] (f g : monoid_algebra k G) (x : G) (s : finset (G × G)) :
(∀ {p : G × G}, p s p.fst * p.snd = x)(f * g) x = s.sum (λ (p : G × G), f p.fst * g p.snd)

theorem monoid_algebra.​support_mul {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] (a b : monoid_algebra k G) :
(a * b).support a.support.bind (λ (a₁ : G), b.support.bind (λ (a₂ : G), {a₁ * a₂}))

@[instance]
def monoid_algebra.​has_one {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] :

The unit of the multiplication is single 1 1, i.e. the function that is 1 at 1 and zero elsewhere.

Equations
theorem monoid_algebra.​one_def {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] :

theorem monoid_algebra.​zero_mul {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] (f : monoid_algebra k G) :
0 * f = 0

theorem monoid_algebra.​mul_zero {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] (f : monoid_algebra k G) :
f * 0 = 0

@[simp]
theorem monoid_algebra.​single_mul_single {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] {a₁ a₂ : G} {b₁ b₂ : k} :
finsupp.single a₁ b₁ * finsupp.single a₂ b₂ = finsupp.single (a₁ * a₂) (b₁ * b₂)

@[simp]
theorem monoid_algebra.​single_pow {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] {a : G} {b : k} (n : ) :
finsupp.single a b ^ n = finsupp.single (a ^ n) (b ^ n)

def monoid_algebra.​of (k : Type u₁) (G : Type u₂) [semiring k] [monoid G] :

Embedding of a monoid into its monoid algebra.

Equations
@[simp]
theorem monoid_algebra.​of_apply {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] (a : G) :

theorem monoid_algebra.​mul_single_apply_aux {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] (f : monoid_algebra k G) {r : k} {x y z : G} :
(∀ (a : G), a * x = z a = y)(f * finsupp.single x r) z = f y * r

theorem monoid_algebra.​mul_single_one_apply {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] (f : monoid_algebra k G) (r : k) (x : G) :
(f * finsupp.single 1 r) x = f x * r

theorem monoid_algebra.​single_mul_apply_aux {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] (f : monoid_algebra k G) {r : k} {x y z : G} :
(∀ (a : G), x * a = y a = z)(finsupp.single x r * f) y = r * f z

theorem monoid_algebra.​single_one_mul_apply {k : Type u₁} {G : Type u₂} [semiring k] [monoid G] (f : monoid_algebra k G) (r : k) (x : G) :
(finsupp.single 1 r * f) x = r * f x

@[instance]
def monoid_algebra.​has_neg {k : Type u₁} {G : Type u₂} [ring k] :

Equations
@[instance]
def monoid_algebra.​has_scalar {k : Type u₁} {G : Type u₂} [semiring k] :

Equations
@[instance]
def monoid_algebra.​semimodule {k : Type u₁} {G : Type u₂} [semiring k] :

Equations
theorem monoid_algebra.​single_one_comm {k : Type u₁} {G : Type u₂} [comm_semiring k] [monoid G] (r : k) (f : monoid_algebra k G) :

def monoid_algebra.​algebra_map' {k : Type u₁} {G : Type u₂} {A : Type u_1} [semiring k] [semiring A] (f : k →+* A) [monoid G] :

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
@[instance]
def monoid_algebra.​algebra {k : Type u₁} {G : Type u₂} {A : Type u_1} [comm_semiring k] [semiring A] [algebra k A] [monoid G] :

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
@[simp]
theorem monoid_algebra.​coe_algebra_map {k : Type u₁} {G : Type u₂} [comm_semiring k] [monoid G] :

theorem monoid_algebra.​single_eq_algebra_map_mul_of {k : Type u₁} {G : Type u₂} [comm_semiring k] [monoid G] (a : G) (b : k) :

def monoid_algebra.​lift (k : Type u₁) (G : Type u₂) [comm_semiring k] [monoid G] (R : Type u₃) [semiring R] [algebra k R] :

Any monoid homomorphism G →* R can be lifted to an algebra homomorphism monoid_algebra k G →ₐ[k] R.

Equations
theorem monoid_algebra.​lift_apply {k : Type u₁} {G : Type u₂} [comm_semiring k] [monoid G] {R : Type u₃} [semiring R] [algebra k R] (F : G →* R) (f : monoid_algebra k G) :
((monoid_algebra.lift k G R) F) f = finsupp.sum f (λ (a : G) (b : k), b F a)

@[simp]
theorem monoid_algebra.​lift_symm_apply {k : Type u₁} {G : Type u₂} [comm_semiring k] [monoid G] {R : Type u₃} [semiring R] [algebra k R] (F : monoid_algebra k G →ₐ[k] R) (x : G) :

theorem monoid_algebra.​lift_of {k : Type u₁} {G : Type u₂} [comm_semiring k] [monoid G] {R : Type u₃} [semiring R] [algebra k R] (F : G →* R) (x : G) :

@[simp]
theorem monoid_algebra.​lift_single {k : Type u₁} {G : Type u₂} [comm_semiring k] [monoid G] {R : Type u₃} [semiring R] [algebra k R] (F : G →* R) (a : G) (b : k) :

theorem monoid_algebra.​lift_unique' {k : Type u₁} {G : Type u₂} [comm_semiring k] [monoid G] {R : Type u₃} [semiring R] [algebra k R] (F : monoid_algebra k G →ₐ[k] R) :

theorem monoid_algebra.​lift_unique {k : Type u₁} {G : Type u₂} [comm_semiring k] [monoid G] {R : Type u₃} [semiring R] [algebra k R] (F : monoid_algebra k G →ₐ[k] R) (f : monoid_algebra k G) :
F f = finsupp.sum f (λ (a : G) (b : k), b F (finsupp.single a 1))

Decomposition of a k-algebra homomorphism from monoid_algebra k G by its values on F (single a 1).

theorem monoid_algebra.​alg_hom_ext {k : Type u₁} {G : Type u₂} [comm_semiring k] [monoid G] {R : Type u₃} [semiring R] [algebra k R] ⦃φ₁ φ₂ : monoid_algebra k G →ₐ[k] R⦄ :
(∀ (x : G), φ₁ (finsupp.single x 1) = φ₂ (finsupp.single x 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
@[simp]
theorem monoid_algebra.​group_smul.​linear_map_apply (k : Type u₁) {G : Type u₂} [group G] [comm_ring k] (V : Type u₃) [add_comm_group V] [module (monoid_algebra k G) V] (g : G) (v : V) :

def monoid_algebra.​equivariant_of_linear_of_comm {k : Type u₁} {G : Type u₂} [group G] [comm_ring k] {V : Type u₃} {gV : add_comm_group V} {mV : module (monoid_algebra k G) V} {W : Type u₃} {gW : add_comm_group W} {mW : module (monoid_algebra k G) W} (f : semimodule.restrict_scalars k (monoid_algebra k G) V →ₗ[k] semimodule.restrict_scalars k (monoid_algebra k G) W) :
(∀ (g : G) (v : V), f (finsupp.single g 1 v) = finsupp.single g 1 f v)(V →ₗ[monoid_algebra k G] W)

Build a k[G]-linear map from a k-linear map and evidence that it is G-equivariant.

Equations
@[simp]
theorem monoid_algebra.​equivariant_of_linear_of_comm_apply {k : Type u₁} {G : Type u₂} [group G] [comm_ring k] {V : Type u₃} {gV : add_comm_group V} {mV : module (monoid_algebra k G) V} {W : Type u₃} {gW : add_comm_group W} {mW : module (monoid_algebra k G) W} (f : semimodule.restrict_scalars k (monoid_algebra k G) V →ₗ[k] semimodule.restrict_scalars k (monoid_algebra k G) W) (h : ∀ (g : G) (v : V), f (finsupp.single g 1 v) = finsupp.single g 1 f v) (v : V) :

theorem monoid_algebra.​prod_single {k : Type u₁} {G : Type u₂} {ι : Type ui} [comm_semiring k] [comm_monoid G] {s : finset ι} {a : ι → G} {b : ι → k} :
s.prod (λ (i : ι), finsupp.single (a i) (b i)) = finsupp.single (s.prod (λ (i : ι), a i)) (s.prod (λ (i : ι), b i))

@[simp]
theorem monoid_algebra.​mul_single_apply {k : Type u₁} {G : Type u₂} [semiring k] [group G] (f : monoid_algebra k G) (r : k) (x y : G) :
(f * finsupp.single x r) y = f (y * x⁻¹) * r

@[simp]
theorem monoid_algebra.​single_mul_apply {k : Type u₁} {G : Type u₂} [semiring k] [group G] (r : k) (x : G) (f : monoid_algebra k G) (y : G) :
(finsupp.single x r * f) y = r * f (x⁻¹ * y)

theorem monoid_algebra.​mul_apply_left {k : Type u₁} {G : Type u₂} [semiring k] [group G] (f g : monoid_algebra k G) (x : G) :
(f * g) x = finsupp.sum f (λ (a : G) (b : k), b * g (a⁻¹ * x))

theorem monoid_algebra.​mul_apply_right {k : Type u₁} {G : Type u₂} [semiring k] [group G] (f g : monoid_algebra k G) (x : G) :
(f * g) x = finsupp.sum g (λ (a : G) (b : k), f (x * a⁻¹) * b)

@[instance]
def add_monoid_algebra.​add_comm_monoid (k : Type u₁) (G : Type u₂) [semiring k] :

@[instance]
def add_monoid_algebra.​inhabited (k : Type u₁) (G : Type u₂) [semiring k] :

def add_monoid_algebra (k : Type u₁) (G : Type u₂) [semiring k] :
Type (max u₂ u₁)

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
@[instance]
def add_monoid_algebra.​has_mul {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] :

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
theorem add_monoid_algebra.​mul_def {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] {f g : add_monoid_algebra k G} :
f * g = finsupp.sum f (λ (a₁ : G) (b₁ : k), finsupp.sum g (λ (a₂ : G) (b₂ : k), finsupp.single (a₁ + a₂) (b₁ * b₂)))

theorem add_monoid_algebra.​mul_apply {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] (f g : add_monoid_algebra k G) (x : G) :
(f * g) x = finsupp.sum f (λ (a₁ : G) (b₁ : k), finsupp.sum g (λ (a₂ : G) (b₂ : k), ite (a₁ + a₂ = x) (b₁ * b₂) 0))

theorem add_monoid_algebra.​support_mul {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] (a b : add_monoid_algebra k G) :
(a * b).support a.support.bind (λ (a₁ : G), b.support.bind (λ (a₂ : G), {a₁ + a₂}))

@[instance]
def add_monoid_algebra.​has_one {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] :

The unit of the multiplication is single 1 1, i.e. the function that is 1 at 0 and zero elsewhere.

Equations
theorem add_monoid_algebra.​one_def {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] :

theorem add_monoid_algebra.​zero_mul {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] (f : add_monoid_algebra k G) :
0 * f = 0

theorem add_monoid_algebra.​mul_zero {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] (f : add_monoid_algebra k G) :
f * 0 = 0

theorem add_monoid_algebra.​single_mul_single {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] {a₁ a₂ : G} {b₁ b₂ : k} :
finsupp.single a₁ b₁ * finsupp.single a₂ b₂ = finsupp.single (a₁ + a₂) (b₁ * b₂)

def add_monoid_algebra.​of (k : Type u₁) (G : Type u₂) [semiring k] [add_monoid G] :

Embedding of a monoid into its monoid algebra.

Equations
@[simp]
theorem add_monoid_algebra.​of_apply {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] (a : G) :

theorem add_monoid_algebra.​mul_single_apply_aux {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] (f : add_monoid_algebra k G) (r : k) (x y z : G) :
(∀ (a : G), a + x = z a = y)(f * finsupp.single x r) z = f y * r

theorem add_monoid_algebra.​mul_single_zero_apply {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] (f : add_monoid_algebra k G) (r : k) (x : G) :
(f * finsupp.single 0 r) x = f x * r

theorem add_monoid_algebra.​single_mul_apply_aux {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] (f : add_monoid_algebra k G) (r : k) (x y z : G) :
(∀ (a : G), x + a = y a = z)(finsupp.single x r * f) y = r * f z

theorem add_monoid_algebra.​single_zero_mul_apply {k : Type u₁} {G : Type u₂} [semiring k] [add_monoid G] (f : add_monoid_algebra k G) (r : k) (x : G) :
(finsupp.single 0 r * f) x = r * f x

@[instance]
def add_monoid_algebra.​has_neg {k : Type u₁} {G : Type u₂} [ring k] :

Equations
@[instance]
def add_monoid_algebra.​has_scalar {k : Type u₁} {G : Type u₂} [semiring k] :

Equations
@[instance]
def add_monoid_algebra.​semimodule {k : Type u₁} {G : Type u₂} [semiring k] :

Equations
def add_monoid_algebra.​algebra_map' {k : Type u₁} {G : Type u₂} {A : Type u_1} [semiring k] [semiring A] (f : k →+* A) [add_monoid G] :

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
@[instance]
def add_monoid_algebra.​algebra {k : Type u₁} {G : Type u₂} {A : Type u_1} [comm_semiring k] [semiring A] [algebra k A] [add_monoid G] :

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
@[simp]

def add_monoid_algebra.​lift {k : Type u₁} {G : Type u₂} [comm_semiring k] [add_monoid G] {R : Type u₃} [semiring R] [algebra k R] :

Any monoid homomorphism multiplicative G →* R can be lifted to an algebra homomorphism add_monoid_algebra k G →ₐ[k] R.

Equations
theorem add_monoid_algebra.​prod_single {k : Type u₁} {G : Type u₂} {ι : Type ui} [comm_semiring k] [add_comm_monoid G] {s : finset ι} {a : ι → G} {b : ι → k} :
s.prod (λ (i : ι), finsupp.single (a i) (b i)) = finsupp.single (s.sum (λ (i : ι), a i)) (s.prod (λ (i : ι), b i))