mathlib documentation

data.polynomial.induction

Theory of univariate polynomials #

The main results are induction_on and as_sum.

theorem polynomial.sum_C_mul_X_eq {R : Type u} [semiring R] (p : R[X]) :
p.sum (λ (n : ) (a : R), (polynomial.C a) * polynomial.X ^ n) = p
theorem polynomial.sum_monomial_eq {R : Type u} [semiring R] (p : R[X]) :
p.sum (λ (n : ) (a : R), (polynomial.monomial n) a) = p
@[protected]
theorem polynomial.induction_on {R : Type u} [semiring R] {M : R[X] → Prop} (p : R[X]) (h_C : ∀ (a : R), M (polynomial.C a)) (h_add : ∀ (p q : R[X]), M pM qM (p + q)) (h_monomial : ∀ (n : ) (a : R), M ((polynomial.C a) * polynomial.X ^ n)M ((polynomial.C a) * polynomial.X ^ (n + 1))) :
M p
@[protected]
theorem polynomial.induction_on' {R : Type u} [semiring R] {M : R[X] → Prop} (p : R[X]) (h_add : ∀ (p q : R[X]), M pM qM (p + q)) (h_monomial : ∀ (n : ) (a : R), M ((polynomial.monomial n) a)) :
M p

To prove something about polynomials, it suffices to show the condition is closed under taking sums, and it holds for monomials.

theorem polynomial.coeff_mul_monomial {R : Type u} [semiring R] (p : R[X]) (n d : ) (r : R) :
(p * (polynomial.monomial n) r).coeff (d + n) = (p.coeff d) * r
theorem polynomial.coeff_monomial_mul {R : Type u} [semiring R] (p : R[X]) (n d : ) (r : R) :
(((polynomial.monomial n) r) * p).coeff (d + n) = r * p.coeff d
theorem polynomial.coeff_mul_monomial_zero {R : Type u} [semiring R] (p : R[X]) (d : ) (r : R) :
(p * (polynomial.monomial 0) r).coeff d = (p.coeff d) * r
theorem polynomial.coeff_monomial_zero_mul {R : Type u} [semiring R] (p : R[X]) (d : ) (r : R) :
(((polynomial.monomial 0) r) * p).coeff d = r * p.coeff d
theorem polynomial.span_le_of_coeff_mem_C_inverse {R : Type u} [semiring R] {f : R[X]} {I : submodule R[X] R[X]} (cf : ∀ (i : ), f.coeff i polynomial.C ⁻¹' I.carrier) :
submodule.span R[X] {g : R[X] | ∃ (i : ), g = polynomial.C (f.coeff i)} I

If the coefficients of a polynomial belong to n ideal contains the submodule span of the coefficients of a polynomial.

theorem polynomial.mem_span_C_coeff {R : Type u} [semiring R] {f : R[X]} :
f submodule.span R[X] {g : R[X] | ∃ (i : ), g = polynomial.C (f.coeff i)}
theorem polynomial.exists_coeff_not_mem_C_inverse {R : Type u} [semiring R] {f : R[X]} {I : submodule R[X] R[X]} :
f I(∃ (i : ), f.coeff i polynomial.C ⁻¹' I.carrier)