Blueprint of Groebner Basis Theory in LEAN

2 Lemmas

Lemma 5 card_bijOn
#
Proof
Lemma 6 finset_subset_preimage_of_finite_image

Let \(f: \alpha \to \beta \) be a function and \(s \subseteq \alpha \) a subset with finite image \(f(s)\). Then there exists a finite subset \(s' \subseteq _{\text{fin}} s\) such that:

  • \(s' \subseteq s\) (subset relation)

  • \(f(s') = f(s)\) (image equality)

  • \(|s'| = |f(s)|\) (cardinality preservation)

Proof
Theorem 7 mem_of_mem_of_le
#
Proof
Theorem 8 isRemainder_range
#
Proof
Theorem 9 isRemainder_range_fin
Proof
Lemma 10 isRemainder_def’
#

A variant of IsRemainder without coercion of a Set (MvPolynomial σ R).

Proof
Lemma 11 isRemainder_def’’
#

A variant of IsRemainder where g : MvPolynomial σ R →₀ MvPolynomial σ R is replaced with a function g : MvPolynomial σ R → MvPolynomial σ R without limitation on its support.

Proof
Lemma 12 isRemainder_finset
Proof
Lemma 13 isRemainder_insert_zero_iff_isRemainder

Remainders are preserved on insertion of the zero polynomial into the set of divisors.

Proof
Lemma 14 isRemainder_sdiff_singleton_zero_iff_isRemainder

Remainders are preserved with the zero polynomial removed from the set of divisors.

Proof
Lemma 15 isRemainder_zero
#
Proof
Lemma 16 isRemainder_zero₀
Proof
Lemma 17 isRemainder_zero’
#
Proof
Lemma 18 isRemainder_finset₁
Proof
Lemma 19 isRemainder_finset₀₁
Proof
Lemma 20 isRemainder_finset’₁
Proof
Theorem 21 isRemainder_def’₁
Proof
Lemma 22 leadingTerm_eq_zero_iff
#

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

Proof
Lemma 23 leadingTerm_zero
#
Proof
Lemma 24 image_leadingTerm_sdiff_singleton_zero
Proof
Lemma 25 image_leadingTerm_insert_zero
Proof
Lemma 26 sPolynomial_antisymm
#

the S-polynomial of \(f\) and \(g\) is antisymmetric:

\[ \operatorname{Sph}{f}{g} = -\operatorname{Sph}{g}{f} \]
Proof
Lemma 27 sPolynomial_left_zero
#

For any polynomial \(g \in \operatorname{MvPolynomial}{\sigma }{R}\) and monomial order \(m\), the S-polynomial with zero as first argument vanishes:

\[ \operatorname{Sph}{0}{g} = 0 \]
Proof
Lemma 28 sPolynomial_right_zero

For any polynomial \(g \in \operatorname{MvPolynomial}{\sigma }{R}\) and monomial order \(m\), the S-polynomial with zero as second argument vanishes:

\[ \operatorname{Sph}{f}{0} = 0 \]
Proof
Lemma 29 sPolynomial_def
#
Proof
Lemma 30 sPolynomial_self
#
Proof
Theorem 31 div_set’
#
Proof
Theorem 32 div_set’₀

Let \(G'' \subseteq R[\mathbf{X}]\) be a set of polynomials where every nonzero element has a unit leading coefficient:

\[ \forall g \in G'',\ \big(\mathrm{IsUnit}(\operatorname{LC}_m(g)) \lor g = 0\big) \]

Then for any polynomial \(p \in R[\mathbf{X}]\), there exists a remainder \(r\) satisfying:

\[ \mathsf{IsRemainder}_m\, p\, G''\, r \]

where \(\operatorname{LC}_m(g)\) denotes the leading coefficient of \(g\) under monomial order \(m\).

Proof
Lemma 33 degree_leadingTerm
#
Proof
Lemma 34 leadingCoeff_leadingTerm
#
Proof
Theorem 35 degree_sub_leadingTerm_le
Proof
Lemma 36 degree_sub_leadingTerm
Proof
Lemma 37 degree_sub_leadingTerm_lt_degree
Proof
Lemma 38 degree_sub_leadingTerm_lt_iff
Proof
Lemma 39 degree_sPolynomial_le
Proof
Lemma 40 coeff_sPolynomial_sup_eq_zero
Proof
Lemma 41 degree_sPolynomial
Proof
Lemma 42 degree_sPolynomial_lt_sup_degree
Proof
Lemma 43 sPolynomial_lt_of_degree_ne_zero_of_degree_eq

\(h_1, h_2 \in k[\mathbf{x}], lm(h_1) = lm(h_2), S(h_1, h_2) \ne 0\), then \(lm(S(h_1, h_2)) {\lt} lm(h_1)\).

Proof
Lemma 44 degree_mul’
#

Monomial degree of product

Proof
Lemma 45 notMem_support_of_degree_lt
#
Proof
Lemma 46 sPolynomial_mul_monomial
Proof
Theorem 47 div_set’’
#

Let \(k\) be a field, and let \(G'' \subseteq k[x_i : i \in \sigma ]\) be a set of polynomials. Then for any \(p \in k[x_i : i \in \sigma ]\), there exists a generalized remainder \(r\) of \(p\) upon division by \(G''\).

Proof
Lemma 48 fg_span_iff_fg_span_finset_subset
#

A subset \(s \subseteq R\) has finitely generated span if and only if: \(\exists \) finite \(s' \subseteq s\) such that \(\mathsf{span}(s) = \mathsf{span}(s')\)

Proof
Lemma 49 span_leadingTerm_sdiff_singleton_zero
Proof
Lemma 50 span_leadingTerm_insert_zero
Proof
Lemma 51 isGroebnerBasis_sdiff_singleton_zero
Proof
Lemma 52 isGroebnerBasis_insert_zero
Proof
Lemma 53 span_leadingTerm_eq_span_monomial

Let \(G'' \subseteq R[x_1, \dots , x_n]\) be a set of polynomials such that

\[ \forall p \in G'',\ \operatorname {leadingCoeff}(p) \in R^\times . \]

Then,

\[ \left\langle \operatorname {lt}(G'') \right\rangle = \left\langle x^{\deg (p)} \mid p \in G'' \right\rangle , \]
Proof
Lemma 54 span_leadingTerm_eq_span_monomial₀
\[ \langle \mathrm{lt}(G) \rangle = \left\langle \left\{ x^t : t \in \{ \mathrm{multideg}(p) : p \in G \setminus \{ 0\} \} \right\} \right\rangle \]
Proof
Lemma 55 span_leadingTerm_eq_span_monomial’
Proof
Lemma 56 mem_ideal_of_isRemainder_of_mem_ideal

Let \(G'' \subseteq R[x_1, \dots , x_n]\), let \(I \subseteq R[x_1, \dots , x_n]\) be an ideal, and let \(p, r \in R[x_1, \dots , x_n]\). Suppose that:

  • \(G'' \subseteq I\),

  • \(r \in I\),

  • \(r\) is the remainder of \(p\) upon division by \(G''\).

Then,

\[ p \in I. \]
Proof
Lemma 57 mem_ideal_iff_of_isRemainder

Let \(R\) be a commutative ring, and let \(G'' \subseteq R[x_1, \dots , x_n]\), \(I \subseteq R[x_1, \dots , x_n]\) be an ideal, and \(p, r \in R[x_1, \dots , x_n]\). Assume that:

  • \(G'' \subseteq I\),

  • \(r\) is the remainder of \(p\) upon division by \(G''\).

Then,

\[ r \in I \quad \Longleftrightarrow \quad p \in I. \]
Proof
Lemma 58 sub_mem_ideal_of_isRemainder_of_subset_ideal

Let \(I \subseteq k[x_i : i \in \sigma ]\) be an ideal, and let \(G \subseteq I\) be a finite subset. Suppose that \(r_1\) and \(r_2\) are generalized remainders of a polynomial \(p\) upon division by \(G\). Then,

\[ r_1 - r_2 \in I. \]
Proof
Lemma 59 term_notMem_span_leadingTerm_of_isRemainder
Proof
Lemma 60 term_notMem_span_leadingTerm_of_isRemainder₀
Proof
Lemma 61 term_notMem_span_leadingTerm_of_isRemainder’
Proof
Lemma 62 monomial_notMem_span_leadingTerm
Proof
Lemma 63 monomial_notMem_span_leadingTerm_of_isRemainder
Proof
Lemma 64 monomial_notMem_span_leadingTerm_of_isRemainder₀
Proof
Lemma 65 monomial_notMem_span_leadingTerm_of_isRemainder’
Proof
Lemma 66 sPolynomial_mem_ideal
#
Proof
Lemma 67 sub_monomial_notMem_span_leadingTerm_of_isRemainder
Proof
Theorem 68 exists_isGroebnerBasis

Let \(I \subseteq k[x_1, \ldots , x_n]\) be an ideal. Then there exists a finite subset \(G = \{ g_1, \ldots , g_t\} \) of \(I\) such that \(G\) is a Gröbner basis for \(I\).

Proof
Theorem 69 remainder_eq_zero_iff_mem_ideal_of_isGroebner

Given a remainder r of a polynomial p on division by a Gröbner basis G of an ideal I, the remainder r is 0 if and only if p is in the ideal I.

Any leading coefficient of polynomial in the Gröbner basis G is required to be a unit.

Formally:

Let \(G = \{ g_1, \dots , g_t\} \) be a Gröbner basis for an ideal \(I \subseteq k[x_1, \dots , x_n]\) and let \(f \in k[x_1, \dots , x_n]\). Then \(f \in I\) if and only if the remainder on division of \(f\) by \(G\) is zero.

Proof
Theorem 70 remainder_eq_zero_iff_mem_ideal_of_isGroebner₀

Given a remainder r of a polynomial p on division by a Gröbner basis G of an ideal I, the remainder r is 0 if and only if p is in the ideal I.

It is a variant of MonomialOrder.remainder_eq_zero_iff_mem_ideal_of_isGroebner, allowing the finite set to contain also 0, besides polynomials with invertible leading coefficients.

Proof
Theorem 71 remainder_eq_zero_iff_mem_ideal_of_isGroebner’

Given a remainder r of a polynomial p on division by a Gröbner basis G of an ideal I, the remainder r is 0 if and only if p is in the ideal I.

It is variant of MonomialOrder.remainder_eq_zero_iff_mem_ideal_of_isGroebner, over a field and without hypothesis on leading coefficients in the finite set.

Proof
Theorem 72 isRemainder_zero_iff_mem_ideal_of_isGroebner
Proof
Lemma 73 isRemainder_zero_iff_mem_ideal_of_isGroebner₀
Proof
Lemma 74 isRemainder_zero_iff_mem_ideal_of_isGroebner’
Proof
Lemma 75 exists_degree_le_degree_of_isRemainder_zero
Proof
Lemma 76 exists_degree_le_degree_of_isRemainder_zero₀
Proof
Lemma 77 exists_degree_le_degree_of_isRemainder_zero’
Proof
Theorem 78 ideal_eq_span_of_isGroebner

Let \(G = \{ g_1, \ldots , g_t\} \) be a Gröbner basis for an ideal \(I \subseteq k[x_1, \ldots , x_n]\). Then \(G\) is a basis for the vector space \(I\) over \(k\).

Proof
Theorem 79 isGroebnerBasis_iff_ideal_eq_span_and_isGroebner_span
Proof
Theorem 80 isGroebnerBasis_iff_span_eq_and_degree_le
Proof
Theorem 81 isGroebnerBasis_iff_subset_ideal_and_isRemainder_zero

A finite set of polynomials is a Gröbner basis of an ideal if and only if it is a subset of this ideal and 0 is a remainder of each member of this ideal on division by this finite set.

Any leading coefficient of polynomial in the finite set is required to be a unit.

Proof
Theorem 82 isGroebnerBasis_iff_subset_ideal_and_isRemainder_zero₀

A finite set of polynomials is a Gröbner basis of an ideal if and only if it is a subset of this ideal and 0 is a remainder of each member of this ideal on division by this finite set.

It is a variant of MonomialOrder.isGroebnerBasis_iff_subset_ideal_and_isRemainder_zero, allowing the finite set to contain also 0, besides polynomials with invertible leading coefficients.

Proof
Theorem 83 isGroebnerBasis_iff_subset_ideal_and_isRemainder_zero’

A finite set of polynomials is a Gröbner basis of an ideal if and only if it is a subset of this ideal and 0 is a remainder of each member of this ideal on division by this finite set.

It is a variant of MonomialOrder.isGroebnerBasis_iff_subset_ideal_and_isRemainder_zero, over a field and without hypothesis on leading coefficients in the finite set.

Formally:

Let \(G = \{ g_1, \ldots , g_t\} \) be a finite subset of \(k[x_1, \ldots , x_n]\). Then \(G\) is a Gröbner basis for the ideal \(I = \langle G \rangle \) if and only if for every \(f \in I\), the remainder of \(f\) on division by \(G\) is zero. whose leading coefficients are invertible with respect to a monomial order

Proof
Theorem 84 span_leadingTerm_eq_span_monomial_of_isGroebner
Proof
Theorem 85 span_leadingTerm_eq_span_monomial_of_isGroebner₀
Proof
Theorem 86 existsUnique_isRemainder_of_isGroebnerBasis

Remainder of any polynomial on division by Gröbner basis exists and is unique.

Any leading coefficient of polynomial in the Gröbner basis is required to be a unit.

Proof
Theorem 87 existsUnique_isRemainder_of_isGroebnerBasis₀

Remainder of any polynomial on division by Gröbner basis exists and is unique.

It is a variant of MonomialOrder.existsUnique_isRemainder_of_isGroebnerBasis, allowing the Gröbner basis to contain also 0, besides polynomials with invertible leading coefficients.

Proof
Lemma 88 sPolynomial_ne_zero
#
Proof
Lemma 89 sPolynomial_decomposition

Let \(f, h_1, \dots , h_m \in k[\mathbf{x}] \setminus \{ 0\} \), and suppose

\[ f = c_1 h_1 + \cdots + c_m h_m, \quad \text{with } c_i \in k. \]

If

\[ \mathrm{lm}(h_1) = \mathrm{lm}(h_2) = \cdots = \mathrm{lm}(h_i) {\gt} \mathrm{lm}(f), \]

then

\[ f = \sum _{1 \leq i {\lt} j \leq m} c_{i,j} S(h_i, h_j), \quad c_{i,j} \in k. \]

Furthermore, if \(S(h_i, h_j) \ne 0\), then \(\mathrm{lm}(h_i) {\gt} \mathrm{lm}(S(h_i, h_j))\).

Proof
Lemma 90 sPolynomial_decomposition’
Proof

A basis \(G = \{ g_1, \ldots , g_t \} \) for an ideal \(I\) is a Gröbner basis if and only if \(S(g_i, g_j) \to _G 0\) for all \(i \neq j\).

Proof
Theorem 92 buchberger_criterion

Alias of MonomialOrder.isGroebnerBasis_iff_isRemainder_sPolynomial_zero.

A basis \(G = \{ g_1, \ldots , g_t \} \) for an ideal \(I\) is a Gröbner basis if and only if \(S(g_i, g_j) \to _G 0\) for all \(i \neq j\).

Proof
Theorem 93 isGroebnerBasis_iff_isRemainder_sPolynomial_zero’
Proof
Theorem 94 buchberger_criterion’

Alias of MonomialOrder.isGroebnerBasis_iff_isRemainder_sPolynomial_zero.

Proof