Documentation

Mathlib.Algebra.Polynomial.Degree.TrailingDegree

Trailing degree of univariate polynomials #

Main definitions #

Converts most results about degree, natDegree and leadingCoeff to results about the bottom end of a polynomial

trailingDegree p is the multiplicity of x in the polynomial p, i.e. the smallest X-exponent in p. trailingDegree p = some n when p ≠ 0 and n is the smallest power of X that appears in p, otherwise trailingDegree 0 = ⊤.

Instances For

    natTrailingDegree p forces trailingDegree p to , by defining natTrailingDegree ⊤ = 0.

    Instances For

      trailingCoeff p gives the coefficient of the smallest power of X in p.

      Instances For

        a polynomial is monic_at if its trailing coefficient is 1

        Instances For
          @[implicit_reducible]
          instance Polynomial.TrailingMonic.decidable {R : Type u} [Semiring R] {p : Polynomial R} [DecidableEq R] :
          Decidable p.TrailingMonic
          theorem Polynomial.trailingDegree_le_of_ne_zero {R : Type u} {n : } [Semiring R] {p : Polynomial R} (h : p.coeff n 0) :
          @[simp]
          theorem Polynomial.trailingDegree_eq_zero {R : Type u} [Semiring R] {p : Polynomial R} :
          p.trailingDegree = 0 p.coeff 0 0
          @[simp]
          theorem Polynomial.natTrailingDegree_eq_zero {R : Type u} [Semiring R] {p : Polynomial R} :
          p.natTrailingDegree = 0 p = 0 p.coeff 0 0
          theorem Polynomial.natTrailingDegree_ne_zero {R : Type u} [Semiring R] {p : Polynomial R} :
          p.natTrailingDegree 0 p 0 p.coeff 0 = 0
          @[simp]
          theorem Polynomial.trailingDegree_monomial {R : Type u} {a : R} {n : } [Semiring R] (ha : a 0) :
          ((monomial n) a).trailingDegree = n
          theorem Polynomial.natTrailingDegree_monomial {R : Type u} {a : R} {n : } [Semiring R] (ha : a 0) :
          @[simp]
          theorem Polynomial.trailingDegree_C {R : Type u} {a : R} [Semiring R] (ha : a 0) :
          @[simp]
          theorem Polynomial.trailingDegree_C_mul_X_pow {R : Type u} {a : R} [Semiring R] (n : ) (ha : a 0) :
          (C a * X ^ n).trailingDegree = n
          theorem Polynomial.le_trailingDegree_C_mul_X_pow {R : Type u} [Semiring R] (n : ) (a : R) :
          n (C a * X ^ n).trailingDegree
          @[simp]
          theorem Polynomial.trailingCoeff_eq_zero {R : Type u} [Semiring R] {p : Polynomial R} :
          p.trailingCoeff = 0 p = 0
          theorem Polynomial.le_natTrailingDegree {R : Type u} {n : } [Semiring R] {p : Polynomial R} (hp : p 0) (hn : m < n, p.coeff m = 0) :
          theorem Polynomial.natTrailingDegree_mul_X_pow {R : Type u} [Semiring R] {p : Polynomial R} (hp : p 0) (n : ) :
          @[simp]
          theorem Polynomial.trailingDegree_X_pow {R : Type u} [Semiring R] [Nontrivial R] (n : ) :
          (X ^ n).trailingDegree = n
          @[simp]
          theorem Polynomial.natTrailingDegree_intCast {R : Type u} [Ring R] (n : ) :
          def Polynomial.nextCoeffUp {R : Type u} [Semiring R] (p : Polynomial R) :
          R

          The second-lowest coefficient, or 0 for constants

          Instances For
            @[simp]
            theorem Polynomial.nextCoeffUp_C_eq_zero {R : Type u} [Semiring R] (c : R) :
            (C c).nextCoeffUp = 0
            theorem Polynomial.ne_zero_of_trailingDegree_lt {R : Type u} [Semiring R] {p : Polynomial R} {n : ℕ∞} (h : p.trailingDegree < n) :
            p 0