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 : (Polynomial.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 : (Polynomial.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
    @[simp]
    theorem Polynomial.ker_modByMonicHom {R : Type u} [CommRing R] {q : Polynomial R} (hq : q.Monic) :
    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 : (Polynomial.aeval x) q = 0) :
    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_rootMultiplicity {R : Type u} [CommRing R] {p : Polynomial R} {t : R} :
    Polynomial.rootMultiplicity t p = Polynomial.rootMultiplicity 0 (p.comp (Polynomial.X + Polynomial.C t))
    theorem Polynomial.rootMultiplicity_eq_natTrailingDegree {R : Type u} [CommRing R] {p : Polynomial R} {t : R} :
    Polynomial.rootMultiplicity t p = (p.comp (Polynomial.X + Polynomial.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) :
    Polynomial.rootMultiplicity a (p * (Polynomial.X - Polynomial.C a) ^ n) = Polynomial.rootMultiplicity a p + n
    theorem Polynomial.rootMultiplicity_X_sub_C_pow {R : Type u} [CommRing R] [Nontrivial R] (a : R) (n : ) :
    Polynomial.rootMultiplicity a ((Polynomial.X - Polynomial.C a) ^ n) = n

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

    theorem Polynomial.rootMultiplicity_X_sub_C_self {R : Type u} [CommRing R] [Nontrivial R] {x : R} :
    Polynomial.rootMultiplicity x (Polynomial.X - Polynomial.C x) = 1
    theorem Polynomial.rootMultiplicity_X_sub_C {R : Type u} [CommRing R] [Nontrivial R] [DecidableEq R] {x y : R} :
    Polynomial.rootMultiplicity x (Polynomial.X - Polynomial.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 : Polynomial.eval x (p /ₘ (Polynomial.X - Polynomial.C x) ^ Polynomial.rootMultiplicity x p) * Polynomial.eval x (q /ₘ (Polynomial.X - Polynomial.C x) ^ Polynomial.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 (-Polynomial.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 (Polynomial.X - Polynomial.C r)
    theorem Polynomial.prime_X {R : Type u} [CommRing R] [IsDomain R] :
    Prime Polynomial.X
    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.irreducible_X_sub_C {R : Type u} [CommRing R] [IsDomain R] (r : R) :
    Irreducible (Polynomial.X - Polynomial.C r)
    theorem Polynomial.irreducible_X {R : Type u} [CommRing R] [IsDomain R] :
    Irreducible Polynomial.X
    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) :
    theorem Polynomial.isCoprime_X_sub_C_of_isUnit_sub {R : Type u_1} [CommRing R] {a b : R} (h : IsUnit (a - b)) :
    IsCoprime (Polynomial.X - Polynomial.C a) (Polynomial.X - Polynomial.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 (IsCoprime on fun (i : I) => Polynomial.X - Polynomial.C (s i))
    @[irreducible]
    theorem Polynomial.exists_multiset_roots {R : Type u} [CommRing R] [IsDomain R] [DecidableEq R] {p : Polynomial R} :
    p 0∃ (s : Multiset R), (Multiset.card s) p.degree ∀ (a : R), Multiset.count a s = Polynomial.rootMultiplicity a p