Documentation

Mathlib.Algebra.Polynomial.FieldDivision

Theory of univariate polynomials #

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

theorem Polynomial.lt_rootMultiplicity_of_isRoot_iterate_derivative_of_mem_nonZeroDivisors {R : Type u} [CommRing R] {p : Polynomial R} {t : R} {n : β„•} (h : p β‰  0) (hroot : βˆ€ m ≀ n, ((⇑derivative)^[m] p).IsRoot t) (hnzd : ↑n.factorial ∈ nonZeroDivisors R) :
theorem Polynomial.lt_rootMultiplicity_of_isRoot_iterate_derivative_of_mem_nonZeroDivisors' {R : Type u} [CommRing R] {p : Polynomial R} {t : R} {n : β„•} (h : p β‰  0) (hroot : βˆ€ m ≀ n, ((⇑derivative)^[m] p).IsRoot t) (hnzd : βˆ€ m ≀ n, m β‰  0 β†’ ↑m ∈ nonZeroDivisors R) :
theorem Polynomial.lt_rootMultiplicity_iff_isRoot_iterate_derivative_of_mem_nonZeroDivisors' {R : Type u} [CommRing R] {p : Polynomial R} {t : R} {n : β„•} (h : p β‰  0) (hnzd : βˆ€ m ≀ n, m β‰  0 β†’ ↑m ∈ nonZeroDivisors R) :
n < rootMultiplicity t p ↔ βˆ€ m ≀ n, ((⇑derivative)^[m] p).IsRoot t
theorem Polynomial.lt_rootMultiplicity_of_isRoot_iterate_derivative {R : Type u} [CommRing R] [NoZeroDivisors R] [CharZero R] {p : Polynomial R} {t : R} {n : β„•} (h : p β‰  0) (hroot : βˆ€ m ≀ n, ((⇑derivative)^[m] p).IsRoot t) :
theorem Polynomial.isRoot_of_isRoot_of_dvd_derivative_mul {R : Type u} [CommRing R] [NoZeroDivisors R] [CharZero R] {f g : Polynomial R} (hf0 : f β‰  0) (hfd : f ∣ derivative f * g) {a : R} (haf : f.IsRoot a) :
g.IsRoot a

A sufficient condition for the set of roots of a nonzero polynomial f to be a subset of the set of roots of g is that f divides f.derivative * g. Over an algebraically closed field of characteristic zero, this is also a necessary condition. See isRoot_of_isRoot_iff_dvd_derivative_mul

@[simp]
theorem Polynomial.map_eq_zero {R : Type u} {S : Type v} [Ring R] [IsSimpleRing R] [Semiring S] [Nontrivial S] {p : Polynomial R} (f : R β†’+* S) :
map f p = 0 ↔ p = 0
theorem Polynomial.map_ne_zero {R : Type u} {S : Type v} [Ring R] [IsSimpleRing R] [Semiring S] [Nontrivial S] {p : Polynomial R} {f : R β†’+* S} (hp : p β‰  0) :
map f p β‰  0
@[simp]
theorem Polynomial.degree_map {R : Type u} {S : Type v} [Ring R] [IsSimpleRing R] [Semiring S] [Nontrivial S] (p : Polynomial R) (f : R β†’+* S) :
(map f p).degree = p.degree
@[simp]
theorem Polynomial.natDegree_map {R : Type u} {S : Type v} [Ring R] [IsSimpleRing R] [Semiring S] [Nontrivial S] {p : Polynomial R} (f : R β†’+* S) :
@[simp]
theorem Polynomial.monic_map_iff {R : Type u} {S : Type v} [Ring R] [IsSimpleRing R] [Semiring S] [Nontrivial S] {f : R β†’+* S} {p : Polynomial R} :
def Polynomial.div {R : Type u} [Field R] (p q : Polynomial R) :

Division of polynomials. See Polynomial.divByMonic for more details.

Equations
    Instances For
      def Polynomial.mod {R : Type u} [Field R] (p q : Polynomial R) :

      Remainder of polynomial division. See Polynomial.modByMonic for more details.

      Equations
        Instances For
          theorem Polynomial.modByMonic_eq_mod {R : Type u} [Field R] {q : Polynomial R} (p : Polynomial R) (hq : q.Monic) :
          p %β‚˜ q = p % q
          theorem Polynomial.divByMonic_eq_div {R : Type u} [Field R] {q : Polynomial R} (p : Polynomial R) (hq : q.Monic) :
          p /β‚˜ q = p / q
          theorem Polynomial.mod_X_sub_C_eq_C_eval {R : Type u} [Field R] (p : Polynomial R) (a : R) :
          p % (X - C a) = C (eval a p)
          theorem Polynomial.mul_div_eq_iff_isRoot {R : Type u} {a : R} [Field R] {p : Polynomial R} :
          (X - C a) * (p / (X - C a)) = p ↔ p.IsRoot a
          theorem Polynomial.IsRoot.mul_div_eq {R : Type u} {a : R} [Field R] {p : Polynomial R} :
          p.IsRoot a β†’ (X - C a) * (p / (X - C a)) = p

          Alias of the reverse direction of Polynomial.mul_div_eq_iff_isRoot.

          theorem Polynomial.mod_eq_self_iff {R : Type u} [Field R] {p q : Polynomial R} (hq0 : q β‰  0) :
          p % q = p ↔ p.degree < q.degree
          theorem Polynomial.div_eq_zero_iff {R : Type u} [Field R] {p q : Polynomial R} (hq0 : q β‰  0) :
          p / q = 0 ↔ p.degree < q.degree
          theorem Polynomial.degree_add_div {R : Type u} [Field R] {p q : Polynomial R} (hq0 : q β‰  0) (hpq : q.degree ≀ p.degree) :
          q.degree + (p / q).degree = p.degree
          theorem Polynomial.degree_div_lt {R : Type u} [Field R] {p q : Polynomial R} (hp : p β‰  0) (hq : 0 < q.degree) :
          (p / q).degree < p.degree
          theorem Polynomial.isUnit_map {R : Type u} {k : Type y} [Field R] {p : Polynomial R} [Field k] (f : R β†’+* k) :
          theorem Polynomial.map_div {R : Type u} {k : Type y} [Field R] {p q : Polynomial R} [Field k] (f : R β†’+* k) :
          map f (p / q) = map f p / map f q
          theorem Polynomial.map_mod {R : Type u} {k : Type y} [Field R] {p q : Polynomial R} [Field k] (f : R β†’+* k) :
          map f (p % q) = map f p % map f q
          theorem Polynomial.degree_mod_lt {R : Type u} [Field R] (p : Polynomial R) {q : Polynomial R} (hq : q β‰  0) :
          (p % q).degree < q.degree
          theorem Polynomial.add_mod {R : Type u} [Field R] (p₁ pβ‚‚ q : Polynomial R) :
          (p₁ + pβ‚‚) % q = p₁ % q + pβ‚‚ % q
          theorem Polynomial.sub_mod {R : Type u} [Field R] (p₁ pβ‚‚ q : Polynomial R) :
          (p₁ - pβ‚‚) % q = p₁ % q - pβ‚‚ % q
          theorem Polynomial.mul_mod {R : Type u} [Field R] (p₁ pβ‚‚ q : Polynomial R) :
          p₁ * pβ‚‚ % q = p₁ % q * (pβ‚‚ % q) % q
          theorem Polynomial.evalβ‚‚_gcd_eq_zero {R : Type u} {k : Type y} [Field R] [CommSemiring k] [DecidableEq R] {Ο• : R β†’+* k} {f g : Polynomial R} {Ξ± : k} (hf : evalβ‚‚ Ο• Ξ± f = 0) (hg : evalβ‚‚ Ο• Ξ± g = 0) :
          evalβ‚‚ Ο• Ξ± (EuclideanDomain.gcd f g) = 0
          theorem Polynomial.eval_gcd_eq_zero {R : Type u} [Field R] [DecidableEq R] {f g : Polynomial R} {Ξ± : R} (hf : eval Ξ± f = 0) (hg : eval Ξ± g = 0) :
          theorem Polynomial.root_left_of_root_gcd {R : Type u} {k : Type y} [Field R] [CommSemiring k] [DecidableEq R] {Ο• : R β†’+* k} {f g : Polynomial R} {Ξ± : k} (hΞ± : evalβ‚‚ Ο• Ξ± (EuclideanDomain.gcd f g) = 0) :
          evalβ‚‚ Ο• Ξ± f = 0
          theorem Polynomial.root_right_of_root_gcd {R : Type u} {k : Type y} [Field R] [CommSemiring k] [DecidableEq R] {Ο• : R β†’+* k} {f g : Polynomial R} {Ξ± : k} (hΞ± : evalβ‚‚ Ο• Ξ± (EuclideanDomain.gcd f g) = 0) :
          evalβ‚‚ Ο• Ξ± g = 0
          theorem Polynomial.root_gcd_iff_root_left_right {R : Type u} {k : Type y} [Field R] [CommSemiring k] [DecidableEq R] {Ο• : R β†’+* k} {f g : Polynomial R} {Ξ± : k} :
          evalβ‚‚ Ο• Ξ± (EuclideanDomain.gcd f g) = 0 ↔ evalβ‚‚ Ο• Ξ± f = 0 ∧ evalβ‚‚ Ο• Ξ± g = 0
          theorem Polynomial.isCoprime_map {R : Type u} {k : Type y} [Field R] {p q : Polynomial R} [Field k] (f : R β†’+* k) :
          IsCoprime (map f p) (map f q) ↔ IsCoprime p q
          theorem Polynomial.mem_roots_map {R : Type u} {k : Type y} [Field R] {p : Polynomial R} [CommRing k] [IsDomain k] {f : R β†’+* k} {x : k} (hp : p β‰  0) :
          x ∈ (map f p).roots ↔ evalβ‚‚ f x p = 0
          theorem Polynomial.rootSet_monomial {R : Type u} {S : Type v} [Field R] [CommRing S] [IsDomain S] [Algebra R S] {n : β„•} (hn : n β‰  0) {a : R} (ha : a β‰  0) :
          ((monomial n) a).rootSet S = {0}
          theorem Polynomial.rootSet_C_mul_X_pow {R : Type u} {S : Type v} [Field R] [CommRing S] [IsDomain S] [Algebra R S] {n : β„•} (hn : n β‰  0) {a : R} (ha : a β‰  0) :
          (C a * X ^ n).rootSet S = {0}
          theorem Polynomial.rootSet_X_pow {R : Type u} {S : Type v} [Field R] [CommRing S] [IsDomain S] [Algebra R S] {n : β„•} (hn : n β‰  0) :
          (X ^ n).rootSet S = {0}
          theorem Polynomial.rootSet_prod {R : Type u} {S : Type v} [Field R] [CommRing S] [IsDomain S] [Algebra R S] {ΞΉ : Type u_1} (f : ΞΉ β†’ Polynomial R) (s : Finset ΞΉ) (h : s.prod f β‰  0) :
          (s.prod f).rootSet S = ⋃ i ∈ s, (f i).rootSet S
          theorem Polynomial.roots_C_mul_X_sub_C {R : Type u} {a : R} [Field R] (b : R) (ha : a β‰  0) :
          (C a * X - C b).roots = {a⁻¹ * b}
          theorem Polynomial.roots_C_mul_X_add_C {R : Type u} {a : R} [Field R] (b : R) (ha : a β‰  0) :
          (C a * X + C b).roots = {-(a⁻¹ * b)}
          theorem Polynomial.exists_root_of_degree_eq_one {R : Type u} [Field R] {p : Polynomial R} (h : p.degree = 1) :
          βˆƒ (x : R), p.IsRoot x
          theorem Polynomial.div_C_mul {R : Type u} {a : R} [Field R] {p q : Polynomial R} :
          p / (C a * q) = C a⁻¹ * (p / q)
          theorem Polynomial.div_C {R : Type u} {a : R} [Field R] {p : Polynomial R} :
          p / C a = p * C a⁻¹
          theorem Polynomial.C_div {R : Type u} {a b : R} [Field R] :
          C (a / b) = C a / C b
          theorem Polynomial.C_mul_dvd {R : Type u} {a : R} [Field R] {p q : Polynomial R} (ha : a β‰  0) :
          C a * p ∣ q ↔ p ∣ q
          theorem Polynomial.dvd_C_mul {R : Type u} {a : R} [Field R] {p q : Polynomial R} (ha : a β‰  0) :
          p ∣ C a * q ↔ p ∣ q
          theorem Polynomial.map_dvd_map' {R : Type u} {k : Type y} [Field R] [Field k] (f : R β†’+* k) {x y : Polynomial R} :
          map f x ∣ map f y ↔ x ∣ y
          theorem Polynomial.isCoprime_of_is_root_of_eval_derivative_ne_zero {K : Type u_1} [Field K] (f : Polynomial K) (a : K) (hf' : eval a (derivative f) β‰  0) :
          IsCoprime (X - C a) (f /β‚˜ (X - C a))

          If f is a polynomial over a field, and a : K satisfies f' a β‰  0, then f / (X - a) is coprime with X - a. Note that we do not assume f a = 0, because f / (X - a) = (f - f a) / (X - a).

          theorem Polynomial.irreducible_iff_degree_lt {R : Type u} [Field R] (p : Polynomial R) (hp0 : p β‰  0) (hpu : Β¬IsUnit p) :
          Irreducible p ↔ βˆ€ (q : Polynomial R), q.degree ≀ ↑(p.natDegree / 2) β†’ q ∣ p β†’ IsUnit q

          To check a polynomial over a field is irreducible, it suffices to check only for divisors that have smaller degree.

          See also: Polynomial.Monic.irreducible_iff_natDegree.

          theorem Polynomial.irreducible_iff_lt_natDegree_lt {R : Type u} [Field R] {p : Polynomial R} (hp0 : p β‰  0) (hpu : Β¬IsUnit p) :
          Irreducible p ↔ βˆ€ (q : Polynomial R), q.Monic β†’ q.natDegree ∈ Finset.Ioc 0 (p.natDegree / 2) β†’ Β¬q ∣ p

          To check a polynomial p over a field is irreducible, it suffices to check there are no divisors of degree 0 < d ≀ degree p / 2.

          See also: Polynomial.Monic.irreducible_iff_natDegree'.

          The normalized factors of a polynomial over a field times its leading coefficient give the polynomial.

          @[simp]
          theorem Polynomial.map_normalize {R : Type u} {S : Type v} [Field R] (p : Polynomial R) [DecidableEq R] [Field S] [DecidableEq S] (f : R β†’+* S) :
          theorem Polynomial.mod_eq_of_dvd_sub {R : Type u} [Field R] {p₁ pβ‚‚ q : Polynomial R} (h : q ∣ p₁ - pβ‚‚) :
          p₁ % q = pβ‚‚ % q

          An irreducible polynomial over a field must have positive degree.

          theorem Irreducible.degree_pos {F : Type u_1} [DivisionSemiring F] {f : Polynomial F} (h : Irreducible f) :
          0 < f.degree

          An irreducible polynomial over a field must have positive degree.