The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V09. Commutative algebra I: ideals, polynomials, factorization

Mathlib.Algebra.MonoidAlgebra.Defs

334 declarations and 29 deprecated aliases. Mathlib docs · Source

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 and AddMonoidAlgebra R M as one-field structures around M →₀ R, and then define the convolution product on these.

When the domain is additive, this is used to define polynomials:

Polynomial R := AddMonoidAlgebra R ℕ
MvPolynomial σ R := 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[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.

TODO

Use coeff/ofCoeff more widely. See https://github.com/leanprover-community/mathlib4/pull/36746 https://github.com/leanprover-community/mathlib4/pull/25273

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.

Additive monoids

def AddMonoidAlgebra.ctorIdx E1 #

{R : Type u_8} → {M : Type u_9} → {inst : Semiring R} → AddMonoidAlgebra R M → ℕ

theorem AddMonoidAlgebra.ofCoeff.injEq E0 #

∀ {R : Type u_8} {M : Type u_9} [inst : Semiring R] (coeff coeff_1 : M →₀ R),
  (AddMonoidAlgebra.ofCoeff coeff = AddMonoidAlgebra.ofCoeff coeff_1) = (coeff = coeff_1)

theorem MonoidAlgebra.ofCoeff.inj E1 #

∀ {R : Type u_8} {M : Type u_9} {inst : Semiring R} {coeff coeff_1 : M →₀ R},
  MonoidAlgebra.ofCoeff coeff = MonoidAlgebra.ofCoeff coeff_1 → coeff = coeff_1

theorem MonoidAlgebra.uniqueRingEquiv.congr_simp E1 #

∀ {R : Type u_1} (M : Type u_4) [inst : Semiring R] [inst_1 : Monoid M] [inst_2 : Subsingleton M],
  MonoidAlgebra.uniqueRingEquiv M = MonoidAlgebra.uniqueRingEquiv M

def MonoidAlgebra.ctorIdx E1 #

{R : Type u_8} → {M : Type u_9} → {inst : Semiring R} → MonoidAlgebra R M → ℕ

theorem AddMonoidAlgebra.ofCoeff.inj E1 #

∀ {R : Type u_8} {M : Type u_9} {inst : Semiring R} {coeff coeff_1 : M →₀ R},
  AddMonoidAlgebra.ofCoeff coeff = AddMonoidAlgebra.ofCoeff coeff_1 → coeff = coeff_1

theorem MonoidAlgebra.ofCoeff.injEq E0 #

∀ {R : Type u_8} {M : Type u_9} [inst : Semiring R] (coeff coeff_1 : M →₀ R),
  (MonoidAlgebra.ofCoeff coeff = MonoidAlgebra.ofCoeff coeff_1) = (coeff = coeff_1)

structure AddMonoidAlgebra E1 #

(R : Type u_8) → Type u_9 → [Semiring R] → Type (max u_8 u_9)

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.

ctor AddMonoidAlgebra.ofCoeff E0 #

{R : Type u_8} → {M : Type u_9} → [inst : Semiring R] → (M →₀ R) → AddMonoidAlgebra R M

Construct an element of the additive monoid algebra R[M] from its coefficients M →₀ R.

abbrev AddMonoidAlgebra.coeff E1 #

{R : Type u_8} → {M : Type u_9} → [inst : Semiring R] → AddMonoidAlgebra R M → M →₀ R

The coefficients M →₀ R of an element of the additive monoid algebra R[M].

structure MonoidAlgebra E1 #

(R : Type u_8) → Type u_9 → [Semiring R] → Type (max u_8 u_9)

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.

ctor MonoidAlgebra.ofCoeff E0 #

{R : Type u_8} → {M : Type u_9} → [inst : Semiring R] → (M →₀ R) → MonoidAlgebra R M

Construct an element of the monoid algebra R[M] from its coefficients M →₀ R.

abbrev MonoidAlgebra.coeff E1 #

{R : Type u_8} → {M : Type u_9} → [inst : Semiring R] → MonoidAlgebra R M → M →₀ R

The coefficients M →₀ R of an element of the monoid algebra R[M].

def AddMonoidAlgebra.«term__[_]» E1 #

Lean.TrailingParserDescr

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.

def AddMonoidAlgebra.unexpander E1 #

Lean.PrettyPrinter.Unexpander

Unexpander for AddMonoidAlgebra.

def AddMonoidAlgebra.delabOfCoeff E1 #

Lean.PrettyPrinter.Delaborator.Delab

This prevents ofCoeff x being printed as { coeff := x } by delabStructureInstance.

def MonoidAlgebra.delabOfCoeff E1 #

Lean.PrettyPrinter.Delaborator.Delab

This prevents ofCoeff x being printed as { coeff := x } by delabStructureInstance.

def MonoidAlgebra.«term__[_]» E1 #

Lean.TrailingParserDescr

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.

def MonoidAlgebra.unexpander E1 #

Lean.PrettyPrinter.Unexpander

Unexpander for MonoidAlgebra.

theorem MonoidAlgebra.coeff_ofCoeff E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (x : M →₀ R), (MonoidAlgebra.ofCoeff x).coeff = x

theorem AddMonoidAlgebra.coeff_ofCoeff E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (x : M →₀ R), (AddMonoidAlgebra.ofCoeff x).coeff = x

theorem AddMonoidAlgebra.ofCoeff_coeff E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (x : AddMonoidAlgebra R M), AddMonoidAlgebra.ofCoeff x.coeff = x

theorem MonoidAlgebra.ofCoeff_coeff E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (x : MonoidAlgebra R M), MonoidAlgebra.ofCoeff x.coeff = x

def MonoidAlgebra.coeffEquiv E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → MonoidAlgebra R M ≃ (M →₀ R)

MonoidAlgebra.coeff as an equiv.

theorem AddMonoidAlgebra.coeffEquiv_symm_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (coeff : M →₀ R),
  AddMonoidAlgebra.coeffEquiv.symm coeff = AddMonoidAlgebra.ofCoeff coeff

theorem MonoidAlgebra.coeffEquiv_symm_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (coeff : M →₀ R),
  MonoidAlgebra.coeffEquiv.symm coeff = MonoidAlgebra.ofCoeff coeff

def AddMonoidAlgebra.coeffEquiv E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → AddMonoidAlgebra R M ≃ (M →₀ R)

AddMonoidAlgebra.coeff as an equiv.

theorem MonoidAlgebra.coeffEquiv_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (self : MonoidAlgebra R M),
  MonoidAlgebra.coeffEquiv self = self.coeff

theorem AddMonoidAlgebra.coeffEquiv_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (self : AddMonoidAlgebra R M),
  AddMonoidAlgebra.coeffEquiv self = self.coeff

theorem MonoidAlgebra.forall E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {P : MonoidAlgebra R M → Prop},
  (∀ (p : MonoidAlgebra R M), P p) ↔ ∀ (q : M →₀ R), P (MonoidAlgebra.ofCoeff q)

theorem AddMonoidAlgebra.forall E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {P : AddMonoidAlgebra R M → Prop},
  (∀ (p : AddMonoidAlgebra R M), P p) ↔ ∀ (q : M →₀ R), P (AddMonoidAlgebra.ofCoeff q)

theorem AddMonoidAlgebra.exists E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {P : AddMonoidAlgebra R M → Prop},
  (∃ p, P p) ↔ ∃ q, P (AddMonoidAlgebra.ofCoeff q)

theorem MonoidAlgebra.exists E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {P : MonoidAlgebra R M → Prop},
  (∃ p, P p) ↔ ∃ q, P (MonoidAlgebra.ofCoeff q)

theorem MonoidAlgebra.coeff_injective E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R], Function.Injective MonoidAlgebra.coeff

theorem AddMonoidAlgebra.coeff_injective E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R], Function.Injective AddMonoidAlgebra.coeff

theorem MonoidAlgebra.ofCoeff_injective E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R], Function.Injective MonoidAlgebra.ofCoeff

theorem AddMonoidAlgebra.ofCoeff_injective E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R], Function.Injective AddMonoidAlgebra.ofCoeff

theorem MonoidAlgebra.coeff_inj E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x y : MonoidAlgebra R M}, x.coeff = y.coeff ↔ x = y

theorem AddMonoidAlgebra.coeff_inj E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x y : AddMonoidAlgebra R M}, x.coeff = y.coeff ↔ x = y

theorem MonoidAlgebra.ofCoeff_inj E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x y : M →₀ R},
  MonoidAlgebra.ofCoeff x = MonoidAlgebra.ofCoeff y ↔ x = y

theorem AddMonoidAlgebra.ofCoeff_inj E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x y : M →₀ R},
  AddMonoidAlgebra.ofCoeff x = AddMonoidAlgebra.ofCoeff y ↔ x = y

theorem AddMonoidAlgebra.ext E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x y : AddMonoidAlgebra R M}, x.coeff = y.coeff → x = y

Alias of the forward direction of AddMonoidAlgebra.coeff_inj.

theorem MonoidAlgebra.ext E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x y : MonoidAlgebra R M}, x.coeff = y.coeff → x = y

Alias of the forward direction of MonoidAlgebra.coeff_inj.

theorem AddMonoidAlgebra.ext_iff E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x y : AddMonoidAlgebra R M}, x = y ↔ x.coeff = y.coeff

theorem MonoidAlgebra.ext_iff E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x y : MonoidAlgebra R M}, x = y ↔ x.coeff = y.coeff

instance AddMonoidAlgebra.instInhabited E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → Inhabited (AddMonoidAlgebra R M)

instance MonoidAlgebra.instInhabited E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → Inhabited (MonoidAlgebra R M)

instance MonoidAlgebra.instNontrivial E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [Nontrivial R] [Nonempty M], Nontrivial (MonoidAlgebra R M)

instance AddMonoidAlgebra.instNontrivial E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [Nontrivial R] [Nonempty M], Nontrivial (AddMonoidAlgebra R M)

instance MonoidAlgebra.instUnique E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [Subsingleton R] → Unique (MonoidAlgebra R M)

instance AddMonoidAlgebra.instUnique E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [Subsingleton R] → Unique (AddMonoidAlgebra R M)

instance AddMonoidAlgebra.instDecidableEq E0 #

{R : Type u_1} →
  {M : Type u_4} → [inst : Semiring R] → [DecidableEq R] → [DecidableEq M] → DecidableEq (AddMonoidAlgebra R M)

instance MonoidAlgebra.instDecidableEq E0 #

{R : Type u_1} →
  {M : Type u_4} → [inst : Semiring R] → [DecidableEq R] → [DecidableEq M] → DecidableEq (MonoidAlgebra R M)

instance AddMonoidAlgebra.instAddMonoid E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → AddMonoid (AddMonoidAlgebra R M)

instance MonoidAlgebra.instAddMonoid E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → AddMonoid (MonoidAlgebra R M)

instance AddMonoidAlgebra.instAddCommMonoid E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → AddCommMonoid (AddMonoidAlgebra R M)

instance MonoidAlgebra.instAddCommMonoid E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → AddCommMonoid (MonoidAlgebra R M)

instance MonoidAlgebra.instIsCancelAdd E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [IsCancelAdd R], IsCancelAdd (MonoidAlgebra R M)

instance AddMonoidAlgebra.instIsCancelAdd E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [IsCancelAdd R], IsCancelAdd (AddMonoidAlgebra R M)

def MonoidAlgebra.coeffAddEquiv E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → MonoidAlgebra R M ≃+ (M →₀ R)

MonoidAlgebra.coeff as an AddEquiv.

theorem AddMonoidAlgebra.coeffAddEquiv_symm_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (coeff : M →₀ R),
  AddMonoidAlgebra.coeffAddEquiv.symm coeff = AddMonoidAlgebra.ofCoeff coeff

theorem MonoidAlgebra.coeffAddEquiv_symm_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (coeff : M →₀ R),
  MonoidAlgebra.coeffAddEquiv.symm coeff = MonoidAlgebra.ofCoeff coeff

theorem AddMonoidAlgebra.coeffAddEquiv_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (self : AddMonoidAlgebra R M),
  AddMonoidAlgebra.coeffAddEquiv self = self.coeff

theorem MonoidAlgebra.coeffAddEquiv_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (self : MonoidAlgebra R M),
  MonoidAlgebra.coeffAddEquiv self = self.coeff

def AddMonoidAlgebra.coeffAddEquiv E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → AddMonoidAlgebra R M ≃+ (M →₀ R)

AddMonoidAlgebra.coeff as an AddEquiv.

theorem MonoidAlgebra.coeff_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R], MonoidAlgebra.coeff 0 = 0

theorem AddMonoidAlgebra.coeff_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R], AddMonoidAlgebra.coeff 0 = 0

theorem AddMonoidAlgebra.ofCoeff_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R], AddMonoidAlgebra.ofCoeff 0 = 0

theorem MonoidAlgebra.ofCoeff_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R], MonoidAlgebra.ofCoeff 0 = 0

theorem AddMonoidAlgebra.coeff_eq_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x : AddMonoidAlgebra R M}, x.coeff = 0 ↔ x = 0

theorem MonoidAlgebra.coeff_eq_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x : MonoidAlgebra R M}, x.coeff = 0 ↔ x = 0

theorem AddMonoidAlgebra.ofCoeff_eq_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x : M →₀ R}, AddMonoidAlgebra.ofCoeff x = 0 ↔ x = 0

theorem MonoidAlgebra.ofCoeff_eq_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x : M →₀ R}, MonoidAlgebra.ofCoeff x = 0 ↔ x = 0

theorem AddMonoidAlgebra.coeff_add E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (x y : AddMonoidAlgebra R M), (x + y).coeff = x.coeff + y.coeff

theorem MonoidAlgebra.coeff_add E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (x y : MonoidAlgebra R M), (x + y).coeff = x.coeff + y.coeff

theorem AddMonoidAlgebra.ofCoeff_add E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (x y : M →₀ R),
  AddMonoidAlgebra.ofCoeff (x + y) = AddMonoidAlgebra.ofCoeff x + AddMonoidAlgebra.ofCoeff y

theorem MonoidAlgebra.ofCoeff_add E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (x y : M →₀ R),
  MonoidAlgebra.ofCoeff (x + y) = MonoidAlgebra.ofCoeff x + MonoidAlgebra.ofCoeff y

theorem AddMonoidAlgebra.coeff_sum E0 #

∀ {R : Type u_1} {M : Type u_4} {ι : Type u_7} [inst : Semiring R] (s : Finset ι) (f : ι → AddMonoidAlgebra R M),
  (∑ i ∈ s, f i).coeff = ∑ i ∈ s, (f i).coeff

theorem MonoidAlgebra.coeff_sum E0 #

∀ {R : Type u_1} {M : Type u_4} {ι : Type u_7} [inst : Semiring R] (s : Finset ι) (f : ι → MonoidAlgebra R M),
  (∑ i ∈ s, f i).coeff = ∑ i ∈ s, (f i).coeff

theorem MonoidAlgebra.ofCoeff_sum E0 #

∀ {R : Type u_1} {M : Type u_4} {ι : Type u_7} [inst : Semiring R] (s : Finset ι) (f : ι → M →₀ R),
  MonoidAlgebra.ofCoeff (∑ i ∈ s, f i) = ∑ i ∈ s, MonoidAlgebra.ofCoeff (f i)

theorem AddMonoidAlgebra.ofCoeff_sum E0 #

∀ {R : Type u_1} {M : Type u_4} {ι : Type u_7} [inst : Semiring R] (s : Finset ι) (f : ι → M →₀ R),
  AddMonoidAlgebra.ofCoeff (∑ i ∈ s, f i) = ∑ i ∈ s, AddMonoidAlgebra.ofCoeff (f i)

theorem MonoidAlgebra.coeff_finsuppSum E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} {ι : Type u_7} [inst : Semiring R] [inst_1 : AddCommMonoid N]
  (f : ι →₀ N) (g : ι → N → MonoidAlgebra R M), (f.sum g).coeff = f.sum fun i n ↦ (g i n).coeff

theorem AddMonoidAlgebra.coeff_finsuppSum E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} {ι : Type u_7} [inst : Semiring R] [inst_1 : AddCommMonoid N]
  (f : ι →₀ N) (g : ι → N → AddMonoidAlgebra R M), (f.sum g).coeff = f.sum fun i n ↦ (g i n).coeff

theorem MonoidAlgebra.ofCoeff_finsuppSum E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} {ι : Type u_7} [inst : Semiring R] [inst_1 : AddCommMonoid N]
  (f : ι →₀ N) (g : ι → N → M →₀ R), MonoidAlgebra.ofCoeff (f.sum g) = f.sum fun i n ↦ MonoidAlgebra.ofCoeff (g i n)

theorem AddMonoidAlgebra.ofCoeff_finsuppSum E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} {ι : Type u_7} [inst : Semiring R] [inst_1 : AddCommMonoid N]
  (f : ι →₀ N) (g : ι → N → M →₀ R),
  AddMonoidAlgebra.ofCoeff (f.sum g) = f.sum fun i n ↦ AddMonoidAlgebra.ofCoeff (g i n)

def MonoidAlgebra.single E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → M → R → MonoidAlgebra R M

MonoidAlgebra.single m r for m : M, r : R is the element rm : R[M].

def AddMonoidAlgebra.single E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → M → R → AddMonoidAlgebra R M

AddMonoidAlgebra.single m r for m : M, r : R is the element rm : R[M].

theorem AddMonoidAlgebra.coeff_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r : R), (AddMonoidAlgebra.single m r).coeff = fun₀ | m => r

theorem MonoidAlgebra.coeff_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r : R), (MonoidAlgebra.single m r).coeff = fun₀ | m => r

theorem MonoidAlgebra.ofCoeff_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r : R),
  (MonoidAlgebra.ofCoeff fun₀ | m => r) = MonoidAlgebra.single m r

theorem AddMonoidAlgebra.ofCoeff_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r : R),
  (AddMonoidAlgebra.ofCoeff fun₀ | m => r) = AddMonoidAlgebra.single m r

theorem MonoidAlgebra.single_inj E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r₁ r₂ : R} {m₁ m₂ : M},
  MonoidAlgebra.single m₁ r₁ = MonoidAlgebra.single m₂ r₂ ↔ m₁ = m₂ ∧ r₁ = r₂ ∨ r₁ = 0 ∧ r₂ = 0

theorem AddMonoidAlgebra.single_inj E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r₁ r₂ : R} {m₁ m₂ : M},
  AddMonoidAlgebra.single m₁ r₁ = AddMonoidAlgebra.single m₂ r₂ ↔ m₁ = m₂ ∧ r₁ = r₂ ∨ r₁ = 0 ∧ r₂ = 0

theorem AddMonoidAlgebra.single_left_inj E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r : R} {m₁ m₂ : M},
  r ≠ 0 → (AddMonoidAlgebra.single m₁ r = AddMonoidAlgebra.single m₂ r ↔ m₁ = m₂)

theorem MonoidAlgebra.single_left_inj E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r : R} {m₁ m₂ : M},
  r ≠ 0 → (MonoidAlgebra.single m₁ r = MonoidAlgebra.single m₂ r ↔ m₁ = m₂)

theorem MonoidAlgebra.single_right_inj E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r₁ r₂ : R} {m : M},
  MonoidAlgebra.single m r₁ = MonoidAlgebra.single m r₂ ↔ r₁ = r₂

theorem AddMonoidAlgebra.single_right_inj E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r₁ r₂ : R} {m : M},
  AddMonoidAlgebra.single m r₁ = AddMonoidAlgebra.single m r₂ ↔ r₁ = r₂

theorem MonoidAlgebra.single_left_injective E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r : R}, r ≠ 0 → Function.Injective fun m ↦ MonoidAlgebra.single m r

MonoidAlgebra.single m r is injective in m if r ≠ 0. For injectivity in r, see MonoidAlgebra.single_injective.

theorem AddMonoidAlgebra.single_left_injective E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r : R},
  r ≠ 0 → Function.Injective fun m ↦ AddMonoidAlgebra.single m r

AddMonoidAlgebra.single m r is injective in m if r ≠ 0. For injectivity in r, see AddMonoidAlgebra.single_injective.

theorem MonoidAlgebra.single_right_injective E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {m : M}, Function.Injective (MonoidAlgebra.single m)

theorem AddMonoidAlgebra.single_right_injective E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {m : M}, Function.Injective (AddMonoidAlgebra.single m)

theorem AddMonoidAlgebra.single_add_single_inj E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r₁ r₂ : R} {m₁ m₂ m₁' m₂' : M},
  r₁ ≠ 0 →
    r₂ ≠ 0 →
      (AddMonoidAlgebra.single m₁ r₁ + AddMonoidAlgebra.single m₂ r₂ =
          AddMonoidAlgebra.single m₁' r₁ + AddMonoidAlgebra.single m₂' r₂ ↔
        m₁ = m₁' ∧ m₂ = m₂' ∨ r₁ = r₂ ∧ m₁ = m₂' ∧ m₂ = m₁' ∨ r₁ + r₂ = 0 ∧ m₁ = m₂ ∧ m₁' = m₂')

theorem MonoidAlgebra.single_add_single_inj E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r₁ r₂ : R} {m₁ m₂ m₁' m₂' : M},
  r₁ ≠ 0 →
    r₂ ≠ 0 →
      (MonoidAlgebra.single m₁ r₁ + MonoidAlgebra.single m₂ r₂ =
          MonoidAlgebra.single m₁' r₁ + MonoidAlgebra.single m₂' r₂ ↔
        m₁ = m₁' ∧ m₂ = m₂' ∨ r₁ = r₂ ∧ m₁ = m₂' ∧ m₂ = m₁' ∨ r₁ + r₂ = 0 ∧ m₁ = m₂ ∧ m₁' = m₂')

def MonoidAlgebra.erase E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → M → MonoidAlgebra R M → MonoidAlgebra R M

Remove a term from an element of the monoid algebra.

def AddMonoidAlgebra.erase E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → M → AddMonoidAlgebra R M → AddMonoidAlgebra R M

Remove a term from an element of the additive monoid algebra.

theorem AddMonoidAlgebra.coeff_erase E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (x : AddMonoidAlgebra R M),
  (AddMonoidAlgebra.erase m x).coeff = Finsupp.erase m x.coeff

theorem MonoidAlgebra.coeff_erase E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (x : MonoidAlgebra R M),
  (MonoidAlgebra.erase m x).coeff = Finsupp.erase m x.coeff

theorem AddMonoidAlgebra.ofCoeff_erase E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (x : M →₀ R),
  AddMonoidAlgebra.ofCoeff (Finsupp.erase m x) = AddMonoidAlgebra.erase m (AddMonoidAlgebra.ofCoeff x)

theorem MonoidAlgebra.ofCoeff_erase E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (x : M →₀ R),
  MonoidAlgebra.ofCoeff (Finsupp.erase m x) = MonoidAlgebra.erase m (MonoidAlgebra.ofCoeff x)

theorem AddMonoidAlgebra.erase_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M), AddMonoidAlgebra.erase m 0 = 0

theorem MonoidAlgebra.erase_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M), MonoidAlgebra.erase m 0 = 0

theorem MonoidAlgebra.erase_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r : R),
  MonoidAlgebra.erase m (MonoidAlgebra.single m r) = 0

theorem AddMonoidAlgebra.erase_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r : R),
  AddMonoidAlgebra.erase m (AddMonoidAlgebra.single m r) = 0

def MonoidAlgebra.update E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → M → R → MonoidAlgebra R M → MonoidAlgebra R M

Replace the m-th coefficient of an element x of the monoid algebra by a given value r : R. If r = 0, this is equal to x.erase m.

def AddMonoidAlgebra.update E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → M → R → AddMonoidAlgebra R M → AddMonoidAlgebra R M

Replace the m-th coefficient of an element x of the monoid algebra by a given value r : R. If r = 0, this is equal to x.erase m.

theorem MonoidAlgebra.coeff_update E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r : R) (x : MonoidAlgebra R M),
  (MonoidAlgebra.update m r x).coeff = x.coeff.update m r

theorem AddMonoidAlgebra.coeff_update E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r : R) (x : AddMonoidAlgebra R M),
  (AddMonoidAlgebra.update m r x).coeff = x.coeff.update m r

theorem AddMonoidAlgebra.ofCoeff_update E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r : R) (x : M →₀ R),
  AddMonoidAlgebra.ofCoeff (x.update m r) = AddMonoidAlgebra.update m r (AddMonoidAlgebra.ofCoeff x)

theorem MonoidAlgebra.ofCoeff_update E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r : R) (x : M →₀ R),
  MonoidAlgebra.ofCoeff (x.update m r) = MonoidAlgebra.update m r (MonoidAlgebra.ofCoeff x)

instance MonoidAlgebra.smulZeroClass E0 #

{R : Type u_1} →
  {M : Type u_4} → [inst : Semiring R] → {A : Type u_8} → [SMulZeroClass A R] → SMulZeroClass A (MonoidAlgebra R M)

instance AddMonoidAlgebra.smulZeroClass E0 #

{R : Type u_1} →
  {M : Type u_4} → [inst : Semiring R] → {A : Type u_8} → [SMulZeroClass A R] → SMulZeroClass A (AddMonoidAlgebra R M)

theorem MonoidAlgebra.coeff_smul E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {A : Type u_8} [inst_1 : SMulZeroClass A R] (a : A)
  (x : MonoidAlgebra R M), (a • x).coeff = a • x.coeff

theorem AddMonoidAlgebra.coeff_smul E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {A : Type u_8} [inst_1 : SMulZeroClass A R] (a : A)
  (x : AddMonoidAlgebra R M), (a • x).coeff = a • x.coeff

theorem MonoidAlgebra.ofCoeff_smul E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {A : Type u_8} [inst_1 : SMulZeroClass A R] (a : A) (x : M →₀ R),
  MonoidAlgebra.ofCoeff (a • x) = a • MonoidAlgebra.ofCoeff x

theorem AddMonoidAlgebra.ofCoeff_smul E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {A : Type u_8} [inst_1 : SMulZeroClass A R] (a : A) (x : M →₀ R),
  AddMonoidAlgebra.ofCoeff (a • x) = a • AddMonoidAlgebra.ofCoeff x

theorem AddMonoidAlgebra.coeff_smul_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {A : Type u_8} [inst_1 : SMulZeroClass A R] (a : A)
  (x : AddMonoidAlgebra R M) (m : M), (a • x).coeff m = a • x.coeff m

theorem MonoidAlgebra.coeff_smul_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {A : Type u_8} [inst_1 : SMulZeroClass A R] (a : A)
  (x : MonoidAlgebra R M) (m : M), (a • x).coeff m = a • x.coeff m

theorem AddMonoidAlgebra.smul_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {A : Type u_8} [inst_1 : SMulZeroClass A R] (a : A) (m : M) (r : R),
  a • AddMonoidAlgebra.single m r = AddMonoidAlgebra.single m (a • r)

theorem MonoidAlgebra.smul_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {A : Type u_8} [inst_1 : SMulZeroClass A R] (a : A) (m : M) (r : R),
  a • MonoidAlgebra.single m r = MonoidAlgebra.single m (a • r)

theorem MonoidAlgebra.smul_single' E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (r' : R) (m : M) (r : R),
  r' • MonoidAlgebra.single m r = MonoidAlgebra.single m (r' * r)

theorem AddMonoidAlgebra.smul_single' E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (r' : R) (m : M) (r : R),
  r' • AddMonoidAlgebra.single m r = AddMonoidAlgebra.single m (r' * r)

instance AddMonoidAlgebra.distribSMul E0 #

{R : Type u_1} →
  {M : Type u_4} → {N : Type u_5} → [inst : Semiring R] → [DistribSMul N R] → DistribSMul N (AddMonoidAlgebra R M)

instance MonoidAlgebra.distribSMul E0 #

{R : Type u_1} →
  {M : Type u_4} → {N : Type u_5} → [inst : Semiring R] → [DistribSMul N R] → DistribSMul N (MonoidAlgebra R M)

instance AddMonoidAlgebra.isScalarTower E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} {O : Type u_6} [inst : Semiring R] [inst_1 : SMulZeroClass N R]
  [inst_2 : SMulZeroClass O R] [inst_3 : SMul N O] [IsScalarTower N O R], IsScalarTower N O (AddMonoidAlgebra R M)

instance MonoidAlgebra.isScalarTower E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} {O : Type u_6} [inst : Semiring R] [inst_1 : SMulZeroClass N R]
  [inst_2 : SMulZeroClass O R] [inst_3 : SMul N O] [IsScalarTower N O R], IsScalarTower N O (MonoidAlgebra R M)

instance MonoidAlgebra.smulCommClass E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} {O : Type u_6} [inst : Semiring R] [inst_1 : SMulZeroClass N R]
  [inst_2 : SMulZeroClass O R] [SMulCommClass N O R], SMulCommClass N O (MonoidAlgebra R M)

instance AddMonoidAlgebra.smulCommClass E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} {O : Type u_6} [inst : Semiring R] [inst_1 : SMulZeroClass N R]
  [inst_2 : SMulZeroClass O R] [SMulCommClass N O R], SMulCommClass N O (AddMonoidAlgebra R M)

instance MonoidAlgebra.isCentralScalar E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} [inst : Semiring R] [inst_1 : SMulZeroClass N R]
  [inst_2 : SMulZeroClass Nᵐᵒᵖ R] [IsCentralScalar N R], IsCentralScalar N (MonoidAlgebra R M)

instance AddMonoidAlgebra.isCentralScalar E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} [inst : Semiring R] [inst_1 : SMulZeroClass N R]
  [inst_2 : SMulZeroClass Nᵐᵒᵖ R] [IsCentralScalar N R], IsCentralScalar N (AddMonoidAlgebra R M)

theorem AddMonoidAlgebra.single_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M), AddMonoidAlgebra.single m 0 = 0

theorem MonoidAlgebra.single_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M), MonoidAlgebra.single m 0 = 0

theorem AddMonoidAlgebra.single_add E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r₁ r₂ : R),
  AddMonoidAlgebra.single m (r₁ + r₂) = AddMonoidAlgebra.single m r₁ + AddMonoidAlgebra.single m r₂

theorem MonoidAlgebra.single_add E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r₁ r₂ : R),
  MonoidAlgebra.single m (r₁ + r₂) = MonoidAlgebra.single m r₁ + MonoidAlgebra.single m r₂

theorem MonoidAlgebra.single_add_erase E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (x : MonoidAlgebra R M),
  MonoidAlgebra.single m (x.coeff m) + MonoidAlgebra.erase m x = x

theorem AddMonoidAlgebra.single_add_erase E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (x : AddMonoidAlgebra R M),
  AddMonoidAlgebra.single m (x.coeff m) + AddMonoidAlgebra.erase m x = x

theorem AddMonoidAlgebra.erase_add_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (x : AddMonoidAlgebra R M),
  AddMonoidAlgebra.erase m x + AddMonoidAlgebra.single m (x.coeff m) = x

theorem MonoidAlgebra.erase_add_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (x : MonoidAlgebra R M),
  MonoidAlgebra.erase m x + MonoidAlgebra.single m (x.coeff m) = x

def MonoidAlgebra.singleAddHom E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → M → R →+ MonoidAlgebra R M

MonoidAlgebra.single as an AddMonoidHom.

TODO: Rename to singleAddMonoidHom.

theorem MonoidAlgebra.singleAddHom_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r : R),
  (MonoidAlgebra.singleAddHom m) r = MonoidAlgebra.single m r

def AddMonoidAlgebra.singleAddHom E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → M → R →+ AddMonoidAlgebra R M

AddMonoidAlgebra.single as an AddMonoidHom.

TODO: Rename to singleAddMonoidHom.

theorem AddMonoidAlgebra.singleAddHom_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (m : M) (r : R),
  (AddMonoidAlgebra.singleAddHom m) r = AddMonoidAlgebra.single m r

theorem MonoidAlgebra.addMonoidHom_ext E1 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} [inst : Semiring R] [inst_1 : AddZeroClass N]
  ⦃f g : MonoidAlgebra R M →+ N⦄,
  (∀ (m : M) (r : R), f (MonoidAlgebra.single m r) = g (MonoidAlgebra.single m r)) → f = g

If two additive homomorphisms from R[M] are equal on each single r m, then they are equal.

theorem AddMonoidAlgebra.addMonoidHom_ext E1 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} [inst : Semiring R] [inst_1 : AddZeroClass N]
  ⦃f g : AddMonoidAlgebra R M →+ N⦄,
  (∀ (m : M) (r : R), f (AddMonoidAlgebra.single m r) = g (AddMonoidAlgebra.single m r)) → f = g

If two additive homomorphisms from R[M] are equal on each single r m, then they are equal.

theorem MonoidAlgebra.addHom_ext' E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {N : Type u_8} [inst_1 : AddZeroClass N]
  ⦃f g : MonoidAlgebra R M →+ N⦄,
  (∀ (m : M), f.comp (MonoidAlgebra.singleAddHom m) = g.comp (MonoidAlgebra.singleAddHom m)) → f = g

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'.

theorem AddMonoidAlgebra.addHom_ext' E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {N : Type u_8} [inst_1 : AddZeroClass N]
  ⦃f g : AddMonoidAlgebra R M →+ N⦄,
  (∀ (m : M), f.comp (AddMonoidAlgebra.singleAddHom m) = g.comp (AddMonoidAlgebra.singleAddHom m)) → f = g

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'.

theorem AddMonoidAlgebra.addHom_ext'_iff E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {N : Type u_8} [inst_1 : AddZeroClass N]
  {f g : AddMonoidAlgebra R M →+ N},
  f = g ↔ ∀ (m : M), f.comp (AddMonoidAlgebra.singleAddHom m) = g.comp (AddMonoidAlgebra.singleAddHom m)

theorem MonoidAlgebra.addHom_ext'_iff E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {N : Type u_8} [inst_1 : AddZeroClass N]
  {f g : MonoidAlgebra R M →+ N},
  f = g ↔ ∀ (m : M), f.comp (MonoidAlgebra.singleAddHom m) = g.comp (MonoidAlgebra.singleAddHom m)

theorem MonoidAlgebra.sum_coeff_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (f : MonoidAlgebra R M), f.coeff.sum MonoidAlgebra.single = f

theorem AddMonoidAlgebra.sum_coeff_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (f : AddMonoidAlgebra R M), f.coeff.sum AddMonoidAlgebra.single = f

theorem MonoidAlgebra.single_eq_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r : R} {m : M}, MonoidAlgebra.single m r = 0 ↔ r = 0

theorem AddMonoidAlgebra.single_eq_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r : R} {m : M}, AddMonoidAlgebra.single m r = 0 ↔ r = 0

theorem AddMonoidAlgebra.single_ne_zero E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r : R} {m : M}, AddMonoidAlgebra.single m r ≠ 0 ↔ r ≠ 0

theorem MonoidAlgebra.single_ne_zero E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r : R} {m : M}, MonoidAlgebra.single m r ≠ 0 ↔ r ≠ 0

theorem AddMonoidAlgebra.induction E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {motive : AddMonoidAlgebra R M → Prop} (x : AddMonoidAlgebra R M),
  motive 0 →
    (∀ (m : M) (r : R) (x : AddMonoidAlgebra R M),
        m ∉ x.coeff.support → r ≠ 0 → motive x → motive (AddMonoidAlgebra.single m r + x)) →
      motive x

theorem MonoidAlgebra.induction E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {motive : MonoidAlgebra R M → Prop} (x : MonoidAlgebra R M),
  motive 0 →
    (∀ (m : M) (r : R) (x : MonoidAlgebra R M),
        m ∉ x.coeff.support → r ≠ 0 → motive x → motive (MonoidAlgebra.single m r + x)) →
      motive x

theorem AddMonoidAlgebra.induction_linear E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {motive : AddMonoidAlgebra R M → Prop} (x : AddMonoidAlgebra R M),
  motive 0 →
    (∀ (x y : AddMonoidAlgebra R M), motive x → motive y → motive (x + y)) →
      (∀ (m : M) (r : R), motive (AddMonoidAlgebra.single m r)) → motive x

theorem MonoidAlgebra.induction_linear E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {motive : MonoidAlgebra R M → Prop} (x : MonoidAlgebra R M),
  motive 0 →
    (∀ (x y : MonoidAlgebra R M), motive x → motive y → motive (x + y)) →
      (∀ (m : M) (r : R), motive (MonoidAlgebra.single m r)) → motive x

theorem AddMonoidAlgebra.addSubmonoidClosure_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R],
  AddSubmonoid.closure {x | ∃ m r, x = AddMonoidAlgebra.single m r} = ⊤

theorem MonoidAlgebra.addSubmonoidClosure_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R], AddSubmonoid.closure {x | ∃ m r, x = MonoidAlgebra.single m r} = ⊤

instance MonoidAlgebra.one E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [One M] → One (MonoidAlgebra R M)

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

instance AddMonoidAlgebra.zero E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [Zero M] → One (AddMonoidAlgebra R M)

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

theorem MonoidAlgebra.one_def E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : One M], 1 = MonoidAlgebra.single 1 1

theorem AddMonoidAlgebra.one_def E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Zero M], 1 = AddMonoidAlgebra.single 0 1

theorem AddMonoidAlgebra.coeff_one_zero E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Zero M], (AddMonoidAlgebra.coeff 1) 0 = 1

theorem MonoidAlgebra.coeff_one_one E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : One M], (MonoidAlgebra.coeff 1) 1 = 1

def MonoidAlgebra.mul' E1 #

{R : Type u_1} →
  {M : Type u_4} → [inst : Semiring R] → [Mul M] → MonoidAlgebra R M → MonoidAlgebra R M → MonoidAlgebra R M

The multiplication in a monoid algebra.

We make it irreducible so that Lean doesn't unfold it when trying to unify two different things.

def AddMonoidAlgebra.mul' E1 #

{R : Type u_1} →
  {M : Type u_4} → [inst : Semiring R] → [Add M] → AddMonoidAlgebra R M → AddMonoidAlgebra R M → AddMonoidAlgebra R M

The multiplication in an additive monoid algebra.

We make it irreducible so that Lean doesn't unfold it when trying to unify two different things.

instance MonoidAlgebra.instMul E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [Mul M] → Mul (MonoidAlgebra R M)

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.

instance AddMonoidAlgebra.instMul E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [Add M] → Mul (AddMonoidAlgebra R M)

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.

theorem MonoidAlgebra.mul_def E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Mul M] (x y : MonoidAlgebra R M),
  x * y = x.coeff.sum fun m₁ r₁ ↦ y.coeff.sum fun m₂ r₂ ↦ MonoidAlgebra.single (m₁ * m₂) (r₁ * r₂)

theorem AddMonoidAlgebra.mul_def E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Add M] (x y : AddMonoidAlgebra R M),
  x * y = x.coeff.sum fun m₁ r₁ ↦ y.coeff.sum fun m₂ r₂ ↦ AddMonoidAlgebra.single (m₁ + m₂) (r₁ * r₂)

instance AddMonoidAlgebra.nonUnitalNonAssocSemiring E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [Add M] → NonUnitalNonAssocSemiring (AddMonoidAlgebra R M)

instance MonoidAlgebra.nonUnitalNonAssocSemiring E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [Mul M] → NonUnitalNonAssocSemiring (MonoidAlgebra R M)

theorem AddMonoidAlgebra.coeff_mul E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Add M] [inst_2 : DecidableEq M]
  (x y : AddMonoidAlgebra R M) (m : M),
  (x * y).coeff m = x.coeff.sum fun m₁ r₁ ↦ y.coeff.sum fun m₂ r₂ ↦ if m₁ + m₂ = m then r₁ * r₂ else 0

theorem MonoidAlgebra.coeff_mul E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Mul M] [inst_2 : DecidableEq M] (x y : MonoidAlgebra R M)
  (m : M), (x * y).coeff m = x.coeff.sum fun m₁ r₁ ↦ y.coeff.sum fun m₂ r₂ ↦ if m₁ * m₂ = m then r₁ * r₂ else 0

theorem AddMonoidAlgebra.coeff_mul_antidiag E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Add M] (x y : AddMonoidAlgebra R M) (m : M)
  (s : Finset (M × M)), (∀ {p : M × M}, p ∈ s ↔ p.1 + p.2 = m) → (x * y).coeff m = ∑ p ∈ s, x.coeff p.1 * y.coeff p.2

theorem MonoidAlgebra.coeff_mul_antidiag E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Mul M] (x y : MonoidAlgebra R M) (m : M)
  (s : Finset (M × M)), (∀ {p : M × M}, p ∈ s ↔ p.1 * p.2 = m) → (x * y).coeff m = ∑ p ∈ s, x.coeff p.1 * y.coeff p.2

theorem MonoidAlgebra.single_mul_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Mul M] (m₁ m₂ : M) (r₁ r₂ : R),
  MonoidAlgebra.single m₁ r₁ * MonoidAlgebra.single m₂ r₂ = MonoidAlgebra.single (m₁ * m₂) (r₁ * r₂)

theorem AddMonoidAlgebra.single_mul_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Add M] (m₁ m₂ : M) (r₁ r₂ : R),
  AddMonoidAlgebra.single m₁ r₁ * AddMonoidAlgebra.single m₂ r₂ = AddMonoidAlgebra.single (m₁ + m₂) (r₁ * r₂)

theorem AddMonoidAlgebra.single_commute_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r₁ r₂ : R} {m₁ m₂ : M} [inst_1 : Add M],
  AddCommute m₁ m₂ → Commute r₁ r₂ → Commute (AddMonoidAlgebra.single m₁ r₁) (AddMonoidAlgebra.single m₂ r₂)

theorem MonoidAlgebra.single_commute_single E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r₁ r₂ : R} {m₁ m₂ : M} [inst_1 : Mul M],
  Commute m₁ m₂ → Commute r₁ r₂ → Commute (MonoidAlgebra.single m₁ r₁) (MonoidAlgebra.single m₂ r₂)

theorem MonoidAlgebra.single_commute E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r : R} {m : M} [inst_1 : Mul M],
  (∀ (m' : M), Commute m m') →
    (∀ (r' : R), Commute r r') → ∀ (x : MonoidAlgebra R M), Commute (MonoidAlgebra.single m r) x

theorem AddMonoidAlgebra.single_commute E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {r : R} {m : M} [inst_1 : Add M],
  (∀ (m' : M), AddCommute m m') →
    (∀ (r' : R), Commute r r') → ∀ (x : AddMonoidAlgebra R M), Commute (AddMonoidAlgebra.single m r) x

theorem MonoidAlgebra.coeff_mul_single_eq_coeff_mul E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x : MonoidAlgebra R M} {r : R} {m m₁ : M} [inst_1 : Mul M]
  (m₂ : M), (∀ m' ∈ x.coeff.support, m' * m = m₁ ↔ m' = m₂) → (x * MonoidAlgebra.single m r).coeff m₁ = x.coeff m₂ * r

theorem AddMonoidAlgebra.coeff_mul_single_eq_coeff_mul E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x : AddMonoidAlgebra R M} {r : R} {m m₁ : M} [inst_1 : Add M]
  (m₂ : M),
  (∀ m' ∈ x.coeff.support, m' + m = m₁ ↔ m' = m₂) → (x * AddMonoidAlgebra.single m r).coeff m₁ = x.coeff m₂ * r

theorem MonoidAlgebra.coeff_single_mul_eq_mul_coeff E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x : MonoidAlgebra R M} {r : R} {m m₁ : M} [inst_1 : Mul M]
  (m₂ : M), (∀ m' ∈ x.coeff.support, m * m' = m₁ ↔ m' = m₂) → (MonoidAlgebra.single m r * x).coeff m₁ = r * x.coeff m₂

theorem AddMonoidAlgebra.coeff_single_mul_eq_mul_coeff E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {x : AddMonoidAlgebra R M} {r : R} {m m₁ : M} [inst_1 : Add M]
  (m₂ : M),
  (∀ m' ∈ x.coeff.support, m + m' = m₁ ↔ m' = m₂) → (AddMonoidAlgebra.single m r * x).coeff m₁ = r * x.coeff m₂

theorem MonoidAlgebra.coeff_mul_single_of_forall_mul_ne E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {m m' : M} [inst_1 : Mul M] (r : R) (x : MonoidAlgebra R M),
  (∀ (d : M), d * m ≠ m') → (x * MonoidAlgebra.single m r).coeff m' = 0

theorem AddMonoidAlgebra.coeff_mul_single_of_forall_add_ne E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {m m' : M} [inst_1 : Add M] (r : R) (x : AddMonoidAlgebra R M),
  (∀ (d : M), d + m ≠ m') → (x * AddMonoidAlgebra.single m r).coeff m' = 0

theorem MonoidAlgebra.coeff_single_mul_of_forall_mul_ne E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {m m' : M} [inst_1 : Mul M] (r : R) (x : MonoidAlgebra R M),
  (∀ (d : M), m * d ≠ m') → (MonoidAlgebra.single m r * x).coeff m' = 0

theorem AddMonoidAlgebra.coeff_single_mul_of_forall_add_ne E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {m m' : M} [inst_1 : Add M] (r : R) (x : AddMonoidAlgebra R M),
  (∀ (d : M), m + d ≠ m') → (AddMonoidAlgebra.single m r * x).coeff m' = 0

def MonoidAlgebra.ofMagma E1 #

(R : Type u_8) → (M : Type u_9) → [inst : Semiring R] → [inst_1 : Mul M] → M →ₙ* MonoidAlgebra R M

The embedding of a magma into its magma algebra.

theorem MonoidAlgebra.ofMagma_apply E0 #

∀ (R : Type u_8) (M : Type u_9) [inst : Semiring R] [inst_1 : Mul M] (a : M),
  (MonoidAlgebra.ofMagma R M) a = MonoidAlgebra.single a 1

instance MonoidAlgebra.nonUnitalSemiring E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [Semigroup M] → NonUnitalSemiring (MonoidAlgebra R M)

instance AddMonoidAlgebra.nonUnitalSemiring E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [AddSemigroup M] → NonUnitalSemiring (AddMonoidAlgebra R M)

instance MonoidAlgebra.nonAssocSemiring E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [MulOneClass M] → NonAssocSemiring (MonoidAlgebra R M)

instance AddMonoidAlgebra.nonAssocSemiring E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [AddZeroClass M] → NonAssocSemiring (AddMonoidAlgebra R M)

theorem AddMonoidAlgebra.natCast_def E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (n : ℕ), ↑n = AddMonoidAlgebra.single 0 ↑n

theorem MonoidAlgebra.natCast_def E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] (n : ℕ), ↑n = MonoidAlgebra.single 1 ↑n

theorem AddMonoidAlgebra.ofNat_def E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (n : ℕ) [inst_2 : n.AtLeastTwo],
  OfNat.ofNat n = AddMonoidAlgebra.single 0 (OfNat.ofNat n)

theorem MonoidAlgebra.ofNat_def E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] (n : ℕ) [inst_2 : n.AtLeastTwo],
  OfNat.ofNat n = MonoidAlgebra.single 1 (OfNat.ofNat n)

theorem AddMonoidAlgebra.coeff_natCast E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (n : ℕ), (↑n).coeff = fun₀ | 0 => ↑n

theorem MonoidAlgebra.coeff_natCast E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] (n : ℕ), (↑n).coeff = fun₀ | 1 => ↑n

theorem AddMonoidAlgebra.coeff_ofNat E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (n : ℕ) [inst_2 : n.AtLeastTwo],
  (OfNat.ofNat n).coeff = fun₀ | 0 => OfNat.ofNat n

theorem MonoidAlgebra.coeff_ofNat E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] (n : ℕ) [inst_2 : n.AtLeastTwo],
  (OfNat.ofNat n).coeff = fun₀ | 1 => OfNat.ofNat n

theorem MonoidAlgebra.coeff_mul_single_one E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] (x : MonoidAlgebra R M) (r : R) (m : M),
  (x * MonoidAlgebra.single 1 r).coeff m = x.coeff m * r

theorem AddMonoidAlgebra.coeff_mul_single_zero E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (x : AddMonoidAlgebra R M) (r : R)
  (m : M), (x * AddMonoidAlgebra.single 0 r).coeff m = x.coeff m * r

theorem AddMonoidAlgebra.coeff_single_zero_mul E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (x : AddMonoidAlgebra R M) (r : R)
  (m : M), (AddMonoidAlgebra.single 0 r * x).coeff m = r * x.coeff m

theorem MonoidAlgebra.coeff_single_one_mul E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] (x : MonoidAlgebra R M) (r : R) (m : M),
  (MonoidAlgebra.single 1 r * x).coeff m = r * x.coeff m

theorem AddMonoidAlgebra.coeff_mul_natCast E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (x : AddMonoidAlgebra R M) (n : ℕ)
  (m : M), (x * ↑n).coeff m = x.coeff m * ↑n

theorem MonoidAlgebra.coeff_mul_natCast E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] (x : MonoidAlgebra R M) (n : ℕ) (m : M),
  (x * ↑n).coeff m = x.coeff m * ↑n

theorem MonoidAlgebra.coeff_natCast_mul E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] (x : MonoidAlgebra R M) (n : ℕ) (m : M),
  (↑n * x).coeff m = ↑n * x.coeff m

theorem AddMonoidAlgebra.coeff_natCast_mul E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (x : AddMonoidAlgebra R M) (n : ℕ)
  (m : M), (↑n * x).coeff m = ↑n * x.coeff m

theorem MonoidAlgebra.coeff_mul_ofNat E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] (x : MonoidAlgebra R M) (n : ℕ)
  [inst_2 : n.AtLeastTwo] (m : M), (x * OfNat.ofNat n).coeff m = x.coeff m * OfNat.ofNat n

theorem AddMonoidAlgebra.coeff_mul_ofNat E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (x : AddMonoidAlgebra R M) (n : ℕ)
  [inst_2 : n.AtLeastTwo] (m : M), (x * OfNat.ofNat n).coeff m = x.coeff m * OfNat.ofNat n

theorem AddMonoidAlgebra.coeff_ofNat_mul E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (x : AddMonoidAlgebra R M) (n : ℕ)
  [inst_2 : n.AtLeastTwo] (m : M), (OfNat.ofNat n * x).coeff m = OfNat.ofNat n * x.coeff m

theorem MonoidAlgebra.coeff_ofNat_mul E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] (x : MonoidAlgebra R M) (n : ℕ)
  [inst_2 : n.AtLeastTwo] (m : M), (OfNat.ofNat n * x).coeff m = OfNat.ofNat n * x.coeff m

def MonoidAlgebra.of E1 #

(R : Type u_8) → (M : Type u_9) → [inst : Semiring R] → [inst_1 : MulOneClass M] → M →* MonoidAlgebra R M

The embedding of a unital magma into its magma algebra.

theorem MonoidAlgebra.of_apply E0 #

∀ (R : Type u_8) (M : Type u_9) [inst : Semiring R] [inst_1 : MulOneClass M] (a : M),
  (MonoidAlgebra.of R M) a = MonoidAlgebra.single a 1

theorem MonoidAlgebra.of_injective E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] [Nontrivial R],
  Function.Injective ⇑(MonoidAlgebra.of R M)

theorem MonoidAlgebra.of_commute E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] {m : M} [inst_1 : MulOneClass M],
  (∀ (m' : M), Commute m m') → ∀ (f : MonoidAlgebra R M), Commute ((MonoidAlgebra.of R M) m) f

def MonoidAlgebra.singleHom E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [inst_1 : MulOneClass M] → R × M →* MonoidAlgebra R M

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.

theorem MonoidAlgebra.singleHom_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] (a : R × M),
  MonoidAlgebra.singleHom a = MonoidAlgebra.single a.2 a.1

def MonoidAlgebra.singleOneRingHom E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [inst_1 : MulOneClass M] → R →+* MonoidAlgebra R M

MonoidAlgebra.single 1 as a RingHom

theorem AddMonoidAlgebra.singleZeroRingHom_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (a : R),
  AddMonoidAlgebra.singleZeroRingHom a = (↑(AddMonoidAlgebra.singleAddHom 0)).toFun a

def AddMonoidAlgebra.singleZeroRingHom E1 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [inst_1 : AddZeroClass M] → R →+* AddMonoidAlgebra R M

AddMonoidAlgebra.single 1 as a RingHom

theorem MonoidAlgebra.singleOneRingHom_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] (a : R),
  MonoidAlgebra.singleOneRingHom a = (↑(MonoidAlgebra.singleAddHom 1)).toFun a

theorem MonoidAlgebra.ringHom_ext E1 #

∀ {R : Type u_1} {S : Type u_2} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] [inst_2 : Semiring S]
  {f g : MonoidAlgebra R M →+* S},
  (∀ (r : R), f (MonoidAlgebra.single 1 r) = g (MonoidAlgebra.single 1 r)) →
    (∀ (m : M), f (MonoidAlgebra.single m 1) = g (MonoidAlgebra.single m 1)) → f = g

If two ring homomorphisms from R[M] are equal on all single m 1 and single 1 r, then they are equal.

theorem AddMonoidAlgebra.ringHom_ext E1 #

∀ {R : Type u_1} {S : Type u_2} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] [inst_2 : Semiring S]
  {f g : AddMonoidAlgebra R M →+* S},
  (∀ (r : R), f (AddMonoidAlgebra.single 0 r) = g (AddMonoidAlgebra.single 0 r)) →
    (∀ (m : M), f (AddMonoidAlgebra.single m 1) = g (AddMonoidAlgebra.single m 1)) → f = g

If two ring homomorphisms from R[M] are equal on all single m 1 and single 0 r, then they are equal.

theorem MonoidAlgebra.ringHom_ext' E1 #

∀ {R : Type u_1} {S : Type u_2} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] [inst_2 : Semiring S]
  {f g : MonoidAlgebra R M →+* S},
  f.comp MonoidAlgebra.singleOneRingHom = g.comp MonoidAlgebra.singleOneRingHom →
    (↑f).comp (MonoidAlgebra.of R M) = (↑g).comp (MonoidAlgebra.of R M) → f = g

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].

theorem MonoidAlgebra.ringHom_ext'_iff E0 #

∀ {R : Type u_1} {S : Type u_2} {M : Type u_4} [inst : Semiring R] [inst_1 : MulOneClass M] [inst_2 : Semiring S]
  {f g : MonoidAlgebra R M →+* S},
  f = g ↔
    f.comp MonoidAlgebra.singleOneRingHom = g.comp MonoidAlgebra.singleOneRingHom ∧
      (↑f).comp (MonoidAlgebra.of R M) = (↑g).comp (MonoidAlgebra.of R M)

instance MonoidAlgebra.semiring E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [Monoid M] → Semiring (MonoidAlgebra R M)

instance AddMonoidAlgebra.semiring E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Semiring R] → [AddMonoid M] → Semiring (AddMonoidAlgebra R M)

theorem AddMonoidAlgebra.single_pow E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddMonoid M] (m : M) (r : R) (n : ℕ),
  AddMonoidAlgebra.single m r ^ n = AddMonoidAlgebra.single (n • m) (r ^ n)

theorem MonoidAlgebra.single_pow E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Monoid M] (m : M) (r : R) (n : ℕ),
  MonoidAlgebra.single m r ^ n = MonoidAlgebra.single (m ^ n) (r ^ n)

theorem MonoidAlgebra.induction_on E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Monoid M] {motive : MonoidAlgebra R M → Prop}
  (x : MonoidAlgebra R M),
  (∀ (m : M), motive ((MonoidAlgebra.of R M) m)) →
    (∀ (x y : MonoidAlgebra R M), motive x → motive y → motive (x + y)) →
      (∀ (r : R) (x : MonoidAlgebra R M), motive x → motive (r • x)) → motive x

instance AddMonoidAlgebra.isLocalHom_singleZeroRingHom E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddMonoid M],
  IsLocalHom AddMonoidAlgebra.singleZeroRingHom

instance MonoidAlgebra.isLocalHom_singleOneRingHom E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Monoid M], IsLocalHom MonoidAlgebra.singleOneRingHom

def MonoidAlgebra.uniqueRingEquiv E1 #

{R : Type u_1} → (M : Type u_4) → [inst : Semiring R] → [inst_1 : Monoid M] → [Subsingleton M] → MonoidAlgebra R M ≃+* R

The trivial monoid algebra is the base ring.

theorem AddMonoidAlgebra.uniqueRingEquiv_apply E0 #

∀ {R : Type u_1} (M : Type u_4) [inst : Semiring R] [inst_1 : AddMonoid M] [inst_2 : Subsingleton M]
  (a : AddMonoidAlgebra R M), (AddMonoidAlgebra.uniqueRingEquiv M) a = a.coeff 0

theorem MonoidAlgebra.uniqueRingEquiv_apply E0 #

∀ {R : Type u_1} (M : Type u_4) [inst : Semiring R] [inst_1 : Monoid M] [inst_2 : Subsingleton M]
  (a : MonoidAlgebra R M), (MonoidAlgebra.uniqueRingEquiv M) a = a.coeff 1

def AddMonoidAlgebra.uniqueRingEquiv E1 #

{R : Type u_1} →
  (M : Type u_4) → [inst : Semiring R] → [inst_1 : AddMonoid M] → [Subsingleton M] → AddMonoidAlgebra R M ≃+* R

The trivial additive monoid algebra is the base ring.

theorem MonoidAlgebra.uniqueRingEquiv_symm_apply E0 #

∀ {R : Type u_1} (M : Type u_4) [inst : Semiring R] [inst_1 : Monoid M] [inst_2 : Subsingleton M] (r : R),
  (MonoidAlgebra.uniqueRingEquiv M).symm r = MonoidAlgebra.single 1 r

theorem AddMonoidAlgebra.uniqueRingEquiv_symm_apply E0 #

∀ {R : Type u_1} (M : Type u_4) [inst : Semiring R] [inst_1 : AddMonoid M] [inst_2 : Subsingleton M] (r : R),
  (AddMonoidAlgebra.uniqueRingEquiv M).symm r = AddMonoidAlgebra.single 0 r

theorem AddMonoidAlgebra.coeff_uniqueRingEquiv_symm E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddMonoid M] [inst_2 : Subsingleton M] (r : R) (m : M),
  ((AddMonoidAlgebra.uniqueRingEquiv M).symm r).coeff m = r

theorem MonoidAlgebra.coeff_uniqueRingEquiv_symm E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Monoid M] [inst_2 : Subsingleton M] (r : R) (m : M),
  ((MonoidAlgebra.uniqueRingEquiv M).symm r).coeff m = r

def MonoidAlgebra.curryAddEquiv E1 #

{R : Type u_1} →
  {M : Type u_4} →
    {N : Type u_5} →
      [inst : Semiring R] →
        [inst_1 : Monoid M] → [inst_2 : Monoid N] → MonoidAlgebra R (M × N) ≃+ MonoidAlgebra (MonoidAlgebra R N) M

A product monoid algebra is a nested monoid algebra.

def AddMonoidAlgebra.curryAddEquiv E1 #

{R : Type u_1} →
  {M : Type u_4} →
    {N : Type u_5} →
      [inst : Semiring R] →
        [inst_1 : AddMonoid M] →
          [inst_2 : AddMonoid N] → AddMonoidAlgebra R (M × N) ≃+ AddMonoidAlgebra (AddMonoidAlgebra R N) M

An additive product monoid algebra is a nested additive monoid algebra.

theorem AddMonoidAlgebra.curryAddEquiv_single E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} [inst : Semiring R] [inst_1 : AddMonoid M] [inst_2 : AddMonoid N] (m : M)
  (n : N) (r : R),
  AddMonoidAlgebra.curryAddEquiv (AddMonoidAlgebra.single (m, n) r) =
    AddMonoidAlgebra.single m (AddMonoidAlgebra.single n r)

theorem MonoidAlgebra.curryAddEquiv_single E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} [inst : Semiring R] [inst_1 : Monoid M] [inst_2 : Monoid N] (m : M)
  (n : N) (r : R),
  MonoidAlgebra.curryAddEquiv (MonoidAlgebra.single (m, n) r) = MonoidAlgebra.single m (MonoidAlgebra.single n r)

theorem MonoidAlgebra.curryAddEquiv_symm_single E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} [inst : Semiring R] [inst_1 : Monoid M] [inst_2 : Monoid N] (m : M)
  (n : N) (r : R),
  MonoidAlgebra.curryAddEquiv.symm (MonoidAlgebra.single m (MonoidAlgebra.single n r)) = MonoidAlgebra.single (m, n) r

theorem AddMonoidAlgebra.curryAddEquiv_symm_single E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} [inst : Semiring R] [inst_1 : AddMonoid M] [inst_2 : AddMonoid N] (m : M)
  (n : N) (r : R),
  AddMonoidAlgebra.curryAddEquiv.symm (AddMonoidAlgebra.single m (AddMonoidAlgebra.single n r)) =
    AddMonoidAlgebra.single (m, n) r

def MonoidAlgebra.curryRingEquiv E1 #

{R : Type u_1} →
  {M : Type u_4} →
    {N : Type u_5} →
      [inst : Semiring R] →
        [inst_1 : Monoid M] → [inst_2 : Monoid N] → MonoidAlgebra R (M × N) ≃+* MonoidAlgebra (MonoidAlgebra R N) M

A product monoid algebra is a nested monoid algebra.

def AddMonoidAlgebra.curryRingEquiv E1 #

{R : Type u_1} →
  {M : Type u_4} →
    {N : Type u_5} →
      [inst : Semiring R] →
        [inst_1 : AddMonoid M] →
          [inst_2 : AddMonoid N] → AddMonoidAlgebra R (M × N) ≃+* AddMonoidAlgebra (AddMonoidAlgebra R N) M

An additive product monoid algebra is a nested additive monoid algebra.

theorem MonoidAlgebra.curryRingEquiv_single E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} [inst : Semiring R] [inst_1 : Monoid M] [inst_2 : Monoid N] (m : M)
  (n : N) (r : R),
  MonoidAlgebra.curryRingEquiv (MonoidAlgebra.single (m, n) r) = MonoidAlgebra.single m (MonoidAlgebra.single n r)

theorem AddMonoidAlgebra.curryRingEquiv_single E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} [inst : Semiring R] [inst_1 : AddMonoid M] [inst_2 : AddMonoid N] (m : M)
  (n : N) (r : R),
  AddMonoidAlgebra.curryRingEquiv (AddMonoidAlgebra.single (m, n) r) =
    AddMonoidAlgebra.single m (AddMonoidAlgebra.single n r)

theorem MonoidAlgebra.curryRingEquiv_symm_single E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} [inst : Semiring R] [inst_1 : Monoid M] [inst_2 : Monoid N] (m : M)
  (n : N) (r : R),
  MonoidAlgebra.curryRingEquiv.symm (MonoidAlgebra.single m (MonoidAlgebra.single n r)) = MonoidAlgebra.single (m, n) r

theorem AddMonoidAlgebra.curryRingEquiv_symm_single E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} [inst : Semiring R] [inst_1 : AddMonoid M] [inst_2 : AddMonoid N] (m : M)
  (n : N) (r : R),
  AddMonoidAlgebra.curryRingEquiv.symm (AddMonoidAlgebra.single m (AddMonoidAlgebra.single n r)) =
    AddMonoidAlgebra.single (m, n) r

theorem MonoidAlgebra.coeff_mul_single_mul E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Monoid M] [IsCancelMul M] (x : MonoidAlgebra R M) (r : R)
  (m m' : M), (x * MonoidAlgebra.single m r).coeff (m' * m) = x.coeff m' * r

theorem AddMonoidAlgebra.coeff_mul_single_add E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddMonoid M] [IsCancelAdd M] (x : AddMonoidAlgebra R M)
  (r : R) (m m' : M), (x * AddMonoidAlgebra.single m r).coeff (m' + m) = x.coeff m' * r

theorem AddMonoidAlgebra.coeff_single_mul_add E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddMonoid M] [IsCancelAdd M] (x : AddMonoidAlgebra R M)
  (r : R) (m m' : M), (AddMonoidAlgebra.single m r * x).coeff (m + m') = r * x.coeff m'

theorem MonoidAlgebra.coeff_single_mul_mul E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : Monoid M] [IsCancelMul M] (x : MonoidAlgebra R M) (r : R)
  (m m' : M), (MonoidAlgebra.single m r * x).coeff (m * m') = r * x.coeff m'

theorem MonoidAlgebra.coeff_mul_single_apply E0 #

∀ {R : Type u_1} {G : Type u_3} [inst : Semiring R] [inst_1 : Group G] (x : MonoidAlgebra R G) (r : R) (g h : G),
  (x * MonoidAlgebra.single g r).coeff h = x.coeff (h * g⁻¹) * r

theorem AddMonoidAlgebra.coeff_mul_single_apply E0 #

∀ {R : Type u_1} {G : Type u_3} [inst : Semiring R] [inst_1 : AddGroup G] (x : AddMonoidAlgebra R G) (r : R) (g h : G),
  (x * AddMonoidAlgebra.single g r).coeff h = x.coeff (h + -g) * r

theorem AddMonoidAlgebra.coeff_single_mul_apply E0 #

∀ {R : Type u_1} {G : Type u_3} [inst : Semiring R] [inst_1 : AddGroup G] (x : AddMonoidAlgebra R G) (r : R) (g h : G),
  (AddMonoidAlgebra.single g r * x).coeff h = r * x.coeff (-g + h)

theorem MonoidAlgebra.coeff_single_mul_apply E0 #

∀ {R : Type u_1} {G : Type u_3} [inst : Semiring R] [inst_1 : Group G] (x : MonoidAlgebra R G) (r : R) (g h : G),
  (MonoidAlgebra.single g r * x).coeff h = r * x.coeff (g⁻¹ * h)

theorem MonoidAlgebra.coeff_mul_apply_left E1 #

∀ {R : Type u_1} {G : Type u_3} [inst : Semiring R] [inst_1 : Group G] (x y : MonoidAlgebra R G) (g : G),
  (x * y).coeff g = x.coeff.sum fun h r ↦ r * y.coeff (h⁻¹ * g)

theorem AddMonoidAlgebra.coeff_mul_apply_left E1 #

∀ {R : Type u_1} {G : Type u_3} [inst : Semiring R] [inst_1 : AddGroup G] (x y : AddMonoidAlgebra R G) (g : G),
  (x * y).coeff g = x.coeff.sum fun h r ↦ r * y.coeff (-h + g)

theorem AddMonoidAlgebra.coeff_mul_apply_right E1 #

∀ {R : Type u_1} {G : Type u_3} [inst : Semiring R] [inst_1 : AddGroup G] (x y : AddMonoidAlgebra R G) (g : G),
  (x * y).coeff g = y.coeff.sum fun h r ↦ x.coeff (g + -h) * r

theorem MonoidAlgebra.coeff_mul_apply_right E1 #

∀ {R : Type u_1} {G : Type u_3} [inst : Semiring R] [inst_1 : Group G] (x y : MonoidAlgebra R G) (g : G),
  (x * y).coeff g = y.coeff.sum fun h r ↦ x.coeff (g * h⁻¹) * r

instance MonoidAlgebra.nonUnitalCommSemiring E0 #

{R : Type u_1} →
  {M : Type u_4} → [inst : CommSemiring R] → [CommSemigroup M] → NonUnitalCommSemiring (MonoidAlgebra R M)

instance AddMonoidAlgebra.nonUnitalCommSemiring E0 #

{R : Type u_1} →
  {M : Type u_4} → [inst : CommSemiring R] → [AddCommSemigroup M] → NonUnitalCommSemiring (AddMonoidAlgebra R M)

theorem AddMonoidAlgebra.single_zero_comm E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : CommSemiring R] [inst_1 : AddZeroClass M] (r : R) (f : AddMonoidAlgebra R M),
  AddMonoidAlgebra.single 0 r * f = f * AddMonoidAlgebra.single 0 r

theorem MonoidAlgebra.single_one_comm E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : CommSemiring R] [inst_1 : MulOneClass M] (r : R) (f : MonoidAlgebra R M),
  MonoidAlgebra.single 1 r * f = f * MonoidAlgebra.single 1 r

instance AddMonoidAlgebra.commSemiring E0 #

{R : Type u_1} → {M : Type u_4} → [inst : CommSemiring R] → [AddCommMonoid M] → CommSemiring (AddMonoidAlgebra R M)

instance MonoidAlgebra.commSemiring E0 #

{R : Type u_1} → {M : Type u_4} → [inst : CommSemiring R] → [CommMonoid M] → CommSemiring (MonoidAlgebra R M)

theorem AddMonoidAlgebra.prod_single E0 #

∀ {R : Type u_1} {M : Type u_4} {ι : Type u_7} [inst : CommSemiring R] [inst_1 : AddCommMonoid M] (s : Finset ι)
  (m : ι → M) (r : ι → R),
  ∏ i ∈ s, AddMonoidAlgebra.single (m i) (r i) = AddMonoidAlgebra.single (∑ i ∈ s, m i) (∏ i ∈ s, r i)

theorem MonoidAlgebra.prod_single E0 #

∀ {R : Type u_1} {M : Type u_4} {ι : Type u_7} [inst : CommSemiring R] [inst_1 : CommMonoid M] (s : Finset ι)
  (m : ι → M) (r : ι → R),
  ∏ i ∈ s, MonoidAlgebra.single (m i) (r i) = MonoidAlgebra.single (∏ i ∈ s, m i) (∏ i ∈ s, r i)

theorem AddMonoidAlgebra.finsuppProd_single E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} {ι : Type u_7} [inst : CommSemiring R] [inst_1 : AddCommMonoid M]
  [inst_2 : AddCommMonoid N] (f : ι →₀ N) (m : ι → N → M) (r : ι → N → R),
  (f.prod fun i n ↦ AddMonoidAlgebra.single (m i n) (r i n)) = AddMonoidAlgebra.single (f.sum m) (f.prod r)

theorem MonoidAlgebra.finsuppProd_single E0 #

∀ {R : Type u_1} {M : Type u_4} {N : Type u_5} {ι : Type u_7} [inst : CommSemiring R] [inst_1 : CommMonoid M]
  [inst_2 : AddCommMonoid N] (f : ι →₀ N) (m : ι → N → M) (r : ι → N → R),
  (f.prod fun i n ↦ MonoidAlgebra.single (m i n) (r i n)) = MonoidAlgebra.single (f.prod m) (f.prod r)

instance MonoidAlgebra.addCommGroup E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Ring R] → AddCommGroup (MonoidAlgebra R M)

instance AddMonoidAlgebra.addCommGroup E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Ring R] → AddCommGroup (AddMonoidAlgebra R M)

theorem MonoidAlgebra.coeff_neg E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (x : MonoidAlgebra R M), (-x).coeff = -x.coeff

theorem AddMonoidAlgebra.coeff_neg E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (x : AddMonoidAlgebra R M), (-x).coeff = -x.coeff

theorem AddMonoidAlgebra.ofCoeff_neg E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (x : M →₀ R),
  AddMonoidAlgebra.ofCoeff (-x) = -AddMonoidAlgebra.ofCoeff x

theorem MonoidAlgebra.ofCoeff_neg E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (x : M →₀ R), MonoidAlgebra.ofCoeff (-x) = -MonoidAlgebra.ofCoeff x

theorem AddMonoidAlgebra.coeff_sub E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (x y : AddMonoidAlgebra R M), (x - y).coeff = x.coeff - y.coeff

theorem MonoidAlgebra.coeff_sub E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (x y : MonoidAlgebra R M), (x - y).coeff = x.coeff - y.coeff

theorem AddMonoidAlgebra.ofCoeff_sub E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (x y : M →₀ R),
  AddMonoidAlgebra.ofCoeff (x - y) = AddMonoidAlgebra.ofCoeff x - AddMonoidAlgebra.ofCoeff y

theorem MonoidAlgebra.ofCoeff_sub E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (x y : M →₀ R),
  MonoidAlgebra.ofCoeff (x - y) = MonoidAlgebra.ofCoeff x - MonoidAlgebra.ofCoeff y

theorem MonoidAlgebra.coeff_sub_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (x y : MonoidAlgebra R M) (i : M),
  (x - y).coeff i = x.coeff i - y.coeff i

theorem AddMonoidAlgebra.coeff_sub_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (x y : AddMonoidAlgebra R M) (i : M),
  (x - y).coeff i = x.coeff i - y.coeff i

theorem MonoidAlgebra.single_neg E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (m : M) (r : R), MonoidAlgebra.single m (-r) = -MonoidAlgebra.single m r

theorem AddMonoidAlgebra.single_neg E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (m : M) (r : R),
  AddMonoidAlgebra.single m (-r) = -AddMonoidAlgebra.single m r

theorem AddMonoidAlgebra.single_sub E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (m : M) (r s : R),
  AddMonoidAlgebra.single m (r - s) = AddMonoidAlgebra.single m r - AddMonoidAlgebra.single m s

theorem MonoidAlgebra.single_sub E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] (m : M) (r s : R),
  MonoidAlgebra.single m (r - s) = MonoidAlgebra.single m r - MonoidAlgebra.single m s

instance MonoidAlgebra.nonUnitalNonAssocRing E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Ring R] → [Mul M] → NonUnitalNonAssocRing (MonoidAlgebra R M)

instance AddMonoidAlgebra.nonUnitalNonAssocRing E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Ring R] → [Add M] → NonUnitalNonAssocRing (AddMonoidAlgebra R M)

instance MonoidAlgebra.nonUnitalRing E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Ring R] → [Semigroup M] → NonUnitalRing (MonoidAlgebra R M)

instance AddMonoidAlgebra.nonUnitalRing E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Ring R] → [AddSemigroup M] → NonUnitalRing (AddMonoidAlgebra R M)

instance MonoidAlgebra.nonAssocRing E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Ring R] → [MulOneClass M] → NonAssocRing (MonoidAlgebra R M)

instance AddMonoidAlgebra.nonAssocRing E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Ring R] → [AddZeroClass M] → NonAssocRing (AddMonoidAlgebra R M)

theorem AddMonoidAlgebra.intCast_def E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] [inst_1 : AddZeroClass M] (z : ℤ), ↑z = AddMonoidAlgebra.single 0 ↑z

theorem MonoidAlgebra.intCast_def E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Ring R] [inst_1 : MulOneClass M] (z : ℤ), ↑z = MonoidAlgebra.single 1 ↑z

instance MonoidAlgebra.ring E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Ring R] → [Monoid M] → Ring (MonoidAlgebra R M)

instance AddMonoidAlgebra.ring E0 #

{R : Type u_1} → {M : Type u_4} → [inst : Ring R] → [AddMonoid M] → Ring (AddMonoidAlgebra R M)

instance AddMonoidAlgebra.nonUnitalCommRing E0 #

{R : Type u_1} → {M : Type u_4} → [inst : CommRing R] → [AddCommSemigroup M] → NonUnitalCommRing (AddMonoidAlgebra R M)

instance MonoidAlgebra.nonUnitalCommRing E0 #

{R : Type u_1} → {M : Type u_4} → [inst : CommRing R] → [CommSemigroup M] → NonUnitalCommRing (MonoidAlgebra R M)

instance AddMonoidAlgebra.commRing E0 #

{R : Type u_1} → {M : Type u_4} → [inst : CommRing R] → [AddCommMonoid M] → CommRing (AddMonoidAlgebra R M)

instance MonoidAlgebra.commRing E0 #

{R : Type u_1} → {M : Type u_4} → [inst : CommRing R] → [CommMonoid M] → CommRing (MonoidAlgebra R M)

def AddMonoidAlgebra.ofMagma E1 #

(R : Type u_8) → (M : Type u_9) → [inst : Semiring R] → [inst_1 : Add M] → Multiplicative M →ₙ* AddMonoidAlgebra R M

The embedding of an additive magma into its additive magma algebra.

theorem AddMonoidAlgebra.ofMagma_apply E0 #

∀ (R : Type u_8) (M : Type u_9) [inst : Semiring R] [inst_1 : Add M] (a : Multiplicative M),
  (AddMonoidAlgebra.ofMagma R M) a = AddMonoidAlgebra.single (Multiplicative.toAdd a) 1

def AddMonoidAlgebra.of E1 #

(R : Type u_8) →
  (M : Type u_9) → [inst : Semiring R] → [inst_1 : AddZeroClass M] → Multiplicative M →* AddMonoidAlgebra R M

Embedding of a magma with zero into its magma algebra.

def AddMonoidAlgebra.of' E1 #

(R : Type u_8) → (M : Type u_9) → [inst : Semiring R] → M → AddMonoidAlgebra R M

Embedding of a magma with zero M, into its magma algebra, having M as source.

theorem AddMonoidAlgebra.of_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (a : Multiplicative M),
  (AddMonoidAlgebra.of R M) a = AddMonoidAlgebra.single (Multiplicative.toAdd a) 1

theorem AddMonoidAlgebra.of'_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] (a : M), AddMonoidAlgebra.of' R M a = AddMonoidAlgebra.single a 1

theorem AddMonoidAlgebra.of'_eq_of E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (a : M),
  AddMonoidAlgebra.of' R M a = (AddMonoidAlgebra.of R M) (Multiplicative.ofAdd a)

theorem AddMonoidAlgebra.of_injective E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [Nontrivial R] [inst_2 : AddZeroClass M],
  Function.Injective ⇑(AddMonoidAlgebra.of R M)

theorem AddMonoidAlgebra.of'_commute E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] {a : M},
  (∀ (a' : M), AddCommute a a') → ∀ (f : AddMonoidAlgebra R M), Commute (AddMonoidAlgebra.of' R M a) f

def AddMonoidAlgebra.singleHom E1 #

{R : Type u_1} →
  {M : Type u_4} → [inst : Semiring R] → [inst_1 : AddZeroClass M] → R × Multiplicative M →* AddMonoidAlgebra R M

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.

theorem AddMonoidAlgebra.singleHom_apply E0 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddZeroClass M] (a : R × Multiplicative M),
  AddMonoidAlgebra.singleHom a = AddMonoidAlgebra.single (Multiplicative.toAdd a.2) a.1

theorem AddMonoidAlgebra.induction_on E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddMonoid M] {motive : AddMonoidAlgebra R M → Prop}
  (x : AddMonoidAlgebra R M),
  (∀ (m : M), motive ((AddMonoidAlgebra.of R M) (Multiplicative.ofAdd m))) →
    (∀ (x y : AddMonoidAlgebra R M), motive x → motive y → motive (x + y)) →
      (∀ (r : R) (x : AddMonoidAlgebra R M), motive x → motive (r • x)) → motive x

theorem AddMonoidAlgebra.ringHom_ext' E1 #

∀ {R : Type u_1} {S : Type u_2} {M : Type u_4} [inst : Semiring R] [inst_1 : Semiring S] [inst_2 : AddMonoid M]
  {f g : AddMonoidAlgebra R M →+* S},
  f.comp AddMonoidAlgebra.singleZeroRingHom = g.comp AddMonoidAlgebra.singleZeroRingHom →
    (↑f).comp (AddMonoidAlgebra.of R M) = (↑g).comp (AddMonoidAlgebra.of R M) → f = g

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].

theorem AddMonoidAlgebra.ringHom_ext'_iff E0 #

∀ {R : Type u_1} {S : Type u_2} {M : Type u_4} [inst : Semiring R] [inst_1 : Semiring S] [inst_2 : AddMonoid M]
  {f g : AddMonoidAlgebra R M →+* S},
  f = g ↔
    f.comp AddMonoidAlgebra.singleZeroRingHom = g.comp AddMonoidAlgebra.singleZeroRingHom ∧
      (↑f).comp (AddMonoidAlgebra.of R M) = (↑g).comp (AddMonoidAlgebra.of R M)

Deprecated aliases

NameNew nameSince
AddMonoidAlgebra.add_single_apply_of_not_exists_addAddMonoidAlgebra.coeff_mul_single_of_forall_add_ne2026-06-18
AddMonoidAlgebra.coe_addAddMonoidAlgebra.coeff_add2026-06-18
AddMonoidAlgebra.coeff_single_applyFinsupp.single_apply2026-06-18
AddMonoidAlgebra.coeff_zero_zeroAddMonoidAlgebra.coeff_one_zero2026-07-15
AddMonoidAlgebra.mul_applyAddMonoidAlgebra.coeff_mul2026-06-18
AddMonoidAlgebra.mul_apply_antidiagonalAddMonoidAlgebra.coeff_mul_antidiag2026-06-18
AddMonoidAlgebra.single_add_apply_of_not_exists_addAddMonoidAlgebra.coeff_single_mul_of_forall_add_ne2026-06-18
AddMonoidAlgebra.sum_singleAddMonoidAlgebra.sum_coeff_single2026-06-18
AddMonoidAlgebra.sum_single_indexFinsupp.sum_single_index2026-06-18
MonoidAlgebra.coe_addMonoidAlgebra.coeff_add2026-06-18
MonoidAlgebra.coeff_single_applyFinsupp.single_apply2026-06-18
MonoidAlgebra.mul_applyMonoidAlgebra.coeff_mul2026-06-18
MonoidAlgebra.mul_apply_antidiagonalMonoidAlgebra.coeff_mul_antidiag2026-06-18
MonoidAlgebra.mul_apply_leftMonoidAlgebra.coeff_mul_apply_left2026-06-18
MonoidAlgebra.mul_apply_rightMonoidAlgebra.coeff_mul_apply_right2026-06-18
MonoidAlgebra.mul_single_applyMonoidAlgebra.coeff_mul_single_apply2026-06-18
MonoidAlgebra.mul_single_apply_auxMonoidAlgebra.coeff_mul_single_eq_coeff_mul2026-06-18
MonoidAlgebra.mul_single_apply_of_not_exists_mulMonoidAlgebra.coeff_mul_single_of_forall_mul_ne2026-06-18
MonoidAlgebra.mul_single_one_applyMonoidAlgebra.coeff_mul_single_one2026-06-18
MonoidAlgebra.neg_applyMonoidAlgebra.coeff_neg2026-06-18
MonoidAlgebra.single_applyMonoidAlgebra.coeff_single_apply2026-06-18
MonoidAlgebra.single_mul_applyMonoidAlgebra.coeff_single_mul_apply2026-06-18
MonoidAlgebra.single_mul_apply_auxMonoidAlgebra.coeff_single_mul_eq_mul_coeff2026-06-18
MonoidAlgebra.single_mul_apply_of_not_exists_mulMonoidAlgebra.coeff_single_mul_of_forall_mul_ne2026-06-18
MonoidAlgebra.single_one_mul_applyMonoidAlgebra.coeff_single_one_mul2026-06-18
MonoidAlgebra.smul_applyMonoidAlgebra.coeff_smul_apply2026-06-18
MonoidAlgebra.sum_singleMonoidAlgebra.sum_coeff_single2026-06-18
MonoidAlgebra.sum_single_indexFinsupp.sum_single_index2026-06-18
MonoidAlgebra.uniqueRingEquiv_symm_apply_applyMonoidAlgebra.coeff_uniqueRingEquiv_symm2026-06-18