Documentation

Mathlib.Algebra.Polynomial.Monic

Theory of monic polynomials #

We give several tools for proving that polynomials are monic, e.g. Monic.mul, Monic.map, Monic.pow.

theorem Polynomial.not_monic_zero_iff {R : Type u} [Semiring R] :
ยฌMonic 0 โ†” 0 โ‰  1
theorem Polynomial.monic_zero_iff_subsingleton' {R : Type u} [Semiring R] :
Monic 0 โ†” (โˆ€ (f g : Polynomial R), f = g) โˆง โˆ€ (a b : R), a = b
theorem Polynomial.Monic.as_sum {R : Type u} [Semiring R] {p : Polynomial R} (hp : p.Monic) :
p = X ^ p.natDegree + โˆ‘ i โˆˆ Finset.range p.natDegree, C (p.coeff i) * X ^ i
theorem Polynomial.Monic.map {R : Type u} {S : Type v} [Semiring R] {p : Polynomial R} [Semiring S] (f : R โ†’+* S) (hp : p.Monic) :
theorem Polynomial.monic_X_pow_add {R : Type u} [Semiring R] {p : Polynomial R} {n : โ„•} (H : p.degree < โ†‘n) :
(X ^ n + p).Monic
theorem Polynomial.monic_X_pow_add_C {R : Type u} (a : R) [Semiring R] {n : โ„•} (h : n โ‰  0) :
(X ^ n + C a).Monic
theorem Polynomial.Monic.mul {R : Type u} [Semiring R] {p q : Polynomial R} (hp : p.Monic) (hq : q.Monic) :
(p * q).Monic
theorem Polynomial.Monic.pow {R : Type u} [Semiring R] {p : Polynomial R} (hp : p.Monic) (n : โ„•) :
(p ^ n).Monic
theorem Polynomial.Monic.add_of_left {R : Type u} [Semiring R] {p q : Polynomial R} (hp : p.Monic) (hpq : q.degree < p.degree) :
(p + q).Monic
theorem Polynomial.Monic.add_of_right {R : Type u} [Semiring R] {p q : Polynomial R} (hq : q.Monic) (hpq : p.degree < q.degree) :
(p + q).Monic
theorem Polynomial.Monic.of_mul_monic_left {R : Type u} [Semiring R] {p q : Polynomial R} (hp : p.Monic) (hpq : (p * q).Monic) :
theorem Polynomial.Monic.of_mul_monic_right {R : Type u} [Semiring R] {p q : Polynomial R} (hq : q.Monic) (hpq : (p * q).Monic) :
theorem Polynomial.Monic.comp {R : Type u} [Semiring R] {p q : Polynomial R} (hp : p.Monic) (hq : q.Monic) (h : q.natDegree โ‰  0) :
(p.comp q).Monic
theorem Polynomial.Monic.comp_X_add_C {R : Type u} [Semiring R] {p : Polynomial R} (hp : p.Monic) (r : R) :
(p.comp (X + C r)).Monic
@[deprecated Polynomial.Monic.natDegree_eq_zero (since := "2025-10-26")]
theorem Polynomial.Monic.natDegree_eq_zero_iff_eq_one {R : Type u} [Semiring R] {p : Polynomial R} (hf : p.Monic) :
p.natDegree = 0 โ†” p = 1

Alias of Polynomial.Monic.natDegree_eq_zero.

@[simp]
theorem Polynomial.Monic.degree_le_zero_iff_eq_one {R : Type u} [Semiring R] {p : Polynomial R} (hp : p.Monic) :
p.degree โ‰ค 0 โ†” p = 1
theorem Polynomial.Monic.degree_mul_comm {R : Type u} [Semiring R] {p : Polynomial R} (hp : p.Monic) (q : Polynomial R) :
(p * q).degree = (q * p).degree
theorem Polynomial.Monic.natDegree_mul' {R : Type u} [Semiring R] {p q : Polynomial R} (hp : p.Monic) (hq : q โ‰  0) :
(p * q).natDegree = p.natDegree + q.natDegree
theorem Polynomial.Monic.not_dvd_of_natDegree_lt {R : Type u} [Semiring R] {p q : Polynomial R} (hp : p.Monic) (h0 : q โ‰  0) (hl : q.natDegree < p.natDegree) :
ยฌp โˆฃ q
theorem Polynomial.Monic.not_dvd_of_degree_lt {R : Type u} [Semiring R] {p q : Polynomial R} (hp : p.Monic) (h0 : q โ‰  0) (hl : q.degree < p.degree) :
ยฌp โˆฃ q
theorem Polynomial.Monic.nextCoeff_pow {R : Type u} [Semiring R] {p : Polynomial R} (hp : p.Monic) (n : โ„•) :
(p ^ n).nextCoeff = n โ€ข p.nextCoeff
theorem Polynomial.Monic.eq_one_of_map_eq_one {R : Type u} [Semiring R] {p : Polynomial R} {S : Type u_1} [Semiring S] [Nontrivial S] (f : R โ†’+* S) (hp : p.Monic) (map_eq : Polynomial.map f p = 1) :
p = 1
theorem Polynomial.Monic.natDegree_pow {R : Type u} [Semiring R] {p : Polynomial R} (hp : p.Monic) (n : โ„•) :
(p ^ n).natDegree = n * p.natDegree
@[simp]
theorem Polynomial.natDegree_pow_X_add_C {R : Type u} [Semiring R] [Nontrivial R] (n : โ„•) (r : R) :
((X + C r) ^ n).natDegree = n
theorem Polynomial.Monic.eq_one_of_isUnit {R : Type u} [Semiring R] {p : Polynomial R} (hm : p.Monic) (hpu : IsUnit p) :
p = 1
theorem Polynomial.Monic.isUnit_iff {R : Type u} [Semiring R] {p : Polynomial R} (hm : p.Monic) :
IsUnit p โ†” p = 1
theorem Polynomial.eq_of_monic_of_associated {R : Type u} [Semiring R] {p q : Polynomial R} (hp : p.Monic) (hq : q.Monic) (hpq : Associated p q) :
p = q
@[reducible, inline]
abbrev Polynomial.MonicDegreeEq (R : Type u) (n : โ„•) [Semiring R] :

The type of monic polynomials of degree n.

The implementation is slightly different because it is useful to still contain X ^ n when R is trivial. See MonicDegreeEq.mk for the usual constructor.

Instances For
    @[simp]
    theorem Polynomial.MonicDegreeEq.natDegree {R : Type u} {n : โ„•} [Semiring R] [Nontrivial R] (p : MonicDegreeEq R n) :
    (โ†‘p).natDegree = n
    @[simp]
    theorem Polynomial.MonicDegreeEq.degree {R : Type u} {n : โ„•} [Semiring R] [Nontrivial R] (p : MonicDegreeEq R n) :
    (โ†‘p).degree = โ†‘n
    theorem Polynomial.MonicDegreeEq.monic {R : Type u} {n : โ„•} [Semiring R] (p : MonicDegreeEq R n) :
    (โ†‘p).Monic
    theorem Polynomial.MonicDegreeEq.coeff_of_ge {R : Type u} {n : โ„•} [Semiring R] (p : MonicDegreeEq R n) (i : โ„•) (hi : n โ‰ค i) :
    (โ†‘p).coeff i = if i = n then 1 else 0
    def Polynomial.MonicDegreeEq.mk {R : Type u} {n : โ„•} [Semiring R] (p : Polynomial R) (hp : p.Monic) (hp' : p.natDegree = n) :

    The constructor for MonicDegreeEq given a monic polynomial of degree n.

    Instances For
      @[simp]
      theorem Polynomial.MonicDegreeEq.mk_coe {R : Type u} {n : โ„•} [Semiring R] (p : Polynomial R) (hp : p.Monic) (hp' : p.natDegree = n) :
      โ†‘(mk p hp hp') = p
      noncomputable def Polynomial.MonicDegreeEq.map {R : Type u} {S : Type v} {n : โ„•} [Semiring R] [Semiring S] (p : MonicDegreeEq R n) (f : R โ†’+* S) :

      The image of a monic polynomial of degree n under a ring homomorphism.

      Instances For
        @[simp]
        theorem Polynomial.MonicDegreeEq.map_coe {R : Type u} {S : Type v} {n : โ„•} [Semiring R] [Semiring S] (p : MonicDegreeEq R n) (f : R โ†’+* S) :
        โ†‘(p.map f) = Polynomial.map f โ†‘p
        theorem Polynomial.monic_multiset_prod_of_monic {R : Type u} {ฮน : Type y} [CommSemiring R] (t : Multiset ฮน) (f : ฮน โ†’ Polynomial R) (ht : โˆ€ i โˆˆ t, (f i).Monic) :
        theorem Polynomial.monic_prod_of_monic {R : Type u} {ฮน : Type y} [CommSemiring R] (s : Finset ฮน) (f : ฮน โ†’ Polynomial R) (hs : โˆ€ i โˆˆ s, (f i).Monic) :
        (โˆ i โˆˆ s, f i).Monic
        theorem Polynomial.monic_finprod_of_monic {R : Type u} [CommSemiring R] (ฮฑ : Type u_1) (f : ฮฑ โ†’ Polynomial R) (hf : โˆ€ i โˆˆ Function.mulSupport f, (f i).Monic) :
        theorem Polynomial.Monic.nextCoeff_multiset_prod {R : Type u} {ฮน : Type y} [CommSemiring R] (t : Multiset ฮน) (f : ฮน โ†’ Polynomial R) (h : โˆ€ i โˆˆ t, (f i).Monic) :
        (Multiset.map f t).prod.nextCoeff = (Multiset.map (fun (i : ฮน) => (f i).nextCoeff) t).sum
        theorem Polynomial.Monic.nextCoeff_prod {R : Type u} {ฮน : Type y} [CommSemiring R] (s : Finset ฮน) (f : ฮน โ†’ Polynomial R) (h : โˆ€ i โˆˆ s, (f i).Monic) :
        (โˆ i โˆˆ s, f i).nextCoeff = โˆ‘ i โˆˆ s, (f i).nextCoeff
        theorem Polynomial.irreducible_of_monic {R : Type u} [CommSemiring R] [NoZeroDivisors R] {p : Polynomial R} (hp : p.Monic) (hp1 : p โ‰  1) :
        Irreducible p โ†” โˆ€ (f g : Polynomial R), f.Monic โ†’ g.Monic โ†’ f * g = p โ†’ f = 1 โˆจ g = 1
        theorem Polynomial.Monic.irreducible_iff_natDegree {R : Type u} [CommSemiring R] [NoZeroDivisors R] {p : Polynomial R} (hp : p.Monic) :
        Irreducible p โ†” p โ‰  1 โˆง โˆ€ (f g : Polynomial R), f.Monic โ†’ g.Monic โ†’ f * g = p โ†’ f.natDegree = 0 โˆจ g.natDegree = 0
        theorem Polynomial.Monic.irreducible_iff_natDegree' {R : Type u} [CommSemiring R] [NoZeroDivisors R] {p : Polynomial R} (hp : p.Monic) :
        Irreducible p โ†” p โ‰  1 โˆง โˆ€ (f g : Polynomial R), f.Monic โ†’ g.Monic โ†’ f * g = p โ†’ g.natDegree โˆ‰ Finset.Ioc 0 (p.natDegree / 2)
        theorem Polynomial.Monic.irreducible_iff_lt_natDegree_lt {R : Type u} [CommSemiring R] [NoZeroDivisors R] {p : Polynomial R} (hp : p.Monic) (hp1 : p โ‰  1) :
        Irreducible p โ†” โˆ€ (q : Polynomial R), q.Monic โ†’ q.natDegree โˆˆ Finset.Ioc 0 (p.natDegree / 2) โ†’ ยฌq โˆฃ p

        Alternate phrasing of Polynomial.Monic.irreducible_iff_natDegree' where we only have to check one divisor at a time.

        theorem Polynomial.Monic.not_irreducible_iff_exists_add_mul_eq_coeff {R : Type u} [CommSemiring R] [NoZeroDivisors R] {p : Polynomial R} (hm : p.Monic) (hnd : p.natDegree = 2) :
        ยฌIrreducible p โ†” โˆƒ (cโ‚ : R) (cโ‚‚ : R), p.coeff 0 = cโ‚ * cโ‚‚ โˆง p.coeff 1 = cโ‚ + cโ‚‚
        @[simp]
        theorem Polynomial.Monic.natDegree_map {R : Type u} {S : Type v} [Semiring R] [Semiring S] [Nontrivial S] {P : Polynomial R} (hmo : P.Monic) (f : R โ†’+* S) :
        @[simp]
        theorem Polynomial.Monic.degree_map {R : Type u} {S : Type v} [Semiring R] [Semiring S] [Nontrivial S] {P : Polynomial R} (hmo : P.Monic) (f : R โ†’+* S) :
        @[deprecated Polynomial.leadingCoeff_map_of_injective (since := "2025-10-26")]
        theorem Polynomial.leadingCoeff_map' {R : Type u} {S : Type v} [Semiring R] [Semiring S] {f : R โ†’+* S} (hf : Function.Injective โ‡‘f) (p : Polynomial R) :

        Alias of Polynomial.leadingCoeff_map_of_injective.

        @[deprecated Polynomial.leadingCoeff_map_of_injective (since := "2025-10-26")]
        theorem Polynomial.leadingCoeff_of_injective {R : Type u} {S : Type v} [Semiring R] [Semiring S] {f : R โ†’+* S} (hf : Function.Injective โ‡‘f) (p : Polynomial R) :

        Alias of Polynomial.leadingCoeff_map_of_injective.

        theorem Polynomial.monic_of_injective {R : Type u} {S : Type v} [Semiring R] [Semiring S] {f : R โ†’+* S} (hf : Function.Injective โ‡‘f) {p : Polynomial R} (hp : (map f p).Monic) :
        theorem Function.Injective.monic_map_iff {R : Type u} {S : Type v} [Semiring R] [Semiring S] {f : R โ†’+* S} (hf : Injective โ‡‘f) {p : Polynomial R} :
        p.Monic โ†” (Polynomial.map f p).Monic
        theorem Polynomial.monic_X_sub_C {R : Type u} [Ring R] (x : R) :
        (X - C x).Monic
        theorem Polynomial.monic_X_pow_sub {R : Type u} [Ring R] {p : Polynomial R} {n : โ„•} (H : p.degree < โ†‘n) :
        (X ^ n - p).Monic
        theorem Polynomial.monic_X_pow_sub_C {R : Type u} [Ring R] (a : R) {n : โ„•} (h : n โ‰  0) :
        (X ^ n - C a).Monic

        X ^ n - a is monic.

        theorem Polynomial.not_isUnit_X_pow_sub_one (R : Type u_1) [Ring R] [Nontrivial R] (n : โ„•) :
        ยฌIsUnit (X ^ n - 1)
        theorem Polynomial.Monic.comp_X_sub_C {R : Type u} [Ring R] {p : Polynomial R} (hp : p.Monic) (r : R) :
        (p.comp (X - C r)).Monic
        theorem Polynomial.Monic.sub_of_left {R : Type u} [Ring R] {p q : Polynomial R} (hp : p.Monic) (hpq : q.degree < p.degree) :
        (p - q).Monic
        theorem Polynomial.Monic.sub_of_right {R : Type u} [Ring R] {p q : Polynomial R} (hq : q.leadingCoeff = -1) (hpq : p.degree < q.degree) :
        (p - q).Monic
        theorem Polynomial.Monic.mul_left_ne_zero {R : Type u} [Semiring R] {p : Polynomial R} (hp : p.Monic) {q : Polynomial R} (hq : q โ‰  0) :
        q * p โ‰  0
        theorem Polynomial.Monic.mul_right_ne_zero {R : Type u} [Semiring R] {p : Polynomial R} (hp : p.Monic) {q : Polynomial R} (hq : q โ‰  0) :
        p * q โ‰  0
        theorem Polynomial.Monic.mul_natDegree_lt_iff {R : Type u} [Semiring R] {p : Polynomial R} (h : p.Monic) {q : Polynomial R} :
        (p * q).natDegree < p.natDegree โ†” p โ‰  1 โˆง q = 0
        theorem Polynomial.Monic.mul_right_eq_zero_iff {R : Type u} [Semiring R] {p : Polynomial R} (h : p.Monic) {q : Polynomial R} :
        p * q = 0 โ†” q = 0
        theorem Polynomial.Monic.mul_left_eq_zero_iff {R : Type u} [Semiring R] {p : Polynomial R} (h : p.Monic) {q : Polynomial R} :
        q * p = 0 โ†” q = 0
        theorem Polynomial.degree_smul_of_smul_regular {R : Type u} [Semiring R] {S : Type u_1} [SMulZeroClass S R] {k : S} (p : Polynomial R) (h : IsSMulRegular R k) :
        (k โ€ข p).degree = p.degree
        theorem Polynomial.natDegree_smul_of_smul_regular {R : Type u} [Semiring R] {S : Type u_1} [SMulZeroClass S R] {k : S} (p : Polynomial R) (h : IsSMulRegular R k) :
        (k โ€ข p).natDegree = p.natDegree
        theorem Polynomial.leadingCoeff_smul_of_smul_regular {R : Type u} [Semiring R] {S : Type u_1} [SMulZeroClass S R] {k : S} (p : Polynomial R) (h : IsSMulRegular R k) :
        (k โ€ข p).leadingCoeff = k โ€ข p.leadingCoeff