Documentation

Mathlib.Algebra.Polynomial.RingDivision

Theory of univariate polynomials #

We prove basic results about univariate polynomials.

theorem Polynomial.natDegree_pos_of_aeval_root {R : Type u} {S : Type v} [CommRing R] [Semiring S] [Algebra R S] {p : Polynomial R} (hp : p 0) {z : S} (hz : (aeval z) p = 0) (inj : ∀ (x : R), (algebraMap R S) x = 0x = 0) :
0 < p.natDegree
theorem Polynomial.degree_pos_of_aeval_root {R : Type u} {S : Type v} [CommRing R] [Semiring S] [Algebra R S] {p : Polynomial R} (hp : p 0) {z : S} (hz : (aeval z) p = 0) (inj : ∀ (x : R), (algebraMap R S) x = 0x = 0) :
0 < p.degree
theorem Polynomial.smul_modByMonic {R : Type u} [CommRing R] {q : Polynomial R} (c : R) (p : Polynomial R) :
c p %ₘ q = c (p %ₘ q)

_ %ₘ q as an R-linear map.

Equations
  • q.modByMonicHom = { toFun := fun (p : Polynomial R) => p %ₘ q, map_add' := , map_smul' := }
Instances For
    @[simp]
    theorem Polynomial.modByMonicHom_apply {R : Type u} [CommRing R] (q p : Polynomial R) :
    q.modByMonicHom p = p %ₘ q
    theorem Polynomial.mem_ker_modByMonic {R : Type u} [CommRing R] {q : Polynomial R} (hq : q.Monic) {p : Polynomial R} :
    p LinearMap.ker q.modByMonicHom q p
    theorem Polynomial.aeval_modByMonic_eq_self_of_root {R : Type u} {S : Type v} [CommRing R] [Ring S] [Algebra R S] {p q : Polynomial R} (hq : q.Monic) {x : S} (hx : (aeval x) q = 0) :
    (aeval x) (p %ₘ q) = (aeval x) p
    theorem Polynomial.trailingDegree_mul {R : Type u} [Semiring R] [NoZeroDivisors R] {p q : Polynomial R} :
    (p * q).trailingDegree = p.trailingDegree + q.trailingDegree
    theorem Polynomial.rootMultiplicity_eq_natTrailingDegree {R : Type u} [CommRing R] {p : Polynomial R} {t : R} :
    rootMultiplicity t p = (p.comp (X + C t)).natTrailingDegree

    See Polynomial.rootMultiplicity_eq_natTrailingDegree' for the special case of t = 0.

    theorem Polynomial.rootMultiplicity_mul_X_sub_C_pow {R : Type u} [CommRing R] {p : Polynomial R} {a : R} {n : } (h : p 0) :
    rootMultiplicity a (p * (X - C a) ^ n) = rootMultiplicity a p + n
    theorem Polynomial.rootMultiplicity_X_sub_C_pow {R : Type u} [CommRing R] [Nontrivial R] (a : R) (n : ) :
    rootMultiplicity a ((X - C a) ^ n) = n

    The multiplicity of a as root of (X - a) ^ n is n.

    theorem Polynomial.rootMultiplicity_X_sub_C {R : Type u} [CommRing R] [Nontrivial R] [DecidableEq R] {x y : R} :
    rootMultiplicity x (X - C y) = if x = y then 1 else 0
    theorem Polynomial.rootMultiplicity_mul' {R : Type u} [CommRing R] {p q : Polynomial R} {x : R} (hpq : eval x (p /ₘ (X - C x) ^ rootMultiplicity x p) * eval x (q /ₘ (X - C x) ^ rootMultiplicity x q) 0) :
    theorem Polynomial.Monic.neg_one_pow_natDegree_mul_comp_neg_X {R : Type u} [CommRing R] {p : Polynomial R} (hp : p.Monic) :
    ((-1) ^ p.natDegree * p.comp (-X)).Monic
    theorem Polynomial.degree_eq_degree_of_associated {R : Type u} [CommRing R] [IsDomain R] {p q : Polynomial R} (h : Associated p q) :
    p.degree = q.degree
    theorem Polynomial.prime_X_sub_C {R : Type u} [CommRing R] [IsDomain R] (r : R) :
    Prime (X - C r)
    theorem Polynomial.Monic.prime_of_degree_eq_one {R : Type u} [CommRing R] [IsDomain R] {p : Polynomial R} (hp1 : p.degree = 1) (hm : p.Monic) :
    theorem Polynomial.Monic.irreducible_of_degree_eq_one {R : Type u} [CommRing R] [IsDomain R] {p : Polynomial R} (hp1 : p.degree = 1) (hm : p.Monic) :
    theorem Polynomial.aeval_ne_zero_of_isCoprime {S : Type v} {R : Type u_1} [CommSemiring R] [Nontrivial S] [Semiring S] [Algebra R S] {p q : Polynomial R} (h : IsCoprime p q) (s : S) :
    (aeval s) p 0 (aeval s) q 0
    theorem Polynomial.isCoprime_X_sub_C_of_isUnit_sub {R : Type u_1} [CommRing R] {a b : R} (h : IsUnit (a - b)) :
    IsCoprime (X - C a) (X - C b)
    theorem Polynomial.pairwise_coprime_X_sub_C {K : Type u_1} [Field K] {I : Type v} {s : IK} (H : Function.Injective s) :
    Pairwise (Function.onFun IsCoprime fun (i : I) => X - C (s i))
    theorem Polynomial.rootMultiplicity_mul {R : Type u} [CommRing R] [IsDomain R] {p q : Polynomial R} {x : R} (hpq : p * q 0) :
    @[irreducible]
    theorem Polynomial.exists_multiset_roots {R : Type u} [CommRing R] [IsDomain R] [DecidableEq R] {p : Polynomial R} :
    p 0∃ (s : Multiset R), s.card p.degree ∀ (a : R), Multiset.count a s = rootMultiplicity a p