mathlib documentation

data.polynomial.inductions

Induction on polynomials #

This file contains lemmas dealing with different flavours of induction on polynomials.

def polynomial.div_X {R : Type u} [semiring R] (p : polynomial R) :

div_X p returns a polynomial q such that q * X + C (p.coeff 0) = p. It can be used in a semiring where the usual division algorithm is not possible

Equations
@[simp]
theorem polynomial.coeff_div_X {R : Type u} {n : } [semiring R] {p : polynomial R} :
p.div_X.coeff n = p.coeff (n + 1)
theorem polynomial.div_X_mul_X_add {R : Type u} [semiring R] (p : polynomial R) :
@[simp]
theorem polynomial.div_X_C {R : Type u} [semiring R] (a : R) :
theorem polynomial.div_X_eq_zero_iff {R : Type u} [semiring R] {p : polynomial R} :
theorem polynomial.div_X_add {R : Type u} [semiring R] {p q : polynomial R} :
(p + q).div_X = p.div_X + q.div_X
theorem polynomial.degree_div_X_lt {R : Type u} [semiring R] {p : polynomial R} (hp0 : p 0) :
def polynomial.rec_on_horner {R : Type u} [semiring R] {M : polynomial RSort u_1} (p : polynomial R) :
M 0(Π (p : polynomial R) (a : R), p.coeff 0 = 0a 0M pM (p + polynomial.C a))(Π (p : polynomial R), p 0M pM (p * polynomial.X))M p

An induction principle for polynomials, valued in Sort* instead of Prop.

Equations
theorem polynomial.degree_pos_induction_on {R : Type u} [semiring R] {P : polynomial R → Prop} (p : polynomial R) (h0 : 0 < p.degree) (hC : ∀ {a : R}, a 0P ((polynomial.C a) * polynomial.X)) (hX : ∀ {p : polynomial R}, 0 < p.degreeP pP (p * polynomial.X)) (hadd : ∀ {p : polynomial R} {a : R}, 0 < p.degreeP pP (p + polynomial.C a)) :
P p

A property holds for all polynomials of positive degree with coefficients in a semiring R if it holds for

  • a * X, with a ∈ R,
  • p * X, with p ∈ R[X],
  • p + a, with a ∈ R, p ∈ R[X], with appropriate restrictions on each term.

See nat_degree_ne_zero_induction_on for a similar statement involving no explicit multiplication.