Documentation

Mathlib.RingTheory.MvPolynomial.MonomialOrder

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 σ.

Reference #

[Becker-Weispfenning1993]

noncomputable def MonomialOrder.degree {σ : Type u_1} (m : MonomialOrder σ) {R : Type u_2} [CommSemiring R] (f : MvPolynomial σ R) :

the degree of a multivariate polynomial with respect to a monomial ordering

Equations
Instances For
    noncomputable def MonomialOrder.leadingCoeff {σ : Type u_1} (m : MonomialOrder σ) {R : Type u_2} [CommSemiring R] (f : MvPolynomial σ R) :
    R

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

    Equations
    Instances For
      def MonomialOrder.Monic {σ : Type u_1} (m : MonomialOrder σ) {R : Type u_2} [CommSemiring R] (f : MvPolynomial σ R) :

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

      Equations
      Instances For
        noncomputable def MonomialOrder.leadingTerm {σ : Type u_1} (m : MonomialOrder σ) {R : Type u_2} [CommSemiring R] (f : MvPolynomial σ R) :

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

        Equations
        Instances For
          theorem MonomialOrder.Monic.of_subsingleton {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [Subsingleton R] {f : MvPolynomial σ R} :
          m.Monic f
          @[instance_reducible]
          noncomputable instance MonomialOrder.Monic.decidable {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [DecidableEq R] (f : MvPolynomial σ R) :
          Equations
          @[simp]
          theorem MonomialOrder.Monic.leadingCoeff_eq_one {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f : MvPolynomial σ R} (hf : m.Monic f) :
          theorem MonomialOrder.Monic.coeff_degree {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f : MvPolynomial σ R} (hf : m.Monic f) :
          @[simp]
          theorem MonomialOrder.degree_zero {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] :
          m.degree 0 = 0
          theorem MonomialOrder.ne_zero_of_degree_ne_zero {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f : MvPolynomial σ R} (h : m.degree f ≠ 0) :
          f ≠ 0
          @[simp]
          theorem MonomialOrder.degree_subsingleton {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [Subsingleton R] {f : MvPolynomial σ R} :
          m.degree f = 0
          @[simp]
          theorem MonomialOrder.leadingCoeff_zero {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] :
          theorem MonomialOrder.Monic.ne_zero {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [Nontrivial R] {f : MvPolynomial σ R} (hf : m.Monic f) :
          f ≠ 0
          theorem MonomialOrder.degree_monomial_le {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {d : σ →₀ ℕ} (c : R) :
          theorem MonomialOrder.degree_monomial {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {d : σ →₀ ℕ} (c : R) [Decidable (c = 0)] :
          theorem MonomialOrder.degree_X_le_single {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {s : σ} :
          theorem MonomialOrder.degree_X {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [Nontrivial R] {s : σ} :
          @[simp]
          theorem MonomialOrder.degree_one {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] :
          m.degree 1 = 0
          @[simp]
          theorem MonomialOrder.leadingCoeff_monomial {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {d : σ →₀ ℕ} (c : R) :
          @[simp]
          theorem MonomialOrder.monic_monomial_one {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {d : σ →₀ ℕ} :
          theorem MonomialOrder.monic_monomial {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {d : σ →₀ ℕ} {c : R} :
          theorem MonomialOrder.leadingCoeff_X {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {s : σ} :
          @[simp]
          theorem MonomialOrder.monic_X {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {s : σ} :
          theorem MonomialOrder.leadingCoeff_one {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] :
          @[simp]
          theorem MonomialOrder.monic_one {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] :
          m.Monic 1
          theorem MonomialOrder.degree_le_iff {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f : MvPolynomial σ R} {d : σ →₀ ℕ} (hd : 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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f : MvPolynomial σ R} {d : σ →₀ ℕ} (hd : d ∈ f.support) :
          m.toSyn d ≤ m.toSyn (m.degree f)
          theorem MonomialOrder.coeff_eq_zero_of_lt {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f : MvPolynomial σ R} {d : σ →₀ ℕ} (hd : m.toSyn (m.degree f) < m.toSyn d) :
          @[simp]
          theorem MonomialOrder.leadingCoeff_eq_zero_iff {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f : MvPolynomial σ R} :
          m.leadingCoeff f = 0 ↔ f = 0
          theorem MonomialOrder.degree_mem_support_iff {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] (f : MvPolynomial σ R) :
          @[simp]
          theorem MonomialOrder.coeff_degree_eq_zero_iff {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f : MvPolynomial σ R} :
          theorem MonomialOrder.degree_mem_support {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {p : MvPolynomial σ R} (hp : p ≠ 0) :
          @[simp]
          theorem MonomialOrder.degree_C {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] (r : R) :
          @[simp]
          theorem MonomialOrder.leadingCoeff_C {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] (c : R) :
          theorem MonomialOrder.eq_C_of_degree_eq_zero {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f : MvPolynomial σ R} (hf : m.degree f = 0) :
          theorem MonomialOrder.degree_add_le {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} (h : 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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} (h : m.toSyn (m.degree f) < m.toSyn (m.degree g)) :
          m.degree (f + g) = m.degree g
          theorem MonomialOrder.leadingCoeff_add_of_lt {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} (h : m.toSyn (m.degree g) < m.toSyn (m.degree f)) :
          theorem MonomialOrder.Monic.add_of_lt {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} (hf : m.Monic f) (h : m.toSyn (m.degree g) < m.toSyn (m.degree f)) :
          m.Monic (f + g)
          theorem MonomialOrder.degree_add_of_ne {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} (h : 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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} {a b : σ →₀ ℕ} (ha : m.toSyn (m.degree f) ≤ m.toSyn a) (hb : m.toSyn (m.degree g) ≤ m.toSyn b) :

          Multiplicativity of leading coefficients

          theorem MonomialOrder.coeff_mul_of_degree_add {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} :

          Multiplicativity of leading coefficients

          theorem MonomialOrder.degree_mul_of_mul_leadingCoeff_ne_zero {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} (hfg : m.leadingCoeff f * m.leadingCoeff g ≠ 0) :
          m.degree (f * g) = m.degree f + m.degree g

          Monomial degree of product

          Multiplicativity of leading coefficients

          theorem MonomialOrder.degree_mul_of_left_mem_nonZeroDivisors {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} (hf : m.leadingCoeff f ∈ nonZeroDivisors R) (hg : g ≠ 0) :
          m.degree (f * g) = m.degree f + m.degree g
          theorem MonomialOrder.degree_mul_of_right_mem_nonZeroDivisors {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} (hf : f ≠ 0) (hg : m.leadingCoeff g ∈ nonZeroDivisors R) :
          m.degree (f * g) = m.degree f + m.degree g
          theorem MonomialOrder.degree_mul_of_isRegular_left {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} (hf : IsRegular (m.leadingCoeff f)) (hg : g ≠ 0) :
          m.degree (f * g) = m.degree f + m.degree g

          Monomial degree of product

          Multiplicativity of leading coefficients

          theorem MonomialOrder.degree_mul_of_isRegular_right {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} (hf : f ≠ 0) (hg : IsRegular (m.leadingCoeff g)) :
          m.degree (f * g) = m.degree f + m.degree g

          Monomial degree of product

          Multiplicativity of leading coefficients

          theorem MonomialOrder.Monic.mul {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} (hf : m.Monic f) (hg : m.Monic g) :
          m.Monic (f * g)
          theorem MonomialOrder.degree_mul {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [NoZeroDivisors R] {f g : MvPolynomial σ R} (hf : f ≠ 0) (hg : g ≠ 0) :
          m.degree (f * g) = m.degree f + m.degree g

          Monomial degree of product

          @[simp]
          theorem MonomialOrder.leadingCoeff_mul {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [NoZeroDivisors R] {f g : MvPolynomial σ R} :

          Multiplicativity of leading coefficients

          theorem MonomialOrder.degree_pow_le {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] (f : MvPolynomial σ R) (n : ℕ) :
          theorem MonomialOrder.degree_pow_of_pow_leadingCoeff_ne_zero {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f : MvPolynomial σ R} {n : ℕ} (hf : 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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f : MvPolynomial σ R} {n : ℕ} (hf : m.leadingCoeff f ^ n ≠ 0) :
          m.leadingCoeff (f ^ n) = m.leadingCoeff f ^ n

          Leading coefficient of powers

          theorem MonomialOrder.Monic.pow {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f : MvPolynomial σ R} {n : ℕ} (hf : m.Monic f) :
          m.Monic (f ^ n)
          theorem MonomialOrder.degree_pow {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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.degree_smul_le {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {r : R} (hr : r ∈ nonZeroDivisors R) {f : MvPolynomial σ R} :
          m.degree (r • f) = m.degree f
          theorem MonomialOrder.degree_smul_of_isRegular {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {r : R} (hr : IsRegular r) {f : MvPolynomial σ R} :
          m.degree (r • f) = m.degree f
          theorem MonomialOrder.degree_prod_le {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {ι : Type u_3} (P : ι → MvPolynomial σ R) (s : Finset ι) :
          MvPolynomial.coeff (∑ i ∈ s, m.degree (P i)) (∏ i ∈ s, P i) = ∏ i ∈ s, m.leadingCoeff (P i)
          theorem MonomialOrder.degree_prod_of_mem_nonZeroDivisors {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {ι : Type u_3} {P : ι → MvPolynomial σ R} {s : Finset ι} (H : ∀ 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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {ι : Type u_3} {P : ι → MvPolynomial σ R} {s : Finset ι} (H : ∀ i ∈ s, IsRegular (m.leadingCoeff (P i))) :
          m.degree (∏ i ∈ s, P i) = ∑ i ∈ s, m.degree (P i)
          theorem MonomialOrder.degree_prod {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [NoZeroDivisors R] {ι : Type u_3} {P : ι → MvPolynomial σ R} {s : Finset ι} (H : ∀ i ∈ s, P i ≠ 0) :
          m.degree (∏ i ∈ s, P i) = ∑ i ∈ s, m.degree (P i)
          theorem MonomialOrder.degree_mul' {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [NoZeroDivisors R] {f g : MvPolynomial σ R} (hf : f * g ≠ 0) :
          m.degree (f * g) = m.degree f + m.degree g
          theorem MonomialOrder.notMem_support_of_degree_lt {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} (h : m.toSyn (m.degree f) < m.toSyn (m.degree g)) :
          m.degree g ∉ f.support
          theorem MonomialOrder.leadingCoeff_prod_of_mem_nonZeroDivisors {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {ι : Type u_3} {P : ι → MvPolynomial σ R} {s : Finset ι} (H : ∀ 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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {ι : Type u_3} {P : ι → MvPolynomial σ R} {s : Finset ι} (H : ∀ i ∈ s, IsRegular (m.leadingCoeff (P i))) :
          m.leadingCoeff (∏ i ∈ s, P i) = ∏ i ∈ s, m.leadingCoeff (P i)
          theorem MonomialOrder.Monic.prod {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {ι : Type u_3} {P : ι → MvPolynomial σ R} {s : Finset ι} (H : ∀ i ∈ s, m.Monic (P i)) :
          m.Monic (∏ i ∈ s, P i)

          A product of monic polynomials is monic

          @[simp]
          theorem MonomialOrder.leadingTerm_eq_zero_iff {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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.

          @[simp]
          theorem MonomialOrder.leadingTerm_zero {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] :

          The leading term of the zero polynomial is zero

          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.

          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.

          @[simp]
          theorem MonomialOrder.degree_leadingTerm {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] (f : MvPolynomial σ R) :

          The degree of f equals to the degree of leadingTerm f

          @[simp]
          @[simp]
          theorem MonomialOrder.leadingTerm_C {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] (c : R) :
          @[simp]
          @[simp]
          theorem MonomialOrder.degree_leadingTerm_mul {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [NoZeroDivisors R] (p q : MvPolynomial σ R) :
          m.degree (m.leadingTerm p * q) = m.degree (p * q)
          @[simp]
          theorem MonomialOrder.degree_mul_leadingTerm {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [NoZeroDivisors R] {p p' q : MvPolynomial σ R} (hp : p ≠ 0) (h : 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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [NoZeroDivisors R] {p p' q : MvPolynomial σ R} (hp : p ≠ 0) (hq : q ≠ 0) :
          m.toSyn (m.degree (p * q)) < m.toSyn (m.degree (p' * q)) ↔ m.toSyn (m.degree p) < m.toSyn (m.degree p')
          @[simp]
          theorem MonomialOrder.monic_leadingTerm {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] (p : MvPolynomial σ R) :
          theorem MonomialOrder.support_leadingTerm {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] (p : MvPolynomial σ R) [Decidable (p = 0)] :
          theorem MonomialOrder.support_leadingTerm' {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {p : MvPolynomial σ R} (hp : p ≠ 0) :
          theorem MonomialOrder.le_degree_of_mem_support {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {p : MvPolynomial σ R} {a : σ →₀ ℕ} (ha : a ∈ p.support) :
          m.toSyn a ≤ m.toSyn (m.degree p)
          @[simp]
          theorem MonomialOrder.leadingTerm_mul {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [NoZeroDivisors R] (p q : MvPolynomial σ R) :
          @[simp]
          theorem MonomialOrder.monic_of_subsingleton {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] [Subsingleton R] (p : MvPolynomial σ R) :
          m.Monic p
          theorem MonomialOrder.degree_le_degree_of_support_subset {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {p q : MvPolynomial σ R} (h : p.support ⊆ q.support) :
          m.toSyn (m.degree p) ≤ m.toSyn (m.degree q)
          theorem MonomialOrder.toSyn_degree_mul_le {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommSemiring R] {f g : MvPolynomial σ R} :
          m.toSyn (m.degree (f * g)) ≤ m.toSyn (m.degree f) + m.toSyn (m.degree g)
          noncomputable def MonomialOrder.sPolynomial {σ : Type u_1} (m : MonomialOrder σ) {R : Type u_2} [CommRing R] (f g : 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).$$

          Equations
          Instances For
            theorem MonomialOrder.sPolynomial_def {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] (f g : MvPolynomial σ R) :
            theorem MonomialOrder.degree_ne_zero_of_sub_leadingTerm_ne_zero {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] {f : MvPolynomial σ R} (h : f - m.leadingTerm f ≠ 0) :
            m.degree f ≠ 0
            @[simp]
            theorem MonomialOrder.degree_neg {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] {f : MvPolynomial σ R} :
            m.degree (-f) = m.degree f
            @[simp]
            theorem MonomialOrder.leadingCoeff_neg {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] {f : MvPolynomial σ R} :
            theorem MonomialOrder.degree_sub_le {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] {f g : MvPolynomial σ R} (h : m.toSyn (m.degree g) < m.toSyn (m.degree f)) :
            m.degree (f - g) = m.degree f
            theorem MonomialOrder.leadingCoeff_sub_of_lt {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] {f g : MvPolynomial σ R} (h : m.toSyn (m.degree g) < m.toSyn (m.degree f)) :
            theorem MonomialOrder.degree_sub_leadingTerm_le {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] {f : MvPolynomial σ R} (h : m.degree f ≠ 0) :
            m.toSyn (m.degree (f - m.leadingTerm f)) < m.toSyn (m.degree f)
            theorem MonomialOrder.degree_sub_leadingTerm_lt_iff {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] (f g : MvPolynomial σ R) :
            @[simp]
            theorem MonomialOrder.sPolynomial_left_zero {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] (g : MvPolynomial σ R) :
            m.sPolynomial 0 g = 0
            @[simp]
            theorem MonomialOrder.sPolynomial_right_zero {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] (f : MvPolynomial σ R) :
            m.sPolynomial f 0 = 0
            @[simp]
            theorem MonomialOrder.sPolynomial_self {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] (f : MvPolynomial σ R) :
            m.sPolynomial f f = 0
            theorem MonomialOrder.degree_sPolynomial_le {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] (f g : MvPolynomial σ R) :
            MvPolynomial.coeff (m.degree f ⊔ m.degree g) (m.sPolynomial f g) = 0
            theorem MonomialOrder.degree_sPolynomial {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] {f g : MvPolynomial σ R} (h : 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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] {f g : MvPolynomial σ R} (h : m.degree f = m.degree g) (hs : m.sPolynomial f g ≠ 0) :
            m.toSyn (m.degree (m.sPolynomial f g)) < m.toSyn (m.degree f)
            theorem MonomialOrder.sPolynomial_monomial_mul {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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' {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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' {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [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 {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [CommRing R] {d : m.syn} {ι : Type u_3} {B : Finset ι} {g : ι → MvPolynomial σ R} (hd : ∀ b ∈ B, m.toSyn (m.degree (g b)) = d ∧ IsUnit (m.leadingCoeff (g b)) ∨ g b = 0) (hfd : m.toSyn (m.degree (∑ b ∈ B, g b)) < d) :
            ∃ (c : ι → ι → R), ∑ b ∈ B, g b = ∑ b₁ ∈ B, ∑ b₂ ∈ B, c b₁ b₂ • m.sPolynomial (g b₁) (g b₂)
            theorem MonomialOrder.isUnit_leadingCoeff {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [Field R] {f : MvPolynomial σ R} :
            theorem MonomialOrder.sPolynomial_decomposition' {σ : Type u_1} {m : MonomialOrder σ} {R : Type u_2} [Field R] {d : m.syn} {ι : Type u_3} {B : Finset ι} (g : ι → MvPolynomial σ R) (hd : ∀ b ∈ B, m.toSyn (m.degree (g b)) = d ∨ g b = 0) (hfd : m.toSyn (m.degree (∑ b ∈ B, g b)) < d) :
            ∃ (c : ι → ι → R), ∑ b ∈ B, g b = ∑ b₁ ∈ B, ∑ b₂ ∈ B, c b₁ b₂ • m.sPolynomial (g b₁) (g b₂)
            theorem MonomialOrder.degree_X_add_C {R : Type u_2} [CommRing R] [Nontrivial R] {ι : Type u_3} (m : MonomialOrder ι) (i : ι) (r : R) :
            theorem MonomialOrder.degree_X_sub_C {R : Type u_2} [CommRing R] [Nontrivial R] {ι : Type u_3} (m : MonomialOrder ι) (i : ι) (r : R) :
            theorem MonomialOrder.monic_X_add_C {R : Type u_2} [CommRing R] {ι : Type u_3} (m : MonomialOrder ι) (i : ι) (r : R) :
            theorem MonomialOrder.monic_X_sub_C {R : Type u_2} [CommRing R] {ι : Type u_3} (m : MonomialOrder ι) (i : ι) (r : R) :