The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V09. Commutative algebra I: ideals, polynomials, factorization

Mathlib.Algebra.MvPolynomial.CommRing

24 declarations and 2 deprecated aliases. Mathlib docs · Source

Multivariate polynomials over a ring

Many results about polynomials hold when the coefficient ring is a commutative semiring. Some stronger results can be derived when we assume this semiring is a ring.

This file does not define any new operations, but proves some of these stronger results.

Notation

As in other polynomial files, we typically use the notation:

  • σ : Type* (indexing the variables)

  • R : Type* [CommRing R] (the coefficients)

  • s : σ →₀ ℕ, a function from σ to ℕ which is zero away from a finite set. This will give rise to a monomial in MvPolynomial σ R which mathematicians might call X^s.

  • a : R

  • i : σ, with corresponding monomial X i, often denoted X_i by mathematicians

  • p : MvPolynomial σ R

theorem MvPolynomial.C_sub E0 #

∀ {R : Type u} (σ : Type u_1) (a a' : R) [inst : CommRing R],
  MvPolynomial.C (a - a') = MvPolynomial.C a - MvPolynomial.C a'

theorem MvPolynomial.C_neg E0 #

∀ {R : Type u} (σ : Type u_1) (a : R) [inst : CommRing R], MvPolynomial.C (-a) = -MvPolynomial.C a

theorem MvPolynomial.support_neg E0 #

∀ {R : Type u} (σ : Type u_1) [inst : CommRing R] {p : MvPolynomial σ R}, (-p).support = p.support

theorem MvPolynomial.support_sub E1 #

∀ {R : Type u} (σ : Type u_1) [inst : CommRing R] [inst_1 : DecidableEq σ] (p q : MvPolynomial σ R),
  (p - q).support ⊆ p.support ∪ q.support

theorem MvPolynomial.notMem_support_sub_monomial_sub_monomial E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] (p : MvPolynomial σ R) (d d' : σ →₀ ℕ) (c : R),
  d ≠ d' → p.coeff d = c → d ∉ (p - ((MvPolynomial.monomial d) c - (MvPolynomial.monomial d') c)).support

Subtracting monomial d c - monomial d' c from p, where c = coeff d p and d ≠ d', removes d from the support.

theorem MvPolynomial.support_sub_monomial_sub_monomial_subset E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] (p : MvPolynomial σ R) [inst_1 : DecidableEq σ] (d d' : σ →₀ ℕ)
  (c : R),
  d ≠ d' →
    p.coeff d = c →
      (p - ((MvPolynomial.monomial d) c - (MvPolynomial.monomial d') c)).support ⊆ p.support.erase d ∪ {d'}

Subtracting monomial d c - monomial d' c from p, where c = coeff d p and d ≠ d', leaves the support inside p.support.erase d ∪ {d'}.

theorem MvPolynomial.degrees_neg E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] (p : MvPolynomial σ R), (-p).degrees = p.degrees

theorem MvPolynomial.degrees_sub_le E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] [inst_1 : DecidableEq σ] {p q : MvPolynomial σ R},
  (p - q).degrees ≤ p.degrees ∪ q.degrees

theorem MvPolynomial.degreeOf_neg E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] (i : σ) (p : MvPolynomial σ R),
  MvPolynomial.degreeOf i (-p) = MvPolynomial.degreeOf i p

theorem MvPolynomial.degreeOf_sub_le E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] (i : σ) (p q : MvPolynomial σ R),
  MvPolynomial.degreeOf i (p - q) ≤ max (MvPolynomial.degreeOf i p) (MvPolynomial.degreeOf i q)

theorem MvPolynomial.vars_neg E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] (p : MvPolynomial σ R), (-p).vars = p.vars

theorem MvPolynomial.vars_sub_subset E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] (p : MvPolynomial σ R) {q : MvPolynomial σ R}
  [inst_1 : DecidableEq σ], (p - q).vars ⊆ p.vars ∪ q.vars

theorem MvPolynomial.vars_sub_of_disjoint E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] (p : MvPolynomial σ R) {q : MvPolynomial σ R}
  [inst_1 : DecidableEq σ], Disjoint p.vars q.vars → (p - q).vars = p.vars ∪ q.vars

theorem MvPolynomial.eval₂_sub E0 #

∀ {R : Type u} {S : Type v} {σ : Type u_1} [inst : CommRing R] (p : MvPolynomial σ R) {q : MvPolynomial σ R}
  [inst_1 : CommRing S] (f : R →+* S) (g : σ → S),
  MvPolynomial.eval₂ f g (p - q) = MvPolynomial.eval₂ f g p - MvPolynomial.eval₂ f g q

theorem MvPolynomial.eval_sub E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] (p : MvPolynomial σ R) {q : MvPolynomial σ R} (f : σ → R),
  (MvPolynomial.eval f) (p - q) = (MvPolynomial.eval f) p - (MvPolynomial.eval f) q

theorem MvPolynomial.eval₂_neg E0 #

∀ {R : Type u} {S : Type v} {σ : Type u_1} [inst : CommRing R] (p : MvPolynomial σ R) [inst_1 : CommRing S]
  (f : R →+* S) (g : σ → S), MvPolynomial.eval₂ f g (-p) = -MvPolynomial.eval₂ f g p

theorem MvPolynomial.eval_neg E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] (p : MvPolynomial σ R) (f : σ → R),
  (MvPolynomial.eval f) (-p) = -(MvPolynomial.eval f) p

theorem MvPolynomial.hom_C E1 #

∀ {S : Type v} {σ : Type u_1} [inst : CommRing S] (f : MvPolynomial σ ℤ →+* S) (n : ℤ), f (MvPolynomial.C n) = ↑n

theorem MvPolynomial.eval₂Hom_X E0 #

∀ {S : Type v} [inst : CommRing S] {R : Type u} (c : ℤ →+* S) (f : MvPolynomial R ℤ →+* S) (x : MvPolynomial R ℤ),
  MvPolynomial.eval₂ c (⇑f ∘ MvPolynomial.X) x = f x

A ring homomorphism f : Z[X_1, X_2, ...] → R is determined by the evaluations f(X_1), f(X_2), ...

def MvPolynomial.homEquiv E1 #

{S : Type v} → {σ : Type u_1} → [inst : CommRing S] → (MvPolynomial σ ℤ →+* S) ≃ (σ → S)

Ring homomorphisms out of integer polynomials on a type σ are the same as functions out of the type σ.

theorem MvPolynomial.degreeOf_sub_lt E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] {x : σ} {f g : MvPolynomial σ R} {k : ℕ},
  0 < k →
    (∀ m ∈ f.support, k ≤ m x → f.coeff m = g.coeff m) →
      (∀ m ∈ g.support, k ≤ m x → f.coeff m = g.coeff m) → MvPolynomial.degreeOf x (f - g) < k

theorem MvPolynomial.totalDegree_neg E0 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] (a : MvPolynomial σ R), (-a).totalDegree = a.totalDegree

theorem MvPolynomial.totalDegree_sub E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] (a b : MvPolynomial σ R),
  (a - b).totalDegree ≤ max a.totalDegree b.totalDegree

theorem MvPolynomial.totalDegree_sub_C_le E1 #

∀ {R : Type u} {σ : Type u_1} [inst : CommRing R] (p : MvPolynomial σ R) (r : R),
  (p - MvPolynomial.C r).totalDegree ≤ p.totalDegree

Deprecated aliases

NameNew nameSince
MvPolynomial.coeff_negAddMonoidAlgebra.coeff_neg2026-10-06
MvPolynomial.coeff_subAddMonoidAlgebra.coeff_sub2026-10-06