Documentation

Mathlib.Algebra.Polynomial.Degree.Support

Degree and support of univariate polynomials #

Main results #

theorem Polynomial.as_sum_support {R : Type u} [Semiring R] (p : Polynomial R) :
p = ∑ i ∈ p.support, (monomial i) (p.coeff i)
theorem Polynomial.as_sum_support_C_mul_X_pow {R : Type u} [Semiring R] (p : Polynomial R) :
p = ∑ i ∈ p.support, C (p.coeff i) * X ^ i
theorem Polynomial.sum_over_range' {R : Type u} {S : Type v} [Semiring R] [AddCommMonoid S] (p : Polynomial R) {f : ℕ → R → S} (h : ∀ (n : ℕ), f n 0 = 0) (n : ℕ) (hn : p.natDegree < n) :
p.sum f = ∑ a ∈ Finset.range n, f a (p.coeff a)

We can reexpress a sum over p.support as a sum over range n, for any n satisfying p.natDegree < n.

theorem Polynomial.sum_over_range {R : Type u} {S : Type v} [Semiring R] [AddCommMonoid S] (p : Polynomial R) {f : ℕ → R → S} (h : ∀ (n : ℕ), f n 0 = 0) :
p.sum f = ∑ a ∈ Finset.range (p.natDegree + 1), f a (p.coeff a)

We can reexpress a sum over p.support as a sum over range (p.natDegree + 1).

theorem Polynomial.sum_fin {R : Type u} {S : Type v} [Semiring R] [AddCommMonoid S] (f : ℕ → R → S) (hf : ∀ (i : ℕ), f i 0 = 0) {n : ℕ} {p : Polynomial R} (hn : p.degree < ↑n) :
∑ i : Fin n, f (↑i) (p.coeff ↑i) = p.sum f
theorem Polynomial.as_sum_range' {R : Type u} [Semiring R] (p : Polynomial R) (n : ℕ) (hn : p.natDegree < n) :
p = ∑ i ∈ Finset.range n, (monomial i) (p.coeff i)
theorem Polynomial.as_sum_range {R : Type u} [Semiring R] (p : Polynomial R) :
p = ∑ i ∈ Finset.range (p.natDegree + 1), (monomial i) (p.coeff i)
theorem Polynomial.as_sum_range_C_mul_X_pow' {R : Type u} [Semiring R] (p : Polynomial R) {n : ℕ} (hn : p.natDegree < n) :
p = ∑ i ∈ Finset.range n, C (p.coeff i) * X ^ i
theorem Polynomial.as_sum_range_C_mul_X_pow {R : Type u} [Semiring R] (p : Polynomial R) :
p = ∑ i ∈ Finset.range (p.natDegree + 1), C (p.coeff i) * X ^ i
theorem Polynomial.mem_support_C_mul_X_pow {R : Type u} [Semiring R] {n a : ℕ} {c : R} (h : a ∈ (C c * X ^ n).support) :
a = n
theorem Polynomial.le_degree_of_mem_supp {R : Type u} [Semiring R] {p : Polynomial R} (a : ℕ) :
a ∈ p.support → ↑a ≤ p.degree