mathlib3 documentation

ring_theory.polynomial.basic

Ring-theoretic supplement of data.polynomial. #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

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) [semiring 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) [semiring R] (n : ) :

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

Equations
noncomputable def polynomial.degree_lt_equiv (R : Type u_1) [semiring R] (n : ) :

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

Equations
@[simp]
theorem polynomial.eval_eq_sum_degree_lt_equiv {R : Type u} [semiring R] {n : } {p : polynomial R} (hp : p polynomial.degree_lt R n) (x : R) :
noncomputable def polynomial.frange {R : Type u} [semiring R] (p : polynomial R) :

The finset of nonzero coefficients of a polynomial.

Equations
theorem polynomial.mem_frange_iff {R : Type u} [semiring R] {p : polynomial R} {c : R} :
c p.frange (n : ) (H : n p.support), c = p.coeff n
theorem polynomial.frange_one {R : Type u} [semiring R] :
1.frange {1}
theorem polynomial.coeff_mem_frange {R : Type u} [semiring R] (p : polynomial R) (n : ) (h : p.coeff n 0) :
theorem polynomial.geom_sum_X_comp_X_add_one_eq_sum {R : Type u} [semiring R] (n : ) :
((finset.range n).sum (λ (i : ), polynomial.X ^ i)).comp (polynomial.X + 1) = (finset.range n).sum (λ (i : ), (n.choose (i + 1)) * polynomial.X ^ i)
theorem polynomial.monic.geom_sum {R : Type u} [semiring R] {P : polynomial R} (hP : P.monic) (hdeg : 0 < P.nat_degree) {n : } (hn : n 0) :
((finset.range n).sum (λ (i : ), P ^ i)).monic
theorem polynomial.monic.geom_sum' {R : Type u} [semiring R] {P : polynomial R} (hP : P.monic) (hdeg : 0 < P.degree) {n : } (hn : n 0) :
((finset.range n).sum (λ (i : ), P ^ i)).monic
theorem polynomial.monic_geom_sum_X {R : Type u} [semiring R] {n : } (hn : n 0) :
((finset.range n).sum (λ (i : ), polynomial.X ^ i)).monic
noncomputable def polynomial.restriction {R : Type u} [ring R] (p : polynomial R) :

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} [ring R] {p : polynomial R} {n : } :
@[simp]
theorem polynomial.coeff_restriction' {R : Type u} [ring R] {p : polynomial R} {n : } :
@[simp]
@[simp]
@[simp]
theorem polynomial.restriction_zero {R : Type u} [ring R] :
@[simp]
theorem polynomial.restriction_one {R : Type u} [ring R] :
noncomputable def polynomial.to_subring {R : Type u} [ring R] (p : polynomial R) (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} [ring R] (p : polynomial R) (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} [ring R] (p : polynomial R) (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} [ring R] (p : polynomial R) (T : subring R) (hp : (p.frange) T) :
@[simp]
theorem polynomial.degree_to_subring {R : Type u} [ring R] (p : polynomial R) (T : subring R) (hp : (p.frange) T) :
@[simp]
theorem polynomial.nat_degree_to_subring {R : Type u} [ring R] (p : polynomial R) (T : subring R) (hp : (p.frange) T) :
@[simp]
theorem polynomial.monic_to_subring {R : Type u} [ring R] (p : polynomial R) (T : subring R) (hp : (p.frange) T) :
@[simp]
theorem polynomial.to_subring_zero {R : Type u} [ring R] (T : subring R) :
0.to_subring T _ = 0
@[simp]
theorem polynomial.to_subring_one {R : Type u} [ring R] (T : subring R) :
1.to_subring T _ = 1
@[simp]
theorem polynomial.map_to_subring {R : Type u} [ring R] (p : polynomial R) (T : subring R) (hp : (p.frange) T) :
noncomputable def polynomial.of_subring {R : Type u} [ring R] (T : subring R) (p : polynomial T) :

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} [ring R] (T : subring R) (p : polynomial T) (n : ) :
@[simp]

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

Equations
theorem ideal.mem_of_polynomial {R : Type u} [semiring R] {I : ideal (polynomial R)} (x : polynomial R) :
noncomputable def ideal.degree_le {R : Type u} [semiring R] (I : ideal (polynomial R)) (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} [semiring R] (I : ideal (polynomial R)) (n : ) :

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

Equations
noncomputable def ideal.leading_coeff {R : Type u} [semiring R] (I : ideal (polynomial R)) :

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

Equations

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_semiring R] {I : ideal R} {f : polynomial R} :

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

theorem ideal.mem_leading_coeff_nth {R : Type u} [comm_semiring R] (I : ideal (polynomial R)) (n : ) (x : R) :
theorem ideal.mem_leading_coeff {R : Type u} [comm_semiring R] (I : ideal (polynomial R)) (x : R) :
theorem polynomial.coeff_prod_mem_ideal_pow_tsub {R : Type u} [comm_semiring R] {ι : Type u_1} (s : finset ι) (f : ι polynomial R) (I : ideal R) (n : ι ) (h : (i : ι), i s (k : ), (f i).coeff k I ^ (n i - k)) (k : ) :
(s.prod f).coeff k I ^ (s.sum n - k)

If I is an ideal, and pᵢ is a finite family of polynomials each satisfying ∀ k, (pᵢ)ₖ ∈ Iⁿⁱ⁻ᵏ for some nᵢ, then p = ∏ pᵢ also satisfies ∀ k, pₖ ∈ Iⁿ⁻ᵏ with n = ∑ nᵢ.

R[X] is never a field for any ring R.

theorem ideal.eq_zero_of_constant_mem_of_maximal {R : Type u} [ring R] (hR : is_field R) (I : ideal (polynomial R)) [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.

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

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

theorem ideal.is_fg_degree_le {R : Type u} [comm_ring R] [is_noetherian_ring R] (I : ideal (polynomial 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} :
@[protected, instance]
@[protected, instance]

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

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 : polynomial R), ((polynomial.aeval f) p) v = 0 p = 0
@[protected, instance]

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

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.no_zero_divisors for the general case.

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.no_zero_divisors_fin, and then used to prove the general case without finiteness hypotheses. See mv_polynomial.no_zero_divisors for the general case.

@[protected, instance]
@[protected, instance]

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] [finite σ] (ϕ : mv_polynomial σ R →+* S) (p : mv_polynomial σ R) :

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