Efficient Gr\"obner Bases Computation over Principal Ideal Rings
Christian Eder, Tommy Hofmann

TL;DR
This paper introduces an efficient method for computing strong Gr"obner bases over quotients of principal ideal rings, leveraging a recursive reduction to computations over fields for squarefree moduli.
Contribution
The authors present a novel lifting process that reduces Gr"obner basis computations over quotients of principal ideal rings to simpler computations over fields, improving efficiency.
Findings
Reduces complex computations to simpler field-based calculations
Allows recursive reduction for squarefree moduli
Provides a practical approach for strong Gr"obner basis computation
Abstract
In this paper we present a new efficient variant to compute strong Gr\"obner basis over quotients of principal ideal domains. We show an easy lifting process which allows us to reduce one computation over the quotient to two computations over and where with coprime . Possibly using available factorization algorithms we may thus recursively reduce some strong Gr\"obner basis computations to Gr\"obner basis computations over fields for prime factors of , at least for squarefree . Considering now a computation over we can run a standard Gr\"obner basis algorithm pretending to be field. If we discover a non-invertible leading coefficient , we use this information to try to split with coprime . If no such is discovered, the returned Gr\"obner basis is already a strong Gr\"obner basis for the input ideal over .
| Examples | New Algorithm | Singular | Magma |
|---|---|---|---|
| Cyclic-6 | |||
| Cyclic-7 | |||
| Cyclic-8 | h | ||
| Katsura-8 | |||
| Katsura-9 | |||
| Katsura-10 | |||
| Eco-10 | |||
| Eco-11 | |||
| F-744 | |||
| F-855 | h | ||
| Noon-7 | |||
| Noon-8 | h | ||
| Reimer-5 | |||
| Reimer-6 | |||
| Lichtblau | |||
| Mayr-42 * | |||
| Yang-1 * | |||
| Jason-210 | h |
| Examples | New Algorithm | Singular | Magma |
|---|---|---|---|
| Cyclic-6 | |||
| Cyclic-7 | |||
| Cyclic-8 | |||
| Katsura-8 | |||
| Katsura-9 | |||
| Katsura-10 | |||
| Eco-10 | |||
| Eco-11 | |||
| F-744 | |||
| F-855 | |||
| Noon-7 | |||
| Noon-8 | |||
| Reimer-5 | |||
| Reimer-6 | |||
| Lichtblau | |||
| Mayr-42 | |||
| Yang-1 | |||
| Jason-210 |
| Examples | New Algorithm | Singular | Magma |
|---|---|---|---|
| Cyclic-6 | |||
| Cyclic-7 | |||
| Cyclic-8 | h | ||
| Katsura-8 | |||
| Katsura-9 | |||
| Katsura-10 | |||
| Eco-10 | |||
| Eco-11 | h | ||
| F-744 | |||
| F-855 | h | ||
| Noon-7 | h | ||
| Noon-8 | h | h | |
| Reimer-5 | |||
| Reimer-6 | |||
| Lichtblau | |||
| Mayr-42 * | |||
| Yang-1 * | |||
| Jason-210 | h |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Efficient Gröbner Bases Computation over Principal Ideal Rings
Christian Eder
University of Leipzig
Department of Mathematics
D-04109 Leipzig
Tommy Hofmann
Technische Universtität Kaiserslautern
Department of Mathematics
D-67663 Kaiserslautern
Abstract
In this paper we present a new efficient variant to compute strong Gröbner bases over quotients of principal ideal domains. We show an easy lifting process which allows us to reduce one computation over the quotient to two computations over and where with coprime . Possibly using available factorization algorithms we may thus recursively reduce some strong Gröbner basis computations to Gröbner basis computations over fields for prime factors of , at least for squarefree . Considering now a computation over we can run a standard Gröbner basis algorithm pretending to be field. If we discover a non-invertible leading coefficient , we use this information to try to split with coprime . If no such is discovered, the returned Gröbner basis is already a strong Gröbner basis for the input ideal over .
keywords:
Gröbner bases, Principal ideal rings
1 Introduction
In Hironaka already investigated computational approaches towards singularities and introduced the notion of standard bases for local monomial orders, see, for example, Hironaka (1964); Hironaka, H. (1964); Grauert (1972). In Buchberger (1965, 2006), Buchberger initiated, in , the theory of Gröbner bases for global monomial orders by which many fundamental problems in mathematics, science and engineering can be solved algorithmically. Specifically, he introduced some key structural theory, and based on this theory, proposed the first algorithm for computing Gröbner bases. Buchberger’s algorithm introduced the concept of critical pairs and repeatedly carries out a certain polynomial operation (called reduction).
Once the underlying structure is no longer a field, one needs the notion of strong Gröbner bases respectively strong standard bases. Influential work was done by Kandri-Rody and Kapur (1988), introducing the first generalization of Buchberger’s algorithm over Euclidean domains computing strong Gröbner bases. Since then only a few optimizations have been introduced, see, for example, Wienand (2011); Lichtblau (2012); Eder et al. (2017). For more general rings, like principal ideal domains or rings, more recent approaches can be found, for example, in Norton and Sǎlǎgean (2001); Pauer (2007); Popescu (2016); Francis and Verron (2019). Common to all these approaches is the idea to transfer ideas from the well studied field case, like criteria for predicting zero reductions or the use of linear algebra, to the setting of rings.
In some sense, we take this approach to the extreme by just treating the underlying ring as field and by hopefully splitting the computation to smaller problems in case it fails. To be more precise, consider a quotient of a principal ideal domain for some non-trivial element . If is an ideal for which we want to find a strong Gröbner basis computation, we pretend that is prime, that is, is a field and apply a classical Gröbner basis algorithm from the field case to . If this does not encounter a non-invertible element, then we are done. Otherwise we use a non-invertible element to split with coprime elements . After computing strong Gröbner bases of over and , we pull them back along the canonical isomorphism to obtain a strong Gröbner basis of . In case we cannot split , we fall back to a classical algorithm for computing strong Gröbner basis. The most favorable case for the new algorithm are squarefree elements , since then any non-invertible element allows us to split .
The idea of working in as if were a prime, is a common strategy in computer algebra. Other examples include the computation of matrix normal forms over , see Fieker and Hofmann (2014). To make this approach work in the setting of strong Gröbner bases, we investigate the behavior of strong Gröbner bases with respect to quotients and the Chinese remainder theorem. By properly normalizing the strong Gröbner basis, we prove that one can efficiently pull back strong Gröbner bases along a projection (Theorem 10) as well as along a canonical isomorphism (Theorem 12).
The algorithm has been implemented to compute strong Gröbner bases over residue class rings of the form , where , see Section 5. Running standard benchmarks for Gröbner basis computations for of different shape shows a consistent speed-up across all examples (except one). In case of squarefree , the new algorithm improves upon the state of the art implementations by a factor of 10–100.
Acknowledgments
This work was supported by DFG project SFB-TRR 195. The authors thank Claus Fieker for helpful comments.
2 Basic notions
Let be a principal ideal ring, that is a unital commutative ring such that every ideal is principal. Note that is not necessarily an integral domain. If are two elements with we denote by by abuse of notation any element with . Recall that a least common multiple of two elements is an element such that . By abuse of notation we denote by such an element. Similarly, we denote by an element of with and call it a greatest common divisor. For an element we denote by the canonical projection. For an ideal we define the annihilator of by
[TABLE]
For an element we denote by the annihilator of .
A polynomial in variables over is a finite -linear combination of terms ,
[TABLE]
such that and . The polynomial ring in variables over is the set of all polynomials over together with the usual addition and multiplication. For we define the degree of by . For we set .
We fix once and for all a monomial order on , which, for the sake of simplicity, is assumed to be global, that is, for all . Given a monomial order we can highlight the maximal terms of elements in with respect to : For , is the lead term, the lead monomial, and the lead coefficient of . For any set we define the lead ideal ; for an ideal , is defined as the ideal of lead terms of all elements of .
The reduction process of two polynomials and in depends now on the uniqueness of the minimal remainder in the division algorithm in :
Definition 1**.**
Let and let be a finite set of polynomials.
We say that top-reduces if and . A top-reduction of by is then given by
[TABLE] 2. 2.
Relaxing the reduction of the lead term to any term of , we say that reduces . In general, we speak of a reduction of a polynomial with respect to a finite set . Let 3. 3.
We say that has a weak standard representation with respect to if for some such that for some . 4. 4.
We say that has a strong standard representation with respect to if for some such that for some and for all .
This kind of reduction is equivalent to definition CP3 from Kandri-Rody and Kapur (1984) and generalizes Buchberger’s attempt from Buchberger (1985). The result of such a reduction might not be unique. This uniqueness is exactly the property Gröbner bases give us.
Definition 2**.**
A finite set is called a Gröbner basis for an ideal (with respect to ) if and . Furthermore, is called a strong Gröbner basis if for any there exists an element such that .
Remark 3**.**
Note that being a strong Gröbner basis is equivalent to all elements having a strong standard representation with respect to . See, for example, Theorem 1 in Lichtblau (2012) for a proof.
Clearly, assuming that is a field, any Gröbner basis is a strong Gröbner basis. But in our setting with being a principal ideal ring one has to check the coefficients, too, as explained in Definition 1. The fact that for an arbitrary principal ideal ring the notions of Gröbner bases and strong Gröbner bases do not agree, can be observed already for monomial ideals in univariate polynomial rings:
Example 4**.**
Let and . Clearly, is a Gröbner basis for : and . But is not a strong Gröbner basis for since and .
In order to compute strong Gröbner bases we need to consider two different types of special polynomials:
Definition 5**.**
Let , , , and .
Let , and . A S-polynomial of and is denoted by
[TABLE] 2. 2.
Let . Choose such that . A GCD-polynomial of and is denoted by
[TABLE] 3. 3.
Let be a generator of . An annihilator polynomial of is denoted by
[TABLE]
Remark 6**.**
Note that as well as are not uniquely defined, since quotients, Bézout coefficients and generators are in general not unique. 2. 2.
If is not a zero divisor in then . It follows that if is a domain, there is no need to handle annihilator polynomials since [math] is the only zero divisor. 3. 3.
*In the field case we do not need to consider GCD-polynomials at all since we can always normalize the polynomials, that is, ensure that . *
From Example 4 it is clear that the usual Buchberger algorithm as in the field case will not compute a strong Gröbner basis as we would only consider . Luckily, we can fix this via taking care of the corresponding GCD-polynomial:
[TABLE]
It follows that given an ideal a strong Gröbner basis for can be achieved using a generalized version of Buchberger’s algorithm computing not only strong standard representations of S-polynomials but also of GCD-polynomials and annihilator polynomials. We refer, for example, to Lichtblau (2012) for more details.
So, how do we get a strong standard representations of elements w.r.t. some set ? The answer is given by the concept of a normal form:
Definition 7**.**
Let denote the set of all finite subsets . We call the map , a weak normal form (w.r.t. a monomial ordering ) if for all and all the following hold:
. 2. 2.
If then . 3. 3.
If then there exists a unit such that either or has a strong standard representation with respect to .
A weak normal form NF is called a normal form if we can always choose .
Algorithm 1 presents a normal form algorithm for computations:
Now we state Buchberger’s algorithm for computing strong Gröbner bases, Algorithm 2. For the theoretical background we refer to Greuel and Pfister (2007) and Becker and Weispfenning (1993).
Algorithm 2 Buchberger’s algorithm for computing strong Gröbner bases (sBBA)
1:Ideal , normal form algorithm NF (depending on )
2:Gröbner basis for w.r.t.
3:
4:
5:
6:while do
7: Choose ,
8:
9: if then
10:
11:
12:
13:
3 Strong Gröbner bases over principal ideal rings
In this section we give theoretical results for the computation of strong Gröbner bases over principal ideal rings. These results will then be used in Section 4 for an improved computation of strong Gröbner bases over quotients of principal ideal rings. We begin by analyzing Algorithm 2 in case all occurring leading coefficients are invertible.
Lemma 8**.**
Let be an ideal such that for all we have that is invertible in . Moreover, assume that for each newly added polynomial in Line 12 in Algorithm 2 the polynomial is invertible in . Then Algorithm 2 does not need to consider GCD-polynomials and annihilator polynomials.
Proof.
We show that all GCD-polynomials and all annihilator polynomials are zero in the setting of the lemma:
For each element in the intermediate Gröbner basis it holds that is invertible in and thus, not a zero divisor. It follows that by definition. 2. 2.
For each for it holds that : is invertible in , so we get
[TABLE]
Again, by definition, .∎
Remark 9**.**
From Lemma 8 it follows that as long as Algorithm 2 does not encounter a lead coefficient that is not invertible in we can use Buchberger’s algorithm from the field case without the need to consider GCD-polynomials and annihilator polynomials for strongness properties. In Section 4 we discuss how one can use this fact to improve the general computations of strong Gröbner bases over .
We next next show how to pull back a strong Gröbner bases along a canonical projection .
Theorem 10**.**
Let , and an ideal. Assume that is a set of polynomials with the following properties:
* is a strong Gröbner basis of ;* 2. 2.
for every the leading coefficient divides and .
Then is a strong Gröbner basis of .
Proof.
It is clear that . Now let . If , then the leading term is a multiple of . Thus we may assume that . Since is a strong Gröbner basis of , there exists such that divides . Hence we can find with . We can assume that is a term and . By assumption we have as well as . Hence we can write for some . Since divides and divides it follows that divides . ∎
Remark 11**.**
Assume that we know that an ideal contains a constant polynomial , . As , Theorem 10 implies that we can compute a strong Gröbner basis of be properly choosing the lifts of a strong Gröbner basis of the reduction . For , a similar idea can be found in Section of Eder, C. et al. (2018). There it is described how to check if an ideal contains a constant polynomial , . In case it exists, the authors describe an ad hoc method which keeps the size of the coefficients of the polynomials in Algorithm 2 bounded by .
We now consider the following situation. Assume that are elements with and . Note that this implies and .
Theorem 12**.**
Assume that is an ideal. Furthermore let be finite index sets and strong Gröbner bases of and respectively, satisfying the following conditions:
For , if is non-constant, then divides and 2. 2.
For , if is non-constant, then divides and .
For , define
[TABLE]
Then is a strong Gröbner basis of .
Proof.
Note that from it follows at once that . Hence . As and are coprime we have . Moreover, since
[TABLE]
we have
[TABLE]
In particular
[TABLE]
Consider now an element . Since and , there exist , such that and . Thus is divisible by and is divisible by , that is, is divisible by . ∎
4 Algorithmic approach for computing in quotients of principal ideal rings
We now assume that is a principal ideal domain. Additionally we now also fix an element , . Using the theoretical results from Section 3 we are now able to describe improvements to the Gröbner basis computation over the base ring .
Corollary 13**.**
Let be an ideal and a factorization of into coprime elements . Let be finite index sets. Assume that is a set of polynomials, such that is a strong Gröbner basis of , and for every , the leading coefficient divides and is not divisible by . Assume that has similar properties with respect to . For , define
[TABLE]
Then is a strong Gröbner basis of .
Proof.
Follows at once from Theorems 10 and 12 since for we have . ∎
To use this, we need, given a divisor of , a way to lift polynomials from to such that the leading coefficients divide .
Lemma 14**.**
There exists an algorithm, that given determines such that and .
Proof.
This can be found in (Storjohann and Mulders, 1998, Section 2). ∎
In case we have an algorithm for factoring elements of into irreducible elements, this allows us to reduce the strong Gröbner basis computation to computations over smaller quotient rings. This approach is summarized in Algorithm 3.
Depending on the ring , the particular and the factorization algorithm, Step (1) is infeasible or not. For example if , the fastest factorization algorithms are subexponential in , rendering this approach futile for non-trivial example with large . On the other hand, if or for some prime , then factoring in can be done in (randomized) polynomial time in the size of and thus is a good idea, at least from a theoretical point of view.
We now consider the case, where we cannot or do not want to factor the modulus . The basic idea is to run the algorithm from the field case, pretending that is a field, and to stop whenever we find a non-invertible leading coefficient. If the algorithm discovers a non-invertible element, we try to split the modulus and the computation of the strong Gröbner basis. The splitting is based on the following consequence of so-called factor refinement.
Proposition 15**.**
There exists an algorithm that given with , that is, , either
finds , with and , or 2. 2.
finds coprime elements with .
Proof.
Using an algorithm for factor refinement, for example the algorithm of Bach–Driscoll–Shallit (see Bach et al. (1993)), we can find a set of coprime elements such that and factor uniquely into elements of and for all we have or not in . Now pick with . We can write with and coprime to . Depending on whether is a unit or not, we are in case (1) or (2). ∎
Incorporating this into the strong Gröbner basis computation we obtain Algorithm 4.
Theorem 16**.**
Algorithm 4 terminates and is correct.
Proof.
Termination follows since in the recursion, the number of irreducible factors of is strictly decreasing. Correctness follows from Corollary 13. ∎
Remark 17**.**
The usefulness of the splitting depends very much on the factorization of . For example, if is the power of an irreducible element , then Algorithm 4 is the same as Algorithm 2. The most favorable input for Algorithm 4 are rings with squarefree, that is, is the product of pairwise coprime irreducible elements (including the case, where is itself irreducible). In this case, every non-invertible element allows us to split the modulus into coprime elements. Thus all Gröbner basis computations can be done as in the field case.
5 Experimental results
In the following we present experimental results comparing our new approach to the current implementations in the computer algebra systems Singular (Decker et al. (2019)) and Magma (Bosma et al. (1997)). All computations were done on an Intel® Xeon® CPU E5-2643 v3 @ 3.40GHz with GB RAM. Computations that took more than 24 hours were terminated by hand.
Our new algorithm is implemented in the Julia package GB.jl (Eder and Hofmann (2019)) which is part of the OSCAR project of the SFB TRR-195. The package GB.jl is based on the C library GB (Eder (2019)) which implements Faugère’s F4 algorithm (Faugère (1999)) for computing Gröbner bases over finite fields. The implementation of Algorithm 4 uses GB and Singular as follows: All the computations over a ring for which we want to execute the algorithm from the field case are delegated to GB. In case we find such that is not prime but we cannot find a factorization of into coprime elements (Proposition 15 (1)), we delegate the corresponding strong Gröbner basis computation to Singular. All the lifting and recombination steps are done in Julia (see Fieker et al. (2017)). Note that in practice we always compute minimal strong Gröbner bases and make sure that minimality is preserved during the recombination using Corollary 13. This makes sure that for all intermediate Gröbner bases that we compute the size is bounded by the size of a minimal strong Gröbner basis of the input.
We use a set of different benchmark systems focusing on pair handling, the reduction process, finding of reducers, respectively. We have computed strong Gröbner bases for these systems over using three different settings for :
For (Table 1) we get a factorization down to the finite prime fields. Thus in all theses examples our new implementation can use the F4 algorithm implemented in GB as base case. With “*” we highlight examples for which there was no non-invertible element discovered, that is, the computation from the field case runs through without any splitting of to be considered. 2. 2.
For (Table 2) we can see that our approach of applying Lemma 8 is very promising: In none of the examples tested we found non-invertible elements, thus we compute the basis as if we are working over a finite field, receiving a correct strong Gröbner basis over . 3. 3.
For (Table 3) we, in general, have to use Singular’s strong Gröbner basis algorithm for computing in . Still, we can see that our approach is most often by a factor of at least faster than directly applying Singular’s implementation over . The only exception is Jason-210, for which Singular is faster: The basis is huge ( generators), thus our new implementation needs roughly of the overall seconds to apply the recombination and lifting due to Corollary 13. Again, we highlight with “*” examples for which there was no non-invertible element discovered.
6 Conclusion
We have presented a new approach for computing strong Gröbner bases over principal ideal rings which exploits the factorization of composite moduli to recursively compute strong Gröbner bases in smaller rings and lifting the results back to . In many situations the base cases of this recursive step boil down to computations over finite fields which are much faster than those over principal ideal rings.
One further optimization of our new approach might be the following: Once we have several factors of found, we can run the different, independent Gröbner basis computations in parallel. This is one of our next steps. Another one is to implement an optimized version of Faugère’s F4 algorithm for in GB.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Bach et al. (1993) Bach, E., Driscoll, J., Shallit, J., 1993. Factor refinement. J. Algorithms 15 (2), 199–222. URL https://doi.org/10.1006/jagm.1993.1038 · doi ↗
- 2Becker and Weispfenning (1993) Becker, T., Weispfenning, V., 1993. Gröbner bases. Vol. 141 of Graduate Texts in Mathematics. Springerg, New York. URL https://doi.org/10.1007/978-1-4612-0913-3 · doi ↗
- 3Bosma et al. (1997) Bosma, W., Cannon, J., Playoust, C., 1997. The Magma algebra system. I. The user language. Journal of Symbolic Computation 24 (3-4), 235–265.
- 4Buchberger (1965) Buchberger, B., 1965. Ein Algorithmus zum Auffinden der Basiselemente des Restklassenringes nach einem nulldimensionalen Polynomideal. Ph.D. thesis, University of Innsbruck.
- 5Buchberger (1985) Buchberger, B., 1985. Gröbner-Bases: An Algorithmic Method in Polynomial Ideal Theory. Reidel Publishing Company, Dodrecht - Boston - Lancaster.
- 6Buchberger (2006) Buchberger, B., 2006. An Algorithm for Finding the Basis Elements of the Residue Class Ring of Zero Dimensional Polynomial Ideal. Journal of Symbolic Computation 41 (3-4), 475 – 511.
- 7Decker et al. (2019) Decker, W., Greuel, G.-M., Pfister, G., Schönemann, H., 2019. Singular 4-1-2 — A computer algebra system for polynomial computations. http://www.singular.uni-kl.de .
- 8Eder (2019) Eder, C., 2019. gb. https://github.com/ederc/gb .
