The areas / V09. Commutative algebra I: ideals, polynomials, factorization
Mathlib.Algebra.Polynomial.Eval.Degree
26 declarations. Mathlib docs · Source
Evaluation of polynomials and degrees
This file contains results on the interaction of Polynomial.eval and Polynomial.degree.
theorem Polynomial.eval₂_eq_sum_range E1 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] {p : Polynomial R} [inst_1 : Semiring S] (f : R →+* S) (x : S),
Polynomial.eval₂ f x p = ∑ i ∈ Finset.range (p.natDegree + 1), f (p.coeff i) * x ^ i
theorem Polynomial.eval₂_eq_sum_range' E1 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] (f : R →+* S) {p : Polynomial R} {n : ℕ},
p.natDegree < n → ∀ (x : S), Polynomial.eval₂ f x p = ∑ i ∈ Finset.range n, f (p.coeff i) * x ^ i
theorem Polynomial.eval_eq_sum_range E1 #
∀ {R : Type u} [inst : Semiring R] {p : Polynomial R} (x : R),
Polynomial.eval x p = ∑ i ∈ Finset.range (p.natDegree + 1), p.coeff i * x ^ i
theorem Polynomial.eval_eq_sum_range' E1 #
∀ {R : Type u} [inst : Semiring R] {p : Polynomial R} {n : ℕ},
p.natDegree < n → ∀ (x : R), Polynomial.eval x p = ∑ i ∈ Finset.range n, p.coeff i * x ^ i
theorem Polynomial.eval_monomial_one_add_sub E1 #
∀ {S : Type v} [inst : CommRing S] (d : ℕ) (y : S),
Polynomial.eval (1 + y) ((Polynomial.monomial d) (↑d + 1)) - Polynomial.eval y ((Polynomial.monomial d) (↑d + 1)) =
∑ x_1 ∈ Finset.range (d + 1), ↑((d + 1).choose x_1) * (↑x_1 * y ^ (x_1 - 1))
A reformulation of the expansion of (1 + y)^d: $$(d + 1) (1 + y)^d - (d + 1)y^d = \sum_{i = 0}^d {d + 1 \choose i} \cdot i \cdot y^{i - 1}.$$
theorem Polynomial.coeff_comp_degree_mul_degree E1 #
∀ {R : Type u} [inst : Semiring R] {p q : Polynomial R},
q.natDegree ≠ 0 → (p.comp q).coeff (p.natDegree * q.natDegree) = p.leadingCoeff * q.leadingCoeff ^ p.natDegree
theorem Polynomial.comp_C_mul_X_coeff E0 #
∀ {R : Type u} [inst : Semiring R] {p : Polynomial R} {r : R} {n : ℕ},
(p.comp (Polynomial.C r * Polynomial.X)).coeff n = p.coeff n * r ^ n
theorem Polynomial.comp_C_mul_X_eq_zero_iff E0 #
∀ {R : Type u} [inst : Semiring R] {p : Polynomial R} {r : R},
r ∈ nonZeroDivisors R → (p.comp (Polynomial.C r * Polynomial.X) = 0 ↔ p = 0)
def Polynomial.mapEquiv E1 #
{R : Type u} → {S : Type v} → [inst : Semiring R] → [inst_1 : Semiring S] → R ≃+* S → Polynomial R ≃+* Polynomial S
If R and S are isomorphic, then so are their polynomial rings.
theorem Polynomial.mapEquiv_symm_apply E0 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] (e : R ≃+* S) (a : Polynomial S),
(Polynomial.mapEquiv e).symm a = Polynomial.map (↑e.symm) a
theorem Polynomial.mapEquiv_apply E0 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] (e : R ≃+* S) (a : Polynomial R),
(Polynomial.mapEquiv e) a = Polynomial.map (↑e) a
theorem Polynomial.map_monic_eq_zero_iff E0 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] {f : R →+* S} {p : Polynomial R},
p.Monic → (Polynomial.map f p = 0 ↔ ∀ (x : R), f x = 0)
theorem Polynomial.map_monic_ne_zero E0 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] {f : R →+* S} {p : Polynomial R},
p.Monic → ∀ [Nontrivial S], Polynomial.map f p ≠ 0
theorem Polynomial.degree_map_le E1 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] {f : R →+* S} {p : Polynomial R},
(Polynomial.map f p).degree ≤ p.degree
theorem Polynomial.natDegree_map_le E1 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] {f : R →+* S} {p : Polynomial R},
(Polynomial.map f p).natDegree ≤ p.natDegree
theorem Polynomial.degree_map_lt E1 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] {f : R →+* S} {p : Polynomial R},
f p.leadingCoeff = 0 → p ≠ 0 → (Polynomial.map f p).degree < p.degree
theorem Polynomial.natDegree_map_lt E1 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] {f : R →+* S} {p : Polynomial R},
f p.leadingCoeff = 0 → Polynomial.map f p ≠ 0 → (Polynomial.map f p).natDegree < p.natDegree
theorem Polynomial.natDegree_map_lt' E1 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] {f : R →+* S} {p : Polynomial R},
f p.leadingCoeff = 0 → 0 < p.natDegree → (Polynomial.map f p).natDegree < p.natDegree
Variant of natDegree_map_lt that assumes 0 < natDegree p instead of map f p ≠ 0.
theorem Polynomial.degree_map_eq_of_leadingCoeff_ne_zero E1 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] {p : Polynomial R} (f : R →+* S),
f p.leadingCoeff ≠ 0 → (Polynomial.map f p).degree = p.degree
theorem Polynomial.natDegree_map_of_leadingCoeff_ne_zero E1 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] {p : Polynomial R} (f : R →+* S),
f p.leadingCoeff ≠ 0 → (Polynomial.map f p).natDegree = p.natDegree
theorem Polynomial.leadingCoeff_map_of_leadingCoeff_ne_zero E1 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] {p : Polynomial R} (f : R →+* S),
f p.leadingCoeff ≠ 0 → (Polynomial.map f p).leadingCoeff = f p.leadingCoeff
theorem Polynomial.nextCoeff_map_of_leadingCoeff_ne_zero E1 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : Semiring S] {p : Polynomial R} (f : R →+* S),
f p.leadingCoeff ≠ 0 → (Polynomial.map f p).nextCoeff = f p.nextCoeff
theorem Polynomial.eval₂_comp E1 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] {p q : Polynomial R} [inst_1 : CommSemiring S] (f : R →+* S) {x : S},
Polynomial.eval₂ f x (p.comp q) = Polynomial.eval₂ f (Polynomial.eval₂ f x q) p
theorem Polynomial.iterate_comp_eval₂ E0 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] {p q : Polynomial R} [inst_1 : CommSemiring S] (f : R →+* S) (k : ℕ)
(t : S), Polynomial.eval₂ f t (p.comp^[k] q) = (fun x ↦ Polynomial.eval₂ f x p)^[k] (Polynomial.eval₂ f t q)
theorem Polynomial.iterate_comp_eval E0 #
∀ {R : Type u} [inst : CommSemiring R] {p q : Polynomial R} (k : ℕ) (t : R),
Polynomial.eval t (p.comp^[k] q) = (fun x ↦ Polynomial.eval x p)^[k] (Polynomial.eval t q)
theorem Polynomial.isUnit_of_isUnit_leadingCoeff_of_isUnit_map E1 #
∀ {R : Type u} {S : Type v} [inst : Semiring R] [inst_1 : CommRing S] [IsDomain S] (φ : R →+* S) {f : Polynomial R},
IsUnit f.leadingCoeff → IsUnit (Polynomial.map φ f) → IsUnit f