mathlib documentation

data.​polynomial.​ring_division

data.​polynomial.​ring_division

Theory of univariate polynomials

This file starts looking like the ring theory of $ R[X] $

theorem polynomial.​nat_degree_pos_of_aeval_root {R : Type u} {S : Type v} [comm_ring R] [comm_ring S] [algebra R S] {p : polynomial R} (hp : p 0) {z : S} :
(polynomial.aeval z) p = 0(∀ (x : R), (algebra_map R S) x = 0x = 0)0 < p.nat_degree

theorem polynomial.​degree_pos_of_aeval_root {R : Type u} {S : Type v} [comm_ring R] [comm_ring S] [algebra R S] {p : polynomial R} (hp : p 0) {z : S} :
(polynomial.aeval z) p = 0(∀ (x : R), (algebra_map R S) x = 0x = 0)0 < p.degree

theorem polynomial.​nat_degree_mul {R : Type u} [integral_domain R] {p q : polynomial R} :
p 0q 0(p * q).nat_degree = p.nat_degree + q.nat_degree

@[simp]
theorem polynomial.​nat_degree_pow {R : Type u} [integral_domain R] (p : polynomial R) (n : ) :

theorem polynomial.​root_mul {R : Type u} {a : R} [integral_domain R] {p q : polynomial R} :
(p * q).is_root a p.is_root a q.is_root a

theorem polynomial.​root_or_root_of_root_mul {R : Type u} {a : R} [integral_domain R] {p q : polynomial R} :
(p * q).is_root ap.is_root a q.is_root a

theorem polynomial.​degree_le_mul_left {R : Type u} [integral_domain R] {q : polynomial R} (p : polynomial R) :
q 0p.degree (p * q).degree

theorem polynomial.​nat_degree_le_of_dvd {R : Type u} [integral_domain R] {p q : polynomial R} :
p qq 0p.nat_degree q.nat_degree

theorem polynomial.​exists_finset_roots {R : Type u} [integral_domain R] {p : polynomial R} :
p 0(∃ (s : finset R), (s.card) p.degree ∀ (x : R), x s p.is_root x)

def polynomial.​roots {R : Type u} [integral_domain R] :

roots p noncomputably gives a finset containing all the roots of p

Equations
@[simp]
theorem polynomial.​roots_zero {R : Type u} [integral_domain R] :

theorem polynomial.​card_roots {R : Type u} [integral_domain R] {p : polynomial R} :
p 0(p.roots.card) p.degree

theorem polynomial.​card_roots' {R : Type u} [integral_domain R] {p : polynomial R} :

theorem polynomial.​card_roots_sub_C {R : Type u} [integral_domain R] {p : polynomial R} {a : R} :

theorem polynomial.​card_roots_sub_C' {R : Type u} [integral_domain R] {p : polynomial R} {a : R} :

@[simp]
theorem polynomial.​mem_roots {R : Type u} {a : R} [integral_domain R] {p : polynomial R} :
p 0(a p.roots p.is_root a)

theorem polynomial.​roots_mul {R : Type u} [integral_domain R] {p q : polynomial R} :
p * q 0(p * q).roots = p.roots q.roots

@[simp]
theorem polynomial.​mem_roots_sub_C {R : Type u} [integral_domain R] {p : polynomial R} {a x : R} :

@[simp]
theorem polynomial.​roots_X_sub_C {R : Type u} [integral_domain R] (r : R) :

@[simp]
theorem polynomial.​roots_C {R : Type u} [integral_domain R] (x : R) :

@[simp]
theorem polynomial.​roots_one {R : Type u} [integral_domain R] :

theorem polynomial.​roots_list_prod {R : Type u} [integral_domain R] (L : list (polynomial R)) :
(∀ (p : polynomial R), p Lp 0)L.prod.roots = L.to_finset.bind polynomial.roots

theorem polynomial.​roots_multiset_prod {R : Type u} [integral_domain R] (m : multiset (polynomial R)) :
(∀ (p : polynomial R), p mp 0)m.prod.roots = m.to_finset.bind polynomial.roots

theorem polynomial.​roots_prod {R : Type u} [integral_domain R] {ι : Type u_1} (f : ι → polynomial R) (s : finset ι) :
s.prod f 0(s.prod f).roots = s.bind (λ (i : ι), (f i).roots)

theorem polynomial.​roots_prod_X_sub_C {R : Type u} [integral_domain R] (s : finset R) :
(s.prod (λ (a : R), polynomial.X - polynomial.C a)).roots = s

theorem polynomial.​card_roots_X_pow_sub_C {R : Type u} [integral_domain R] {n : } (hn : 0 < n) (a : R) :

def polynomial.​nth_roots {R : Type u_1} [integral_domain R] :
R → finset R

nth_roots n a noncomputably returns the solutions to x ^ n = a

Equations
@[simp]
theorem polynomial.​mem_nth_roots {R : Type u_1} [integral_domain R] {n : } (hn : 0 < n) {a x : R} :

theorem polynomial.​card_nth_roots {R : Type u_1} [integral_domain R] (n : ) (a : R) :

@[simp]
theorem polynomial.​degree_coe_units {R : Type u} [integral_domain R] (u : units (polynomial R)) :

theorem polynomial.​units_coeff_zero_smul {R : Type u} [integral_domain R] (c : units (polynomial R)) (p : polynomial R) :
c.coeff 0 p = c * p

@[simp]

theorem polynomial.​is_unit_iff {R : Type u} [integral_domain R] {f : polynomial R} :
is_unit f ∃ (r : R), is_unit r polynomial.C r = f

theorem polynomial.​degree_eq_one_of_irreducible_of_root {R : Type u} [integral_domain R] {p : polynomial R} (hi : irreducible p) {x : R} :
p.is_root xp.degree = 1

theorem polynomial.​eq_of_monic_of_associated {R : Type u} [integral_domain R] {p q : polynomial R} :
p.monicq.monicassociated p qp = q

theorem polynomial.​irreducible_of_irreducible_map {R : Type u} {S : Type v} [integral_domain R] [integral_domain S] (φ : R →+* S) (f : polynomial R) :

A polynomial over an integral domain R is irreducible if it is monic and irreducible after mapping into an integral domain S.

A special case of this lemma is that a polynomial over is irreducible if it is monic and irreducible over ℤ/pℤ for some prime p.