mathlib documentation

ring_theory.polynomial.basic

Ring-theoretic supplement of data.polynomial. #

Main results #

@[protected, instance]
def polynomial.char_p {R : Type u} [semiring R] (p : ℕ) [h : char_p R p] :
noncomputable def polynomial.degree_le (R : Type u) [comm_ring R] (n : with_bot ℕ) :

The R-submodule of R[X] consisting of polynomials of degree ≤ n.

Equations
noncomputable def polynomial.degree_lt (R : Type u) [comm_ring R] (n : ℕ) :

The R-submodule of R[X] consisting of polynomials of degree < n.

Equations
theorem polynomial.mem_degree_le {R : Type u} [comm_ring R] {n : with_bot ℕ} {f : R[X]} :
theorem polynomial.mem_degree_lt {R : Type u} [comm_ring R] {n : ℕ} {f : R[X]} :
theorem polynomial.degree_lt_mono {R : Type u} [comm_ring R] {m n : ℕ} (H : m ≤ n) :
noncomputable def polynomial.degree_lt_equiv (R : Type u) [comm_ring R] (n : ℕ) :

The first n coefficients on degree_lt n form a linear equivalence with fin n → R.

Equations
noncomputable def polynomial.frange {R : Type u} [comm_ring R] (p : R[X]) :

The finset of nonzero coefficients of a polynomial.

Equations
theorem polynomial.frange_zero {R : Type u} [comm_ring R] :
theorem polynomial.mem_frange_iff {R : Type u} [comm_ring R] {p : R[X]} {c : R} :
c ∈ p.frange ↔ ∃ (n : ℕ) (H : n ∈ p.support), c = p.coeff n
theorem polynomial.frange_one {R : Type u} [comm_ring R] :
1.frange ⊆ {1}
theorem polynomial.coeff_mem_frange {R : Type u} [comm_ring R] (p : R[X]) (n : ℕ) (h : p.coeff n ≠ 0) :
noncomputable def polynomial.restriction {R : Type u} [comm_ring R] (p : R[X]) :

Given a polynomial, return the polynomial whose coefficients are in the ring closure of the original coefficients.

Equations
@[simp]
theorem polynomial.coeff_restriction {R : Type u} [comm_ring R] {p : R[X]} {n : ℕ} :
@[simp]
theorem polynomial.coeff_restriction' {R : Type u} [comm_ring R] {p : R[X]} {n : ℕ} :
@[simp]
theorem polynomial.support_restriction {R : Type u} [comm_ring R] (p : R[X]) :
@[simp]
theorem polynomial.degree_restriction {R : Type u} [comm_ring R] {p : R[X]} :
@[simp]
@[simp]
theorem polynomial.monic_restriction {R : Type u} [comm_ring R] {p : R[X]} :
@[simp]
theorem polynomial.restriction_zero {R : Type u} [comm_ring R] :
@[simp]
theorem polynomial.restriction_one {R : Type u} [comm_ring R] :
theorem polynomial.eval₂_restriction {R : Type u} [comm_ring R] {S : Type v} [ring S] {f : R →+* S} {x : S} {p : R[X]} :
theorem polynomial.monic.geom_sum {R : Type u_1} [semiring R] {P : R[X]} (hP : P.monic) (hdeg : 0 < P.nat_degree) {n : ℕ} (hn : n ≠ 0) :
theorem polynomial.monic.geom_sum' {R : Type u_1} [semiring R] {P : R[X]} (hP : P.monic) (hdeg : 0 < P.degree) {n : ℕ} (hn : n ≠ 0) :
theorem polynomial.monic_geom_sum_X (R : Type u_1) [semiring R] {n : ℕ} (hn : n ≠ 0) :
noncomputable def polynomial.to_subring {R : Type u} [comm_ring R] (p : R[X]) (T : subring R) (hp : ↑(p.frange) ⊆ ↑T) :

Given a polynomial p and a subring T that contains the coefficients of p, return the corresponding polynomial whose coefficients are in `T.

Equations
@[simp]
theorem polynomial.coeff_to_subring {R : Type u} [comm_ring R] (p : R[X]) (T : subring R) (hp : ↑(p.frange) ⊆ ↑T) {n : ℕ} :
↑((p.to_subring T hp).coeff n) = p.coeff n
@[simp]
theorem polynomial.coeff_to_subring' {R : Type u} [comm_ring R] (p : R[X]) (T : subring R) (hp : ↑(p.frange) ⊆ ↑T) {n : ℕ} :
((p.to_subring T hp).coeff n).val = p.coeff n
@[simp]
theorem polynomial.support_to_subring {R : Type u} [comm_ring R] (p : R[X]) (T : subring R) (hp : ↑(p.frange) ⊆ ↑T) :
@[simp]
theorem polynomial.degree_to_subring {R : Type u} [comm_ring R] (p : R[X]) (T : subring R) (hp : ↑(p.frange) ⊆ ↑T) :
@[simp]
theorem polynomial.nat_degree_to_subring {R : Type u} [comm_ring R] (p : R[X]) (T : subring R) (hp : ↑(p.frange) ⊆ ↑T) :
@[simp]
theorem polynomial.monic_to_subring {R : Type u} [comm_ring R] (p : R[X]) (T : subring R) (hp : ↑(p.frange) ⊆ ↑T) :
@[simp]
theorem polynomial.to_subring_zero {R : Type u} [comm_ring R] (T : subring R) :
0.to_subring T _ = 0
@[simp]
theorem polynomial.to_subring_one {R : Type u} [comm_ring R] (T : subring R) :
1.to_subring T _ = 1
@[simp]
theorem polynomial.map_to_subring {R : Type u} [comm_ring R] (p : R[X]) (T : subring R) (hp : ↑(p.frange) ⊆ ↑T) :
noncomputable def polynomial.of_subring {R : Type u} [comm_ring R] (T : subring R) (p : (↥T)[X]) :

Given a polynomial whose coefficients are in some subring, return the corresponding polynomial whose coefficients are in the ambient ring.

Equations
theorem polynomial.coeff_of_subring {R : Type u} [comm_ring R] (T : subring R) (p : (↥T)[X]) (n : ℕ) :
@[simp]
theorem polynomial.frange_of_subring {R : Type u} [comm_ring R] (T : subring R) {p : (↥T)[X]} :
theorem polynomial.mem_ker_mod_by_monic {R : Type u} [comm_ring R] {q : R[X]} (hq : q.monic) {p : R[X]} :
theorem ideal.polynomial_mem_ideal_of_coeff_mem_ideal {R : Type u} [comm_ring R] (I : ideal R[X]) (p : R[X]) (hp : ∀ (n : ℕ), p.coeff n ∈ ideal.comap polynomial.C I) :
p ∈ I

If every coefficient of a polynomial is in an ideal I, then so is the polynomial itself

theorem ideal.mem_map_C_iff {R : Type u} [comm_ring R] {I : ideal R} {f : R[X]} :
f ∈ ideal.map polynomial.C I ↔ ∀ (n : ℕ), f.coeff n ∈ I

The push-forward of an ideal I of R to polynomial R via inclusion is exactly the set of polynomials whose coefficients are in I

theorem polynomial.ker_map_ring_hom {R : Type u} {S : Type u_1} [comm_ring R] [comm_ring S] (f : R →+* S) :
theorem ideal.quotient_map_C_eq_zero {R : Type u} [comm_ring R] {I : ideal R} (a : R) (H : a ∈ I) :

If I is an ideal of R, then the ring polynomials over the quotient ring I.quotient is isomorphic to the quotient of polynomial R by the ideal map C I, where map C I contains exactly the polynomials whose coefficients all lie in I

Equations
theorem ideal.is_domain_map_C_quotient {R : Type u} [comm_ring R] {P : ideal R} (H : P.is_prime) :

If P is a prime ideal of R, then R[x]/(P) is an integral domain.

theorem ideal.is_prime_map_C_of_is_prime {R : Type u} [comm_ring R] {P : ideal R} (H : P.is_prime) :

If P is a prime ideal of R, then P.R[x] is a prime ideal of R[x].

Given any ring R and an ideal I of polynomial R, we get a map R → R[x] → R[x]/I. If we let R be the image of R in R[x]/I then we also have a map R[x] → R'[x]. In particular we can map I across this map, to get I' and a new map R' → R'[x] → R'[x]/I. This theorem shows I' will not contain any non-zero constant polynomials

theorem ideal.polynomial_not_is_field {R : Type u} [comm_ring R] :

polynomial R is never a field for any ring R.

theorem ideal.eq_zero_of_constant_mem_of_maximal {R : Type u} [comm_ring R] (hR : is_field R) (I : ideal R[X]) [hI : I.is_maximal] (x : R) (hx : ⇑polynomial.C x ∈ I) :
x = 0

The only constant in a maximal ideal over a field is 0.

def ideal.of_polynomial {R : Type u} [comm_ring R] (I : ideal R[X]) :

Transport an ideal of R[X] to an R-submodule of R[X].

Equations
theorem ideal.mem_of_polynomial {R : Type u} [comm_ring R] {I : ideal R[X]} (x : R[X]) :
noncomputable def ideal.degree_le {R : Type u} [comm_ring R] (I : ideal R[X]) (n : with_bot ℕ) :

Given an ideal I of R[X], make the R-submodule of I consisting of polynomials of degree ≤ n.

Equations
noncomputable def ideal.leading_coeff_nth {R : Type u} [comm_ring R] (I : ideal R[X]) (n : ℕ) :

Given an ideal I of R[X], make the ideal in R of leading coefficients of polynomials in I with degree ≤ n.

Equations
theorem ideal.mem_leading_coeff_nth {R : Type u} [comm_ring R] (I : ideal R[X]) (n : ℕ) (x : R) :
x ∈ I.leading_coeff_nth n ↔ ∃ (p : R[X]) (H : p ∈ I), p.degree ≤ ↑n ∧ p.leading_coeff = x
theorem ideal.mem_leading_coeff_nth_zero {R : Type u} [comm_ring R] (I : ideal R[X]) (x : R) :
theorem ideal.leading_coeff_nth_mono {R : Type u} [comm_ring R] (I : ideal R[X]) {m n : ℕ} (H : m ≤ n) :
noncomputable def ideal.leading_coeff {R : Type u} [comm_ring R] (I : ideal R[X]) :

Given an ideal I in R[X], make the ideal in R of the leading coefficients in I.

Equations
theorem ideal.mem_leading_coeff {R : Type u} [comm_ring R] (I : ideal R[X]) (x : R) :
x ∈ I.leading_coeff ↔ ∃ (p : R[X]) (H : p ∈ I), p.leading_coeff = x
theorem ideal.is_fg_degree_le {R : Type u} [comm_ring R] (I : ideal R[X]) [is_noetherian_ring R] (n : ℕ) :
theorem polynomial.prime_C_iff {R : Type u} [comm_ring R] {r : R} :
theorem mv_polynomial.prime_C_iff {R : Type u} (σ : Type v) [comm_ring R] {r : R} :
theorem mv_polynomial.prime_rename_iff {R : Type u} {σ : Type v} [comm_ring R] (s : set σ) {p : mv_polynomial ↥s R} :
@[protected, instance]
@[protected, instance]

Hilbert basis theorem: a polynomial ring over a noetherian ring is a noetherian ring.

theorem polynomial.exists_irreducible_of_degree_pos {R : Type u} [comm_ring R] [is_domain R] [wf_dvd_monoid R] {f : R[X]} (hf : 0 < f.degree) :
∃ (g : R[X]), irreducible g ∧ g ∣ f
theorem polynomial.exists_irreducible_of_nat_degree_pos {R : Type u} [comm_ring R] [is_domain R] [wf_dvd_monoid R] {f : R[X]} (hf : 0 < f.nat_degree) :
∃ (g : R[X]), irreducible g ∧ g ∣ f
theorem polynomial.exists_irreducible_of_nat_degree_ne_zero {R : Type u} [comm_ring R] [is_domain R] [wf_dvd_monoid R] {f : R[X]} (hf : f.nat_degree ≠ 0) :
∃ (g : R[X]), irreducible g ∧ g ∣ f
theorem polynomial.linear_independent_powers_iff_aeval {R : Type u} {M : Type w} [comm_ring R] [add_comm_group M] [module R M] (f : M →ₗ[R] M) (v : M) :
linear_independent R (λ (n : ℕ), ⇑(f ^ n) v) ↔ ∀ (p : R[X]), ⇑(⇑(polynomial.aeval f) p) v = 0 → p = 0
theorem polynomial.disjoint_ker_aeval_of_coprime {R : Type u} {M : Type w} [comm_ring R] [add_comm_group M] [module R M] (f : M →ₗ[R] M) {p q : R[X]} (hpq : is_coprime p q) :
theorem polynomial.sup_aeval_range_eq_top_of_coprime {R : Type u} {M : Type w} [comm_ring R] [add_comm_group M] [module R M] (f : M →ₗ[R] M) {p q : R[X]} (hpq : is_coprime p q) :
theorem polynomial.sup_ker_aeval_le_ker_aeval_mul {R : Type u} {M : Type w} [comm_ring R] [add_comm_group M] [module R M] {f : M →ₗ[R] M} {p q : R[X]} :
theorem polynomial.sup_ker_aeval_eq_ker_aeval_mul_of_coprime {R : Type u} {M : Type w} [comm_ring R] [add_comm_group M] [module R M] (f : M →ₗ[R] M) {p q : R[X]} (hpq : is_coprime p q) :
@[protected, instance]

The multivariate polynomial ring in finitely many variables over a noetherian ring is itself a noetherian ring.

theorem mv_polynomial.is_domain_fin (R : Type u) [comm_ring R] [is_domain R] (n : ℕ) :

Auxiliary lemma: Multivariate polynomials over an integral domain with variables indexed by fin n form an integral domain. This fact is proven inductively, and then used to prove the general case without any finiteness hypotheses. See mv_polynomial.is_domain for the general case.

theorem mv_polynomial.is_domain_fintype (R : Type u) (σ : Type v) [comm_ring R] [fintype σ] [is_domain R] :

Auxiliary definition: Multivariate polynomials in finitely many variables over an integral domain form an integral domain. This fact is proven by transport of structure from the mv_polynomial.is_domain_fin, and then used to prove the general case without finiteness hypotheses. See mv_polynomial.is_domain for the general case.

@[protected]
theorem mv_polynomial.eq_zero_or_eq_zero_of_mul_eq_zero {R : Type u} [comm_ring R] [is_domain R] {σ : Type v} (p q : mv_polynomial σ R) (h : p * q = 0) :
p = 0 ∨ q = 0
@[protected, instance]
def mv_polynomial.is_domain {R : Type u} {σ : Type v} [comm_ring R] [is_domain R] :

The multivariate polynomial ring over an integral domain is an integral domain.

theorem mv_polynomial.map_mv_polynomial_eq_eval₂ {R : Type u} {σ : Type v} [comm_ring R] {S : Type u_1} [comm_ring S] [fintype σ] (ϕ : mv_polynomial σ R →+* S) (p : mv_polynomial σ R) :
theorem mv_polynomial.quotient_map_C_eq_zero {R : Type u} {σ : Type v} [comm_ring R] {I : ideal R} {i : R} (hi : i ∈ I) :
theorem mv_polynomial.mem_ideal_of_coeff_mem_ideal {R : Type u} {σ : Type v} [comm_ring R] (I : ideal (mv_polynomial σ R)) (p : mv_polynomial σ R) (hcoe : ∀ (m : σ →₀ ℕ), mv_polynomial.coeff m p ∈ ideal.comap mv_polynomial.C I) :
p ∈ I

If every coefficient of a polynomial is in an ideal I, then so is the polynomial itself, multivariate version.

theorem mv_polynomial.mem_map_C_iff {R : Type u} {σ : Type v} [comm_ring R] {I : ideal R} {f : mv_polynomial σ R} :

The push-forward of an ideal I of R to mv_polynomial σ R via inclusion is exactly the set of polynomials whose coefficients are in I

theorem mv_polynomial.ker_map {R : Type u} {S : Type u_1} {σ : Type v} [comm_ring R] [comm_ring S] (f : R →+* S) :