mathlib documentation

data.polynomial.basic

Theory of univariate polynomials #

This file defines polynomial R, the type of univariate polynomials over the semiring R, builds a semiring structure on it, and gives basic definitions that are expanded in other files in this directory.

Main definitions #

There are often two natural variants of lemmas involving sums, depending on whether one acts on the polynomials, or on the function. The naming convention is that one adds index when acting on the polynomials. For instance,

Implementation #

Polynomials are defined using add_monoid_algebra R ℕ, where R is a semiring. The variable X commutes with every polynomial p: lemma X_mul proves the identity X * p =p * X. The relationship toadd_monoid_algebra R ℕis through a structure to make polynomials irreducible from the point of view of the kernel. Most operations are irreducible since Lean can not compute anyway withadd_monoid_algebra`. There are two exceptions that we make semireducible:

The raw implementation of the equivalence between polynomial R and add_monoid_algebra R ℕ is done through of_finsupp and to_finsupp (or, equivalently, rcases p when p is a polynomial gives an element q of add_monoid_algebra R ℕ, and conversely ⟨q⟩ gives back p). The equivalence is also registered as a ring equiv in polynomial.to_finsupp_iso. These should in general not be used once the basic API for polynomials is constructed.

structure polynomial (R : Type u_1) [semiring R] :
Type u_1

polynomial R is the type of univariate polynomials over R.

Polynomials should be seen as (semi-)rings with the additional constructor X. The embedding from R is called C.

theorem polynomial.forall_iff_forall_finsupp {R : Type u} [semiring R] (P : R[X] → Prop) :
(∀ (p : R[X]), P p) ∀ (q : add_monoid_algebra R ), P {to_finsupp := q}
theorem polynomial.exists_iff_exists_finsupp {R : Type u} [semiring R] (P : R[X] → Prop) :
(∃ (p : R[X]), P p) ∃ (q : add_monoid_algebra R ), P {to_finsupp := q}

Conversions to and from add_monoid_algebra #

Since polynomial R is not defeq to add_monoid_algebra R ℕ, but instead is a structure wrapping it, we have to copy across all the arithmetic operators manually, along with the lemmas about how they unfold around polynomial.of_finsupp and polynomial.to_finsupp.

noncomputable def polynomial.monomial_fun {R : Type u} [semiring R] (n : ) (a : R) :

The function version of monomial. Use monomial instead of this one.

Equations
@[protected, instance]
noncomputable def polynomial.has_zero {R : Type u} [semiring R] :
Equations
@[protected, instance]
noncomputable def polynomial.has_one {R : Type u} [semiring R] :
Equations
@[protected, instance]
noncomputable def polynomial.has_add {R : Type u} [semiring R] :
Equations
@[protected, instance]
noncomputable def polynomial.has_neg {R : Type u} [ring R] :
Equations
@[protected, instance]
noncomputable def polynomial.has_sub {R : Type u} [ring R] :
Equations
@[protected, instance]
noncomputable def polynomial.has_mul {R : Type u} [semiring R] :
Equations
@[protected, instance]
noncomputable def polynomial.has_scalar {R : Type u} [semiring R] {S : Type u_1} [monoid S] [distrib_mul_action S R] :
Equations
@[protected, instance]
noncomputable def polynomial.has_pow {R : Type u} [semiring R] :
Equations
@[simp]
theorem polynomial.of_finsupp_zero {R : Type u} [semiring R] :
{to_finsupp := 0} = 0
@[simp]
theorem polynomial.of_finsupp_one {R : Type u} [semiring R] :
{to_finsupp := 1} = 1
@[simp]
theorem polynomial.of_finsupp_add {R : Type u} [semiring R] {a b : add_monoid_algebra R } :
{to_finsupp := a + b} = {to_finsupp := a} + {to_finsupp := b}
@[simp]
theorem polynomial.of_finsupp_neg {R : Type u} [ring R] {a : add_monoid_algebra R } :
{to_finsupp := -a} = -{to_finsupp := a}
@[simp]
theorem polynomial.of_finsupp_sub {R : Type u} [ring R] {a b : add_monoid_algebra R } :
{to_finsupp := a - b} = {to_finsupp := a} - {to_finsupp := b}
@[simp]
theorem polynomial.of_finsupp_mul {R : Type u} [semiring R] (a b : add_monoid_algebra R ) :
{to_finsupp := a * b} = {to_finsupp := a} * {to_finsupp := b}
@[simp]
theorem polynomial.of_finsupp_smul {R : Type u} [semiring R] {S : Type u_1} [monoid S] [distrib_mul_action S R] (a : S) (b : add_monoid_algebra R ) :
{to_finsupp := a b} = a {to_finsupp := b}
@[simp]
theorem polynomial.of_finsupp_pow {R : Type u} [semiring R] (a : add_monoid_algebra R ) (n : ) :
{to_finsupp := a ^ n} = {to_finsupp := a} ^ n
@[simp]
theorem polynomial.to_finsupp_zero {R : Type u} [semiring R] :
@[simp]
theorem polynomial.to_finsupp_one {R : Type u} [semiring R] :
@[simp]
theorem polynomial.to_finsupp_add {R : Type u} [semiring R] (a b : R[X]) :
@[simp]
theorem polynomial.to_finsupp_neg {R : Type u} [ring R] (a : R[X]) :
@[simp]
theorem polynomial.to_finsupp_sub {R : Type u} [ring R] (a b : R[X]) :
@[simp]
theorem polynomial.to_finsupp_mul {R : Type u} [semiring R] (a b : R[X]) :
@[simp]
theorem polynomial.to_finsupp_smul {R : Type u} [semiring R] {S : Type u_1} [monoid S] [distrib_mul_action S R] (a : S) (b : R[X]) :
@[simp]
theorem polynomial.to_finsupp_pow {R : Type u} [semiring R] (a : R[X]) (n : ) :
theorem is_smul_regular.polynomial {R : Type u} [semiring R] {S : Type u_1} [monoid S] [distrib_mul_action S R] {a : S} (ha : is_smul_regular R a) :
@[simp]
theorem polynomial.to_finsupp_inj {R : Type u} [semiring R] {a b : R[X]} :
@[simp]
theorem polynomial.to_finsupp_eq_zero {R : Type u} [semiring R] {a : R[X]} :
a.to_finsupp = 0 a = 0
@[simp]
theorem polynomial.to_finsupp_eq_one {R : Type u} [semiring R] {a : R[X]} :
a.to_finsupp = 1 a = 1
theorem polynomial.of_finsupp_inj {R : Type u} [semiring R] {a b : add_monoid_algebra R } :
{to_finsupp := a} = {to_finsupp := b} a = b

A more convenient spelling of polynomial.of_finsupp.inj_eq in terms of iff.

@[simp]
theorem polynomial.of_finsupp_eq_zero {R : Type u} [semiring R] {a : add_monoid_algebra R } :
{to_finsupp := a} = 0 a = 0
@[simp]
theorem polynomial.of_finsupp_eq_one {R : Type u} [semiring R] {a : add_monoid_algebra R } :
{to_finsupp := a} = 1 a = 1
@[protected, instance]
noncomputable def polynomial.inhabited {R : Type u} [semiring R] :
Equations
@[protected, instance]
@[protected, instance]
noncomputable def polynomial.module {R : Type u} [semiring R] {S : Type u_1} [semiring S] [module S R] :
Equations
@[protected, instance]
def polynomial.smul_comm_class {R : Type u} [semiring R] {S₁ : Type u_1} {S₂ : Type u_2} [monoid S₁] [monoid S₂] [distrib_mul_action S₁ R] [distrib_mul_action S₂ R] [smul_comm_class S₁ S₂ R] :
smul_comm_class S₁ S₂ R[X]
@[protected, instance]
def polynomial.is_scalar_tower {R : Type u} [semiring R] {S₁ : Type u_1} {S₂ : Type u_2} [has_scalar S₁ S₂] [monoid S₁] [monoid S₂] [distrib_mul_action S₁ R] [distrib_mul_action S₂ R] [is_scalar_tower S₁ S₂ R] :
is_scalar_tower S₁ S₂ R[X]
@[protected, instance]
@[protected, instance]
noncomputable def polynomial.unique {R : Type u} [semiring R] [subsingleton R] :
Equations
@[simp]
theorem polynomial.to_finsupp_iso_symm_apply (R : Type u) [semiring R] (to_finsupp : add_monoid_algebra R ) :
((polynomial.to_finsupp_iso R).symm) to_finsupp = {to_finsupp := to_finsupp}

Ring isomorphism between R[X] and add_monoid_algebra R ℕ. This is just an implementation detail, but it can be useful to transfer results from finsupp to polynomials.

Equations
@[simp]
theorem polynomial.to_finsupp_iso_apply (R : Type u) [semiring R] (self : R[X]) :
theorem polynomial.of_finsupp_sum {R : Type u} [semiring R] {ι : Type u_1} (s : finset ι) (f : ι → add_monoid_algebra R ) :
{to_finsupp := ∑ (i : ι) in s, f i} = ∑ (i : ι) in s, {to_finsupp := f i}
theorem polynomial.to_finsupp_sum {R : Type u} [semiring R] {ι : Type u_1} (s : finset ι) (f : ι → R[X]) :
(∑ (i : ι) in s, f i).to_finsupp = ∑ (i : ι) in s, (f i).to_finsupp
@[simp]
def polynomial.support {R : Type u} [semiring R] :

The set of all n such that X^n has a non-zero coefficient.

Equations
@[simp]
@[simp]
theorem polynomial.support_zero {R : Type u} [semiring R] :
@[simp]
theorem polynomial.support_eq_empty {R : Type u} [semiring R] {p : R[X]} :
p.support = p = 0
theorem polynomial.card_support_eq_zero {R : Type u} [semiring R] {p : R[X]} :
p.support.card = 0 p = 0
noncomputable def polynomial.monomial {R : Type u} [semiring R] (n : ) :

monomial s a is the monomial a * X^s

Equations
@[simp]
theorem polynomial.to_finsupp_monomial {R : Type u} [semiring R] (n : ) (r : R) :
@[simp]
theorem polynomial.of_finsupp_single {R : Type u} [semiring R] (n : ) (r : R) :
@[simp]
theorem polynomial.monomial_zero_right {R : Type u} [semiring R] (n : ) :
theorem polynomial.monomial_add {R : Type u} [semiring R] (n : ) (r s : R) :
theorem polynomial.monomial_mul_monomial {R : Type u} [semiring R] (n m : ) (r s : R) :
@[simp]
theorem polynomial.monomial_pow {R : Type u} [semiring R] (n : ) (r : R) (k : ) :
theorem polynomial.smul_monomial {R : Type u} [semiring R] {S : Type u_1} [monoid S] [distrib_mul_action S R] (a : S) (n : ) (b : R) :
@[simp]
theorem polynomial.monomial_eq_zero_iff {R : Type u} [semiring R] (t : R) (n : ) :
theorem polynomial.support_add {R : Type u} [semiring R] {p q : R[X]} :
noncomputable def polynomial.C {R : Type u} [semiring R] :

C a is the constant polynomial a. C is provided as a ring homomorphism.

Equations
@[simp]
theorem polynomial.monomial_zero_left {R : Type u} [semiring R] (a : R) :
@[simp]
theorem polynomial.to_finsupp_C {R : Type u} [semiring R] (a : R) :
theorem polynomial.C_0 {R : Type u} [semiring R] :
theorem polynomial.C_1 {R : Type u} [semiring R] :
theorem polynomial.C_mul {R : Type u} {a b : R} [semiring R] :
theorem polynomial.C_add {R : Type u} {a b : R} [semiring R] :
@[simp]
theorem polynomial.smul_C {R : Type u} [semiring R] {S : Type u_1} [monoid S] [distrib_mul_action S R] (s : S) (r : R) :
@[simp]
theorem polynomial.C_bit0 {R : Type u} {a : R} [semiring R] :
@[simp]
theorem polynomial.C_bit1 {R : Type u} {a : R} [semiring R] :
theorem polynomial.C_pow {R : Type u} {a : R} {n : } [semiring R] :
@[simp]
theorem polynomial.C_eq_nat_cast {R : Type u} [semiring R] (n : ) :
@[simp]
theorem polynomial.C_mul_monomial {R : Type u} {a b : R} {n : } [semiring R] :
@[simp]
theorem polynomial.monomial_mul_C {R : Type u} {a b : R} {n : } [semiring R] :
noncomputable def polynomial.X {R : Type u} [semiring R] :

X is the polynomial variable (aka indeterminate).

Equations
theorem polynomial.X_mul {R : Type u} [semiring R] {p : R[X]} :

X commutes with everything, even when the coefficients are noncommutative.

theorem polynomial.X_pow_mul {R : Type u} [semiring R] {p : R[X]} {n : } :
@[simp]

Prefer putting constants to the left of X.

This lemma is the loop-avoiding simp version of polynomial.X_mul.

@[simp]
theorem polynomial.X_pow_mul_C {R : Type u} [semiring R] (r : R) (n : ) :

Prefer putting constants to the left of X ^ n.

This lemma is the loop-avoiding simp version of X_pow_mul.

theorem polynomial.X_pow_mul_assoc {R : Type u} [semiring R] {p q : R[X]} {n : } :
(p * polynomial.X ^ n) * q = (p * q) * polynomial.X ^ n
@[simp]
theorem polynomial.X_pow_mul_assoc_C {R : Type u} [semiring R] {p : R[X]} {n : } (r : R) :

Prefer putting constants to the left of X ^ n.

This lemma is the loop-avoiding simp version of X_pow_mul_assoc.

theorem polynomial.commute_X {R : Type u} [semiring R] (p : R[X]) :
theorem polynomial.commute_X_pow {R : Type u} [semiring R] (p : R[X]) (n : ) :
@[simp]
theorem polynomial.monomial_mul_X {R : Type u} [semiring R] (n : ) (r : R) :
@[simp]
theorem polynomial.monomial_mul_X_pow {R : Type u} [semiring R] (n : ) (r : R) (k : ) :
@[simp]
theorem polynomial.X_mul_monomial {R : Type u} [semiring R] (n : ) (r : R) :
@[simp]
theorem polynomial.X_pow_mul_monomial {R : Type u} [semiring R] (k n : ) (r : R) :
@[simp]
def polynomial.coeff {R : Type u} [semiring R] :
R[X] → R

coeff p n (often denoted p.coeff n) is the coefficient of X^n in p.

Equations
theorem polynomial.coeff_monomial {R : Type u} {a : R} {m n : } [semiring R] :
((polynomial.monomial n) a).coeff m = ite (n = m) a 0
@[simp]
theorem polynomial.coeff_zero {R : Type u} [semiring R] (n : ) :
0.coeff n = 0
@[simp]
theorem polynomial.coeff_one_zero {R : Type u} [semiring R] :
1.coeff 0 = 1
@[simp]
theorem polynomial.coeff_X_one {R : Type u} [semiring R] :
@[simp]
theorem polynomial.coeff_X_zero {R : Type u} [semiring R] :
@[simp]
theorem polynomial.coeff_monomial_succ {R : Type u} {a : R} {n : } [semiring R] :
theorem polynomial.coeff_X {R : Type u} {n : } [semiring R] :
polynomial.X.coeff n = ite (1 = n) 1 0
theorem polynomial.coeff_X_of_ne_one {R : Type u} [semiring R] {n : } (hn : n 1) :
@[simp]
theorem polynomial.mem_support_iff {R : Type u} {n : } [semiring R] {p : R[X]} :
n p.support p.coeff n 0
theorem polynomial.not_mem_support_iff {R : Type u} {n : } [semiring R] {p : R[X]} :
n p.support p.coeff n = 0
theorem polynomial.coeff_C {R : Type u} {a : R} {n : } [semiring R] :
(polynomial.C a).coeff n = ite (n = 0) a 0
@[simp]
theorem polynomial.coeff_C_zero {R : Type u} {a : R} [semiring R] :
theorem polynomial.coeff_C_ne_zero {R : Type u} {a : R} {n : } [semiring R] (h : n 0) :
theorem polynomial.nontrivial.of_polynomial_ne {R : Type u} [semiring R] {p q : R[X]} (h : p q) :
@[simp]
theorem polynomial.C_inj {R : Type u} {a b : R} [semiring R] :
@[simp]
theorem polynomial.C_eq_zero {R : Type u} {a : R} [semiring R] :
theorem polynomial.ext_iff {R : Type u} [semiring R] {p q : R[X]} :
p = q ∀ (n : ), p.coeff n = q.coeff n
@[ext]
theorem polynomial.ext {R : Type u} [semiring R] {p q : R[X]} :
(∀ (n : ), p.coeff n = q.coeff n)p = q

Monomials generate the additive monoid of polynomials.

theorem polynomial.add_hom_ext {R : Type u} [semiring R] {M : Type u_1} [add_monoid M] {f g : R[X] →+ M} (h : ∀ (n : ) (a : R), f ((polynomial.monomial n) a) = g ((polynomial.monomial n) a)) :
f = g
@[ext]
theorem polynomial.add_hom_ext' {R : Type u} [semiring R] {M : Type u_1} [add_monoid M] {f g : R[X] →+ M} (h : ∀ (n : ), f.comp (polynomial.monomial n).to_add_monoid_hom = g.comp (polynomial.monomial n).to_add_monoid_hom) :
f = g
@[ext]
theorem polynomial.lhom_ext' {R : Type u} [semiring R] {M : Type u_1} [add_comm_monoid M] [module R M] {f g : R[X] →ₗ[R] M} (h : ∀ (n : ), f.comp (polynomial.monomial n) = g.comp (polynomial.monomial n)) :
f = g
theorem polynomial.eq_zero_of_eq_zero {R : Type u} [semiring R] (h : 0 = 1) (p : R[X]) :
p = 0
theorem polynomial.support_monomial {R : Type u} [semiring R] (n : ) (a : R) (H : a 0) :
theorem polynomial.support_monomial' {R : Type u} [semiring R] (n : ) (a : R) :
theorem polynomial.monomial_eq_smul_X {R : Type u} {a : R} [semiring R] {n : } :
theorem polynomial.support_X_pow {R : Type u} [semiring R] (H : ¬1 = 0) (n : ) :
theorem polynomial.support_X_empty {R : Type u} [semiring R] (H : 1 = 0) :
theorem polynomial.support_X {R : Type u} [semiring R] (H : ¬1 = 0) :
theorem polynomial.monomial_left_inj {R : Type u_1} [semiring R] {a : R} (ha : a 0) {i j : } :
theorem polynomial.nat_cast_mul {R : Type u_1} [semiring R] (n : ) (p : R[X]) :
(n) * p = n p
def polynomial.sum {R : Type u} [semiring R] {S : Type u_1} [add_comm_monoid S] (p : R[X]) (f : R → S) :
S

Summing the values of a function applied to the coefficients of a polynomial

Equations
theorem polynomial.sum_def {R : Type u} [semiring R] {S : Type u_1} [add_comm_monoid S] (p : R[X]) (f : R → S) :
p.sum f = ∑ (n : ) in p.support, f n (p.coeff n)
theorem polynomial.sum_eq_of_subset {R : Type u} [semiring R] {S : Type u_1} [add_comm_monoid S] (p : R[X]) (f : R → S) (hf : ∀ (i : ), f i 0 = 0) (s : finset ) (hs : p.support s) :
p.sum f = ∑ (n : ) in s, f n (p.coeff n)
theorem polynomial.mul_eq_sum_sum {R : Type u} [semiring R] {p q : R[X]} :
p * q = ∑ (i : ) in p.support, q.sum (λ (j : ) (a : R), (polynomial.monomial (i + j)) ((p.coeff i) * a))

Expressing the product of two polynomials as a double sum.

@[simp]
theorem polynomial.sum_zero_index {R : Type u} [semiring R] {S : Type u_1} [add_comm_monoid S] (f : R → S) :
0.sum f = 0
@[simp]
theorem polynomial.sum_monomial_index {R : Type u} [semiring R] {S : Type u_1} [add_comm_monoid S] (n : ) (a : R) (f : R → S) (hf : f n 0 = 0) :
((polynomial.monomial n) a).sum f = f n a
@[simp]
theorem polynomial.sum_C_index {R : Type u} [semiring R] {a : R} {β : Type u_1} [add_comm_monoid β] {f : R → β} (h : f 0 0 = 0) :
(polynomial.C a).sum f = f 0 a
@[simp]
theorem polynomial.sum_X_index {R : Type u} [semiring R] {S : Type u_1} [add_comm_monoid S] {f : R → S} (hf : f 1 0 = 0) :
theorem polynomial.sum_add_index {R : Type u} [semiring R] {S : Type u_1} [add_comm_monoid S] (p q : R[X]) (f : R → S) (hf : ∀ (i : ), f i 0 = 0) (h_add : ∀ (a : ) (b₁ b₂ : R), f a (b₁ + b₂) = f a b₁ + f a b₂) :
(p + q).sum f = p.sum f + q.sum f
theorem polynomial.sum_add' {R : Type u} [semiring R] {S : Type u_1} [add_comm_monoid S] (p : R[X]) (f g : R → S) :
p.sum (f + g) = p.sum f + p.sum g
theorem polynomial.sum_add {R : Type u} [semiring R] {S : Type u_1} [add_comm_monoid S] (p : R[X]) (f g : R → S) :
p.sum (λ (n : ) (x : R), f n x + g n x) = p.sum f + p.sum g
theorem polynomial.sum_smul_index {R : Type u} [semiring R] {S : Type u_1} [add_comm_monoid S] (p : R[X]) (b : R) (f : R → S) (hf : ∀ (i : ), f i 0 = 0) :
(b p).sum f = p.sum (λ (n : ) (a : R), f n (b * a))
noncomputable def polynomial.erase {R : Type u} [semiring R] (n : ) :
R[X] → R[X]

erase p n is the polynomial p in which the X^n term has been erased.

Equations
@[simp]
theorem polynomial.to_finsupp_erase {R : Type u} [semiring R] (p : R[X]) (n : ) :
@[simp]
@[simp]
theorem polynomial.support_erase {R : Type u} [semiring R] (p : R[X]) (n : ) :
theorem polynomial.monomial_add_erase {R : Type u} [semiring R] (p : R[X]) (n : ) :
theorem polynomial.coeff_erase {R : Type u} [semiring R] (p : R[X]) (n i : ) :
(polynomial.erase n p).coeff i = ite (i = n) 0 (p.coeff i)
@[simp]
theorem polynomial.erase_zero {R : Type u} [semiring R] (n : ) :
@[simp]
theorem polynomial.erase_monomial {R : Type u} [semiring R] {n : } {a : R} :
@[simp]
theorem polynomial.erase_same {R : Type u} [semiring R] (p : R[X]) (n : ) :
@[simp]
theorem polynomial.erase_ne {R : Type u} [semiring R] (p : R[X]) (n i : ) (h : i n) :
noncomputable def polynomial.update {R : Type u} [semiring R] (p : R[X]) (n : ) (a : R) :

Replace the coefficient of a p : polynomial p at a given degree n : ℕ by a given value a : R. If a = 0, this is equal to p.erase n If p.nat_degree < n and a ≠ 0, this increases the degree to n.

Equations
theorem polynomial.coeff_update {R : Type u} [semiring R] (p : R[X]) (n : ) (a : R) :
theorem polynomial.coeff_update_apply {R : Type u} [semiring R] (p : R[X]) (n : ) (a : R) (i : ) :
(p.update n a).coeff i = ite (i = n) a (p.coeff i)
@[simp]
theorem polynomial.coeff_update_same {R : Type u} [semiring R] (p : R[X]) (n : ) (a : R) :
(p.update n a).coeff n = a
theorem polynomial.coeff_update_ne {R : Type u} [semiring R] (p : R[X]) {n : } (a : R) {i : } (h : i n) :
(p.update n a).coeff i = p.coeff i
@[simp]
theorem polynomial.update_zero_eq_erase {R : Type u} [semiring R] (p : R[X]) (n : ) :
theorem polynomial.support_update {R : Type u} [semiring R] (p : R[X]) (n : ) (a : R) [decidable (a = 0)] :
(p.update n a).support = ite (a = 0) (p.support.erase n) (insert n p.support)
theorem polynomial.support_update_zero {R : Type u} [semiring R] (p : R[X]) (n : ) :
theorem polynomial.support_update_ne_zero {R : Type u} [semiring R] (p : R[X]) (n : ) {a : R} (ha : a 0) :
@[protected, instance]
noncomputable def polynomial.comm_semiring {R : Type u} [comm_semiring R] :
Equations
@[protected, instance]
noncomputable def polynomial.ring {R : Type u} [ring R] :
Equations
@[simp]
theorem polynomial.coeff_neg {R : Type u} [ring R] (p : R[X]) (n : ) :
(-p).coeff n = -p.coeff n
@[simp]
theorem polynomial.coeff_sub {R : Type u} [ring R] (p q : R[X]) (n : ) :
(p - q).coeff n = p.coeff n - q.coeff n
@[simp]
theorem polynomial.monomial_neg {R : Type u} [ring R] (n : ) (a : R) :
@[simp]
theorem polynomial.support_neg {R : Type u} [ring R] {p : R[X]} :
@[simp]
theorem polynomial.C_eq_int_cast {R : Type u} [ring R] (n : ) :
@[protected, instance]
noncomputable def polynomial.comm_ring {R : Type u} [comm_ring R] :
Equations
  • polynomial.comm_ring = function.injective.comm_ring polynomial.to_finsupp polynomial.comm_ring._proof_1 polynomial.comm_ring._proof_2 polynomial.comm_ring._proof_3 polynomial.comm_ring._proof_4 polynomial.comm_ring._proof_5 polynomial.comm_ring._proof_6 polynomial.comm_ring._proof_7 polynomial.comm_ring._proof_8 polynomial.comm_ring._proof_9 polynomial.comm_ring._proof_10
@[protected, instance]
def polynomial.nontrivial {R : Type u} [semiring R] [nontrivial R] :
theorem polynomial.X_ne_zero {R : Type u} [semiring R] [nontrivial R] :
@[simp]
@[protected, instance]
noncomputable def polynomial.has_repr {R : Type u} [semiring R] [has_repr R] :
Equations