mathlib documentation

data.polynomial.eval

Theory of univariate polynomials #

The main defs here are eval₂, eval, and map. We give several lemmas about their interaction with each other and with module operations.

def polynomial.eval₂ {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (x : S) (p : R[X]) :
S

Evaluate a polynomial p given a ring hom f from the scalar ring to the target and a value x for the variable in the target

Equations
theorem polynomial.eval₂_eq_sum {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] {f : R →+* S} {x : S} :
polynomial.eval₂ f x p = p.sum (λ (e : ) (a : R), (f a) * x ^ e)
theorem polynomial.eval₂_congr {R : Type u_1} {S : Type u_2} [semiring R] [semiring S] {f g : R →+* S} {s t : S} {φ ψ : R[X]} :
f = gs = tφ = ψpolynomial.eval₂ f s φ = polynomial.eval₂ g t ψ
@[simp]
theorem polynomial.eval₂_at_zero {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) :
@[simp]
theorem polynomial.eval₂_zero {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (x : S) :
@[simp]
theorem polynomial.eval₂_C {R : Type u} {S : Type v} {a : R} [semiring R] [semiring S] (f : R →+* S) (x : S) :
@[simp]
theorem polynomial.eval₂_X {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (x : S) :
@[simp]
theorem polynomial.eval₂_monomial {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (x : S) {n : } {r : R} :
@[simp]
theorem polynomial.eval₂_X_pow {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (x : S) {n : } :
@[simp]
theorem polynomial.eval₂_add {R : Type u} {S : Type v} [semiring R] {p q : R[X]} [semiring S] (f : R →+* S) (x : S) :
@[simp]
theorem polynomial.eval₂_one {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (x : S) :
@[simp]
theorem polynomial.eval₂_bit0 {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (x : S) :
@[simp]
theorem polynomial.eval₂_bit1 {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (x : S) :
@[simp]
theorem polynomial.eval₂_smul {R : Type u} {S : Type v} [semiring R] [semiring S] (g : R →+* S) (p : R[X]) (x : S) {s : R} :
@[simp]
def polynomial.eval₂_add_monoid_hom {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (x : S) :

eval₂_add_monoid_hom (f : R →+* S) (x : S) is the add_monoid_hom from polynomial R to S obtained by evaluating the pushforward of p along f at x.

Equations
@[simp]
theorem polynomial.eval₂_add_monoid_hom_apply {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (x : S) (p : R[X]) :
@[simp]
theorem polynomial.eval₂_nat_cast {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (x : S) (n : ) :
theorem polynomial.eval₂_sum {R : Type u} {S : Type v} {T : Type w} [semiring R] [semiring S] (f : R →+* S) [semiring T] (p : T[X]) (g : T → R[X]) (x : S) :
polynomial.eval₂ f x (p.sum g) = p.sum (λ (n : ) (a : T), polynomial.eval₂ f x (g n a))
theorem polynomial.eval₂_list_sum {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (l : list R[X]) (x : S) :
theorem polynomial.eval₂_multiset_sum {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (s : multiset R[X]) (x : S) :
theorem polynomial.eval₂_finset_sum {R : Type u} {S : Type v} {ι : Type y} [semiring R] [semiring S] (f : R →+* S) (s : finset ι) (g : ι → R[X]) (x : S) :
polynomial.eval₂ f x (∑ (i : ι) in s, g i) = ∑ (i : ι) in s, polynomial.eval₂ f x (g i)
theorem polynomial.eval₂_of_finsupp {R : Type u} {S : Type v} [semiring R] [semiring S] {f : R →+* S} {x : S} {p : add_monoid_algebra R } :
theorem polynomial.eval₂_mul_noncomm {R : Type u} {S : Type v} [semiring R] {p q : R[X]} [semiring S] (f : R →+* S) (x : S) (hf : ∀ (k : ), commute (f (q.coeff k)) x) :
@[simp]
theorem polynomial.eval₂_mul_X {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (x : S) :
@[simp]
theorem polynomial.eval₂_X_mul {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (x : S) :
theorem polynomial.eval₂_mul_C' {R : Type u} {S : Type v} {a : R} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (x : S) (h : commute (f a) x) :
theorem polynomial.eval₂_list_prod_noncomm {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (x : S) (ps : list R[X]) (hf : ∀ (p : R[X]), p ps∀ (k : ), commute (f (p.coeff k)) x) :
def polynomial.eval₂_ring_hom' {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (x : S) (hf : ∀ (a : R), commute (f a) x) :

eval₂ as a ring_hom for noncommutative rings

Equations

We next prove that eval₂ is multiplicative as long as target ring is commutative (even if the source ring is not).

theorem polynomial.eval₂_eq_sum_range {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (x : S) :
polynomial.eval₂ f x p = ∑ (i : ) in finset.range (p.nat_degree + 1), (f (p.coeff i)) * x ^ i
theorem polynomial.eval₂_eq_sum_range' {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) {p : R[X]} {n : } (hn : p.nat_degree < n) (x : S) :
polynomial.eval₂ f x p = ∑ (i : ) in finset.range n, (f (p.coeff i)) * x ^ i
@[simp]
theorem polynomial.eval₂_mul {R : Type u} {S : Type v} [semiring R] {p q : R[X]} [comm_semiring S] (f : R →+* S) (x : S) :
theorem polynomial.eval₂_mul_eq_zero_of_left {R : Type u} {S : Type v} [semiring R] {p : R[X]} [comm_semiring S] (f : R →+* S) (x : S) (q : R[X]) (hp : polynomial.eval₂ f x p = 0) :
polynomial.eval₂ f x (p * q) = 0
theorem polynomial.eval₂_mul_eq_zero_of_right {R : Type u} {S : Type v} [semiring R] {q : R[X]} [comm_semiring S] (f : R →+* S) (x : S) (p : R[X]) (hq : polynomial.eval₂ f x q = 0) :
polynomial.eval₂ f x (p * q) = 0
noncomputable def polynomial.eval₂_ring_hom {R : Type u} {S : Type v} [semiring R] [comm_semiring S] (f : R →+* S) (x : S) :

eval₂ as a ring_hom

Equations
@[simp]
theorem polynomial.coe_eval₂_ring_hom {R : Type u} {S : Type v} [semiring R] [comm_semiring S] (f : R →+* S) (x : S) :
theorem polynomial.eval₂_pow {R : Type u} {S : Type v} [semiring R] {p : R[X]} [comm_semiring S] (f : R →+* S) (x : S) (n : ) :
theorem polynomial.eval₂_dvd {R : Type u} {S : Type v} [semiring R] {p q : R[X]} [comm_semiring S] (f : R →+* S) (x : S) :
theorem polynomial.eval₂_eq_zero_of_dvd_of_eval₂_eq_zero {R : Type u} {S : Type v} [semiring R] {p q : R[X]} [comm_semiring S] (f : R →+* S) (x : S) (h : p q) (h0 : polynomial.eval₂ f x p = 0) :
theorem polynomial.eval₂_list_prod {R : Type u} {S : Type v} [semiring R] [comm_semiring S] (f : R →+* S) (l : list R[X]) (x : S) :
def polynomial.eval {R : Type u} [semiring R] :
R → R[X] → R

eval x p is the evaluation of the polynomial p at x

Equations
theorem polynomial.eval_eq_sum {R : Type u} [semiring R] {p : R[X]} {x : R} :
polynomial.eval x p = p.sum (λ (e : ) (a : R), a * x ^ e)
theorem polynomial.eval_eq_sum_range {R : Type u} [semiring R] {p : R[X]} (x : R) :
polynomial.eval x p = ∑ (i : ) in finset.range (p.nat_degree + 1), (p.coeff i) * x ^ i
theorem polynomial.eval_eq_sum_range' {R : Type u} [semiring R] {p : R[X]} {n : } (hn : p.nat_degree < n) (x : R) :
polynomial.eval x p = ∑ (i : ) in finset.range n, (p.coeff i) * x ^ i
@[simp]
theorem polynomial.eval₂_at_apply {R : Type u} [semiring R] {p : R[X]} {S : Type u_1} [semiring S] (f : R →+* S) (r : R) :
@[simp]
theorem polynomial.eval₂_at_one {R : Type u} [semiring R] {p : R[X]} {S : Type u_1} [semiring S] (f : R →+* S) :
@[simp]
theorem polynomial.eval₂_at_nat_cast {R : Type u} [semiring R] {p : R[X]} {S : Type u_1} [semiring S] (f : R →+* S) (n : ) :
@[simp]
theorem polynomial.eval_C {R : Type u} {a : R} [semiring R] {x : R} :
@[simp]
theorem polynomial.eval_nat_cast {R : Type u} [semiring R] {x : R} {n : } :
@[simp]
theorem polynomial.eval_X {R : Type u} [semiring R] {x : R} :
@[simp]
theorem polynomial.eval_monomial {R : Type u} [semiring R] {x : R} {n : } {a : R} :
@[simp]
theorem polynomial.eval_zero {R : Type u} [semiring R] {x : R} :
@[simp]
theorem polynomial.eval_add {R : Type u} [semiring R] {p q : R[X]} {x : R} :
@[simp]
theorem polynomial.eval_one {R : Type u} [semiring R] {x : R} :
@[simp]
theorem polynomial.eval_bit0 {R : Type u} [semiring R] {p : R[X]} {x : R} :
@[simp]
theorem polynomial.eval_bit1 {R : Type u} [semiring R] {p : R[X]} {x : R} :
@[simp]
theorem polynomial.eval_smul {R : Type u} {S : Type v} [semiring R] [monoid S] [distrib_mul_action S R] [is_scalar_tower S R R] (s : S) (p : R[X]) (x : R) :
@[simp]
theorem polynomial.eval_C_mul {R : Type u} {a : R} [semiring R] {p : R[X]} {x : R} :
@[simp]
theorem polynomial.leval_apply {R : Type u_1} [semiring R] (r : R) (f : R[X]) :
def polynomial.leval {R : Type u_1} [semiring R] (r : R) :

polynomial.eval as linear map

Equations
@[simp]
theorem polynomial.eval_nat_cast_mul {R : Type u} [semiring R] {p : R[X]} {x : R} {n : } :
@[simp]
theorem polynomial.eval_mul_X {R : Type u} [semiring R] {p : R[X]} {x : R} :
@[simp]
theorem polynomial.eval_mul_X_pow {R : Type u} [semiring R] {p : R[X]} {x : R} {k : } :
theorem polynomial.eval_sum {R : Type u} [semiring R] (p : R[X]) (f : R → R[X]) (x : R) :
polynomial.eval x (p.sum f) = p.sum (λ (n : ) (a : R), polynomial.eval x (f n a))
theorem polynomial.eval_finset_sum {R : Type u} {ι : Type y} [semiring R] (s : finset ι) (g : ι → R[X]) (x : R) :
polynomial.eval x (∑ (i : ι) in s, g i) = ∑ (i : ι) in s, polynomial.eval x (g i)
def polynomial.is_root {R : Type u} [semiring R] (p : R[X]) (a : R) :
Prop

is_root p x implies x is a root of p. The evaluation of p at x is zero

Equations
@[protected, instance]
def polynomial.is_root.decidable {R : Type u} {a : R} [semiring R] {p : R[X]} [decidable_eq R] :
Equations
@[simp]
theorem polynomial.is_root.def {R : Type u} {a : R} [semiring R] {p : R[X]} :
theorem polynomial.is_root.eq_zero {R : Type u} [semiring R] {p : R[X]} {x : R} (h : p.is_root x) :
theorem polynomial.coeff_zero_eq_eval_zero {R : Type u} [semiring R] (p : R[X]) :
theorem polynomial.zero_is_root_of_coeff_zero_eq_zero {R : Type u} [semiring R] {p : R[X]} (hp : p.coeff 0 = 0) :
theorem polynomial.is_root.dvd {R : Type u_1} [comm_semiring R] {p q : R[X]} {x : R} (h : p.is_root x) (hpq : p q) :
theorem polynomial.not_is_root_C {R : Type u} [semiring R] (r a : R) (hr : r 0) :
noncomputable def polynomial.comp {R : Type u} [semiring R] (p q : R[X]) :

The composition of polynomials as a polynomial.

Equations
theorem polynomial.comp_eq_sum_left {R : Type u} [semiring R] {p q : R[X]} :
p.comp q = p.sum (λ (e : ) (a : R), (polynomial.C a) * q ^ e)
@[simp]
theorem polynomial.comp_X {R : Type u} [semiring R] {p : R[X]} :
@[simp]
theorem polynomial.X_comp {R : Type u} [semiring R] {p : R[X]} :
@[simp]
theorem polynomial.comp_C {R : Type u} {a : R} [semiring R] {p : R[X]} :
@[simp]
theorem polynomial.C_comp {R : Type u} {a : R} [semiring R] {p : R[X]} :
@[simp]
theorem polynomial.nat_cast_comp {R : Type u} [semiring R] {p : R[X]} {n : } :
@[simp]
theorem polynomial.comp_zero {R : Type u} [semiring R] {p : R[X]} :
@[simp]
theorem polynomial.zero_comp {R : Type u} [semiring R] {p : R[X]} :
0.comp p = 0
@[simp]
theorem polynomial.comp_one {R : Type u} [semiring R] {p : R[X]} :
@[simp]
theorem polynomial.one_comp {R : Type u} [semiring R] {p : R[X]} :
1.comp p = 1
@[simp]
theorem polynomial.add_comp {R : Type u} [semiring R] {p q r : R[X]} :
(p + q).comp r = p.comp r + q.comp r
@[simp]
theorem polynomial.monomial_comp {R : Type u} {a : R} [semiring R] {p : R[X]} (n : ) :
@[simp]
theorem polynomial.mul_X_comp {R : Type u} [semiring R] {p r : R[X]} :
(p * polynomial.X).comp r = (p.comp r) * r
@[simp]
theorem polynomial.X_pow_comp {R : Type u} [semiring R] {p : R[X]} {k : } :
(polynomial.X ^ k).comp p = p ^ k
@[simp]
theorem polynomial.mul_X_pow_comp {R : Type u} [semiring R] {p r : R[X]} {k : } :
(p * polynomial.X ^ k).comp r = (p.comp r) * r ^ k
@[simp]
theorem polynomial.C_mul_comp {R : Type u} {a : R} [semiring R] {p r : R[X]} :
@[simp]
theorem polynomial.nat_cast_mul_comp {R : Type u} [semiring R] {p r : R[X]} {n : } :
((n) * p).comp r = (n) * p.comp r
@[simp]
theorem polynomial.mul_comp {R : Type u_1} [comm_semiring R] (p q r : R[X]) :
(p * q).comp r = (p.comp r) * q.comp r
theorem polynomial.prod_comp {R : Type u_1} [comm_semiring R] (s : multiset R[X]) (p : R[X]) :
s.prod.comp p = (multiset.map (λ (q : R[X]), q.comp p) s).prod
@[simp]
theorem polynomial.pow_comp {R : Type u_1} [comm_semiring R] (p q : R[X]) (n : ) :
(p ^ n).comp q = p.comp q ^ n
@[simp]
theorem polynomial.bit0_comp {R : Type u} [semiring R] {p q : R[X]} :
(bit0 p).comp q = bit0 (p.comp q)
@[simp]
theorem polynomial.bit1_comp {R : Type u} [semiring R] {p q : R[X]} :
(bit1 p).comp q = bit1 (p.comp q)
@[simp]
theorem polynomial.smul_comp {R : Type u} {S : Type v} [semiring R] [monoid S] [distrib_mul_action S R] [is_scalar_tower S R R] (s : S) (p q : R[X]) :
(s p).comp q = s p.comp q
theorem polynomial.comp_assoc {R : Type u_1} [comm_semiring R] (φ ψ χ : R[X]) :
(φ.comp ψ).comp χ = φ.comp (ψ.comp χ)
noncomputable def polynomial.map {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) :
R[X] → S[X]

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

Equations
@[simp]
theorem polynomial.map_C {R : Type u} {S : Type v} {a : R} [semiring R] [semiring S] (f : R →+* S) :
@[simp]
theorem polynomial.map_X {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) :
@[simp]
theorem polynomial.map_monomial {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) {n : } {a : R} :
@[protected, simp]
theorem polynomial.map_zero {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) :
@[protected, simp]
theorem polynomial.map_add {R : Type u} {S : Type v} [semiring R] {p q : R[X]} [semiring S] (f : R →+* S) :
@[protected, simp]
theorem polynomial.map_one {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) :
@[protected, simp]
theorem polynomial.map_mul {R : Type u} {S : Type v} [semiring R] {p q : R[X]} [semiring S] (f : R →+* S) :
@[simp]
theorem polynomial.map_smul {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (r : R) :
noncomputable def polynomial.map_ring_hom {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) :

polynomial.map as a ring_hom.

Equations
@[simp]
theorem polynomial.coe_map_ring_hom {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) :
@[protected, simp]
theorem polynomial.map_nat_cast {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (n : ) :
@[simp]
theorem polynomial.coeff_map {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (n : ) :
(polynomial.map f p).coeff n = f (p.coeff n)
noncomputable def polynomial.map_equiv {R : Type u} {S : Type v} [semiring R] [semiring S] (e : R ≃+* S) :

If R and S are isomorphic, then so are their polynomial rings.

Equations
@[simp]
theorem polynomial.map_equiv_apply {R : Type u} {S : Type v} [semiring R] [semiring S] (e : R ≃+* S) (ᾰ : R[X]) :
@[simp]
theorem polynomial.map_equiv_symm_apply {R : Type u} {S : Type v} [semiring R] [semiring S] (e : R ≃+* S) (ᾰ : S[X]) :
theorem polynomial.map_map {R : Type u} {S : Type v} {T : Type w} [semiring R] [semiring S] (f : R →+* S) [semiring T] (g : S →+* T) (p : R[X]) :
@[simp]
theorem polynomial.map_id {R : Type u} [semiring R] {p : R[X]} :
theorem polynomial.eval₂_eq_eval_map {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) {x : S} :
theorem polynomial.map_injective {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (hf : function.injective f) :
theorem polynomial.map_surjective {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (hf : function.surjective f) :
theorem polynomial.degree_map_le {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (p : R[X]) :
theorem polynomial.nat_degree_map_le {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (p : R[X]) :
theorem polynomial.map_monic_eq_zero_iff {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] {f : R →+* S} (hp : p.monic) :
polynomial.map f p = 0 ∀ (x : R), f x = 0
theorem polynomial.map_monic_ne_zero {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] {f : R →+* S} (hp : p.monic) [nontrivial S] :
theorem polynomial.degree_map_eq_of_leading_coeff_ne_zero {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (hf : f p.leading_coeff 0) :
theorem polynomial.nat_degree_map_of_leading_coeff_ne_zero {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (hf : f p.leading_coeff 0) :
theorem polynomial.leading_coeff_map_of_leading_coeff_ne_zero {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (hf : f p.leading_coeff 0) :
@[simp]
theorem polynomial.map_ring_hom_comp {R : Type u} {S : Type v} {T : Type w} [semiring R] [semiring S] [semiring T] (f : S →+* T) (g : R →+* S) :
@[protected]
theorem polynomial.map_list_prod {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (L : list R[X]) :
@[protected, simp]
theorem polynomial.map_pow {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (n : ) :
theorem polynomial.mem_map_srange {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) {p : S[X]} :
theorem polynomial.mem_map_range {R : Type u_1} {S : Type u_2} [ring R] [ring S] (f : R →+* S) {p : S[X]} :
theorem polynomial.eval₂_map {R : Type u} {S : Type v} {T : Type w} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) [semiring T] (g : S →+* T) (x : T) :
theorem polynomial.eval_map {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (x : S) :
@[protected]
theorem polynomial.map_sum {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) {ι : Type u_1} (g : ι → R[X]) (s : finset ι) :
polynomial.map f (∑ (i : ι) in s, g i) = ∑ (i : ι) in s, polynomial.map f (g i)
theorem polynomial.map_comp {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (p q : R[X]) :
@[simp]
theorem polynomial.eval_zero_map {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (p : R[X]) :
@[simp]
theorem polynomial.eval_one_map {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (p : R[X]) :
@[simp]
theorem polynomial.eval_nat_cast_map {R : Type u} {S : Type v} [semiring R] [semiring S] (f : R →+* S) (p : R[X]) (n : ) :
@[simp]
theorem polynomial.eval_int_cast_map {R : Type u_1} {S : Type u_2} [ring R] [ring S] (f : R →+* S) (p : R[X]) (i : ) :

After having set up the basic theory of eval₂, eval, comp, and map, we make eval₂ irreducible.

Perhaps we can make the others irreducible too?

theorem polynomial.hom_eval₂ {R : Type u} {S : Type v} {T : Type w} [semiring R] (p : R[X]) [semiring S] [semiring T] (f : R →+* S) (g : S →+* T) (x : S) :
theorem polynomial.eval₂_hom {R : Type u} {S : Type v} [semiring R] {p : R[X]} [semiring S] (f : R →+* S) (x : R) :
theorem polynomial.eval₂_comp {R : Type u} {S : Type v} [semiring R] {p q : R[X]} [comm_semiring S] (f : R →+* S) {x : S} :
@[simp]
theorem polynomial.eval_mul {R : Type u} [comm_semiring R] {p q : R[X]} {x : R} :
noncomputable def polynomial.eval_ring_hom {R : Type u} [comm_semiring R] :
R → R[X] →+* R

eval r, regarded as a ring homomorphism from polynomial R to R.

Equations
@[simp]
theorem polynomial.eval_pow {R : Type u} [comm_semiring R] {p : R[X]} {x : R} (n : ) :
@[simp]
theorem polynomial.eval_comp {R : Type u} [comm_semiring R] {p q : R[X]} {x : R} :
noncomputable def polynomial.comp_ring_hom {R : Type u} [comm_semiring R] :
R[X]R[X] →+* R[X]

comp p, regarded as a ring homomorphism from polynomial R to itself.

Equations
theorem polynomial.root_mul_left_of_is_root {R : Type u} {a : R} [comm_semiring R] (p : R[X]) {q : R[X]} :
q.is_root a(p * q).is_root a
theorem polynomial.root_mul_right_of_is_root {R : Type u} {a : R} [comm_semiring R] {p : R[X]} (q : R[X]) :
p.is_root a(p * q).is_root a
theorem polynomial.eval₂_multiset_prod {R : Type u} {S : Type v} [comm_semiring R] [comm_semiring S] (f : R →+* S) (s : multiset R[X]) (x : S) :
theorem polynomial.eval₂_finset_prod {R : Type u} {S : Type v} {ι : Type y} [comm_semiring R] [comm_semiring S] (f : R →+* S) (s : finset ι) (g : ι → R[X]) (x : S) :
polynomial.eval₂ f x (∏ (i : ι) in s, g i) = ∏ (i : ι) in s, polynomial.eval₂ f x (g i)
theorem polynomial.eval_list_prod {R : Type u} [comm_semiring R] (l : list R[X]) (x : R) :

Polynomial evaluation commutes with list.prod

Polynomial evaluation commutes with multiset.prod

theorem polynomial.eval_prod {R : Type u} [comm_semiring R] {ι : Type u_1} (s : finset ι) (p : ι → R[X]) (x : R) :
polynomial.eval x (∏ (j : ι) in s, p j) = ∏ (j : ι) in s, polynomial.eval x (p j)

Polynomial evaluation commutes with finset.prod

theorem polynomial.is_root_prod {R : Type u_1} [comm_ring R] [is_domain R] {ι : Type u_2} (s : finset ι) (p : ι → R[X]) (x : R) :
(∏ (j : ι) in s, p j).is_root x ∃ (i : ι) (H : i s), (p i).is_root x
theorem polynomial.eval_dvd {R : Type u} [comm_semiring R] {p q : R[X]} {x : R} :
theorem polynomial.eval_eq_zero_of_dvd_of_eval_eq_zero {R : Type u} [comm_semiring R] {p q : R[X]} {x : R} :
p qpolynomial.eval x p = 0polynomial.eval x q = 0
@[simp]
theorem polynomial.eval_geom_sum {R : Type u_1} [comm_semiring R] {n : } {x : R} :
theorem polynomial.map_dvd {R : Type u_1} {S : Type u_2} [semiring R] [comm_semiring S] (f : R →+* S) {x y : R[X]} :
theorem polynomial.support_map_subset {R : Type u} {S : Type v} [semiring R] [comm_semiring S] (f : R →+* S) (p : R[X]) :
@[protected]
theorem polynomial.map_multiset_prod {R : Type u} {S : Type v} [comm_semiring R] [comm_semiring S] (f : R →+* S) (m : multiset R[X]) :
@[protected]
theorem polynomial.map_prod {R : Type u} {S : Type v} [comm_semiring R] [comm_semiring S] (f : R →+* S) {ι : Type u_1} (g : ι → R[X]) (s : finset ι) :
polynomial.map f (∏ (i : ι) in s, g i) = ∏ (i : ι) in s, polynomial.map f (g i)
theorem polynomial.is_root.map {R : Type u} {S : Type v} [comm_semiring R] [comm_semiring S] {f : R →+* S} {x : R} {p : R[X]} (h : p.is_root x) :
theorem polynomial.is_root.of_map {S : Type v} [comm_semiring S] {R : Type u_1} [comm_ring R] {f : R →+* S} {x : R} {p : R[X]} (h : (polynomial.map f p).is_root (f x)) (hf : function.injective f) :
theorem polynomial.is_root_map_iff {S : Type v} [comm_semiring S] {R : Type u_1} [comm_ring R] {f : R →+* S} {x : R} {p : R[X]} (hf : function.injective f) :
theorem polynomial.C_neg {R : Type u} {a : R} [ring R] :
theorem polynomial.C_sub {R : Type u} {a b : R} [ring R] :
@[protected, simp]
theorem polynomial.map_sub {R : Type u} [ring R] {p q : R[X]} {S : Type u_1} [ring S] (f : R →+* S) :
@[protected, simp]
theorem polynomial.map_neg {R : Type u} [ring R] {p : R[X]} {S : Type u_1} [ring S] (f : R →+* S) :
@[simp]
theorem polynomial.map_int_cast {R : Type u} [ring R] {S : Type u_1} [ring S] (f : R →+* S) (n : ) :
@[simp]
theorem polynomial.eval_int_cast {R : Type u} [ring R] {n : } {x : R} :
@[simp]
theorem polynomial.eval₂_neg {R : Type u} [ring R] {p : R[X]} {S : Type u_1} [ring S] (f : R →+* S) {x : S} :
@[simp]
theorem polynomial.eval₂_sub {R : Type u} [ring R] {p q : R[X]} {S : Type u_1} [ring S] (f : R →+* S) {x : S} :
@[simp]
theorem polynomial.eval_neg {R : Type u} [ring R] (p : R[X]) (x : R) :
@[simp]
theorem polynomial.eval_sub {R : Type u} [ring R] (p q : R[X]) (x : R) :
theorem polynomial.root_X_sub_C {R : Type u} {a b : R} [ring R] :
@[simp]
theorem polynomial.neg_comp {R : Type u} [ring R] {p q : R[X]} :
(-p).comp q = -p.comp q
@[simp]
theorem polynomial.sub_comp {R : Type u} [ring R] {p q r : R[X]} :
(p - q).comp r = p.comp r - q.comp r
@[simp]
theorem polynomial.cast_int_comp {R : Type u} [ring R] {p : R[X]} (i : ) :