mathlib documentation

data.​mv_polynomial

data.​mv_polynomial

Multivariate polynomials

This file defines polynomial rings over a base ring (or even semiring), with variables from a general type σ (which could be infinite).

Important definitions

Let R be a commutative ring (or a semiring) and let σ be an arbitrary type. This file creates the type mv_polynomial σ R, which mathematicians might denote R[X_i : i ∈ σ]. It is the type of multivariate (a.k.a. multivariable) polynomials, with variables corresponding to the terms in σ, and coefficients in R.

Notation

In the definitions below, we use the following notation:

Definitions

Implementation notes

Recall that if Y has a zero, then X →₀ Y is the type of functions from X to Y with finite support, i.e. such that only finitely many elements of X get sent to non-zero terms in Y. The definition of mv_polynomial σ α is (σ →₀ ℕ) →₀ α ; here σ →₀ ℕ denotes the space of all monomials in the variables, and the function to α sends a monomial to its coefficient in the polynomial being represented.

Tags

polynomial, multivariate polynomial, multivariable polynomial

def mv_polynomial (σ : Type u_1) (α : Type u_2) [comm_semiring α] :
Type (max u_1 u_2)

Multivariate polynomial, where σ is the index set of the variables and α is the coefficient ring

Equations
@[instance]
def mv_polynomial.​inhabited {α : Type u} {σ : Type u_1} [comm_semiring α] :

Equations
@[instance]
def mv_polynomial.​has_scalar {α : Type u} {σ : Type u_1} [comm_semiring α] :

Equations
@[instance]
def mv_polynomial.​semimodule {α : Type u} {σ : Type u_1} [comm_semiring α] :

Equations
@[instance]
def mv_polynomial.​algebra {α : Type u} {σ : Type u_1} [comm_semiring α] :

Equations
def mv_polynomial.​coeff_coe_to_fun {α : Type u} {σ : Type u_1} [comm_semiring α] :

the coercion turning an mv_polynomial into the function which reports the coefficient of a given monomial

Equations
def mv_polynomial.​monomial {α : Type u} {σ : Type u_1} [comm_semiring α] :
→₀ )α → mv_polynomial σ α

monomial s a is the monomial a * X^s

Equations
def mv_polynomial.​C {α : Type u} {σ : Type u_1} [comm_semiring α] :

C a is the constant polynomial with value a

Equations
theorem mv_polynomial.​algebra_map_eq (α : Type u) (σ : Type u_1) [comm_semiring α] :

def mv_polynomial.​X {α : Type u} {σ : Type u_1} [comm_semiring α] :
σ → mv_polynomial σ α

X n is the degree 1 monomial 1*n

Equations
@[simp]
theorem mv_polynomial.​C_0 {α : Type u} {σ : Type u_1} [comm_semiring α] :

@[simp]
theorem mv_polynomial.​C_1 {α : Type u} {σ : Type u_1} [comm_semiring α] :

theorem mv_polynomial.​C_mul_monomial {α : Type u} {σ : Type u_1} {a a' : α} {s : σ →₀ } [comm_semiring α] :

@[simp]
theorem mv_polynomial.​C_add {α : Type u} {σ : Type u_1} {a a' : α} [comm_semiring α] :

@[simp]
theorem mv_polynomial.​C_mul {α : Type u} {σ : Type u_1} {a a' : α} [comm_semiring α] :

@[simp]
theorem mv_polynomial.​C_pow {α : Type u} {σ : Type u_1} [comm_semiring α] (a : α) (n : ) :

@[simp]
theorem mv_polynomial.​C_inj {σ : Type u_1} (R : Type u_2) [comm_ring R] (r s : R) :

theorem mv_polynomial.​C_eq_coe_nat {α : Type u} {σ : Type u_1} [comm_semiring α] (n : ) :

theorem mv_polynomial.​X_pow_eq_single {α : Type u} {σ : Type u_1} {e : } {n : σ} [comm_semiring α] :

theorem mv_polynomial.​monomial_add_single {α : Type u} {σ : Type u_1} {a : α} {e : } {n : σ} {s : σ →₀ } [comm_semiring α] :

theorem mv_polynomial.​monomial_single_add {α : Type u} {σ : Type u_1} {a : α} {e : } {n : σ} {s : σ →₀ } [comm_semiring α] :

theorem mv_polynomial.​single_eq_C_mul_X {α : Type u} {σ : Type u_1} [comm_semiring α] {s : σ} {a : α} {n : } :

@[simp]
theorem mv_polynomial.​monomial_add {α : Type u} {σ : Type u_1} [comm_semiring α] {s : σ →₀ } {a b : α} :

@[simp]
theorem mv_polynomial.​monomial_mul {α : Type u} {σ : Type u_1} [comm_semiring α] {s s' : σ →₀ } {a b : α} :

@[simp]
theorem mv_polynomial.​monomial_zero {α : Type u} {σ : Type u_1} [comm_semiring α] {s : σ →₀ } :

@[simp]
theorem mv_polynomial.​sum_monomial {α : Type u} {σ : Type u_1} [comm_semiring α] {A : Type u_2} [add_comm_monoid A] {u : σ →₀ } {r : α} {b : →₀ )α → A} :
b u 0 = 0finsupp.sum (mv_polynomial.monomial u r) b = b u r

theorem mv_polynomial.​monomial_eq {α : Type u} {σ : Type u_1} {a : α} {s : σ →₀ } [comm_semiring α] :

theorem mv_polynomial.​induction_on {α : Type u} {σ : Type u_1} [comm_semiring α] {M : mv_polynomial σ α → Prop} (p : mv_polynomial σ α) :
(∀ (a : α), M (mv_polynomial.C a))(∀ (p q : mv_polynomial σ α), M pM qM (p + q))(∀ (p : mv_polynomial σ α) (n : σ), M pM (p * mv_polynomial.X n))M p

theorem mv_polynomial.​induction_on' {α : Type u} {σ : Type u_1} [comm_semiring α] {P : mv_polynomial σ α → Prop} (p : mv_polynomial σ α) :
(∀ (u : σ →₀ ) (a : α), P (mv_polynomial.monomial u a))(∀ (p q : mv_polynomial σ α), P pP qP (p + q))P p

theorem mv_polynomial.​hom_eq_hom {α : Type u} {γ : Type w} {σ : Type u_1} [comm_semiring α] [semiring γ] (f g : mv_polynomial σ α →+* γ) (hC : ∀ (a : α), f (mv_polynomial.C a) = g (mv_polynomial.C a)) (hX : ∀ (n : σ), f (mv_polynomial.X n) = g (mv_polynomial.X n)) (p : mv_polynomial σ α) :
f p = g p

theorem mv_polynomial.​is_id {α : Type u} {σ : Type u_1} [comm_semiring α] (f : mv_polynomial σ α →+* mv_polynomial σ α) (hC : ∀ (a : α), f (mv_polynomial.C a) = mv_polynomial.C a) (hX : ∀ (n : σ), f (mv_polynomial.X n) = mv_polynomial.X n) (p : mv_polynomial σ α) :
f p = p

def mv_polynomial.​coeff {α : Type u} {σ : Type u_1} [comm_semiring α] :
→₀ )mv_polynomial σ α → α

The coefficient of the monomial m in the multi-variable polynomial p.

Equations
theorem mv_polynomial.​ext {α : Type u} {σ : Type u_1} [comm_semiring α] (p q : mv_polynomial σ α) :
(∀ (m : σ →₀ ), mv_polynomial.coeff m p = mv_polynomial.coeff m q)p = q

theorem mv_polynomial.​ext_iff {α : Type u} {σ : Type u_1} [comm_semiring α] (p q : mv_polynomial σ α) :

@[simp]
theorem mv_polynomial.​coeff_add {α : Type u} {σ : Type u_1} [comm_semiring α] (m : σ →₀ ) (p q : mv_polynomial σ α) :

@[simp]
theorem mv_polynomial.​coeff_zero {α : Type u} {σ : Type u_1} [comm_semiring α] (m : σ →₀ ) :

@[simp]
theorem mv_polynomial.​coeff_zero_X {α : Type u} {σ : Type u_1} [comm_semiring α] (i : σ) :

@[instance]

Equations
  • _ = _
theorem mv_polynomial.​coeff_sum {α : Type u} {σ : Type u_1} [comm_semiring α] {X : Type u_2} (s : finset X) (f : X → mv_polynomial σ α) (m : σ →₀ ) :
mv_polynomial.coeff m (s.sum (λ (x : X), f x)) = s.sum (λ (x : X), mv_polynomial.coeff m (f x))

theorem mv_polynomial.​monic_monomial_eq {α : Type u} {σ : Type u_1} [comm_semiring α] (m : σ →₀ ) :
mv_polynomial.monomial m 1 = m.prod (λ (n : σ) (e : ), mv_polynomial.X n ^ e)

@[simp]
theorem mv_polynomial.​coeff_monomial {α : Type u} {σ : Type u_1} [comm_semiring α] (m n : σ →₀ ) (a : α) :

@[simp]
theorem mv_polynomial.​coeff_C {α : Type u} {σ : Type u_1} [comm_semiring α] (m : σ →₀ ) (a : α) :

theorem mv_polynomial.​coeff_X_pow {α : Type u} {σ : Type u_1} [comm_semiring α] (i : σ) (m : σ →₀ ) (k : ) :

theorem mv_polynomial.​coeff_X' {α : Type u} {σ : Type u_1} [comm_semiring α] (i : σ) (m : σ →₀ ) :

@[simp]
theorem mv_polynomial.​coeff_X {α : Type u} {σ : Type u_1} [comm_semiring α] (i : σ) :

@[simp]
theorem mv_polynomial.​coeff_C_mul {α : Type u} {σ : Type u_1} [comm_semiring α] (m : σ →₀ ) (a : α) (p : mv_polynomial σ α) :

theorem mv_polynomial.​coeff_mul {α : Type u} {σ : Type u_1} [comm_semiring α] (p q : mv_polynomial σ α) (n : σ →₀ ) :

@[simp]
theorem mv_polynomial.​coeff_mul_X {α : Type u} {σ : Type u_1} [comm_semiring α] (m : σ →₀ ) (s : σ) (p : mv_polynomial σ α) :

theorem mv_polynomial.​coeff_mul_X' {α : Type u} {σ : Type u_1} [comm_semiring α] (m : σ →₀ ) (s : σ) (p : mv_polynomial σ α) :

theorem mv_polynomial.​eq_zero_iff {α : Type u} {σ : Type u_1} [comm_semiring α] {p : mv_polynomial σ α} :
p = 0 ∀ (d : σ →₀ ), mv_polynomial.coeff d p = 0

theorem mv_polynomial.​ne_zero_iff {α : Type u} {σ : Type u_1} [comm_semiring α] {p : mv_polynomial σ α} :
p 0 ∃ (d : σ →₀ ), mv_polynomial.coeff d p 0

theorem mv_polynomial.​exists_coeff_ne_zero {α : Type u} {σ : Type u_1} [comm_semiring α] {p : mv_polynomial σ α} :
p 0(∃ (d : σ →₀ ), mv_polynomial.coeff d p 0)

@[simp]
theorem mv_polynomial.​support_sum_monomial_coeff {α : Type u} {σ : Type u_1} [comm_semiring α] (p : mv_polynomial σ α) :

theorem mv_polynomial.​as_sum {α : Type u} {σ : Type u_1} [comm_semiring α] (p : mv_polynomial σ α) :

def mv_polynomial.​eval₂ {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] :
→+* β)(σ → β)mv_polynomial σ α → β

Evaluate a polynomial p given a valuation g of all the variables and a ring hom f from the scalar ring to the target

Equations
theorem mv_polynomial.​eval₂_eq {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (g : α →+* β) (x : σ → β) (f : mv_polynomial σ α) :
mv_polynomial.eval₂ g x f = f.support.sum (λ (d : σ →₀ ), g (mv_polynomial.coeff d f) * d.support.prod (λ (i : σ), x i ^ d i))

theorem mv_polynomial.​eval₂_eq' {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] [fintype σ] (g : α →+* β) (x : σ → β) (f : mv_polynomial σ α) :
mv_polynomial.eval₂ g x f = f.support.sum (λ (d : σ →₀ ), g (mv_polynomial.coeff d f) * finset.univ.prod (λ (i : σ), x i ^ d i))

@[simp]
theorem mv_polynomial.​eval₂_zero {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : σ → β) :

@[simp]
theorem mv_polynomial.​eval₂_add {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] {p q : mv_polynomial σ α} [comm_semiring β] (f : α →+* β) (g : σ → β) :

@[simp]
theorem mv_polynomial.​eval₂_monomial {α : Type u} {β : Type v} {σ : Type u_1} {a : α} {s : σ →₀ } [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : σ → β) :
mv_polynomial.eval₂ f g (mv_polynomial.monomial s a) = f a * s.prod (λ (n : σ) (e : ), g n ^ e)

@[simp]
theorem mv_polynomial.​eval₂_C {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : σ → β) (a : α) :

@[simp]
theorem mv_polynomial.​eval₂_one {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : σ → β) :

@[simp]
theorem mv_polynomial.​eval₂_X {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : σ → β) (n : σ) :

theorem mv_polynomial.​eval₂_mul_monomial {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] {p : mv_polynomial σ α} [comm_semiring β] (f : α →+* β) (g : σ → β) {s : σ →₀ } {a : α} :
mv_polynomial.eval₂ f g (p * mv_polynomial.monomial s a) = mv_polynomial.eval₂ f g p * f a * s.prod (λ (n : σ) (e : ), g n ^ e)

@[simp]
theorem mv_polynomial.​eval₂_mul {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] {q : mv_polynomial σ α} [comm_semiring β] (f : α →+* β) (g : σ → β) {p : mv_polynomial σ α} :

@[simp]
theorem mv_polynomial.​eval₂_pow {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : σ → β) {p : mv_polynomial σ α} {n : } :

@[instance]
def mv_polynomial.​eval₂.​is_semiring_hom {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : σ → β) :

Equations
  • _ = _
def mv_polynomial.​eval₂_hom {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] :
→+* β)(σ → β)mv_polynomial σ α →+* β

mv_polynomial.eval₂ as a ring_hom.

Equations
@[simp]
theorem mv_polynomial.​coe_eval₂_hom {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : σ → β) :

theorem mv_polynomial.​eval₂_hom_congr {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] {f₁ f₂ : α →+* β} {g₁ g₂ : σ → β} {p₁ p₂ : mv_polynomial σ α} :
f₁ = f₂g₁ = g₂p₁ = p₂(mv_polynomial.eval₂_hom f₁ g₁) p₁ = (mv_polynomial.eval₂_hom f₂ g₂) p₂

theorem mv_polynomial.​eval₂_comp_left {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] {γ : Type u_2} [comm_semiring γ] (k : β →+* γ) (f : α →+* β) (g : σ → β) (p : mv_polynomial σ α) :

@[simp]

theorem mv_polynomial.​eval₂_congr {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] {p : mv_polynomial σ α} [comm_semiring β] (f : α →+* β) (g₁ g₂ : σ → β) :
(∀ {i : σ} {c : σ →₀ }, i c.supportmv_polynomial.coeff c p 0g₁ i = g₂ i)mv_polynomial.eval₂ f g₁ p = mv_polynomial.eval₂ f g₂ p

@[simp]
theorem mv_polynomial.​eval₂_prod {α : Type u} {β : Type v} {γ : Type w} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : σ → β) (s : finset γ) (p : γ → mv_polynomial σ α) :
mv_polynomial.eval₂ f g (s.prod (λ (x : γ), p x)) = s.prod (λ (x : γ), mv_polynomial.eval₂ f g (p x))

@[simp]
theorem mv_polynomial.​eval₂_sum {α : Type u} {β : Type v} {γ : Type w} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : σ → β) (s : finset γ) (p : γ → mv_polynomial σ α) :
mv_polynomial.eval₂ f g (s.sum (λ (x : γ), p x)) = s.sum (λ (x : γ), mv_polynomial.eval₂ f g (p x))

theorem mv_polynomial.​eval₂_assoc {α : Type u} {β : Type v} {γ : Type w} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : σ → β) (q : γ → mv_polynomial σ α) (p : mv_polynomial γ α) :

def mv_polynomial.​eval {α : Type u} {σ : Type u_1} [comm_semiring α] :
(σ → α)mv_polynomial σ α →+* α

Evaluate a polynomial p given a valuation f of all the variables

Equations
theorem mv_polynomial.​eval_eq {α : Type u} {σ : Type u_1} [comm_semiring α] (x : σ → α) (f : mv_polynomial σ α) :
(mv_polynomial.eval x) f = f.support.sum (λ (d : σ →₀ ), mv_polynomial.coeff d f * d.support.prod (λ (i : σ), x i ^ d i))

theorem mv_polynomial.​eval_eq' {α : Type u} {σ : Type u_1} [comm_semiring α] [fintype σ] (x : σ → α) (f : mv_polynomial σ α) :
(mv_polynomial.eval x) f = f.support.sum (λ (d : σ →₀ ), mv_polynomial.coeff d f * finset.univ.prod (λ (i : σ), x i ^ d i))

theorem mv_polynomial.​eval_monomial {α : Type u} {σ : Type u_1} {a : α} {s : σ →₀ } [comm_semiring α] {f : σ → α} :
(mv_polynomial.eval f) (mv_polynomial.monomial s a) = a * s.prod (λ (n : σ) (e : ), f n ^ e)

@[simp]
theorem mv_polynomial.​eval_C {α : Type u} {σ : Type u_1} [comm_semiring α] {f : σ → α} (a : α) :

@[simp]
theorem mv_polynomial.​eval_X {α : Type u} {σ : Type u_1} [comm_semiring α] {f : σ → α} (n : σ) :

theorem mv_polynomial.​eval_sum {α : Type u} {σ : Type u_1} [comm_semiring α] {ι : Type u_2} (s : finset ι) (f : ι → mv_polynomial σ α) (g : σ → α) :
(mv_polynomial.eval g) (s.sum (λ (i : ι), f i)) = s.sum (λ (i : ι), (mv_polynomial.eval g) (f i))

theorem mv_polynomial.​eval_prod {α : Type u} {σ : Type u_1} [comm_semiring α] {ι : Type u_2} (s : finset ι) (f : ι → mv_polynomial σ α) (g : σ → α) :
(mv_polynomial.eval g) (s.prod (λ (i : ι), f i)) = s.prod (λ (i : ι), (mv_polynomial.eval g) (f i))

theorem mv_polynomial.​eval_assoc {α : Type u} {σ : Type u_1} [comm_semiring α] {τ : Type u_2} (f : σ → mv_polynomial τ α) (g : τ → α) (p : mv_polynomial σ α) :

def mv_polynomial.​map {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] :
→+* β)mv_polynomial σ α →+* mv_polynomial σ β

map f p maps a polynomial p across a ring hom f

Equations
@[simp]
theorem mv_polynomial.​map_monomial {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (s : σ →₀ ) (a : α) :

@[simp]
theorem mv_polynomial.​map_C {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (a : α) :

@[simp]
theorem mv_polynomial.​map_X {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (n : σ) :

theorem mv_polynomial.​map_id {α : Type u} {σ : Type u_1} [comm_semiring α] (p : mv_polynomial σ α) :

theorem mv_polynomial.​map_map {α : Type u} {β : Type v} {γ : Type w} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) [comm_semiring γ] (g : β →+* γ) (p : mv_polynomial σ α) :

theorem mv_polynomial.​eval₂_eq_eval_map {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : σ → β) (p : mv_polynomial σ α) :

theorem mv_polynomial.​eval₂_comp_right {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] {γ : Type u_2} [comm_semiring γ] (k : β →+* γ) (f : α →+* β) (g : σ → β) (p : mv_polynomial σ α) :

theorem mv_polynomial.​map_eval₂ {α : Type u} {β : Type v} {γ : Type w} {δ : Type x} [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : γ → mv_polynomial δ α) (p : mv_polynomial γ α) :

theorem mv_polynomial.​coeff_map {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) (p : mv_polynomial σ α) (m : σ →₀ ) :

theorem mv_polynomial.​map_injective {α : Type u} {β : Type v} {σ : Type u_1} [comm_semiring α] [comm_semiring β] (f : α →+* β) :

def mv_polynomial.​degrees {α : Type u} {σ : Type u_1} [comm_semiring α] :
mv_polynomial σ αmultiset σ

The maximal degrees of each variable in a multi-variable polynomial, expressed as a multiset.

(For example, degrees (x^2 * y + y^3) would be {x, x, y, y, y}.)

Equations
theorem mv_polynomial.​degrees_monomial {α : Type u} {σ : Type u_1} [comm_semiring α] (s : σ →₀ ) (a : α) :

theorem mv_polynomial.​degrees_monomial_eq {α : Type u} {σ : Type u_1} [comm_semiring α] (s : σ →₀ ) (a : α) :

theorem mv_polynomial.​degrees_C {α : Type u} {σ : Type u_1} [comm_semiring α] (a : α) :

theorem mv_polynomial.​degrees_X {α : Type u} {σ : Type u_1} [comm_semiring α] (n : σ) :

theorem mv_polynomial.​degrees_zero {α : Type u} {σ : Type u_1} [comm_semiring α] :

theorem mv_polynomial.​degrees_one {α : Type u} {σ : Type u_1} [comm_semiring α] :

theorem mv_polynomial.​degrees_add {α : Type u} {σ : Type u_1} [comm_semiring α] (p q : mv_polynomial σ α) :

theorem mv_polynomial.​degrees_sum {α : Type u} {σ : Type u_1} [comm_semiring α] {ι : Type u_2} (s : finset ι) (f : ι → mv_polynomial σ α) :
(s.sum (λ (i : ι), f i)).degrees s.sup (λ (i : ι), (f i).degrees)

theorem mv_polynomial.​degrees_mul {α : Type u} {σ : Type u_1} [comm_semiring α] (p q : mv_polynomial σ α) :

theorem mv_polynomial.​degrees_prod {α : Type u} {σ : Type u_1} [comm_semiring α] {ι : Type u_2} (s : finset ι) (f : ι → mv_polynomial σ α) :
(s.prod (λ (i : ι), f i)).degrees s.sum (λ (i : ι), (f i).degrees)

theorem mv_polynomial.​degrees_pow {α : Type u} {σ : Type u_1} [comm_semiring α] (p : mv_polynomial σ α) (n : ) :

def mv_polynomial.​vars {α : Type u} {σ : Type u_1} [comm_semiring α] :
mv_polynomial σ αfinset σ

vars p is the set of variables appearing in the polynomial p

Equations
@[simp]
theorem mv_polynomial.​vars_0 {α : Type u} {σ : Type u_1} [comm_semiring α] :

@[simp]
theorem mv_polynomial.​vars_monomial {α : Type u} {σ : Type u_1} {a : α} {s : σ →₀ } [comm_semiring α] :

@[simp]
theorem mv_polynomial.​vars_C {α : Type u} {σ : Type u_1} {a : α} [comm_semiring α] :

@[simp]
theorem mv_polynomial.​vars_X {α : Type u} {σ : Type u_1} {n : σ} [comm_semiring α] :
0 1(mv_polynomial.X n).vars = {n}

theorem mv_polynomial.​mem_support_not_mem_vars_zero {α : Type u} {σ : Type u_1} [comm_semiring α] {f : mv_polynomial σ α} {x : σ →₀ } (H : x f.support) {v : σ} :
v f.varsx v = 0

def mv_polynomial.​degree_of {α : Type u} {σ : Type u_1} [comm_semiring α] :
σ → mv_polynomial σ α

degree_of n p gives the highest power of X_n that appears in p

Equations
def mv_polynomial.​total_degree {α : Type u} {σ : Type u_1} [comm_semiring α] :
mv_polynomial σ α

total_degree p gives the maximum |s| over the monomials X^s in p

Equations
theorem mv_polynomial.​total_degree_eq {α : Type u} {σ : Type u_1} [comm_semiring α] (p : mv_polynomial σ α) :

theorem mv_polynomial.​total_degree_le_degrees_card {α : Type u} {σ : Type u_1} [comm_semiring α] (p : mv_polynomial σ α) :

@[simp]
theorem mv_polynomial.​total_degree_C {α : Type u} {σ : Type u_1} [comm_semiring α] (a : α) :

@[simp]
theorem mv_polynomial.​total_degree_zero {α : Type u} {σ : Type u_1} [comm_semiring α] :

@[simp]
theorem mv_polynomial.​total_degree_one {α : Type u} {σ : Type u_1} [comm_semiring α] :

@[simp]
theorem mv_polynomial.​total_degree_X {σ : Type u_1} {α : Type u_2} [comm_semiring α] [nontrivial α] (s : σ) :

theorem mv_polynomial.​total_degree_add {α : Type u} {σ : Type u_1} [comm_semiring α] (a b : mv_polynomial σ α) :

theorem mv_polynomial.​total_degree_mul {α : Type u} {σ : Type u_1} [comm_semiring α] (a b : mv_polynomial σ α) :

theorem mv_polynomial.​total_degree_pow {α : Type u} {σ : Type u_1} [comm_semiring α] (a : mv_polynomial σ α) (n : ) :

theorem mv_polynomial.​total_degree_finset_prod {α : Type u} {σ : Type u_1} [comm_semiring α] {ι : Type u_2} (s : finset ι) (f : ι → mv_polynomial σ α) :
(s.prod f).total_degree s.sum (λ (i : ι), (f i).total_degree)

theorem mv_polynomial.​exists_degree_lt {α : Type u} {σ : Type u_1} [comm_semiring α] [fintype σ] (f : mv_polynomial σ α) (n : ) (h : f.total_degree < n * fintype.card σ) {d : σ →₀ } :
d f.support(∃ (i : σ), d i < n)

theorem mv_polynomial.​coeff_eq_zero_of_total_degree_lt {α : Type u} {σ : Type u_1} [comm_semiring α] {f : mv_polynomial σ α} {d : σ →₀ } :
f.total_degree < d.support.sum (λ (i : σ), d i)mv_polynomial.coeff d f = 0

The algebra of multivariate polynomials

def mv_polynomial.​aeval {σ : Type u_1} {R : Type u} {A : Type v} (f : σ → A) [comm_semiring R] [comm_semiring A] [algebra R A] :

A map σ → A where A is an algebra over R generates an R-algebra homomorphism from multivariate polynomials over σ to A.

Equations
theorem mv_polynomial.​aeval_def {σ : Type u_1} {R : Type u} {A : Type v} (f : σ → A) [comm_semiring R] [comm_semiring A] [algebra R A] (p : mv_polynomial σ R) :

@[simp]
theorem mv_polynomial.​aeval_X {σ : Type u_1} {R : Type u} {A : Type v} (f : σ → A) [comm_semiring R] [comm_semiring A] [algebra R A] (s : σ) :

@[simp]
theorem mv_polynomial.​aeval_C {σ : Type u_1} {R : Type u} {A : Type v} (f : σ → A) [comm_semiring R] [comm_semiring A] [algebra R A] (r : R) :

theorem mv_polynomial.​eval_unique {σ : Type u_1} {R : Type u} {A : Type v} [comm_semiring R] [comm_semiring A] [algebra R A] (φ : mv_polynomial σ R →ₐ[R] A) :

@[instance]
def mv_polynomial.​comm_ring {α : Type u} {σ : Type u_1} [comm_ring α] :

Equations
@[instance]

Equations
@[simp]
theorem mv_polynomial.​C_sub {α : Type u} (σ : Type u_1) (a a' : α) [comm_ring α] :

@[simp]
theorem mv_polynomial.​C_neg {α : Type u} (σ : Type u_1) (a : α) [comm_ring α] :

@[simp]
theorem mv_polynomial.​coeff_neg {α : Type u} (σ : Type u_1) [comm_ring α] (m : σ →₀ ) (p : mv_polynomial σ α) :

@[simp]
theorem mv_polynomial.​coeff_sub {α : Type u} (σ : Type u_1) [comm_ring α] (m : σ →₀ ) (p q : mv_polynomial σ α) :

@[instance]

Equations
theorem mv_polynomial.​C_mul' {α : Type u} {σ : Type u_1} (a : α) [comm_ring α] (p : mv_polynomial σ α) :

theorem mv_polynomial.​smul_eq_C_mul {α : Type u} {σ : Type u_1} [comm_ring α] (p : mv_polynomial σ α) (a : α) :

@[simp]
theorem mv_polynomial.​smul_eval {α : Type u} {σ : Type u_1} [comm_ring α] (x : σ → α) (p : mv_polynomial σ α) (s : α) :

theorem mv_polynomial.​degrees_neg {α : Type u} {σ : Type u_1} [comm_ring α] (p : mv_polynomial σ α) :

theorem mv_polynomial.​degrees_sub {α : Type u} {σ : Type u_1} [comm_ring α] (p q : mv_polynomial σ α) :

@[simp]
theorem mv_polynomial.​eval₂_sub {α : Type u} {β : Type v} {σ : Type u_1} [comm_ring α] (p : mv_polynomial σ α) {q : mv_polynomial σ α} [comm_ring β] (f : α →+* β) (g : σ → β) :

@[simp]
theorem mv_polynomial.​eval₂_neg {α : Type u} {β : Type v} {σ : Type u_1} [comm_ring α] (p : mv_polynomial σ α) [comm_ring β] (f : α →+* β) (g : σ → β) :

theorem mv_polynomial.​hom_C {β : Type v} {σ : Type u_1} [comm_ring β] (f : mv_polynomial σ → β) [is_ring_hom f] (n : ) :

@[simp]
theorem mv_polynomial.​eval₂_hom_X {β : Type v} [comm_ring β] {α : Type u} (c : →+* β) (f : mv_polynomial α →+* β) (x : mv_polynomial α ) :

A ring homomorphism f : Z[X_1, X_2, ...] → R is determined by the evaluations f(X_1), f(X_2), ...

def mv_polynomial.​hom_equiv {β : Type v} {σ : Type u_1} [comm_ring β] :
(mv_polynomial σ →+* β) (σ → β)

Ring homomorphisms out of integer polynomials on a type σ are the same as functions out of the type σ,

Equations
@[simp]
theorem mv_polynomial.​total_degree_neg {α : Type u} {σ : Type u_1} [comm_ring α] (a : mv_polynomial σ α) :

theorem mv_polynomial.​total_degree_sub {α : Type u} {σ : Type u_1} [comm_ring α] (a b : mv_polynomial σ α) :

def mv_polynomial.​rename {α : Type u} {β : Type v} {γ : Type w} [comm_semiring α] :
(β → γ)mv_polynomial β α →+* mv_polynomial γ α

Rename all the variables in a multivariable polynomial.

Equations
@[simp]
theorem mv_polynomial.​rename_C {α : Type u} {β : Type v} {γ : Type w} [comm_semiring α] (f : β → γ) (a : α) :

@[simp]
theorem mv_polynomial.​rename_X {α : Type u} {β : Type v} {γ : Type w} [comm_semiring α] (f : β → γ) (b : β) :

theorem mv_polynomial.​map_rename {α : Type u} {β : Type v} {γ : Type w} {δ : Type x} [comm_semiring α] [comm_semiring β] (f : α →+* β) (g : γ → δ) (p : mv_polynomial γ α) :

@[simp]
theorem mv_polynomial.​rename_rename {α : Type u} {β : Type v} {γ : Type w} {δ : Type x} [comm_semiring α] (f : β → γ) (g : γ → δ) (p : mv_polynomial β α) :

@[simp]
theorem mv_polynomial.​rename_id {α : Type u} {β : Type v} [comm_semiring α] (p : mv_polynomial β α) :

theorem mv_polynomial.​rename_monomial {α : Type u} {β : Type v} {γ : Type w} [comm_semiring α] (f : β → γ) (p : β →₀ ) (a : α) :

theorem mv_polynomial.​rename_eq {α : Type u} {β : Type v} {γ : Type w} [comm_semiring α] (f : β → γ) (p : mv_polynomial β α) :

theorem mv_polynomial.​rename_injective {α : Type u} {β : Type v} {γ : Type w} [comm_semiring α] (f : β → γ) :

theorem mv_polynomial.​total_degree_rename_le {α : Type u} {β : Type v} {γ : Type w} [comm_semiring α] (f : β → γ) (p : mv_polynomial β α) :

theorem mv_polynomial.​eval₂_rename {α : Type u} {β : Type v} {γ : Type w} {δ : Type x} [comm_semiring α] [comm_semiring β] (f : α →+* β) (k : γ → δ) (g : δ → β) (p : mv_polynomial γ α) :

theorem mv_polynomial.​rename_eval₂ {α : Type u} {γ : Type w} {δ : Type x} [comm_semiring α] (k : γ → δ) (p : mv_polynomial γ α) (g : δ → mv_polynomial γ α) :

theorem mv_polynomial.​rename_prodmk_eval₂ {α : Type u} {γ : Type w} {δ : Type x} [comm_semiring α] (p : mv_polynomial γ α) (d : δ) (g : γ → mv_polynomial γ α) :

theorem mv_polynomial.​eval₂_rename_prodmk {α : Type u} {β : Type v} {γ : Type w} {δ : Type x} [comm_semiring α] [comm_semiring β] (f : α →+* β) (p : mv_polynomial γ α) (g : δ × γ → β) (d : δ) :

theorem mv_polynomial.​eval_rename_prodmk {α : Type u} {γ : Type w} {δ : Type x} [comm_semiring α] (p : mv_polynomial γ α) (g : δ × γ → α) (d : δ) :

theorem mv_polynomial.​exists_finset_rename {α : Type u} {γ : Type w} [comm_semiring α] (p : mv_polynomial γ α) :
∃ (s : finset γ) (q : mv_polynomial {x // x s} α), p = (mv_polynomial.rename coe) q

Every polynomial is a polynomial in finitely many variables.

theorem mv_polynomial.​exists_fin_rename {α : Type u} {γ : Type w} [comm_semiring α] (p : mv_polynomial γ α) :
∃ (n : ) (f : fin n → γ) (hf : function.injective f) (q : mv_polynomial (fin n) α), p = (mv_polynomial.rename f) q

Every polynomial is a polynomial in finitely many variables.

theorem mv_polynomial.​eval₂_cast_comp {β : Type u} {γ : Type v} (f : γ → β) {α : Type w} [comm_ring α] (c : →+* α) (g : β → α) (x : mv_polynomial γ ) :

The ring isomorphism between multivariable polynomials in no variables and the ground ring.

Equations

The ring isomorphism between multivariable polynomials in a single variable and polynomials over the ground ring.

Equations
def mv_polynomial.​ring_equiv_of_equiv (α : Type u) {β : Type v} {γ : Type w} [comm_semiring α] :
β γmv_polynomial β α ≃+* mv_polynomial γ α

The ring isomorphism between multivariable polynomials induced by an equivalence of the variables.

Equations
def mv_polynomial.​ring_equiv_congr (α : Type u) {β : Type v} {γ : Type w} [comm_semiring α] [comm_semiring γ] :
α ≃+* γmv_polynomial β α ≃+* mv_polynomial β γ

The ring isomorphism between multivariable polynomials induced by a ring isomorphism of the ground ring.

Equations
def mv_polynomial.​sum_to_iter (α : Type u) (β : Type v) (γ : Type w) [comm_semiring α] :

The function from multivariable polynomials in a sum of two types, to multivariable polynomials in one of the types, with coefficents in multivariable polynomials in the other type.

See sum_ring_equiv for the ring isomorphism.

Equations
@[instance]
def mv_polynomial.​is_semiring_hom_sum_to_iter (α : Type u) (β : Type v) (γ : Type w) [comm_semiring α] :

Equations
  • _ = _
theorem mv_polynomial.​sum_to_iter_C (α : Type u) (β : Type v) (γ : Type w) [comm_semiring α] (a : α) :

theorem mv_polynomial.​sum_to_iter_Xl (α : Type u) (β : Type v) (γ : Type w) [comm_semiring α] (b : β) :

theorem mv_polynomial.​sum_to_iter_Xr (α : Type u) (β : Type v) (γ : Type w) [comm_semiring α] (c : γ) :

def mv_polynomial.​iter_to_sum (α : Type u) (β : Type v) (γ : Type w) [comm_semiring α] :

The function from multivariable polynomials in one type, with coefficents in multivariable polynomials in another type, to multivariable polynomials in the sum of the two types.

See sum_ring_equiv for the ring isomorphism.

Equations
theorem mv_polynomial.​iter_to_sum_C_C (α : Type u) (β : Type v) (γ : Type w) [comm_semiring α] (a : α) :

theorem mv_polynomial.​iter_to_sum_X (α : Type u) (β : Type v) (γ : Type w) [comm_semiring α] (b : β) :

theorem mv_polynomial.​iter_to_sum_C_X (α : Type u) (β : Type v) (γ : Type w) [comm_semiring α] (c : γ) :

def mv_polynomial.​mv_polynomial_equiv_mv_polynomial (α : Type u) (β : Type v) (γ : Type w) (δ : Type x) [comm_semiring α] [comm_semiring δ] (f : mv_polynomial β α →+* mv_polynomial γ δ) (g : mv_polynomial γ δ →+* mv_polynomial β α) :
(∀ (a : δ), f (g (mv_polynomial.C a)) = mv_polynomial.C a)(∀ (n : γ), f (g (mv_polynomial.X n)) = mv_polynomial.X n)(∀ (a : α), g (f (mv_polynomial.C a)) = mv_polynomial.C a)(∀ (n : β), g (f (mv_polynomial.X n)) = mv_polynomial.X n)mv_polynomial β α ≃+* mv_polynomial γ δ

A helper function for sum_ring_equiv.

Equations
def mv_polynomial.​sum_ring_equiv (α : Type u) (β : Type v) (γ : Type w) [comm_semiring α] :

The ring isomorphism between multivariable polynomials in a sum of two types, and multivariable polynomials in one of the types, with coefficents in multivariable polynomials in the other type.

Equations
def mv_polynomial.​option_equiv_left (α : Type u) (β : Type v) [comm_semiring α] :

The ring isomorphism between multivariable polynomials in option β and polynomials with coefficients in mv_polynomial β α.

Equations
def mv_polynomial.​option_equiv_right (α : Type u) (β : Type v) [comm_semiring α] :

The ring isomorphism between multivariable polynomials in option β and multivariable polynomials with coefficients in polynomials.

Equations

The ring isomorphism between multivariable polynomials in fin (n + 1) and polynomials over multivariable polynomials in fin n.

Equations

Partial derivatives

def mv_polynomial.​pderivative {R : Type} [comm_ring R] {S : Type} :
S → mv_polynomial S Rmv_polynomial S R

pderivative v p is the partial derivative of p with respect to v

Equations
@[simp]

@[simp]
theorem mv_polynomial.​pderivative_monomial {R : Type} [comm_ring R] {S : Type} {v : S} {u : S →₀ } {a : R} :

@[simp]
theorem mv_polynomial.​pderivative_C {R : Type} [comm_ring R] {S : Type} {v : S} {a : R} :

@[simp]
theorem mv_polynomial.​pderivative_zero {R : Type} [comm_ring R] {S : Type} {v : S} :

theorem mv_polynomial.​pderivative_eq_zero_of_not_mem_vars {R : Type} [comm_ring R] {S : Type} {v : S} {f : mv_polynomial S R} :

@[simp]