Documentation

Mathlib.Algebra.Polynomial.EraseLead

Erase the leading term of a univariate polynomial #

Definition #

eraseLead serves as reduction step in an induction, shaving off one monomial from a polynomial. The definition is set up so that it does not mention subtraction in the definition, and thus works for polynomials over semirings as well as rings.

eraseLead f for a polynomial f is the polynomial obtained by subtracting from f the leading term of f.

Equations
    Instances For
      @[simp]
      theorem Polynomial.eraseLead_monomial {R : Type u_1} [Semiring R] (i : ) (r : R) :
      ((monomial i) r).eraseLead = 0
      @[simp]
      theorem Polynomial.eraseLead_C {R : Type u_1} [Semiring R] (r : R) :
      (C r).eraseLead = 0
      @[simp]
      theorem Polynomial.eraseLead_X_pow {R : Type u_1} [Semiring R] (n : ) :
      (X ^ n).eraseLead = 0
      @[simp]
      theorem Polynomial.eraseLead_C_mul_X_pow {R : Type u_1} [Semiring R] (r : R) (n : ) :
      (C r * X ^ n).eraseLead = 0
      @[simp]
      theorem Polynomial.eraseLead_C_mul_X {R : Type u_1} [Semiring R] (r : R) :
      (C r * X).eraseLead = 0
      theorem Polynomial.eraseLead_mul_eq_mul_eraseLead_of_nextCoeff_zero {R : Type u_2} [Ring R] [NoZeroDivisors R] [Nontrivial R] {x : R} {P : Polynomial R} (hx : x 0) (h : P.nextCoeff = 0) :
      ((X - C x) * P).eraseLead.eraseLead = (X - C x) * P.eraseLead

      If we erase the leading coefficient of a Polynomial.coeffList like [+,0,...], and then multiply by a linear term, it's equivalent to erasing the first two coefficients of the product.

      theorem Polynomial.induction_with_natDegree_le {R : Type u_1} [Semiring R] (motive : Polynomial RProp) (N : ) (zero : motive 0) (C_mul_pow : ∀ (n : ) (r : R), r 0n Nmotive (C r * X ^ n)) (add : ∀ (f g : Polynomial R), f.natDegree < g.natDegreeg.natDegree Nmotive fmotive gmotive (f + g)) (f : Polynomial R) (df : f.natDegree N) :
      motive f

      An induction lemma for polynomials. It takes a natural number N as a parameter, that is required to be at least as big as the natDegree of the polynomial. This is useful to prove results where you want to change each term in a polynomial to something else depending on the natDegree of the polynomial itself and not on the specific natDegree of each term.

      theorem Polynomial.mono_map_natDegree_eq {R : Type u_1} [Semiring R] {S : Type u_2} {F : Type u_3} [Semiring S] [FunLike F (Polynomial R) (Polynomial S)] [AddMonoidHomClass F (Polynomial R) (Polynomial S)] {φ : F} {p : Polynomial R} (k : ) (fu : ) (fu0 : ∀ {n : }, n kfu n = 0) (fc : ∀ {n m : }, k nn < mfu n < fu m) (φ_k : ∀ {f : Polynomial R}, f.natDegree < kφ f = 0) (φ_mon_nat : ∀ (n : ) (c : R), c 0(φ ((monomial n) c)).natDegree = fu n) :
      (φ p).natDegree = fu p.natDegree

      Let φ : R[x] → S[x] be an additive map, k : ℕ a bound, and fu : ℕ → ℕ a "sufficiently monotone" map. Assume also that

      • φ maps to 0 all monomials of degree less than k,
      • φ maps each monomial m in R[x] to a polynomial φ m of degree fu (deg m). Then, φ maps each polynomial p in R[x] to a polynomial of degree fu (deg p).
      theorem Polynomial.map_natDegree_eq_sub {R : Type u_1} [Semiring R] {S : Type u_2} {F : Type u_3} [Semiring S] [FunLike F (Polynomial R) (Polynomial S)] [AddMonoidHomClass F (Polynomial R) (Polynomial S)] {φ : F} {p : Polynomial R} {k : } (φ_k : ∀ (f : Polynomial R), f.natDegree < kφ f = 0) (φ_mon : ∀ (n : ) (c : R), c 0(φ ((monomial n) c)).natDegree = n - k) :
      (φ p).natDegree = p.natDegree - k
      theorem Polynomial.map_natDegree_eq_natDegree {R : Type u_1} [Semiring R] {S : Type u_2} {F : Type u_3} [Semiring S] [FunLike F (Polynomial R) (Polynomial S)] [AddMonoidHomClass F (Polynomial R) (Polynomial S)] {φ : F} (p : Polynomial R) (φ_mon_nat : ∀ (n : ) (c : R), c 0(φ ((monomial n) c)).natDegree = n) :
      theorem Polynomial.card_support_eq' {R : Type u_1} [Semiring R] {n : } (k : Fin n) (x : Fin nR) (hk : Function.Injective k) (hx : ∀ (i : Fin n), x i 0) :
      (∑ i : Fin n, C (x i) * X ^ k i).support.card = n
      theorem Polynomial.card_support_eq {R : Type u_1} [Semiring R] {f : Polynomial R} {n : } :
      f.support.card = n ∃ (k : Fin n) (x : Fin nR) (_ : StrictMono k) (_ : ∀ (i : Fin n), x i 0), f = i : Fin n, C (x i) * X ^ k i
      theorem Polynomial.card_support_eq_one {R : Type u_1} [Semiring R] {f : Polynomial R} :
      f.support.card = 1 ∃ (k : ) (x : R) (_ : x 0), f = C x * X ^ k
      theorem Polynomial.card_support_eq_two {R : Type u_1} [Semiring R] {f : Polynomial R} :
      f.support.card = 2 ∃ (k : ) (m : ) (_ : k < m) (x : R) (y : R) (_ : x 0) (_ : y 0), f = C x * X ^ k + C y * X ^ m
      theorem Polynomial.card_support_eq_three {R : Type u_1} [Semiring R] {f : Polynomial R} :
      f.support.card = 3 ∃ (k : ) (m : ) (n : ) (_ : k < m) (_ : m < n) (x : R) (y : R) (z : R) (_ : x 0) (_ : y 0) (_ : z 0), f = C x * X ^ k + C y * X ^ m + C z * X ^ n