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.RingTheory.MvPolynomial.MonomialOrder

183 declarations and 1 deprecated aliases. Mathlib docs · Source

Degree, leading coefficient and leading term of polynomials with respect to a monomial order

We consider a type σ of indeterminates and a commutative semiring R and a monomial order m : MonomialOrder σ.

  • m.degree f is the degree of f for the monomial ordering m, where the polynomial 0 has degree 0. For the variant mapping polynomial 0 to ⊥ which is less than 0, see MonomialOrder.withBotDegree.

  • m.leadingCoeff f is the leading coefficient of f for the monomial ordering m.

  • m.Monic f asserts that the leading coefficient of f is 1.

  • m.leadingTerm f is the leading term of f for the monomial ordering m.

  • m.sPolynomial f g is S-polynomial of f and g.

  • m.withBotDegree f is the degree of f for the monomial ordering m, where the polynomial 0 has degree ⊥, which is not equal to 0. MonomialOrder.withBotDegree is to MonomialOrder.degree as Polynomial.degree is to Polynomial.natDegree.

  • m.leadingCoeff_ne_zero_iff f asserts that this coefficient is nonzero iff f ≠ 0.

  • in a field, m.isUnit_leadingCoeff f asserts that this coefficient is a unit iff f ≠ 0.

  • m.degree_add_le : the m.degree of f + g is smaller than or equal to the supremum of those of f and g.

  • m.degree_add_of_lt h : the m.degree of f + g is equal to that of f if the m.degree of g is strictly smaller than that f.

  • m.leadingCoeff_add_of_lt h: then, the leading coefficient of f + g is that of f.

  • m.degree_add_of_ne h : the m.degree of f + g is equal to that the supremum of those of f and g if they are distinct.

  • m.degree_sub_le : the m.degree of f - g is smaller than or equal to the supremum of those of f and g.

  • m.degree_sub_of_lt h : the m.degree of f - g is equal to that of f if the m.degree of g is strictly smaller than that f.

  • m.leadingCoeff_sub_of_lt h: then, the leading coefficient of f - g is that of f.

  • m.degree_mul_le: the m.degree of f * g is smaller than or equal to the sum of those of f and g.

  • m.degree_mul_of_mul_leadingCoeff_ne_zero : if the product of the leading coefficients is nonzero, then the degree is the sum of the degrees.

  • m.leadingCoeff_mul_of_mul_leadingCoeff_ne_zero : if the product of the leading coefficients is nonzero, then the leading coefficient is that product.

  • m.degree_mul_of_left_mem_nonZeroDivisors, m.degree_mul_of_right_mem_nonZeroDivisors and m.degree_mul assert the equality when the leading coefficient of f or g isn't zero divisors, or when R is a domain and f and g are nonzero.

  • m.leadingCoeff_mul_of_left_mem_nonZeroDivisors, m.leadingCoeff_mul_of_right_mem_nonZeroDivisors and m.leadingCoeff_mul say that m.leadingCoeff (f * g) = m.leadingCoeff f * m.leadingCoeff g

  • m.degree_pow_of_pow_leadingCoeff_ne_zero : is the nth power of the leading coefficient of f is nonzero, then the degree of f ^ n is n • (m.degree f)

  • m.leadingCoeff_pow_of_pow_leadingCoeff_ne_zero : is the nth power of the leading coefficient of f is nonzero, then the leading coefficient of f ^ n is that power.

  • m.degree_prod_of_mem_nonZeroDivisors : the degree of a product of polynomials whose leading coefficients aren't zero divisors is the sum of their degrees.

  • m.leadingCoeff_prod_of_mem_nonZeroDivisors : the leading coefficient of a product of polynomials whose leading coefficients aren't zero divisors is the product of their leading coefficients.

  • m.Monic.prod : a product of monic polynomials is monic.

  • m.degree_sub_leadingTerm_lt_iff : the degree of f - m.leadingTerm f is smaller than the degree of f if and only if m.degree f ≠ 0.

References

[Becker-Weispfenning1993]

def MonomialOrder.degree E1 #

{σ : Type u_1} → MonomialOrder σ → {R : Type u_2} → [inst : CommSemiring R] → MvPolynomial σ R → σ →₀ ℕ

the degree of a multivariate polynomial with respect to a monomial ordering, where the polynomial 0 has degree 0. For the variant mapping polynomial 0 to ⊥ which is less than 0, see MonomialOrder.withBotDegree.

def MonomialOrder.leadingCoeff E1 #

{σ : Type u_1} → MonomialOrder σ → {R : Type u_2} → [inst : CommSemiring R] → MvPolynomial σ R → R

the leading coefficient of a multivariate polynomial with respect to a monomial ordering

def MonomialOrder.Monic E1 #

{σ : Type u_1} → MonomialOrder σ → {R : Type u_2} → [inst : CommSemiring R] → MvPolynomial σ R → Prop

A multivariate polynomial is Monic with respect to a monomial order if its leading coefficient (for that monomial order) is 1.

def MonomialOrder.leadingTerm E1 #

{σ : Type u_1} → MonomialOrder σ → {R : Type u_2} → [inst : CommSemiring R] → MvPolynomial σ R → MvPolynomial σ R

The leading term of a multivariate polynomial with respect to a monomial ordering.

theorem MonomialOrder.C_mul_leadingCoeff_monomial_degree E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (p : MvPolynomial σ R),
  MvPolynomial.C (m.leadingCoeff p) * (MvPolynomial.monomial (m.degree p)) 1 = m.leadingTerm p

theorem MonomialOrder.Monic.of_subsingleton E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [Subsingleton R] {f : MvPolynomial σ R},
  m.Monic f

instance MonomialOrder.Monic.decidable E0 #

{σ : Type u_1} →
  {m : MonomialOrder σ} →
    {R : Type u_2} → [inst : CommSemiring R] → [DecidableEq R] → (f : MvPolynomial σ R) → Decidable (m.Monic f)

theorem MonomialOrder.Monic.leadingCoeff_eq_one E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R},
  m.Monic f → m.leadingCoeff f = 1

theorem MonomialOrder.Monic.coeff_degree E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R},
  m.Monic f → f.coeff (m.degree f) = 1

theorem MonomialOrder.degree_zero E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R], m.degree 0 = 0

theorem MonomialOrder.ne_zero_of_degree_ne_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R},
  m.degree f ≠ 0 → f ≠ 0

theorem MonomialOrder.degree_of_subsingleton E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [Subsingleton R] {f : MvPolynomial σ R},
  m.degree f = 0

theorem MonomialOrder.leadingCoeff_zero E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R], m.leadingCoeff 0 = 0

theorem MonomialOrder.Monic.ne_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [Nontrivial R] {f : MvPolynomial σ R},
  m.Monic f → f ≠ 0

theorem MonomialOrder.degree_monomial_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {d : σ →₀ ℕ} (c : R),
  m.toSyn (m.degree ((MvPolynomial.monomial d) c)) ≤ m.toSyn d

theorem MonomialOrder.degree_monomial E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {d : σ →₀ ℕ} (c : R)
  [inst_1 : Decidable (c = 0)], m.degree ((MvPolynomial.monomial d) c) = if c = 0 then 0 else d

theorem MonomialOrder.degree_X_le_single E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {s : σ},
  m.toSyn (m.degree (MvPolynomial.X s)) ≤ m.toSyn fun₀ | s => 1

theorem MonomialOrder.degree_X E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [Nontrivial R] {s : σ},
  m.degree (MvPolynomial.X s) = fun₀ | s => 1

theorem MonomialOrder.degree_one E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R], m.degree 1 = 0

theorem MonomialOrder.leadingCoeff_monomial E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {d : σ →₀ ℕ} (c : R),
  m.leadingCoeff ((MvPolynomial.monomial d) c) = c

theorem MonomialOrder.monic_monomial_one E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {d : σ →₀ ℕ},
  m.Monic ((MvPolynomial.monomial d) 1)

theorem MonomialOrder.monic_monomial E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {d : σ →₀ ℕ} {c : R},
  m.Monic ((MvPolynomial.monomial d) c) ↔ c = 1

theorem MonomialOrder.leadingCoeff_X E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {s : σ},
  m.leadingCoeff (MvPolynomial.X s) = 1

theorem MonomialOrder.monic_X E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {s : σ}, m.Monic (MvPolynomial.X s)

theorem MonomialOrder.leadingCoeff_one E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R], m.leadingCoeff 1 = 1

theorem MonomialOrder.monic_C_one E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R], m.Monic (MvPolynomial.C 1)

theorem MonomialOrder.monic_one E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R], m.Monic 1

theorem MonomialOrder.degree_le_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R} {d : σ →₀ ℕ},
  m.toSyn (m.degree f) ≤ m.toSyn d ↔ ∀ c ∈ f.support, m.toSyn c ≤ m.toSyn d

theorem MonomialOrder.degree_lt_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R} {d : σ →₀ ℕ},
  m.toSyn 0 < m.toSyn d → (m.toSyn (m.degree f) < m.toSyn d ↔ ∀ c ∈ f.support, m.toSyn c < m.toSyn d)

theorem MonomialOrder.le_degree E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R} {d : σ →₀ ℕ},
  d ∈ f.support → m.toSyn d ≤ m.toSyn (m.degree f)

theorem MonomialOrder.coeff_eq_zero_of_lt E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R} {d : σ →₀ ℕ},
  m.toSyn (m.degree f) < m.toSyn d → f.coeff d = 0

theorem MonomialOrder.leadingCoeff_ne_zero_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R},
  m.leadingCoeff f ≠ 0 ↔ f ≠ 0

theorem MonomialOrder.leadingCoeff_eq_zero_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R},
  m.leadingCoeff f = 0 ↔ f = 0

theorem MonomialOrder.coeff_degree_ne_zero_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R},
  f.coeff (m.degree f) ≠ 0 ↔ f ≠ 0

theorem MonomialOrder.degree_mem_support_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f : MvPolynomial σ R),
  m.degree f ∈ f.support ↔ f ≠ 0

theorem MonomialOrder.coeff_degree_eq_zero_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R},
  f.coeff (m.degree f) = 0 ↔ f = 0

theorem MonomialOrder.degree_mem_support E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {p : MvPolynomial σ R},
  p ≠ 0 → m.degree p ∈ p.support

theorem MonomialOrder.degree_eq_zero_iff_totalDegree_eq_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R},
  m.degree f = 0 ↔ f.totalDegree = 0

theorem MonomialOrder.degree_C E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (r : R), m.degree (MvPolynomial.C r) = 0

theorem MonomialOrder.leadingCoeff_C E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (c : R),
  m.leadingCoeff (MvPolynomial.C c) = c

theorem MonomialOrder.degree_eq_zero_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R},
  m.degree f = 0 ↔ f = MvPolynomial.C (m.leadingCoeff f)

theorem MonomialOrder.degree_add_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.toSyn (m.degree (f + g)) ≤ max (m.toSyn (m.degree f)) (m.toSyn (m.degree g))

theorem MonomialOrder.degree_sum_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {α : Type u_3} {s : Finset α}
  {f : α → MvPolynomial σ R}, m.toSyn (m.degree (∑ x ∈ s, f x)) ≤ s.sup fun x ↦ m.toSyn (m.degree (f x))

theorem MonomialOrder.degree_add_of_lt E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.toSyn (m.degree g) < m.toSyn (m.degree f) → m.degree (f + g) = m.degree f

theorem MonomialOrder.degree_add_eq_right_of_lt E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.toSyn (m.degree f) < m.toSyn (m.degree g) → m.degree (f + g) = m.degree g

theorem MonomialOrder.leadingCoeff_add_of_lt E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.toSyn (m.degree g) < m.toSyn (m.degree f) → m.leadingCoeff (f + g) = m.leadingCoeff f

theorem MonomialOrder.Monic.add_of_lt E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.Monic f → m.toSyn (m.degree g) < m.toSyn (m.degree f) → m.Monic (f + g)

theorem MonomialOrder.degree_add_of_ne E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.degree f ≠ m.degree g → m.toSyn (m.degree (f + g)) = max (m.toSyn (m.degree f)) (m.toSyn (m.degree g))

theorem MonomialOrder.degree_mul_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.toSyn (m.degree (f * g)) ≤ m.toSyn (m.degree f + m.degree g)

theorem MonomialOrder.coeff_mul_of_add_of_degree_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R} {a b : σ →₀ ℕ},
  m.toSyn (m.degree f) ≤ m.toSyn a → m.toSyn (m.degree g) ≤ m.toSyn b → (f * g).coeff (a + b) = f.coeff a * g.coeff b

Multiplicativity of leading coefficients

theorem MonomialOrder.coeff_mul_of_degree_add E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  (f * g).coeff (m.degree f + m.degree g) = m.leadingCoeff f * m.leadingCoeff g

Multiplicativity of leading coefficients

theorem MonomialOrder.degree_mul_of_mul_leadingCoeff_ne_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.leadingCoeff f * m.leadingCoeff g ≠ 0 → m.degree (f * g) = m.degree f + m.degree g

Monomial degree of product

theorem MonomialOrder.leadingCoeff_mul_of_mul_leadingCoeff_ne_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.leadingCoeff f * m.leadingCoeff g ≠ 0 → m.leadingCoeff (f * g) = m.leadingCoeff f * m.leadingCoeff g

Multiplicativity of leading coefficients

theorem MonomialOrder.degree_mul_of_left_mem_nonZeroDivisors E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.leadingCoeff f ∈ nonZeroDivisors R → g ≠ 0 → m.degree (f * g) = m.degree f + m.degree g

theorem MonomialOrder.degree_mul_of_right_mem_nonZeroDivisors E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  f ≠ 0 → m.leadingCoeff g ∈ nonZeroDivisors R → m.degree (f * g) = m.degree f + m.degree g

theorem MonomialOrder.leadingCoeff_mul_of_left_mem_nonZeroDivisors E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.leadingCoeff f ∈ nonZeroDivisors R → m.leadingCoeff (f * g) = m.leadingCoeff f * m.leadingCoeff g

theorem MonomialOrder.leadingCoeff_mul_of_right_mem_nonZeroDivisors E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.leadingCoeff g ∈ nonZeroDivisors R → m.leadingCoeff (f * g) = m.leadingCoeff f * m.leadingCoeff g

theorem MonomialOrder.degree_mul_of_isRegular_left E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  IsRegular (m.leadingCoeff f) → g ≠ 0 → m.degree (f * g) = m.degree f + m.degree g

Monomial degree of product

theorem MonomialOrder.leadingCoeff_mul_of_isRegular_left E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  IsRegular (m.leadingCoeff f) → m.leadingCoeff (f * g) = m.leadingCoeff f * m.leadingCoeff g

Multiplicativity of leading coefficients

theorem MonomialOrder.degree_mul_of_isRegular_right E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  f ≠ 0 → IsRegular (m.leadingCoeff g) → m.degree (f * g) = m.degree f + m.degree g

Monomial degree of product

theorem MonomialOrder.leadingCoeff_mul_of_isRegular_right E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  IsRegular (m.leadingCoeff g) → m.leadingCoeff (f * g) = m.leadingCoeff f * m.leadingCoeff g

Multiplicativity of leading coefficients

theorem MonomialOrder.Monic.mul E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.Monic f → m.Monic g → m.Monic (f * g)

theorem MonomialOrder.degree_mul E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [NoZeroDivisors R]
  {f g : MvPolynomial σ R}, f ≠ 0 → g ≠ 0 → m.degree (f * g) = m.degree f + m.degree g

Monomial degree of product

theorem MonomialOrder.leadingCoeff_mul E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [NoZeroDivisors R]
  {f g : MvPolynomial σ R}, m.leadingCoeff (f * g) = m.leadingCoeff f * m.leadingCoeff g

Multiplicativity of leading coefficients

theorem MonomialOrder.degree_pow_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R} (n : ℕ),
  m.toSyn (m.degree (f ^ n)) ≤ m.toSyn (n • m.degree f)

Monomial degree of powers

theorem MonomialOrder.coeff_pow_nsmul_degree E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f : MvPolynomial σ R) (n : ℕ),
  (f ^ n).coeff (n • m.degree f) = m.leadingCoeff f ^ n

theorem MonomialOrder.degree_pow_of_pow_leadingCoeff_ne_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R} {n : ℕ},
  m.leadingCoeff f ^ n ≠ 0 → m.degree (f ^ n) = n • m.degree f

Monomial degree of powers

theorem MonomialOrder.leadingCoeff_pow_of_pow_leadingCoeff_ne_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R} {n : ℕ},
  m.leadingCoeff f ^ n ≠ 0 → m.leadingCoeff (f ^ n) = m.leadingCoeff f ^ n

Leading coefficient of powers

theorem MonomialOrder.leadingTerm_pow_of_pow_leadingCoeff_ne_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R} {n : ℕ},
  m.leadingCoeff f ^ n ≠ 0 → m.leadingTerm (f ^ n) = m.leadingTerm f ^ n

Leading term of powers

theorem MonomialOrder.Monic.pow E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R} {n : ℕ},
  m.Monic f → m.Monic (f ^ n)

theorem MonomialOrder.degree_pow_of_not_isNilpotent E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R} (n : ℕ),
  ¬IsNilpotent (m.leadingCoeff f) → m.degree (f ^ n) = n • m.degree f

Monomial degree of powers (when the leading term is not nilpotent)

theorem MonomialOrder.leadingCoeff_pow_of_not_isNilpotent E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R} (n : ℕ),
  ¬IsNilpotent (m.leadingCoeff f) → m.leadingCoeff (f ^ n) = m.leadingCoeff f ^ n

Leading coefficient of powers (when the leading term is not nilpotent)

theorem MonomialOrder.leadingTerm_pow_of_not_isNilpotent E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R} (n : ℕ),
  ¬IsNilpotent (m.leadingCoeff f) → m.leadingTerm (f ^ n) = m.leadingTerm f ^ n

Leading term of powers (when the leading term is not nilpotent)

theorem MonomialOrder.degree_pow E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [IsReduced R] (f : MvPolynomial σ R)
  (n : ℕ), m.degree (f ^ n) = n • m.degree f

Monomial degree of powers (in a reduced ring)

theorem MonomialOrder.leadingCoeff_pow E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [IsReduced R] (f : MvPolynomial σ R)
  (n : ℕ), m.leadingCoeff (f ^ n) = m.leadingCoeff f ^ n

Leading coefficient of powers (in a reduced ring)

theorem MonomialOrder.leadingTerm_pow E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [IsReduced R] (f : MvPolynomial σ R)
  (n : ℕ), m.leadingTerm (f ^ n) = m.leadingTerm f ^ n

Leading term of powers (in a reduced ring)

theorem MonomialOrder.degree_smul_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {r : R} {f : MvPolynomial σ R},
  m.toSyn (m.degree (r • f)) ≤ m.toSyn (m.degree f)

theorem MonomialOrder.degree_smul_of_mem_nonZeroDivisors E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {r : R},
  r ∈ nonZeroDivisors R → ∀ {f : MvPolynomial σ R}, m.degree (r • f) = m.degree f

theorem MonomialOrder.degree_smul_of_isRegular E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {r : R},
  IsRegular r → ∀ {f : MvPolynomial σ R}, m.degree (r • f) = m.degree f

theorem MonomialOrder.degree_prod_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {ι : Type u_3} {P : ι → MvPolynomial σ R}
  {s : Finset ι}, m.toSyn (m.degree (∏ i ∈ s, P i)) ≤ m.toSyn (∑ i ∈ s, m.degree (P i))

theorem MonomialOrder.coeff_prod_sum_degree E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {ι : Type u_3} (P : ι → MvPolynomial σ R)
  (s : Finset ι), (∏ i ∈ s, P i).coeff (∑ i ∈ s, m.degree (P i)) = ∏ i ∈ s, m.leadingCoeff (P i)

theorem MonomialOrder.degree_prod_of_mem_nonZeroDivisors E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {ι : Type u_3} {P : ι → MvPolynomial σ R}
  {s : Finset ι},
  (∀ i ∈ s, m.leadingCoeff (P i) ∈ nonZeroDivisors R) → m.degree (∏ i ∈ s, P i) = ∑ i ∈ s, m.degree (P i)

theorem MonomialOrder.degree_prod_of_regular E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {ι : Type u_3} {P : ι → MvPolynomial σ R}
  {s : Finset ι}, (∀ i ∈ s, IsRegular (m.leadingCoeff (P i))) → m.degree (∏ i ∈ s, P i) = ∑ i ∈ s, m.degree (P i)

theorem MonomialOrder.degree_prod E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [NoZeroDivisors R] {ι : Type u_3}
  {P : ι → MvPolynomial σ R} {s : Finset ι}, (∀ i ∈ s, P i ≠ 0) → m.degree (∏ i ∈ s, P i) = ∑ i ∈ s, m.degree (P i)

theorem MonomialOrder.degree_mul' E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [NoZeroDivisors R]
  {f g : MvPolynomial σ R}, f * g ≠ 0 → m.degree (f * g) = m.degree f + m.degree g

theorem MonomialOrder.notMem_support_of_degree_lt E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.toSyn (m.degree f) < m.toSyn (m.degree g) → m.degree g ∉ f.support

theorem MonomialOrder.leadingCoeff_prod_of_mem_nonZeroDivisors E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {ι : Type u_3} {P : ι → MvPolynomial σ R}
  {s : Finset ι},
  (∀ i ∈ s, m.leadingCoeff (P i) ∈ nonZeroDivisors R) → m.leadingCoeff (∏ i ∈ s, P i) = ∏ i ∈ s, m.leadingCoeff (P i)

theorem MonomialOrder.leadingCoeff_prod_of_regular E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {ι : Type u_3} {P : ι → MvPolynomial σ R}
  {s : Finset ι},
  (∀ i ∈ s, IsRegular (m.leadingCoeff (P i))) → m.leadingCoeff (∏ i ∈ s, P i) = ∏ i ∈ s, m.leadingCoeff (P i)

theorem MonomialOrder.Monic.prod E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {ι : Type u_3} {P : ι → MvPolynomial σ R}
  {s : Finset ι}, (∀ i ∈ s, m.Monic (P i)) → m.Monic (∏ i ∈ s, P i)

A product of monic polynomials is monic

theorem MonomialOrder.leadingTerm_eq_zero_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (p : MvPolynomial σ R),
  m.leadingTerm p = 0 ↔ p = 0

The leading term in a multivariate polynomial is zero if and only if this polynomial is zero.

theorem MonomialOrder.leadingTerm_zero E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R], m.leadingTerm 0 = 0

The leading term of the zero polynomial is zero

theorem MonomialOrder.leadingTerm_one E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R], m.leadingTerm 1 = 1

theorem MonomialOrder.leadingTerm_of_subsingleton E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [Subsingleton R] {f : MvPolynomial σ R},
  m.leadingTerm f = f

theorem MonomialOrder.image_leadingTerm_sdiff_singleton_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (B : Set (MvPolynomial σ R)),
  m.leadingTerm '' (B \ {0}) = m.leadingTerm '' B \ {0}

The set of leading terms of non-zero polynomials within a set B is equal to the set of leading terms of all polynomials within B, excluding zero.

theorem MonomialOrder.image_leadingTerm_insert_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (B : Set (MvPolynomial σ R)),
  m.leadingTerm '' insert 0 B = insert 0 (m.leadingTerm '' B)

The set of leading terms of zero and polynomials within a set B is equal to the set of zero and leading terms of polynomials within B.

theorem MonomialOrder.degree_leadingTerm E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f : MvPolynomial σ R),
  m.degree (m.leadingTerm f) = m.degree f

The degree of f equals to the degree of leadingTerm f

theorem MonomialOrder.leadingCoeff_leadingTerm E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f : MvPolynomial σ R),
  m.leadingCoeff (m.leadingTerm f) = m.leadingCoeff f

theorem MonomialOrder.leadingTerm_leadingTerm E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f : MvPolynomial σ R),
  m.leadingTerm (m.leadingTerm f) = m.leadingTerm f

theorem MonomialOrder.leadingTerm_C E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (c : R),
  m.leadingTerm (MvPolynomial.C c) = MvPolynomial.C c

theorem MonomialOrder.leadingTerm_monomial E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (s : σ →₀ ℕ) (c : R),
  m.leadingTerm ((MvPolynomial.monomial s) c) = (MvPolynomial.monomial s) c

theorem MonomialOrder.leadingTerm_X E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {s : σ},
  m.leadingTerm (MvPolynomial.X s) = MvPolynomial.X s

theorem MonomialOrder.degree_leadingTerm_mul E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [NoZeroDivisors R]
  (p q : MvPolynomial σ R), m.degree (m.leadingTerm p * q) = m.degree (p * q)

theorem MonomialOrder.degree_mul_leadingTerm E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [NoZeroDivisors R]
  (p q : MvPolynomial σ R), m.degree (p * m.leadingTerm q) = m.degree (p * q)

theorem MonomialOrder.degree_lt_of_left_ne_zero_of_degree_mul_lt E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [NoZeroDivisors R]
  {p p' q : MvPolynomial σ R},
  p ≠ 0 → m.toSyn (m.degree (p * q)) < m.toSyn (m.degree (p' * q)) → m.toSyn (m.degree p) < m.toSyn (m.degree p')

theorem MonomialOrder.degree_mul_lt_iff_left_lt_of_ne_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [NoZeroDivisors R]
  {p p' q : MvPolynomial σ R},
  p ≠ 0 →
    q ≠ 0 → (m.toSyn (m.degree (p * q)) < m.toSyn (m.degree (p' * q)) ↔ m.toSyn (m.degree p) < m.toSyn (m.degree p'))

theorem MonomialOrder.monic_leadingTerm E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (p : MvPolynomial σ R),
  m.Monic (m.leadingTerm p) ↔ m.Monic p

theorem MonomialOrder.support_leadingTerm E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (p : MvPolynomial σ R)
  [inst_1 : Decidable (p = 0)], (m.leadingTerm p).support = if p = 0 then ∅ else {m.degree p}

theorem MonomialOrder.support_leadingTerm' E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {p : MvPolynomial σ R},
  p ≠ 0 → (m.leadingTerm p).support = {m.degree p}

theorem MonomialOrder.le_degree_of_mem_support E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {p : MvPolynomial σ R} {a : σ →₀ ℕ},
  a ∈ p.support → m.toSyn a ≤ m.toSyn (m.degree p)

theorem MonomialOrder.leadingTerm_eq_leadingTerm_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {p q : MvPolynomial σ R},
  m.leadingTerm p = m.leadingTerm q ↔ m.leadingCoeff p = m.leadingCoeff q ∧ m.degree p = m.degree q

theorem MonomialOrder.leadingTerm_mul_of_mul_leadingCoeff_ne_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.leadingCoeff f * m.leadingCoeff g ≠ 0 → m.leadingTerm (f * g) = m.leadingTerm f * m.leadingTerm g

Multiplicativity of leading terms

theorem MonomialOrder.leadingTerm_mul_of_left_mem_nonZeroDivisors E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.leadingCoeff f ∈ nonZeroDivisors R → m.leadingTerm (f * g) = m.leadingTerm f * m.leadingTerm g

theorem MonomialOrder.leadingTerm_mul_of_right_mem_nonZeroDivisors E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.leadingCoeff g ∈ nonZeroDivisors R → m.leadingTerm (f * g) = m.leadingTerm f * m.leadingTerm g

theorem MonomialOrder.leadingTerm_mul_of_isRegular_left E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  IsRegular (m.leadingCoeff f) → m.leadingTerm (f * g) = m.leadingTerm f * m.leadingTerm g

theorem MonomialOrder.leadingTerm_mul_of_isRegular_right E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  IsRegular (m.leadingCoeff g) → m.leadingTerm (f * g) = m.leadingTerm f * m.leadingTerm g

theorem MonomialOrder.leadingTerm_mul E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [NoZeroDivisors R]
  (p q : MvPolynomial σ R), m.leadingTerm (p * q) = m.leadingTerm p * m.leadingTerm q

theorem MonomialOrder.leadingTerm_prod_of_mem_nonZeroDivisors E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {ι : Type u_3} {P : ι → MvPolynomial σ R}
  {s : Finset ι},
  (∀ i ∈ s, m.leadingCoeff (P i) ∈ nonZeroDivisors R) → m.leadingTerm (∏ i ∈ s, P i) = ∏ i ∈ s, m.leadingTerm (P i)

theorem MonomialOrder.leadingTerm_prod_of_regular E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {ι : Type u_3} {P : ι → MvPolynomial σ R}
  {s : Finset ι},
  (∀ i ∈ s, IsRegular (m.leadingCoeff (P i))) → m.leadingTerm (∏ i ∈ s, P i) = ∏ i ∈ s, m.leadingTerm (P i)

theorem MonomialOrder.leadingTerm_add_of_lt E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.toSyn (m.degree g) < m.toSyn (m.degree f) → m.leadingTerm (f + g) = m.leadingTerm f

theorem MonomialOrder.monic_of_subsingleton E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [Subsingleton R] (p : MvPolynomial σ R),
  m.Monic p

theorem MonomialOrder.degree_le_degree_of_support_subset E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {p q : MvPolynomial σ R},
  p.support ⊆ q.support → m.toSyn (m.degree p) ≤ m.toSyn (m.degree q)

theorem MonomialOrder.toSyn_degree_mul_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.toSyn (m.degree (f * g)) ≤ m.toSyn (m.degree f) + m.toSyn (m.degree g)

theorem MonomialOrder.mem_nonZeroDivisors_of_leadingCoeff_mem_nonZeroDivisors E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R},
  m.leadingCoeff f ∈ nonZeroDivisors R → f ∈ nonZeroDivisors (MvPolynomial σ R)

def MonomialOrder.withBotDegree E1 #

{σ : Type u_1} → MonomialOrder σ → {R : Type u_2} → [inst : CommSemiring R] → MvPolynomial σ R → WithBot (σ →₀ ℕ)

the degree of a multivariate polynomial with respect to a monomial ordering, where polynomial 0 has degree ⊥, which is not equal to 0. MonomialOrder.withBotDegree is to MonomialOrder.degree as Polynomial.degree is to Polynomial.natDegree.

theorem MonomialOrder.withBotDegree_eq E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f : MvPolynomial σ R)
  [inst_1 : Decidable (f = 0)], m.withBotDegree f = if f = 0 then ⊥ else ↑(m.degree f)

theorem MonomialOrder.withBotDegree_eq_coe_degree_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f : MvPolynomial σ R),
  m.withBotDegree f = ↑(m.degree f) ↔ f ≠ 0

theorem MonomialOrder.withBotDegree_eq_bot_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f : MvPolynomial σ R),
  m.withBotDegree f = ⊥ ↔ f = 0

theorem MonomialOrder.degree_eq_unbotD_withBotDegree E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f : MvPolynomial σ R),
  m.degree f = WithBot.unbotD 0 (m.withBotDegree f)

theorem MonomialOrder.withBotDegree_zero E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R], m.withBotDegree 0 = ⊥

theorem MonomialOrder.withBotDegree_monomial E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (d : σ →₀ ℕ) (c : R)
  [inst_1 : Decidable (c = 0)], m.withBotDegree ((MvPolynomial.monomial d) c) = if c = 0 then ⊥ else ↑d

theorem MonomialOrder.withBotDegree_C E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (c : R) [inst_1 : Decidable (c = 0)],
  m.withBotDegree (MvPolynomial.C c) = if c = 0 then ⊥ else 0

theorem MonomialOrder.withBotDegree_leadingTerm E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f : MvPolynomial σ R),
  m.withBotDegree (m.leadingTerm f) = m.withBotDegree f

theorem MonomialOrder.withBotDegree_one E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] [Nontrivial R], m.withBotDegree 1 = 0

theorem MonomialOrder.withBotDegree_mul_of_left_mem_nonZeroDivisors E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.leadingCoeff f ∈ nonZeroDivisors R → m.withBotDegree (f * g) = m.withBotDegree f + m.withBotDegree g

theorem MonomialOrder.withBotDegree_mul_of_right_mem_nonZeroDivisors E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.leadingCoeff g ∈ nonZeroDivisors R → m.withBotDegree (f * g) = m.withBotDegree f + m.withBotDegree g

theorem MonomialOrder.withBotDegree_mul E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f g : MvPolynomial σ R)
  [NoZeroDivisors R], m.withBotDegree (f * g) = m.withBotDegree f + m.withBotDegree g

theorem MonomialOrder.withBotDegree_mul_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f g : MvPolynomial σ R),
  m.toWithBotSyn (m.withBotDegree (f * g)) ≤ m.toWithBotSyn (m.withBotDegree f + m.withBotDegree g)

theorem MonomialOrder.toWithBotSyn_withBotDegree_mul_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f g : MvPolynomial σ R),
  m.toWithBotSyn (m.withBotDegree (f * g)) ≤ m.toWithBotSyn (m.withBotDegree f) + m.toWithBotSyn (m.withBotDegree g)

theorem MonomialOrder.withBotDegree_le_withBotDegree_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f g : MvPolynomial σ R),
  m.toWithBotSyn (m.withBotDegree f) ≤ m.toWithBotSyn (m.withBotDegree g) ↔
    m.toSyn (m.degree f) ≤ m.toSyn (m.degree g) ∧ (g = 0 → f = 0)

theorem MonomialOrder.withBotDegree_le_withBotDegree_iff_of_ne_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f : MvPolynomial σ R)
  {g : MvPolynomial σ R},
  g ≠ 0 →
    (m.toWithBotSyn (m.withBotDegree f) ≤ m.toWithBotSyn (m.withBotDegree g) ↔
      m.toSyn (m.degree f) ≤ m.toSyn (m.degree g))

theorem MonomialOrder.withBotDegree_lt_withBotDegree_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f g : MvPolynomial σ R),
  m.toWithBotSyn (m.withBotDegree f) < m.toWithBotSyn (m.withBotDegree g) ↔
    m.toSyn (m.degree f) < m.toSyn (m.degree g) ∨ f = 0 ∧ g ≠ 0

theorem MonomialOrder.withBotDegree_lt_withBotDegree_iff_of_ne_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R}
  (g : MvPolynomial σ R),
  f ≠ 0 →
    (m.toWithBotSyn (m.withBotDegree f) < m.toWithBotSyn (m.withBotDegree g) ↔
      m.toSyn (m.degree f) < m.toSyn (m.degree g))

theorem MonomialOrder.withBotDegree_eq_withBotDegree_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f g : MvPolynomial σ R),
  m.withBotDegree f = m.withBotDegree g ↔ m.degree f = m.degree g ∧ (f = 0 ↔ g = 0)

theorem MonomialOrder.withBotDegree_add_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] (f g : MvPolynomial σ R),
  m.toWithBotSyn (m.withBotDegree (f + g)) ≤
    max (m.toWithBotSyn (m.withBotDegree f)) (m.toWithBotSyn (m.withBotDegree g))

theorem MonomialOrder.withBotDegree_add_of_lt E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.toWithBotSyn (m.withBotDegree g) < m.toWithBotSyn (m.withBotDegree f) → m.withBotDegree (f + g) = m.withBotDegree f

theorem MonomialOrder.withBotDegree_add_of_right_lt E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  m.toWithBotSyn (m.withBotDegree f) < m.toWithBotSyn (m.withBotDegree g) → m.withBotDegree (f + g) = m.withBotDegree g

theorem MonomialOrder.withBotDegree_sum_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {α : Type u_3} {s : Finset α}
  {f : α → MvPolynomial σ R},
  m.toWithBotSyn (m.withBotDegree (∑ x ∈ s, f x)) ≤ s.sup fun x ↦ m.toWithBotSyn (m.withBotDegree (f x))

theorem MonomialOrder.le_withBotDegree E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f : MvPolynomial σ R} {d : σ →₀ ℕ},
  d ∈ f.support → m.toWithBotSyn ↑d ≤ m.toWithBotSyn (m.withBotDegree f)

theorem MonomialOrder.withBotDegree_le_withBotDegree_of_support_subset E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommSemiring R] {f g : MvPolynomial σ R},
  f.support ⊆ g.support → m.toWithBotSyn (m.withBotDegree f) ≤ m.toWithBotSyn (m.withBotDegree g)

def MonomialOrder.sPolynomial E1 #

{σ : Type u_1} →
  MonomialOrder σ → {R : Type u_2} → [inst : CommRing R] → MvPolynomial σ R → MvPolynomial σ R → MvPolynomial σ R

The S-polynomial of two polynomials.

Denoting

  • the leading monomial of polynomial $f$ and $g$ as $lm(f)$ and $lm(g)$,
  • the leading coefficient of $f$ and $g$ as $lc(f)$ and $lc(g)$ (formalized as m.leadingCoeff f and m.leadingCoeff g), and
  • the least common multiple of $lm(f)$ and $lm(g)$ as $lcm(lm(f),lm(g))$,

the S-polynomial of $f$ and $g$ is defined as $$sPoly(f,g) := (lcm(lm(f),lm(g)) / lm(f)) * lc(g) * f - (lcm(lm(f),lm(g)) / lm(g)) * lc(f) * g.$$

$(lcm(lm(f),lm(g)) / lm(f))$ and $lcm(lm(f),lm(g)) / lm(g)$ is formalized as monomial (m.degree g - m.degree f) 1 and monomial (m.degree g - m.degree f) 1, while there is also another more direct formalization in sPolynomial_def.

Notice that, when the polynomial ring is over a field, S-polynomial is usually defined as $$sPoly'(f,g) := (lcm(lm(f),lm(g)) / (lm(f) * lc(f))) * f - (lcm(lm(f),lm(g)) / (lm(g) * lc(g))) * g,$$ while we avoid inverting $lc(f)$ and $lc(g)$ in this formalization so that it doesn't require a field or units (IsUnit) over ring.

An equality between these two versions holds: $$sPoly(f,g) = lc(f) * lc(g) * sPoly'(f,g).$$

theorem MonomialOrder.sPolynomial_def E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] (f g : MvPolynomial σ R),
  m.sPolynomial f g =
    (MvPolynomial.monomial (m.degree f ⊔ m.degree g - m.degree f)) (m.leadingCoeff g) * f -
      (MvPolynomial.monomial (m.degree f ⊔ m.degree g - m.degree g)) (m.leadingCoeff f) * g

theorem MonomialOrder.degree_ne_zero_of_sub_leadingTerm_ne_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] {f : MvPolynomial σ R},
  f - m.leadingTerm f ≠ 0 → m.degree f ≠ 0

theorem MonomialOrder.degree_neg E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] {f : MvPolynomial σ R},
  m.degree (-f) = m.degree f

theorem MonomialOrder.leadingCoeff_neg E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] {f : MvPolynomial σ R},
  m.leadingCoeff (-f) = -m.leadingCoeff f

theorem MonomialOrder.leadingTerm_neg E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] {f : MvPolynomial σ R},
  m.leadingTerm (-f) = -m.leadingTerm f

theorem MonomialOrder.degree_sub_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] {f g : MvPolynomial σ R},
  m.toSyn (m.degree (f - g)) ≤ max (m.toSyn (m.degree f)) (m.toSyn (m.degree g))

theorem MonomialOrder.degree_sub_of_lt E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] {f g : MvPolynomial σ R},
  m.toSyn (m.degree g) < m.toSyn (m.degree f) → m.degree (f - g) = m.degree f

theorem MonomialOrder.leadingCoeff_sub_of_lt E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] {f g : MvPolynomial σ R},
  m.toSyn (m.degree g) < m.toSyn (m.degree f) → m.leadingCoeff (f - g) = m.leadingCoeff f

theorem MonomialOrder.leadingTerm_sub_of_lt E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] {f g : MvPolynomial σ R},
  m.toSyn (m.degree g) < m.toSyn (m.degree f) → m.leadingTerm (f - g) = m.leadingTerm f

theorem MonomialOrder.degree_sub_leadingTerm_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] (f : MvPolynomial σ R),
  m.toSyn (m.degree (f - m.leadingTerm f)) ≤ m.toSyn (m.degree f)

theorem MonomialOrder.degree_sub_leadingTerm_lt_degree E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] {f : MvPolynomial σ R},
  m.degree f ≠ 0 → m.toSyn (m.degree (f - m.leadingTerm f)) < m.toSyn (m.degree f)

theorem MonomialOrder.degree_sub_leadingTerm_lt_iff E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] {f : MvPolynomial σ R},
  m.toSyn (m.degree (f - m.leadingTerm f)) < m.toSyn (m.degree f) ↔ m.degree f ≠ 0

theorem MonomialOrder.sPolynomial_antisymm E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] (f g : MvPolynomial σ R),
  m.sPolynomial f g = -m.sPolynomial g f

theorem MonomialOrder.sPolynomial_left_zero E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] (g : MvPolynomial σ R), m.sPolynomial 0 g = 0

theorem MonomialOrder.sPolynomial_right_zero E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] (f : MvPolynomial σ R), m.sPolynomial f 0 = 0

theorem MonomialOrder.sPolynomial_self E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] (f : MvPolynomial σ R), m.sPolynomial f f = 0

theorem MonomialOrder.degree_sPolynomial_le E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] (f g : MvPolynomial σ R),
  m.toSyn (m.degree (m.sPolynomial f g)) ≤ m.toSyn (m.degree f ⊔ m.degree g)

theorem MonomialOrder.coeff_sPolynomial_sup_eq_zero E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] (f g : MvPolynomial σ R),
  (m.sPolynomial f g).coeff (m.degree f ⊔ m.degree g) = 0

theorem MonomialOrder.degree_sPolynomial E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] (f g : MvPolynomial σ R),
  m.toSyn (m.degree (m.sPolynomial f g)) < m.toSyn (m.degree f ⊔ m.degree g) ∨ m.sPolynomial f g = 0

theorem MonomialOrder.degree_sPolynomial_lt_sup_degree E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] {f g : MvPolynomial σ R},
  m.sPolynomial f g ≠ 0 → m.toSyn (m.degree (m.sPolynomial f g)) < m.toSyn (m.degree f ⊔ m.degree g)

theorem MonomialOrder.sPolynomial_lt_of_degree_ne_zero_of_degree_eq E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] {f g : MvPolynomial σ R},
  m.degree f = m.degree g → m.sPolynomial f g ≠ 0 → m.toSyn (m.degree (m.sPolynomial f g)) < m.toSyn (m.degree f)

theorem MonomialOrder.sPolynomial_monomial_mul E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] [NoZeroDivisors R] (p₁ p₂ : MvPolynomial σ R)
  (d₁ d₂ : σ →₀ ℕ) (c₁ c₂ : R),
  m.sPolynomial ((MvPolynomial.monomial d₁) c₁ * p₁) ((MvPolynomial.monomial d₂) c₂ * p₂) =
    (MvPolynomial.monomial ((d₁ + m.degree p₁) ⊔ (d₂ + m.degree p₂) - m.degree p₁ ⊔ m.degree p₂)) (c₁ * c₂) *
      m.sPolynomial p₁ p₂

theorem MonomialOrder.sPolynomial_monomial_mul' E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] [NoZeroDivisors R] (p₁ p₂ : MvPolynomial σ R)
  (d₁ d₂ : σ →₀ ℕ) (c₁ c₂ : R),
  m.sPolynomial ((MvPolynomial.monomial d₁) c₁ * p₁) ((MvPolynomial.monomial d₂) c₂ * p₂) =
    (MvPolynomial.monomial
          (m.degree ((MvPolynomial.monomial d₁) c₁ * p₁) ⊔ m.degree ((MvPolynomial.monomial d₂) c₂ * p₂) -
            m.degree p₁ ⊔ m.degree p₂))
        (c₁ * c₂) *
      m.sPolynomial p₁ p₂

theorem MonomialOrder.sPolynomial_leadingTerm_mul E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] [NoZeroDivisors R]
  (p₁ p₂ q₁ q₂ : MvPolynomial σ R),
  m.sPolynomial (m.leadingTerm p₁ * q₁) (m.leadingTerm p₂ * q₂) =
    (MvPolynomial.monomial ((m.degree p₁ + m.degree q₁) ⊔ (m.degree p₂ + m.degree q₂) - m.degree q₁ ⊔ m.degree q₂))
        (m.leadingCoeff p₁ * m.leadingCoeff p₂) *
      m.sPolynomial q₁ q₂

theorem MonomialOrder.sPolynomial_leadingTerm_mul' E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] [NoZeroDivisors R]
  (p₁ p₂ q₁ q₂ : MvPolynomial σ R),
  m.sPolynomial (m.leadingTerm p₁ * q₁) (m.leadingTerm p₂ * q₂) =
    (MvPolynomial.monomial (m.degree (p₁ * q₁) ⊔ m.degree (p₂ * q₂) - m.degree q₁ ⊔ m.degree q₂))
        (m.leadingCoeff p₁ * m.leadingCoeff p₂) *
      m.sPolynomial q₁ q₂

theorem MonomialOrder.sPolynomial_decomposition E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] {d : m.syn} {ι : Type u_3} {B : Finset ι}
  {g : ι → MvPolynomial σ R},
  (∀ b ∈ B, m.toSyn (m.degree (g b)) = d ∧ IsUnit (m.leadingCoeff (g b)) ∨ g b = 0) →
    m.toSyn (m.degree (∑ b ∈ B, g b)) < d →
      ∃ c, ∑ b ∈ B, g b = ∑ b₁ ∈ B, ∑ b₂ ∈ B, c b₁ b₂ • m.sPolynomial (g b₁) (g b₂)

theorem MonomialOrder.withBotDegree_neg E0 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : CommRing R] (f : MvPolynomial σ R),
  m.withBotDegree (-f) = m.withBotDegree f

theorem MonomialOrder.isUnit_leadingCoeff E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : Field R] {f : MvPolynomial σ R},
  IsUnit (m.leadingCoeff f) ↔ f ≠ 0

theorem MonomialOrder.sPolynomial_decomposition' E1 #

∀ {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [inst : Field R] {d : m.syn} {ι : Type u_3} {B : Finset ι}
  (g : ι → MvPolynomial σ R),
  (∀ b ∈ B, m.toSyn (m.degree (g b)) = d ∨ g b = 0) →
    m.toSyn (m.degree (∑ b ∈ B, g b)) < d →
      ∃ c, ∑ b ∈ B, g b = ∑ b₁ ∈ B, ∑ b₂ ∈ B, c b₁ b₂ • m.sPolynomial (g b₁) (g b₂)

theorem MonomialOrder.degree_X_add_C E1 #

∀ {R : Type u_2} [inst : CommRing R] [Nontrivial R] {ι : Type u_3} (m : MonomialOrder ι) (i : ι) (r : R),
  m.degree (MvPolynomial.X i + MvPolynomial.C r) = fun₀ | i => 1

theorem MonomialOrder.degree_X_sub_C E1 #

∀ {R : Type u_2} [inst : CommRing R] [Nontrivial R] {ι : Type u_3} (m : MonomialOrder ι) (i : ι) (r : R),
  m.degree (MvPolynomial.X i - MvPolynomial.C r) = fun₀ | i => 1

theorem MonomialOrder.monic_X_add_C E1 #

∀ {R : Type u_2} [inst : CommRing R] {ι : Type u_3} (m : MonomialOrder ι) (i : ι) (r : R),
  m.Monic (MvPolynomial.X i + MvPolynomial.C r)

theorem MonomialOrder.monic_X_sub_C E1 #

∀ {R : Type u_2} [inst : CommRing R] {ι : Type u_3} (m : MonomialOrder ι) (i : ι) (r : R),
  m.Monic (MvPolynomial.X i - MvPolynomial.C r)

Deprecated aliases

NameNew nameSince
MonomialOrder.degree_subsingletonMonomialOrder.degree_of_subsingleton2026-08-16