Lexicographic Gröbner bases of bivariate polynomials modulo a univariate one
Abstract
Let be a monic non-constant polynomial and write the quotient ring. Consider two bivariate polynomials . In a first part, is assumed to be the power of an irreducible polynomial . A new algorithm that computes a minimal lexicographic Gröbner basis of the ideal , is introduced. A second part extends this algorithm when is general through the “local/global” principle realized by a generalization of “dynamic evaluation”, restricted so far to a polynomial that is squarefree. The algorithm produces splittings according to the case distinction “invertible/nilpotent”, extending the usual “invertible/zero” in classic dynamic evaluation. This algorithm belongs to the Euclidean family, the core being a subresultant sequence of and modulo . In particular no factorization or Gröbner basis computations are necessary. The theoretical background relies on Lazard’s structural theorem for lexicographic Gröbner bases in two variables. An implementation is realized in Magma. Benchmarks show clearly the benefit, sometimes important, of this approach compared to the Gröbner bases approach.
keywords:
Gröbner basis , lexicographic order , dynamic evaluation , subresultant1 Introduction
1.1 Context and results
Gröbner bases are a major tool to solve and manipulate systems of polynomial equations, as well as computing in their quotient algebras. Modern and most efficient algorithms rely on linear algebra on variants of Macaulay matrices [20, 21]. Another class of methods, the triangular decomposition, rely on some broad generalizations of the Euclidean algorithm, as initiated by Ritt [46], Wu [55], and pursued by many researchers (see surveys [26, 8, 53] for details). Starting from an input system , these methods produce a family of triangular sets which enjoy the elimination property and satisfies . In dimension zero, these sets form a particular subclass of lexicographic Gröbner bases (lexGb thereafter). This representation is well-understood and implemented since already more than two decades, especially for radical ideals. Although several attempts to represent multiplicities have come out [9, 33, 35, 2] they are limited in scope, and resort to sophisticated concepts while obtaining partial information only. Triangular sets, hence standard triangular decomposition methods, cannot in general produce an ideal preserving decomposition: for example a mere primary ideal in dimension zero is not triangular in general (think of the primary ideal of associated prime ; it is a reduced lexGb for and does not generate a radical ideal). However, the underlying key algorithmic concepts may still be relevant, and the present work shows it is the case, yet in a particular situation.
The algorithms proposed in this work consider lexGbs instead of triangular sets. Although it also builds upon the Euclidean algorithm and hence can be compared to triangular decomposition algorithms, it goes only half-way when decomposing. A splitting follows from those of polynomials in only, by generalizing dynamic evaluation. In particular, no decomposition is produced in the first part, when is the power of an irreducible polynomial. One can expect to decompose along the -variable too, but this requires dynamic evaluation in two variables. Nonetheless, the methods introduced here pave the way toward such decompositions. Let us illustrate this by a toy example.
Example 1 (Computing a lexGb).
From now on p.r.s stands for (subresultant) pseudo-remainder sequence. Below it is computed modulo (Eq. (1)) or modulo (Eq. (2)), refers to the -th subresultant of and . See Definition 2 for details.
(1) |
The last non-zero subresultant is nilpotent modulo . We factor out (it is obvious here, in general realized through a removal of nilpotent coefficients, and Weierstrass factorization), and divide by and by in order to make them monic. We obtain now a monic polynomial modulo . We restart then a subresultant p.r.s of and modulo , while keeping record of the division by .
(2) |
The last non-zero subresultant is a gcd of and (modulo ) so that . Note that is a lexGb of . A minimal lexGb of is then obtained by multiplying by (of which we have kept record) the lexGb and concatenating (this is Line 5 of Algorithm 5).
This lexGb of is minimal but not reduced. If necessary, it suffices to compute adequate normal forms to obtain the reduced one. We will consider lexGbs as output by the algorithms, hence minimal Gröbner bases but not necessarily reduced. ∎
As this example shows, several new steps come into play to handle the computation of the subresultant p.r.s. modulo : removal of nilpotent (Algorithm 1) and Weierstrass factorization (Algorithm 2). These two algorithms transform a non monic polynomial modulo to an equivalent monic one (Algorithm 3). In this way, pseudo divisions can be carried through to retrieve the “first nilpotent” and the “last non nilpotent” polynomials in a modified subresultant p.r.s (Algorithm 4). It suffices then to iterate the above process to compute a minimal lexGb (Algorithm 5).
Generalizing dynamic evaluation
In a second part of the article, can be any monic polynomial. The most interesting cases are when a (monic) large degree factor of is also a factor of the resultant of and . If has no common factor or only a small common factor, the degree of the ideal is small compared to the degrees of the input polynomials and while the algorithms proposed work in this case, they are slower than Gröbner bases.
This however covers most important situations, for example when the input are two polynomials without a modulus . Then we take the resultant itself. In the experimental section 6 (Columns 4 & 7 of the tables), timings show indeed that computing the resultant (Column 3) and applying the algorithms of this work (Column 4) reveals faster or simply competitive with computing a lexGb of (Column 5). Computing the squarefree decomposition of the resultant (Column 6) and applying the algorithms of this work is always much faster.
When is not the power of an irreducible polynomial, Weierstrass factorization does not apply in general and making polynomials monic in order to restart subresultant computations becomes impossible “globally” (that is modulo , while modulo primary factors , it does). Applying the “local/global” philosophy of classic dynamic evaluation fails here too, the polynomial being not squarefree. We show that it is possible to extend it to a general with splittings of type “invertible/nilpotent”, instead of the standard “invertible/zero”. The algorithms developed in the first part to treat the local case are then rewritten under this new dynamic evaluation paradigm. The output are families of lexGbs, deduced from the splittings that occur when attempting a division by a non-invertible element.
Example 2.
(See also Algorithm 7 “”, Example 10) Consider a non-zero polynomial . If is irreducible, is invertible, being non-zero. The Extended Euclidean algorithm permits to find it. If is squarefree not irreducible and then is invertible modulo and zero modulo (the “invertible/zero” dichotomy). This leads to an isomorphism , as in classic dynamic evaluation.
If is not squarefree like , then may still not be invertible modulo . Take for example . Then and . is not invertible modulo . Consider next . This time is invertible modulo , and nilpotent modulo (the “invertible/nilpotent” dichotomy). Moreover, . In the invertible branch, we can pursue computations (typically invert a coefficient of a polynomial in ), and in the nilpotent branch, work as introduced in the first part when .
Main results
In the first part, Algorithm 5 “” and Theorem 3 show how to compute a minimal lexGb of an ideal , where and is the power of an irreducible polynomial .
In the second part, the input are polynomials and a monic non-constant polynomial . They verify the assumption
(H) |
Algorithm 12 “” and Theorem 4 computes, on input , a family of minimal lexGbs such that . The product is a direct one. More precisely, for .
The outcome translates to faster computations of (a direct product of) lexGbs of an ideal than the Gröbner engine of Magma [5], one of the fastest available, especially when is a factor of the resultant of and having multiplicities.
There is no difference if in Algorithm 5 “” is a prime number instead of an irreducible polynomial, and if . The obtained family of lexGbs is made of strong Gröbner bases of the ideal . Indeed, Hensel lifting, Weierstrass factorization, Lazard’s structural theorem [1, Section 4.6] all hold in this context too.
In Algorithm 12 it is similarly possible to replace by an integer and to consider polynomials . The output is then a family of coprime lexGbs whose (direct) product equals the ideal . These lexGbs are strong Gröbner bases.
Motivation
There exists a variety of methods to represent the solutions of a system of polynomials. The most widespread are probably Gröbner bases, triangular-decomposition methods, primitive element representations (among which the RUR [47] and the Kronecker representation [24] have received the most attention), homotopy continuation method [50, 4], multi-resultant/eigenvector methods [3, 18]. However, when it comes to representing faithfully the ideal generated by the input polynomial, it remains essentially the Gröbner bases only. Some of the aforementioned methods have the ability to represent a multiplicity of a solution, which is just a number, however this is nowhere near to be ideal preserving. This work is somehow affiliated to the triangular-decomposition method, having the Euclidean algorithm at its core. It thus constitutes a first incursion to ideal preserving methods based on the Euclidean algorithm.
Primary decomposition constitutes another clear motivation. Being factorization free, this work nor its generalizations can compute directly a primary decomposition. Rather, it yields a decomposition at a cheap cost, so that a primary decomposition algorithm can then be run on each component. Finding a decomposition efficiently is indeed a well-known speed-up in the realm of primary decomposition [14, Remark 2]. For example, the PrimaryDecomposition command of Magma tries to compute a triangular decomposition from a Gröbner basis (apparently following [28]) in order to reduce the cost of internal subsequent routines such as factorization. It is not known how to do this for non-radical ideals. In addition, the lexicographic monomial order plays a crucial role in GTZ-like primary decomposition algorithms [23]. As mentioned above, in this work decompositions follow only from polynomials in , so comparisons would be premature. We would rather wait that decompositions following the variables are developed, which essentially amounts to dynamic evaluation in two variables.
Direct product of lexGbs
While our algorithms naturally compare to Gröbner bases’ ones, the output differs in that it is a family of lexGbs. However, this is not a drawback. Indeed it carries more information, like an intermediate representation toward the primary decomposition. Normal forms, for example to test ideal membership, can be done componentwise. It is also possible to perform other standard ideal operations. Besides, when the coefficients are rational numbers, their size are smaller: this stems from the fact that one lexGb can be reconstructed from the family output by our algorithm, through the Chinese remainder theorem, which induces a growth in the size of the coefficients. See [11] for details. Additionally, decomposing a lexGb for solving has been known to be advantageous since a long time [28].
1.2 Previous and related work
On the general method
There exists a quite dense literature about representations of the solutions of a system of polynomials , whether they are simple or not.
One line of research builds upon a subresultant sequence. It started with [25] by Gonzàlez-Vega and El Kahoui, with several forthcoming articles improving the idea. In the background of these works lies the topology of plane (real) curves defined by polynomials over the rationals. The analysis of the bit-complexity is thus a central aspect, and the forthcoming works aim at improving it [15, 6, 31, 34]. From a subresultant sequence of and , it computes a triangular decomposition of the common set of solutions of and . A key step is to take the squarefree part of the resultant. It thus does not consider representation of multiplicities.
Another direction considers shearing of coordinates, for representations in term of primitive element (RUR) [6, 37]. It should be noted that primitive element representations cannot be ideal preserving [47, Remark 3.1].
As for general triangular decomposition methods, some have studied the representation of multiplicities. In most references below the multiplicity is equal to the dimension of a certain local algebra. In the bivariate case, [9] proposes algebraic cycles and primitive p.r.s. to find the multiplicity of each primary components. A preliminary study of deformation techniques is found in [33] that computes a certain multiplicity number. The intersection multiplicity through Fulton’s algorithm was investigated in the bivariate case in [35]. The complexity of this approach remains unclear. It was extended in [2] to multivariate system by reducing to the bivariate ones, through a method dealing with the tangent cone.
The present work distinguishes from the above in that it faithfully produces an ideal preserving representation, which contains far more information than a multiplicity number, yet relying ultimately on the classic routine: the subresultant. To compare with other formal techniques supplied with the ideal preserving feature, I am only aware of Gröbner bases computations.
About the subresultant algorithm
Algorithm 4 “” presents a subresultant algorithm computed modulo the power of an irreducible polynomial . If the input is written then the output written with , and monic (in ) polynomials, satisfy . is a monic gcd of and modulo if there exists one, in which case (such a gcd does not necessarily exist see [12]). Otherwise, and this algorithm provides a weak version of the gcd, with the ideal preserving feature. The terminology reflects the fact that is the last non-nilpotent polynomial “made monic” in the modified p.r.s, while if the first nilpotent one “made monic” too (we assume that is a nilpotent element in this article).
Moroz and Schost [41] propose to compute the resultant modulo , that is when with our notation. It shares some similar tools, Weierstrass factorization and Hensel lifting. However, their purpose is to write a quasi-linear complexity estimate, rather than producing a practical and neat algorithm. The idea amounts to adapt the half-gcd algorithm that runs asymptotically in quasi-linear time, to this particular context — whereas here it is the standard quadratic time subresultant algorithm that is used. The possibility to compute subresultants along with the resultant, required by Algorithm 4, is left open in [41]. The present article aims rather at practical algorithms and implementations. The algorithms presented here being new, they must demonstrate their practical efficiency, and be as simple as possible to check their correctness and to be implemented. Despite this, the description is already quite technical, and the possibility to incorporate faster routines such as the half-gcd for computing subresultants appears to be an interesting challenge for future work. The algorithms described are all implemented “as such” in Magma [5] (see http://xdahan.sakura.ne.jp/gb.html), and in many cases outperform the Gröbner engine of Magma, yet equipped with one of the best implementation of the F4 and FGLM algorithms.
Recently, faster algorithms for the computation of the resultant of have come out [51, 49]. It does so by bypassing the computation of a p.r.s sequence — whereas here the p.r.s. is essential. These outcomes imply directly an algorithm that computes a lexGb of the ideal within the same complexity. However, they require strong generic assumptions: the lexGb must consist of two polynomials, and the unique monic (in ) polynomial shall be of degree one. These assumptions lie far away of the present work that deal with lexGbs containing many polynomials of arbitrary degree.
The algorithms of this article adapt straightforwardly to univariate polynomials and that have coefficients in . When with a prime number, one can think of -adic polynomials, being the precision. A related work [7] in this situation studies the stability of the subresultant algorithm to compute a (-adic) approximate gcd. It should be mentioned that this gcd is not monic, nor have an invertible leading coefficient, hence is of limited practical interest. The subresultant algorithm therein does not hold the crucial functionalities (Hensel lifting, Weierstrass factorization) that make polynomials monic.
About dynamic evaluation
The second part of this article involves dynamic evaluation. In its broad meaning, this technique automatically produces case distinctions depending on the values of some parameters in an equation. More precisely here, the two algebraic equations are the polynomials and in the variable , the parameter being . The case distinctions comes from the image of their coefficients (in ) modulo each primary factor of . In this context, classic dynamic evaluation considers squarefree; A primary factor is then of the form (at least in the algebraic closure) for a root of : this corresponds to the evaluation of the parameter at the value . This work allows Taylor expansions at at order if the primary factor of is of degree namely is . The case distinction still follows from the different roots of , thus the different Taylor expansions considered should be at different expansion points.
The computational paradigm of dynamic evaluation, introduced in [16] is quite simple. A squarefree polynomial is split by a gcd computation when attempting to perform an inversion modulo , see Example 2. It is not surprising that such splittings actually appeared before [16] in the realm of integer factorization, as Pollard did with his rho method [45]. In the algebraic context, dynamic evaluation, also coined “D5 principle” [16], has been quite thoroughly studied, especially toward manipulation and representation of algebraic numbers [17], generalization to multivariate polynomials through the triangular representation [40], becoming a major component of some triangular decomposition algorithms [32]. Another standard reference is [39]. Concerning complexity results, we refer to [10] that brings fast univariate arithmetic to this multivariate context, or more recently to [48]. The splitting can also be performed in an ideal-theoretic way through Gröbner bases computations, see [43], but at a probably too expensive cost to be competitive with what gcd computations afford. Except this latter article, all these previous works manipulate squarefree polynomials only, the present work being to the best of my knowledge, the first addressing general univariate polynomials.
1.3 Organization
The first part (Sections 2-3) considers equal to the power of an irreducible polynomial. Section 2 is made of preliminaries: Lazard’s structural theorem, Weierstrass factorization through Hensel lifting, subresultant p.r.s are recalled. The following section 3 introduces the main subresultant routine “”, and shows how to deduce a minimal (not reduced in general) lexGb of . The second part considers general and is treated in Sections 4-5. This consists essentially in translating the algorithms presented in the first part into a dynamic evaluation that works when is not necessarily squarefree. Section 4 introduces the dichotomy “invertible/nilpotent” and applies it to the algorithms that make polynomials monic. It is followed in Section 5 by the generalization of the algorithm “” that computes the “monic form” of the last nilpotent/first nilpotent polynomials in the modified subresultant p.r.s of and , and by the computation of families of lexGbs whose (direct) product is . An experimental section 6 shows the benefits of an implementation realized in Magma of this approach, compared to Gröbner basis computations. A special emphasize is put on the case of an input , without a modulus in Section 6.4 due to the importance of this case and the questions it raises. The last section 7 describes some improvements for future work and various generalizations.
As one can see, the second part encompasses the algorithms proposed in the first part, restricted to when . Is this first part then really necessary ? Well, rewriting known algorithms to the classic dynamic evaluation paradigm is one thing, rewriting new algorithms in a new dynamic evaluation is another one. Without the first part, the algorithms of the second part would become too obscure. Besides, some of these algorithms rely on those restricted to the “local case” dealt with in the first part, in order to alleviate the proofs.
Notations and convention
Below are gathered some notations used in this paper:
-
•
: squarefree part of a polynomial .
-
•
a polynomial strictly divides another polynomial if and .
-
•
denotes the set of irreducible polynomials in . Given and a polynomial , is the largest integer such that .
-
•
an ideal generated by a family of polynomials is denoted .
-
•
will denote a perfect field: irreducible polynomials are squarefree in any algebraic extension of .
-
•
a product of ideals is direct if the ideals are pairwise coprime. Unless otherwise specified, all products of ideals will be direct.
-
•
all lexicographic Gröbner bases are monic, meaning that their leading coefficient is .
-
•
although zero is usually not considered a nilpotent element, it is convenient to assume it is one.
-
•
a value output by an algorithm is ignored by writing “” (underscore) instead of that value.
-
•
algorithms are written as pseudo-codes. There is no obvious shortcut that would allow to simplify them furthermore. Most routines are indeed elementary, and it essentially amounts to recursive calls, and case distinctions. The proof of correctness follows the lines of the algorithms. They are all self-contained though, copiously commented which should allow to read them without too much effort.
2 Preliminaries
We consider a perfect field , and a monic non-constant polynomial . Write the quotient ring. The other input are two polynomials , in reduced modulo . The lexicographic monomial order with is put on the monomials of . In the first part Sections 2-3 is a power of an irreducible polynomial , .
2.1 Nilpotents
Definition 1.
Let be a non-constant monic polynomial in . An element is invertible if and only if . It is nilpotent if all irreducible factors of divide . Equivalently, if the squarefree part of divides .
The following result is classical and elementary:
Proposition. A polynomial is nilpotent if and only if all its coefficients are nilpotent in , or equivalently, if divides .
Example 3 (nilpotent element).
Let . Then is nilpotent modulo , modulo , and modulo , but not modulo . ∎
Example 4 (nilpotent polynomial).
Let and . Then is nilpotent since its coefficients and are all nilpotents. ∎
2.2 About lexicographic Gröbner bases
The lexicographic monomial order with is a total order on the monomials of defined as if , or and . Given a non-zero polynomial, the notation will refer to the leading monomial for among the monomials occuring in . A lexGb of a polynomial system generating an ideal is any family of polynomials such that for any there is a such that . If is simply an Euclidean ring, variations exist, and the one corresponding to this definition is called a strong Gröbner basis. The Gröbner basis is minimal if for all , is not divided by for any .
In 1985, Lazard [30] completely characterized lexGbs in , result now known as “Lazard’s structural theorem”. It will be used in the following form:
Theorem 1.
(A) Let monic non-constant polynomials such that divides for . Let also monic (in ) polynomials of increasing degree: . The list of polynomials
is a lexGb if and only if:
(3) |
It is moreover minimal if and only if strictly divides for .
(B) Assume now that above is already a lexGb. Given a monic non-constant polynomial, and monic (in ) of degree larger than that of all the polynomials , then
is a lexGb if and only if . It is moreover minimal if and only if is minimal.
Example 5.
The system of polynomials is a minimal lexGb. Indeed, with the notation of the theorem we have and . Moreover strictly divides . The condition is the only one that we must verify. It translates to the condition which is clearly true.
However, the system is not a lexGb. Indeed, .
Proof.
Part (A) is a restatement111 with the notations s of Lazard’s article: , , and and . of Lazard’s theorem [30, Thm 1] in our particular context.
Part (B) is straightforward when we translate the conditions of Eq. (3) made on the list to the list . Indeed, all these conditions, except the one mentioned that is (), are verified since is assumed to be a lexGb. If is minimal, then the condition for minimality is guaranteed since is assumed to be non-constant. ∎
2.3 Making polynomials monic
In order to cope with subresultants which do not have an invertible leading coefficient modulo , a routine that transforms them into equivalent monic polynomials is presented here. If the polynomial is not nilpotent, Weierstrass factorization allows to realize this. Else, we need first to “remove” the nilpotent part. When , it suffices to factor out the largest power of that divides it. When is general however, a polynomial which is not nilpotent may not necessarily have a coefficient that is invertible. We need then dynamic evaluation as introduced in Section 4. The main algorithm 3 “” is a wrapping of two subroutines, Algorithm 1 “” and Algorithm 2 “”. The first one puts the polynomial that we want to “make” monic into a form of application of the second algorithm. This second one realizes Weierstrass factorization through Hensel lifting. In the subsequent algorithms, only the “” wrapping algorithm will appear (and no more “” nor “”).
Overview of Algorithm 1 “”
We assume in this section and the next one that is the power of an irreducible polynomial. The algorithm “” has two effects: find the largest power of that divides the input polynomial (case of return at Line 1), or, if there is none, find the coefficient of highest degree that is not divided by (case of a return at Line 1); This coefficient is then invertible modulo . The algorithm scans the coefficients by decreasing degree and updates the computation with a gcd (Line 1). If the coefficient (of ) is invertible modulo , the algorithm also outputs the largest power of that divides all coefficients of degree higher than , as well as the inverse of modulo . These output are indeed required to perform Weierstrass factorization through Hensel lifting (Algorithm 2 “”).
It may thus be necessary to call Algorithm 1 twice: one to remove the nilpotent part, and one to find the largest coefficient that has become invertible. Then, Weierstrass factorization Algorithm 2 can be called. Let us see this through an example:
Example 6 (Algorithm 1 “”).
Let and , . This polynomial is nilpotent, and to “remove” the nilpotent part, running Algorithm 1 “” gives (see the specifications):
(4) |
Indeed, but . The second output is meaning that there is no coefficient of that is invertible modulo (since is divided by ). The third output has no importance in this case, and according to the conventions is replaced by an underscore “__”.
Then is not nilpotent, so that running again will output:
(5) |
The second output indicates the degree one in . Indeed, the coefficient of in is , which is indeed invertible modulo . The inverse modulo of is then which is the third output.
Note that the coefficient of in is not invertible hence is divided by (this coefficient being ). The first output returns the highest power of that divides this coefficient: divides . ∎
Remark 1.
is nilpotent if and only if where (again, underscores “” replace unimportant output).
Lemma 1 (Correctness of Algorithm 1 “”).
The three output satisfy the specifications 1-2-3.
Weierstrass factorization through Hensel lifting
The Weierstrass preparation theorem states that a formal power series with coefficients in a local complete ring , not all of them lying in , factorizes uniquely as where is monic and , and where is an invertible power series. In the traditional version, the degree of is equal to the smallest degree coefficient of the series not in . If is a polynomial, it is easy to adapt proofs so that is the degree of the highest degree coefficient of not in . Indeed, it suffices to consider the reverse polynomials to switch back to the the smallest degree coefficient. In our context the local complete ring is , (indeed it is isomorphic to , which is a finite quotient of the local complete ring ).
Lemma 2 (Weierstrass).
Given , written , with the coefficient of highest degree not in (that such a coefficient exists is a pre-requirement), there exist two polynomials and defined below such that:
(1) .
(2) is monic of degree , and
(3) with and for . In particular is a unit of , so that: .
To compute the monic polynomial in practice, “special” Euclidean division [27], linear algebra, and Hensel lifting [42, Algo Q] are available. The latter is the most efficient and works in more general situations that are required in the second part of this article. This is what is used in [41, Thm. 1] for their “normalization” (whose purpose is to make polynomials monic too). Since a proof (and more) can be found in [42], it is not reproduced here. That proof relies entirely on Hensel lifting and does not involve Weierstrass preparation theorem, however Algorithm (Q) given by Musser is really a Weierstrass factorization when the modulus is the power of an irreducible polynomial. This implementation has the advantage to extend straightforwardly when the ring of coefficients is not necessarily a local ring, but a direct product of thereof — and that no division by zero occur. This feature helps to generalize the dynamic valuation as undertaken in Section 4, in that we can rely again on the same algorithm 2 when the modulus is not a power of an irreducible polynomial.
This algorithm essentially reduces to quadratic Hensel lifting (QHL). It lifts a factorization, and, as always with QHL, a Bézout identity. A standard form of QHL is described in Algorithm 15.10 of [52] and we refer to it for details. Given and , the notation:
assumes that:
Here, the initial two factors of the input polynomial are the coefficient of , and (so that is a monic polynomial of degree modulo ). The lifting produces the same equality modulo . This integer is the smallest integer for which divides . That such an integer exists follows from . The initial Bézout identity is given for free here: indeed .
Example 7 (Algorithm 2 “”).
With input modulo , and , and . All input’ specifications are satisfied: the coefficient of degree 2 is nilpotent modulo , the coefficient of degree 1 is invertible. As expected, we have and ; As well as .
We have . Now we lift until . The Bézout identity that is also lifted is given for free. In this example one step of lifting is sufficient since , yielding . Then . ∎
As already explained, Algorithm 3 “” encapsulates the two algorithms “” and “” described above in one algorithm. On input , it outputs the largest polynomial that divides , and monic which is “equivalent” to in the sense that .
Lemma 3 (Correctness of Algorithm 3).
The output satisfies the equality of ideals with monic (in ) and .
Proof.
The call to at Line 3 outputs . We must distinguish two cases:
Case of exit at Line 3. Here . According to the output’ specifications of “”, divides and the coefficients of . Additionally, is invertible modulo of inverse . Therefore the five entries of at Line 3 satisfy the input’ specifications of . Its output’ specifications provide: . In conclusion, the output of satisfy the required specifications with .
Case of exit at Line 3. Here , which means that, according to the output’ specifications of “”, divides all coefficients of , as well as . It follows also that has an invertible coefficient modulo . Therefore the second call to “” at Line 3 implies that the output satisfy: is invertible modulo with . Additionally, divides all the coefficients of . Consequently, the five entries satisfy the input’ specifications of at Line 3. The output hence verifies , which is what we wanted to prove. ∎
2.4 Subresultant p.r.s
As explained in the introductory examples 1, the last non nilpotent and the first nilpotent (which may be zero according to our convention) polynomials in the modified subresultant p.r.s. need to be retrieved. The p.r.s is computed modulo which requires special care since very few results exist when coefficients are in a non-reduced ring. In particular the classic formula (6) may fail because of inverting a leading coefficient which may not be invertible. If such a subresultant is met, either all its coefficients are nilpotent and we have found the first nilpotent, either it has one invertible coefficient and it can be made monic (previous section); Then a subresultant computation is restarted (Line 4 of Algorithm 4). Before giving details of Algorithm 4 in the next section, the remaining of this section of preliminaries recalls the most fundamental results of the theory of subresultants.
Review
The subresultant p.r.s is a central topic in computer algebra and as such has been studied extensively; We will only recall the key results. It enjoys many convenient properties both algorithmically and theoretically.
On one hand a subresultant of two polynomials is the determinant of a certain matrix derived from the Sylvester matrix. It can be defined over any ring. But computing them in this way is costly. On the other hand, there is the subresultant p.r.s. computed through the formula (6). The main and classic result is that both objects are related through the block structure (a.k.a gap structure) theorem. Computing subresultants through a p.r.s is cheaper. The latter assumes traditionally that the input polynomials and are in a unique factorization domain.
It is possible to address polynomials having coefficients in rings of type thanks to the specialization property. This is addressed in Section 3.1, here only standard definitions and results are recalled.
Definition 2.
Write the degrees in of any Euclidean p.r.s of and in , with , .
-
•
For , the -th subresultant of and , written , is defined as the polynomial of degree at most whose coefficients are certain minors of the Sylvester matrix (see e.g. [38, Prop. 7.7.1]).
-
•
For , .
-
•
For , .
-
•
Let and and assume . For we define the -th subresultant of and , written , whose coefficients are certain minors of the Sylvester matrix of and .
Both subresultant families and are related by the following functorial property:
Lemma 4 (Corollary 7.8.2 of [38]).
Write , and the reduction map. As above let and with , and and . Assume . Then for ,
-
1.
If and , then .
-
2.
If and , then .
-
3.
If and , then .
Writing and , the subresultant p.r.s over is defined through the formula below (sometimes called “First kind subresultant p.r.s” [38, Definition 7.6.4]):
(6) | |||||
Theorem 2 (Subresultant’s chain theorem — Thm. 7.9.4 of [38]).
The subresultant p.r.s and the subresultant chain are related as follows:
is the top subresultant in the block it belongs to.
3 Gröbner basis from modified p.r.s
The algorithm 5 “”, presented in paragraph 3.2, produces a minimal lexGb of the ideal . It is very simple if we take the modified subresultant algorithm 4 “” for granted: one call to “” (Line 5), a recursive call (Line 5) and an update of the output of this recursive call (Line 5).
On the other hand the algorithm 4 “” is more technical, as often the case when dealing with subresultants. The rough idea summarizes as: “make subresultants monic” if their leading coefficient is not invertible modulo , then pursue the computations of subresultants through a recursive call, until a nilpotent subresultant is found. This simple description hides however the special care that corner cases and degree conditions require. It thus might be useful to have a look at Algorithm 5 “” in prior Algorithm 4 “”, as a motivation.
3.1 Subresultant p.r.s. modulo
This section introduces the algorithm 4 “”. Running the subresultant p.r.s over yields significant and unnecessary growth in the degree in of the coefficients. Only the image modulo , that is of degree in bounded by that of , is needed. Unfortunately, the formula (6) formally works only over unique factorization domains. The classic workaround consists in taking the homomorphic image by :
Proposition 1.
Let polynomials and in of respective degrees (in ) , and let be the homomorphism as defined above. For a given integer , if the are invertible modulo for , then the formula (6) specializes well by :
Write . For then, and . And, for :
In particular for , and can be computed modulo using formula (6) (index included although is not assumed invertible modulo ).
Proof.
We need to show that commutes with all operations and primitives involved in the formula (6). First of all, for by assumption. Hence the Euclidean degree sequence is also that of the one initiated with too, up to . Therefore, for , the pseudo-division equality specializes by : , whence: , for . Moreover the pseudo-quotient and pseudo-remainder are uniquely determined. Besides, the formula involves only algebraic operations which commute by definition with the homomorphism . Therefore, commutes as expected. In particular, although is not assumed to be invertible modulo , we still have
Corollary 1.
With the notations as in Proposition 1, let and . Consider the p.r.s computed in with . Let be the one computed modulo as explained in Proposition 1, under the assumption that the ’s are all invertible modulo . Assume that is not invertible modulo or .
We have for any .
Proof.
Over the unique factorization domain , it is classical that the subresultant p.r.s verifies for any . By Proposition 1, for , hence:
for ∎
Proposition 2 (Correctness of Algorithm 4).
The output of verifies:
If then and . Moreover, we also have the following degree conditions:
(7) |
except in the following corner cases:
-
(i)
possibly holds if and are respectively the monic form of and with nilpotent (implying ) and .
-
(ii)
possibly holds under the condition i above.
-
(iii)
The only other situation where is when is not nilpotent (equivalently is invertible) modulo , and .
In this case, is the monic form of and that of .
Example 8 (corner cases in the degree condition).
Proof.
We start by the proof of correctness before turning to the proof of the degree conditions (7).
Proof of correctness. We investigate the three returns in the algorithm separately.
Case 1: Exit at Line 4. The algorithm does not enter Lines 4-4, which means that the if-test Line 4 was never passed: the leading coefficients in the p.r.s are all invertible modulo , and . The output at Line 4 is
Therefore . Moreover, . Note that is monic verifying . Besides, by Corollary 1, , and since we get . We obtain: as expected.
In the remaining two cases, is not zero, which proves the assertion that if then , and .
Case 2: Exit at Line 4. The if-test Line 4 tells that is not invertible modulo , while the s are for . At Line 4 “” we have from the definition of the “” algorithm that , with and monic. Moreover (the if-test at Line 4) implies that is nilpotent. On the other hand, is invertible modulo : the inversion at Line 4 is correct and is monic verifying . By Corollary 1 we have . This is what we wanted to prove in this case 2.
Case 3: Exit at Line 4. There, is not invertible modulo , and since , is not nilpotent. As above, we have . Additionally, : is not nilpotent but is, so the Weierstrass factorization of produces a monic polynomial of degree smaller than that of . And since is invertible modulo , . The recursive call is thus made with monic polynomials and of degree smaller than that of and ; Indeed, observe that:
(8) |
Therefore, the recursive call ultimately boils down to Case 1: its output verifies and . Since , and that by Corollary 1 we have . We conclude that .
Proof of the degree conditions (7). If at least two pseudo-divisions occur in the algorithm (including in recursive calls), they induce at least two strict degree decreases in the modified p.r.s computed. Both and being the monic form of the last two polynomials in that modified p.r.s, it follows that:
which proves the degree conditions (7). No corner cases can happen in this situation.
If exactly one pseudo-division occurs then:
-
-1-
either is invertible modulo and
-
-2-
or not and then, letting be the monic form of (Line 4), and that of (Line 4), a recursive call “” is performed (Line 4). But then, and being monic at least a pseudo-division should take place inside this recursive call, a contradiction. This situation 2 cannot happen in case of one pseudo-division only.
Note that cannot be nilpotent for one pseudo-division to occur. The algorithm then stops, meaning that is nilpotent (which may be zero according to our convention). Then is its monic form, and is the monic form of . We have:
(9) |
which proves the degree conditions (7). For (possible corner cases i-ii ) to hold, necessarily . The pseudo-division of by writes as:
The degree equality implies that , and since :
This is the corner case iii. Corner cases i-ii do not occur.
If no pseudo-division occurs at all, then is already the “first nilpotent”. The polynomials and are then respectively the monic form of and . Since is invertible modulo by assumption, , in particular : this is corner case ii. We can then observe that:
This proves the degree conditions (7). For to hold, the condition is necessary, proving the situation of corner case i. ∎
3.2 Deducing the Gröbner basis
The main algorithm 5 essentially iterates the algorithm 4 “” through recursive calls. We refer to Example 1 in Introduction.
Theorem 3.
The output is a minimal lexGb of .
Proof.
Among the four returns in the algorithm, the first three ones are base cases treated in Cases 1, 2, 3 below. The last return (Case 4) involves a recursive call and requires more care.
Case 1: Exit at Line 5. Here or is a non-zero constant, thus and the output should be .
Case 2: Exit at Line 5. By the input’ Specification 1., is assumed to have an invertible leading coefficient modulo , and by input’ Specification 2. is not nilpotent (which implies that according to our convention). This legitimates the call to at Line 5, according that and should verify these assumptions. By definition of “”, the output verifies . So that if then and the output should be . This is precisely what returns the algorithm at Line 5.
Case 3: Exit at Line 5. Here , which implies , and by Proposition 2. The return precisely outputs , which is a lexGb (actually a bivariate triangular set).
Case 4: Exit at Line 5. The recursive call at Line 5 makes sense, its input , and satisfying the input’ specifications: and are monic and (this degree inequality follows from the degree condition (7) of the output of “”). Here , as the case is treated in Case 3. By the degree condition (7) of Proposition 2 we have unless one of the corner cases ii or iii occur. In Case ii, which assumptions are that of Case i, is nilpotent, excluded by the input’ Specifications. And in Case iii, which is nilpotent (maybe by our convention, but the case is already treated in Case 3.). Thus, by Eq. (9):
Therefore, the input of the recursive call Line 5 displays in any case a degree decrease compared to the input of the main call: always hold the following inequalities
and at least one of the two strict inequalities holds
We can assume by induction that this recursive call is correct: is a minimal lexGb of . Moreover, inside the recursive call made at Line 5, the algorithm either went through Line 5 or through Line 5. If it exists at Line 5, then since , this means . The output is and the final output is which is a minimal lexGb. Else, at Line 5, let us write the call to “” as:
and let us prove that . The degree conditions (7) of the proposition 2 asserts that it is indeed the case, except maybe for the corner cases ii or iii where possibly holds. Both corner cases ii or iii imply that , but this equality does not hold. Indeed holds only under Case i (as output of the call at Line 5 this time) where is assumed nilpotent. But the specifications of Algorithm 5 “” prescribes to be nilpotent. Hence and finally .
Therefore, by construction of the lexGb, the polynomial has a degree (in ) larger than all polynomials constructed in . We can thus apply Theorem 1-(B) (to and ) which allows to conclude that (as defined at Line 5) is a minimal lexGb if and only if . This is obviously the case, since .
It remains to show that the minimal lexGb generates the ideal to achieve the proof of Case 4. Since , it suffices to show that . From , we obtain . Hence . ∎
4 Generalizing dynamic evaluation
4.1 Splitting “invertible/nilpotent”
Part of a polynomial whose support of irreducible factors are given by another polynomial
Assume that two monic polynomials and are squarefree. Then and are pairwise coprime. Moreover , according that or . We need a similar routine when and are not squarefree. As seen in Example 2, it suffices to iterate a gcd computation until the two factors become coprime.
Definition 3.
Let be the set of irreducible polynomials of . Write the factorization into irreducibles of , and that of . The -component of , denoted is the polynomial .
Example 9 (Isolating irreducible factors algorithm 6 “”).
Let and . Then .
There are several ways to take the -component, we give a standard and easy one.
Lemma 5 (Correctness of Algorithm 6 “”).
The output are coprime polynomials that verify , and , with .
Proof.
Let be the last index at the exit of the repeat loop, so that are the output. The exit condition of the repeat/until loop is , hence with the notation we have adopted. Thus and . We must show two things. First, that and is equivalent to . Second, that is coprime with .
If we rewrite the update line 6 in terms of -adic valuations, we get:
(10) |
With the notations of Definition 3, at initialization we have and . Note that for any irreducible polynomial such that , the sequence of integers strictly decreases to zero, regarding that and thus .
Assume first that there exists an index such that , and then take the smallest index that verifies this inequality. Then and thus . It follows that , then , and . By induction, we observe that , that , and that .
Besides, since is the smallest index for which , we have that for . Consequently, and by induction we observe that . We obtain:
By induction, . We get: . In conclusion, when and when there is a that satisfies .
If there is no such , then the first equality in Eq. (10) implies that . Moreover the output is equal to 1 hence thereby . Additionally, it follows still from Eq. (10) that . For such an irreducible polynomial , the definition of the -component says that must be . This concludes the proof of the output’s specification 1. in any case.
Finally, let us prove that the output are coprime. From and , we deduce that when . When then , and thus . It follows that, either and or and . This means that and are coprime. ∎
Remark 2.
is nilpotent modulo , and is invertible modulo . Indeed all irreducible factors of are irreducible factors of , hence . And does not have any common irreducible factors with .
The splitting “invertible/nilpotent”
The algorithm 7 “” is the cornerstone for generalizing the dynamic evaluation from a modulus that is a squarefree polynomial to a general modulus. The splitting that it induces is “invertible/nilpotent” instead of “invertible/zero” in the standard dynamic evaluation. It is similar to “” algorithm except that the inverse of modulo is also returned.
Proposition 3.
The algorithm 7 “” splits the polynomial into two coprime polynomials and , and outputs two polynomials and such that: is invertible modulo and is nilpotent (maybe zero according to our convention) modulo . Moreover, , and .
Remark 3.
The polynomials are uniquely determined by and .
Proof.
Example 10 (Algorithm 7 “”).
Let be two monic and distinct irreducible polynomials of , . Let with coprime with and with . Then is invertible modulo , and is nilpotent modulo . Then .
With as above and , then .
Still with , and invertible modulo then .
4.2 Monic form according to dynamic evaluation
The next fundamental operation makes polynomials monic. In the case of polynomials over a field, it suffices to invert the leading coefficient. Modulo a squarefree polynomial , it requires classic dynamic evaluation to handle potential zero-divisors: start with the leading coefficient, and if there is a zero branch, carry on with the next coefficient etc. until there is no zero branch.
The situation is more subtle when is not squarefree. This stems from the necessity to perform a Weierstrass factorization to make a polynomial monic.
Overview of Algorithm 8 “”
It investigates all the coefficients of by decreasing degree through recursive calls, by splitting into an invertible branch, and a nilpotent one. It returns the inverse of the coefficient in the invertible branches, and continues with the next coefficient in the nilpotent one. That the branches do not overlap is due to the specification in Algorithm 7, namely the underlying polynomials and obtained in the splitting are coprime. The output is a compilation of the results obtained at the endpoints of all the branches. See Example 11.
The purpose of the algorithm 8 “” is to provide the correct input for “” algorithm, like its local counterpart, Algorithm 1 “”. It is a recursive algorithm, the main call being . Recursive calls take as third input an integer smaller than , and a polynomial that divides as the fourth input. The lemma below addresses the validity of the algorithm throughout recursive calls, and Corollary 2 finalizes the proof of correctness of Algorithm 5.
Lemma 6.
Assume that the algorithm is correct for a fixed polynomial , and for any polynomial , and integers for a fixed integer , and a polynomial , all satisfying the input’ specifications. Then the algorithm is correct with input , any and satisfying the input’ specifications, for the integer ,
Proof.
Let be the coefficient of degree in (Line 8). There are four cases to investigate:
(a) , return at Line 8.
(b) , is invertible modulo , that is . The return occurs at Line 8
(c) , is nilpotent, that is and . The algorithm ends at Line 8.
(d) , has an invertible part and a nilpotent part, that is , . Return occurs at Line 8.
Case (a). The algorithm goes directly to Line 8 where a recursive call is done with input (instead of in the main call), hence is correct by assumption: the output verifies the specifications. Since has coefficient of degree in this case, the output is the same with input . Moreover these specifications are unchanged with or .
Case (b). The coefficient is invertible modulo . There is no splitting at Line 8. The output at Line 8 verifies the specification: since , is the inverse of the coefficient modulo , is the gcd with of the coefficients of degree larger than by assumption, and .
Case (c). The coefficient is nilpotent hence . The recursive call made at Line 8 outputs which verifies the specifications with input . One easily verifies that this output also complies with the specifications corresponding to the input .
Case (d). There is a splitting into an invertible branch and a nilpotent one (Line 8). In the invertible branch, the algorithm returns an output similar to Case (b). In the non-invertible branch, a recursive call is performed and reduces to Case (c). The final step merges these output, which all-in-all verify the required specifications. ∎
Corollary 2.
Algorithm 8 “” is correct.
Proof.
The main call is made with . The proof proceeds by induction on . The base case corresponds to and more precisely to:
The output at Line 8 is then and satisfies the required specifications.
The induction hypothesis assumes that the algorithm is correct for a fixed integer : with input where , , and is any integer , the algorithm is correct. Then Lemma 6 shows that the algorithm is correct for input where achieving the proof by induction.∎
Example 11 (Algorithm 8 “”).
Consider the polynomial and . The main call is
First coefficient, that of : . We have
since is nilpotent modulo . Thus , and .
Recursive call at Line 8 is : .
Second coefficient, that of is: .
thus and . Thus at Line 8-8 and . Next consider Line 8. We obtain
that is supplemented with the recursive call .
Third coefficient is . , thus and . The return occurs at Line 8 with . Finally, where:
We have indeed , , and . Also, for , , and . Moreover, . So that all specifications are satisfied. ∎
Overview of Algorithm 9 “”
Again it translates the algorithm 3 “” to dynamic evaluation. Among the two subroutines involved, only creates splittings, indeed does not perform divisions. Note that the description of “” in Algorithm 2 does not assume to be the power of an irreducible polynomial. There is no need to adapt it to dynamic evaluation.
After a first call to at Line 9, is a collection of data like the output of the local version . For each component of two cases must be distinguished: if then is nilpotent and , or . In the former, a second call to (Line 9) is performed after dividing the input by . This second call creates subbranches requiring to “project” some polynomials on these new factors (role of the call to at Line 9).
-
(a)
and,
-
(b)
if ,
-
(c)
divides modulo
-
(d)
.
Proposition 4 (Correctness of Algorithm 9 “”).
Proof.
1’. ,
2’. and the s are pairwise coprime
4’. (not important)
5’. , and .
Case . This concerns Line 9 and onward. This means that is not nilpotent modulo and . The output of the first call to at Line 9 is then ready to be used by Algorithm at Line 9 (its specifications being satisfied). We obtain with monic. And consequently, by the Chinese remainder theorem and the specifications 1’-2’. above:
Besides, note that the third component of the list added to at Line 9 is , which means that . Specification c is clearly true while Specification b is void. Moreover:
(11) |
Case . This concerns Lines 9-9. We then have and . By specification 5’. above, . Thus . Consequently,
(12) |
Consider now Line 9 as well as a component , written . It verifies the specifications 1.-5. of Algorithm 2.
1”. ,
2”. and the s are pairwise coprime
3”.
4”. (not important)
5”. , and .
Indeed, holds. Otherwise would divide , excluded as seen above in Eq (12). Therefore, the component is ready to be used by Algorithm 2 “” at Line 9, its input’ specifications being satisfied by . Its output hence verifies with monic. Specifications 1”-2”. imply, with the Chinese remainder theorem:
(13) |
Eq. (13) then implies with the Chinese remainder theorem according to Specifications 1’-2’.:
(14) |
Line 9 introduces the -component (Definition 3) of :
The specifications of tell that and is coprime with . We see then that
(15) |
Moreover the polynomials in the product are pairwise coprime. By definition, . Since is a factor in the factorization of of Eq. (15), we deduce that , and thus that .
On the other hand, the specification 2”. above provides with the s coprime, and the specification 5’. gives . It follows that
(16) |
as well as if . This proves Specifications b in the case .
We have seen that , hence . Specification 1’. thus implies that . By Eq. (16) divides and since divides we obtain that , or equivalently that divides modulo . This proves Specification c in the case .
In Eq. (14), substituting the s by s from Eq. (16), and combining with Eq. (11) yield:
This proves Specification d in all cases.
Moreover Specification 2”. above implies that with the s pairwise coprime. With Specification 2’. above , we get
This proves the specification a (in all cases). ∎
5 Computation of lexGb through dynamic evaluation
5.1 Subresultant p.r.s
With the ability to make monic nilpotent polynomials occurring in the subresultant p.r.s. of and modulo , we are ready to generalize the algorithm 4 “”. The skeleton is the same as that of Algorithm 4: find the “last non nilpotent” and the “first nilpotent” polynomials in the modified subresultant p.r.s. The difference lies in the management of the splittings arising when making polynomials monic at Line 4, and from the recursive call at Lines 4. The output is a family of objects each similar to the output of the local version Algorithm 4.
(17) |
Example 12 (Algorithm 10 “”).
Consider , and and . The subresultant of degree 2 is . Since is not invertible modulo , the algorithm calls at Line 10. It outputs two branches:
Recursive calls are then performed on each of these two branches:
1st branch: .
2nd branch: .
Finally: , meaning that (actually, the latter product of ideals is equal to ). ∎
Proposition 5 (Correctness of Algorithm 10 “”).
The family output by satisfies the specifications 1-4 and Eq. (17).
We also have the degree conditions: For all ,
(18) |
Moreover .
Proof.
We separate the proof of correctness, from the proof of the degree conditions, treated after.
Case of return at Line 10. The subresultant p.r.s. was computed modulo without failure until to get a zero . By Corollary 1, , whence the output with , verifies . This equality is a special easy case of Eq. (17) when the output has one component only.
Case of return at Line 10 . The subresultant p.r.s was correctly computed until , being not invertible modulo . Since passed the if-test at Line 10, it has an invertible leading coefficient and makes sense at Line 10 and .
Algorithm 9 “” is then called at Line 10 to “make” monic. The output is a list of lists of three polynomials, say verifying and , with monic; Also the polynomials s are pairwise coprime and if . Next two cases occur: either is nilpotent modulo (Line 10) or not (Line 10).
In the first case, is the last non-nilpotent and is the first nilpotent polynomial met in the modified p.r.s. This is the expected result, thus the component is added to the output . With Corollary 1, we obtain:
(19) |
In the second case, , is not nilpotent modulo . Since is not invertible modulo (Line 10), all monic forms verify . Besides, and . Therefore, the input of the recursive call at Line 10 displays a strict degree decrease compared to the main call with input . We can then assume by induction that the output is correct. Write
We have . Besides, from the equalities
in this case, we get: . Corollary 1 provides the equality of ideals , and we have:
(20) |
Recall that and that the are pairwise coprime. The Chinese remainder theorem applied to Eq. (19) when and to Eq. (20) when gives:
(21) |
The final output of the algorithm is then
And with these notations, the isomorphism (21) above is precisely Eq. (17). This achieves the proof of correctness of the algorithm in all cases.
Proof of the degree condition. Consider one component . Assume that the total number of pseudo-divisions (including those occurring in recursive calls) is at least two. This implies at least two strict degree decreases, and since and are the monic form of the two last polynomials in the modified subresultant p.r.s, this implies:
proving (18) in case of more than one pseudo-division.
If only one pseudo-division occurs in the algorithm, then two possibilities may happen:
-
-1-
either is invertible modulo and
-
-2-
or not and then, let be the monic form of (Line 10), and that of (Line 10). According to Assumption (H), is not nilpotent modulo for any : the algorithm then never goes through the lines 10-10. At Line 10, a recursive call occurs: “”, with and monic. Inside this recursive call, another pseudo-division takes place, a contradiction.
Only Case 1 can happen. Let be the monic form of (Line 10). Write the monic form of at Line 10 as .
This proves Eq (18). For to hold, necessarily . This achieves the proof of the degree condition in the case of one pseudo-division.
If no pseudo-division at all occur, then is not invertible modulo . Moreover the recursive call “” at Line 10 does not involve pseudo-division neither. But since and are monic, this cannot be the case. Thus the algorithm never reaches Line 10. It cannot reach the lines 10-10 neither: this would mean that is nilpotent modulo , excluded by Assumption (H). The situation of no pseudo-division does not occur. ∎
5.2 Family of minimal lexicographic Gröbner bases from the subresultant p.r.s
We focus now on translating Algorithm 5 “” to dynamic evaluation. A direct consequence is that the output is no more one lexGb, but a family of thereof.
Overview of Algorithm 12 “”
Naively, it suffices to track divisions in the local version Algorithm 5 “” and to create splittings accordingly. A slight difficulty occurs in that the “” algorithm assumes that has an invertible leading coefficient modulo . This assumption is too restrictive in many cases: there are some local components of over which this assumption is verified and others over which it is not. To circumvent this, it suffices to “make monic” with a call to “” (Line 12) and proceed with this output. To clarify the exposition, an auxiliary algorithm 11 “” first treats the case of a polynomial that has an invertible leading coefficient modulo , which becomes a subroutine in the main algorithm 12.
However, it is assumed that both and satisfy Assumption (H). It says that for any primary factor of , and are not nilpotent modulo . This assumption can likely be removed; we let if for future work.
(22) |
Proposition 6 (Correctness of Algorithm 11 “”).
Let be the output of . Writing the systems as in Eq. (22),
they are minimal lexGbs verifying the specifications:
-
(i)
and are coprime. Additionally, and .
-
(ii)
.
-
(iii)
and for .
Proof.
If the input or is an invertible constant modulo (Line 11) then the ideal . The output Line 11 is then logically .
The call to at Line 11 outputs a family such that
(23) |
with the polynomials pairwise coprime and if .
If then the ideal and the corresponding lexGb is , which does not need to be added to the output. That is why the if-test at Line 11 discards this case.
If and then , and is a minimal lexGb, which is added to the output (Line 11).
Otherwise, a recursive call at Line 11 is performed. Its validity is proved in the lemma 7 hereafter: we can assume that the output verifies the output’s specifications.
Lemma 7.
The recursive call at Line 11 is valid.
Proof.
By the degree condition Eq. (18) of Proposition 5 related to Algorithm , we have unless . Regarding that (else at Line 11) we have . Moreover is monic so the input satisfies the input’s specifications of Algorithm 11 “”. Still from that proposition 5, possibly holds only if . But then . Thus, in any situations the input presents a degree decrease compared to that of the main call . By induction, we can assume that the output is as expected. ∎
Writing , where is a family of minimal lexGbs that we denote as in Theorem 1. They verify:
(i’) and are coprime and , as well as .
(ii’) .
(iii’) and if .
Then a call to has the effect of “ projecting” along the s. We have where , with (Line 11). The specifications of Algorithm 6 “” provides , the product being that of coprime polynomials. By induction we get:
(24) |
Moreover the factors in the product are pairwise coprime. It follows that
Since the s are pairwise coprime, and that , each irreducible factor of appears in those of one (and only one) of . Moreover, by Remark 4, hence by the output’ specifications of Algorithm 10 “”. Therefore
(25) |
At Line 11, , which rewrites using the notation above:
Since , Theorem 1-(B) implies that is a lexGb. The following lemma 8 shows that it is minimal.
Lemma 8.
The lexGb is a minimal one.
Proof.
According to Theorem 1-(B), it suffices to prove that is larger than the degree (in ) of all the polynomials in . Consider the first recursive call at Line 11. Recall that and . If is a constant (Line 11) then the recursive call outputs and the minimality of is obvious. Else it goes to another call to at Line 11.
According to the degree condition of Proposition 5, an equality can only occur if , which does not hold as seen above. ∎
This proves one output’s specification. According to the specification (ii’) above, we obtain . Moreover, all irreducible factors of are irreducible factors of by definition. We obtain that for . This proves Specification (ii).
Additionally, proving the second statement of Specification (i). The first statement is that the s are pairwise coprime. This follows from Eq. (24) and the specification (i’).
Besides, . Lemma 9 in Appendix, proves that . This ideal is equal to . By the specification (iii’) and Eq. (25) above, we get: . Finally, with Eq. (23) and the Chinese remainder theorem we obtain:
which is output’s specification (iii). That they are pairwise coprime follows from the fact that the ideals are pairwise coprime. ∎
Next the assumption that has an invertible leading coefficient modulo is lifted. It suffices to run the algorithm 9 “” (Line 12), and naively to call the previous algorithm 11 “” on each component of that monic form. But this induces a minor issue, in that the monic forms of may not all satisfy , a requirement for calling “”. The if-test Line 12 distinguishes the s for which from those s for which . In the former case (Lines 12-12), calling directly does not necessarily work because may not have an invertible leading coefficient modulo — another requirement of “”. Thus we make monic first (Line 12). Then a last if-test (Line 12) distinguishes the cases from the cases , before this time calling with all its specifications guaranteed.
(26) |
Theorem 4 (Correctness of Algorithm 12 “”).
The output of verifies the specifications below.
-
(i)
and are coprime. Additionally, and .
-
(ii)
.
-
(iii)
and for .
Proof.
If or is a non-zero constant, then so that the output at Line 12 is correct.
By Assumption (H), for each primary factor of , is not nilpotent. Therefore, when “making” monic with , the collection of output is always of the form . The third component is indeed a polynomial if and only if divides modulo . Since , this would imply that is nilpotent modulo , in contradiction with Assumption (H).
The output of at Line 12, verify with monic and , the s being pairwise coprime. The algorithm treats each component of separately in the for loop Line 12-12.
Naively, a call to “” shall be performed with , but this input does not necessarily satisfy the specifications of that algorithm if . In that case (Lines 12-12), we cannot simply switch with by calling directly neither since may not have a leading coefficient invertible modulo (a requirement of that algorithm). Therefore we “make” monic with a call to at Line 12. Since satisfies Assumption (H), is not nilpotent for all primary factor of . Therefore, (third component is always 1).
Now both families and are made of polynomials having an invertible coefficient modulo , hence calls to at Line 12 or Line 12 are correct. concatenates all these minimal lexGbs. This leads to the following equalities, where the second one is deduced from Lemma 9 in Appendix.
This proves the first statement of the specification (iii), the second statement being that these lexGbs are pairwise coprime. Let and be two different lexGbs in . If and are in the same output of a call to “” at Line 12, 12 or 12, then the output’ specifications of “” guarantee that and are coprime.
If and are obtained from different calls to “”, then the s (Line 12) are pairwise coprime, or the s (Lines 12 or 12) are pairwise coprime, so that and are coprime. This ends the proof of the specification (iii).
Finally, the specifications (i)-(ii) are also satisfied according that the lexGbs are computed by calls to “” whose output satisfy these two specifications. ∎
6 Implementation and experimental section
All algorithms are implemented in Magma v2.25-1 and can be found at http://xdahan.sakura.ne.jp/gb.html. Experiments were realized on an Intel processor Core i7-6700K clocked at 4GHz. The timings naturally compare with that of the GroebnerBasis command. We recall that a common strategy to compute a lexGb divides in two steps: first compute a Gröbner basis for the degree reverse lexicographic order (grevlex for short) then applies a change of monomial order algorithm, typically FGLM since we are constrained to systems of dimension zero. Magma is equipped with one of the best implementation of Faugère algorithm F4 [20], which is called in the first step. We report on the timing F4FGLM, with the timing of FGLM appended inside parentheses when not negligible.
We consider only polynomials over a finite field. Rational coefficients induce large coefficients swell, and without modular methods become difficult to compare. We could have turned the Modular option off in Magma when calling a Gröbner basis computation, but for now we would rather stick to finite fields. The comparison with small size (16bits) and medium size (64bits) finite fields bring enough evidences of the advantage of the proposed algorithms.
6.1 Testing suite
We consider two families of examples, each tested over a 16-bits finite field and a 64-bits finite field. The polynomials are defined as follows:
-
•
First family (Tables 1-3-4): 16 polynomials are constructed with respect to a modulus whose factors are defined as follows:
-
–
Consider (two factors where and ),
(three factors, where ), and finally
(four factors, where ).
-
–
The exponents are respectively
(examples 1-4) when there are two factors,
(examples 5-11) , when there are three factors,
(examples 12-16) , when there are four factors.
-
–
For each polynomials are built as follows:
-
–
Then the CRT is applied to construct polynomials modulo from their local images .
-
–
-
•
Second family (Tables 2-5-6): 6 polynomials constructed according to a modulus whose factors are defined as follows:
-
–
Consider where each polynomial and . For example and .
-
–
.
-
–
For each polynomials are built as follows:
-
–
Then the CRT is applied to construct polynomials modulo from their local images .
-
–
The first family concerns a modulus with few factors of moderate exponent degrees, each exponent degrees being moderately distant. The second family targets a modulus having 27 factors, and a squarefree decomposition made of seven factors. The exponent degrees are distant of one, and are relatively small.
The correctness of the output of Algorithm 12 “” was checked as follows: Take the lexGb output by the Gröbner engine of Magma, and the family of lexGbs output by Algorithm 12. We checked that each polynomial in reduces to zero modulo each . In this way . And compared the dimension of the two vector spaces and .
The two tables 1-2 summarize data attached to the system (without a modulus , which will turn out to be , see next Section 6.2). This kind of input is of practical importance and the timings are not always favorable to Algorithm 12, which require a special analysis, undertaken in Section 6.4.
-
Column 1:
refers to the example’s number. ( examples for the 1st family, and examples for the 2nd family).
-
Column 2:
degree of the ideal generated by , equal to .
-
Column 3:
degrees and of the input polynomials and (always equal).
-
Column 4:
total degrees , of the input polynomials and (always equal).
-
Column 5:
degree of the resultant of and .
-
Column 6:
sum of the degrees of the factors having multiplicity one in the factorization of .
-
Column 7:
sum of the degrees of the factors having multiplicity in the factorization of .
-
Column 8:
average multiplicity of an irreducible factor of having multiplicity (do not count the factor of multiplicity one).
-
Column 9:
number of lexGbs output by Algorithm 12 “. Inside parentheses, the average number of polynomials in these lexGbs.
|
| | |
|
|
|
|
|
||||||||||||
1 | 241 | 10 | 24 | 266 | 171 | 95 | 47.5 | 2 (8.5) | ||||||||||||
2 | 646 | 15 | 39 | 696 | 471 | 225 | 112.5 | 2 (14.5) | ||||||||||||
3 | 1251 | 20 | 54 | 1326 | 919 | 407 | 135.67 | 2 (18.5) | ||||||||||||
4 | 2056 | 25 | 69 | 2165 | 1521 | 635 | 317.5 | 2 (23.5) | ||||||||||||
5 | 281 | 8 | 28 | 300 | 196 | 104 | 34.67 | 3 (8) | ||||||||||||
6 | 581 | 11 | 40 | 609 | 415 | 194 | 64.67 | 3 (11) | ||||||||||||
7 | 989 | 14 | 52 | 1026 | 715 | 311 | 103.67 | 3 (14) | ||||||||||||
8 | 1505 | 17 | 64 | 1551 | 1096 | 455 | 151.67 | 3 (17) | ||||||||||||
9 | 2129 | 20 | 76 | 2184 | 1558 | 626 | 208.67 | 3 (20) | ||||||||||||
10 | 2861 | 23 | 88 | 2925 | 2101 | 824 | 274.67 | 3 (23) | ||||||||||||
11 | 3701 | 26 | 100 | 3774 | 2725 | 1049 | 349.67 | 3 (26) | ||||||||||||
12 | 275 | 7 | 28 | 273 | 171 | 102 | 25.5 | 4 (6.5) | ||||||||||||
13 | 725 | 11 | 48 | 777 | 523 | 254 | 63.5 | 4 (10.5) | ||||||||||||
14 | 1461 | 15 | 68 | 1537 | 1067 | 470 | 117.5 | 4 (14.5) | ||||||||||||
15 | 2453 | 19 | 88 | 2553 | 1803 | 750 | 187.5 | 4 (18.5) | ||||||||||||
16 | 3701 | 23 | 108 | 3825 | 2731 | 1094 | 273.5 | 4 (22.5) |
|
| | |
|
|
|
|
|
||||||||||||
1 | 827 | 7 | 90 | 1079 | 617 | 462 | 6.5 | 7 (5) | ||||||||||||
2 | 1301 | 8 | 119 | 1665 | 979 | 686 | 24.5 | 7 (6) | ||||||||||||
3 | 1887 | 9 | 148 | 2363 | 1425 | 938 | 33.5 | 7 (7) | ||||||||||||
4 | 2585 | 10 | 177 | 3173 | 1955 | 1218 | 43.5 | 7 (8) | ||||||||||||
5 | 3395 | 11 | 206 | 4095 | 2569 | 1526 | 54.5 | 7 (9) | ||||||||||||
6 | 4317 | 12 | 235 | 5129 | 3267 | 1862 | 66.5 | 7 (10) |
6.2 Timings
Tables 3-4 display timings for the first family of 16 polynomials described in Section 6.1 (see also Table 1). The double horizontal lines separate the four polynomials which have two primary factors, from the seven polynomials that have three, and from the last five polynomials which have four primary factors. Tables 5-6 show the timings for the second family of 6 polynomials described in Section 6.1 (see also Table 2). We remark that the polynomials and do not have solutions at infinity: . The four tables all have eight columns. They represent:
-
Column 1:
timing of the algorithm 12 “” with input .
-
Column 2:
timing of GroebnerBasis command in Magma: F4FGLM with FGLM in parenthesis when not negligible.
-
Column 3:
timing for the resultant computation
-
Column 4:
timing for Algorithm 12 “” with input .
-
Column 5:
timing of GroebnerBasis command in Magma: F4FGLM with FGLM in parenthesis when not negligible.
-
Column 6:
timing for the squarefree decomposition of . Here, is the product of those irreducible factors of the resultant that come with the same multiplicity .
-
Column 7:
total time taken for calling Algorithm 12 “” on input for .
-
Column 8:
total time taken for calling GroebnerBasis for .
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Input: | Input: | Input: | Several input: | ||||
this | Gb(fglm) | res | this | Gb(fglm) | sqf dec | this | Gb(fglm) |
0.01 | 0 | 0 | 0.13 | 0.04 (0.029) | 0.01 | 0.02 | 0.13(0.02) |
0 | 0.03 | 0.02 | 2.32 | 0.33 (0.279) | 0 | 0.26 | 0.96(0.18) |
0.01 | 0.1 (0.009) | 0.04 | 12.45 | 1.8 (1.679) | 0.01 | 1.34 | 5.21(1.06) |
0.02 | 0.36 (0.05) | 0.11 | 48.62 | 6.28 (6) | 0.01 | 5.02 | 14.5(3.929 |
0 | 0.01 | 0.01 | 0.08 | 0.06 (0.03) | 0 | 0.02 | 0.2(0.02) |
0 | 0.03 | 0 | 0.69 | 0.26 (0.219) | 0.01 | 0.09 | 0.93(0.129) |
0.01 | 0.1 (0.02) | 0.03 | 2.69 | 0.96 (0.849) | 0.01 | 0.34 | 3.79(0.509) |
0.01 | 0.23 (0.039) | 0.06 | 8.78 | 2.87 (2.65) | 0.01 | 0.99 | 9.54(1.62) |
0.02 | 0.48 (0.079) | 0.1 | 23.58 | 6.96 (6.5) | 0.01 | 2.4 | 22.17(4.299) |
0.02 | 1.09 (0.17) | 0.19 | 55.05 | 15.44 (14.629) | 0.02 | 5.36 | 43.14(9.269) |
0.03 | 2.06(0.3) | 0.33 | 120.7 | 30.65(29.3) | 0.02 | 11.1 | 40.67(17.6) |
0 | 0.01 | 0 | 0.04 | 0.04 (0.03) | 0 | 0.01 | 0.14(0.019) |
0.01 | 0.07 (0.01) | 0.02 | 0.94 | 0.48 (0.4) | 0 | 0.11 | 2.33(0.219) |
0.01 | 0.3 (0.039) | 0.05 | 5.76 | 2.84 (2.509) | 0.01 | 0.69 | 12.04(1.439) |
0.01 | 1.07 (0.139) | 0.14 | 23.15 | 10.69 (9.85) | 0.02 | 2.41 | 39.24(5.92) |
0.02 | 2.71(0.37) | 0.31 | 76.49 | 30.86(28.78) | 0.02 | 7.1 | 47.88(18.33) |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---|---|---|---|---|---|---|---|
Input: | Input: | Input: | Several input: | ||||
this | Gb(fglm) | res | this | Gb(fglm) | sqf dec | this | Gb(fglm) |
0.01 | 0.02 | 0.04 | 2.28 | 0.25 (0.22) | 0 | 0.28 | 0.44(0.13) |
0.02 | 0.22 (0.02) | 0.21 | 36.13 | 3.83 (3.649) | 0.02 | 3 | 5.21(2.23) |
0.04 | 1.23 (0.09) | 0.74 | 174.69 | 27.56 (26.65) | 0.05 | 17.36 | 32.49(18) |
0.09 | 6.17 (0.33) | 1.92 | 592.18 | 121.1 (118.009) | 0.08 | 73.91 | 143.42(78.74) |
0.01 | 0.05 (0.009) | 0.05 | 1.28 | 0.39 (0.339) | 0 | 0.21 | 0.87(0.2) |
0.01 | 0.27 (0.019) | 0.17 | 10.16 | 3.87 (3.6) | 0.02 | 1.06 | 5.55(1.79) |
0.03 | 1.2 (0.109) | 0.47 | 36.48 | 20.48 (19.39) | 0.04 | 4.19 | 23.41(8.9) |
0.05 | 3.7 (0.339) | 1 | 107.99 | 60.39 (57.279) | 0.07 | 12.22 | 73.15(32.88) |
0.09 | 6.76 (0.74) | 2.06 | 277.45 | 169.11 (162) | 0.13 | 33.37 | 205.93(102) |
0.15 | 27.07 (2.039) | 3.45 | 717.37 | 386.3 (370.8) | 0.18 | 77.88 | 508.07(245) |
0.22 | 60.91 (4.5) | 5.72 | 1403.83 | 793.41 (763.609) | 0.27 | 166.48 | 939.93(513) |
0.01 | 0.04 (0.01) | 0.04 | 0.65 | 0.29 (0.239) | 0.01 | 0.13 | 0.71(0.15) |
0.02 | 0.66 (0.059) | 0.26 | 14.41 | 7.54 (6.88) | 0.03 | 1.34 | 15.18(4.7) |
0.04 | 5.42 (0.399) | 0.98 | 83.5 | 62.34 (58.05) | 0.06 | 7.78 | 97.33(33.5) |
0.09 | 25.44 (1.489) | 2.59 | 296.32 | 273.9 (257.47) | 0.14 | 30.87 | 429.38(165) |
0.17 | 91.02 (6.909) | 7 | 943.93 | 907.33 (856.36) | 0.23 | 101.05 | 1383.59(624) |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---|---|---|---|---|---|---|---|
Input: | Input: | Input: | Several input: | ||||
this | Gb(fglm) | res | this | Gb(fglm) | sqf dec | this | Gb(fglm) |
0 | 0.77(0.03) | 0.03 | 0.23 | 1.4(0.66) | 0 | 0.06 | 5.09(0.36) |
0 | 3.6(0.07) | 0.07 | 0.63 | 5.1(2.39) | 0.01 | 0.15 | 19.36 (1.289) |
0.01 | 9.84(0.119) | 0.13 | 1.53 | 13.08(5.969) | 0.01 | 0.34 | 50.39 (3.289) |
0.01 | 23.91(0.25) | 0.23 | 3.16 | 30.47(13.699) | 0.02 | 0.7 | 127.5 (7.5) |
0.01 | 60.21(0.509) | 0.37 | 6.32 | 64.96(28.7) | 0.02 | 1.28 | 268(15.9) |
0.02 | 115.72(0.97) | 0.57 | 11.37 | 134.31(54.509) | 0.03 | 2.28 | 527.95(27.8) |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---|---|---|---|---|---|---|---|
Input: | Input: | Input: | Several input: | ||||
this | Gb(fglm) | res | this | Gb(fglm) | sqf dec | this | Gb(fglm) |
0.01 | 11.79 (0.149) | 0.54 | 3.04 | 18.05(10.05) | 0.04 | 0.86 | 87.28 (5.5) |
0.02 | 90.69 (0.549) | 1.29 | 8.27 | 91.21(43.519) | 0.08 | 1.9 | 338.78 (20) |
0.04 | 297.74(1.23) | 2.52 | 18.73 | 243.46(135) | 0.13 | 3.94 | 808.97 (60) |
0.06 | 681.95(3.09) | 4.44 | 37.28 | 560.26(326.289) | 0.19 | 8.06 | 2186.52 (170) |
0.09 | 2402 (7.8) | 7.76 | 68.63 | 1375.74(899.62) | 0.27 | 15.39 | 5101.74 (300) |
0.13 | 5512.63(16.739) | 12.67 | 134.43 | 2789(1909.229) | 0.36 | 28.41 | 11789.98 (825) |
6.3 Comments on Tables 3-4-5-6
Columns 1-2
The Gröbner engine is unable to take full advantage of the addition of in the system. The comparison between the timings of the first two columns is telling: up to several thousands times faster and always more than one hundred times faster.
Columns 6-7-8
Taking the squarefree decomposition of the resultant is cheap and natural. As one can expect, running Algorithm 12 on each factor found brings a clear advantage in any case, even in comparison with Column 5 F4FGLM. This last experiment supports the conclusion that decomposing helps to alleviate the growth of internal computations.
Columns 3-4-5: preliminary comments
This is related to the computation of a lexGb of a bivariate system of two polynomials: the input is the system . Column 3 displays timings (always negligible) for computing the resultant , and then Column 4 displays the timing taken by Algorithm 12 to find a product of lexGbs of . This timing compares with that of GroebnerBasis of Column 5. One question arises: is it faster to compute GroebnerBasis or to compute GroebnerBasis ? Experiments show that almost always the first is faster. That is why we have shown the timings of GroebnerBasis, rather than those GroebnerBasis which are slower.
We observe that the situation is more balanced in this case. First the computation of is most often negligible. This suggests for future work to take advantage of its computation through a subresultant p.r.s of (not modulo a polynomial ) and work directly on it. Second, the timings of the first family of polynomials (Tables 1-3-4 and rows 1-2-3 of Table 7) are slower in general, whereas those of the second family (Tables 2-5-6 and row 4 of Table 7) are better. To get an educated knowledge of this situation, which is of practical importance, let us provide more details.
6.4 Elements of complexity in case of input and
This section extends the above comment on the timings of Columns 3-4-5 of Tables 3-4-5-6 that concern an input and without a modulus . For clarity, Table 7 displays these data into 8 plots. Magma computes with F4 [20] a grevlex Gröbner basis and then applies FGLM [19] to transform it to a lexGb. The complexity of the latter is well-known, it is , where is the degree of the ideal generated by and . The complexity of the F4 algorithm is notoriously more difficult to analyze. Only the less efficient Lazard’s algorithm relying on Macaulay matrices has a known complexity upper bound, written in Eq. (27) below. The complexity results given hereafter can be found in [29] (see also [44, Section 1.5] for a nice overview and the references therein). The standard assumption in the context of [29] is:
and form a homogeneous regular sequence | (R) |
The examples of polynomials and in the testing suite are not homogeneous, but form a regular sequence. The complexity of Lazard’s method in the affine case is not well-understood. Nonetheless, the bounds for the homogenous case provide some indications for affine polynomials. We define the degree of regularity of the ideal , equal under (R) to be the smallest integer such that the Hilbert function of becomes equal to the corresponding Hilbert polynomial. Then the number of arithmetic operations over to compute a grevlex Gröbner basis of is lower than:
(27) |
We refer to [52] for details about the exponent of linear algebra . It is possibly overestimated in many situations. Considering that the Macaulay bound holds under (R) we obtain:
The latter inequality follows from . Adding the cost of FGLM in yields:
(28) |
Even in the affine case, we can think that the time taken by F4 depends more on and , whereas the one taken by FGLM depends exclusively on . The comparison of the timings of the examples of the 1st family and of the 2nd one supports this claim:
- •
- •
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
In comparison, Algorithm 12 “” certainly has the subresultant as a central routine. The number of arithmetic operations in to compute naively the subresultant p.r.s of and modulo , when divisions are possible, is well-known, upper-bounded by . The number of arithmetic operations in for peforming naively any operation in is . Thus the cost of computing the subresultant p.r.s modulo is within:
(29) |
Without entering into details, other functions to make polynomials monic and to split the computations do increase the cost, but unlikely of a much higher magnitude compared to Eq (29). When , the classical upper-bound [52, Thm. 6.22] where yields:
(30) |
The latter inequality is deduced from . Thus the parameter dominates the total cost.
- •
- •
This is certainly one main explanation behind the difference in the timings of “” and F4FGLM observed in Columns 4-5 of Tables 3-4-5-6, and in Table 7.
7 Concluding Remarks
The new algorithms brought in this work open the way to various generalizations and some improvements.
Subresultant p.r.s of and
The line of works [25, 15, 6, 31, 34] that produces a triangular decomposition of the set of solutions (not ideal preserving) of and , works directly on the subresultant p.r.s of and . The present article requires a modulus and works on the p.r.s modulo . Although this kind of situations is necessary for more general incremental Euclidean algorithm-based decomposition methods, starting with the p.r.s of and directly is desirable. Besides the discussion of Section 6.4 suggests enhanced performances.
Decomposition along the -variable
In the case of a radical ideal, decomposing it along the -variable is well-known. This is a special instance of dynamic evaluation in two variables. It amounts to compute a “gcd” in of two bivariate polynomials. The inversions occurring in the coefficients ring required by the Euclidean algorithm are managed by dynamic evaluation in one variable, namely the -variable. In this way, dynamic evaluation in two variables boils down to that of one variable. To do the same for non-radical lexGbs, two complications occur: first, Hensel lifting comes into play to compensate the division required to make nilpotent polynomials non-nilpotent, second, the output may be a lexGb not necessarily a triangular set. Computing a certain decomposition (as introduced in [12]) of the ideal and decomposing a minimal lexGb of , necessarily along the -variable, does not differ much. Note that Lazard’s structural theorem applies in this situation too. This constitutes a necessary step towards the generalization of this work to more than two variables.
More than two variables
Besides a dynamic evaluation in two variables, a form of structure theorem for lexGbs of three variables or more becomes necessary. For now, it is known to hold in the radical case [22, 36], not sufficient for our purpose since we target non-radical ideals. Evidences that a broad class of non-radical lexGbs also holds a factorization pattern are coming out [54]. A key step in that direction lies in the development of CRT-based algorithms that reconstruct a lexGb from its primary components [13].
Beyond this first step, the idea would be a recursive algorithm on the number of variables in order to ultimately reduce to the bivariate case treated here.
Complexity
Instead of standard quadratic-time subresultant p.r.s, can half-gcd based algorithm be adapted ? This would motivate to analyze the complexity carefully. The work of [41] paves the way to this direction. However, the additional algorithms appearing here compared to [41], which is already quite sophisticated, complicate it furthermore, making the complexity analysis an interesting challenge.
References
- [1] William Wells Adams and Philippe Loustaunau. An introduction to Gröbner bases. Number 3. American Mathematical Soc., 1994.
- [2] Parisa Alvandi, Marc Moreno Maza, Éric Schost, and Paul Vrbik. A standard basis free algorithm for computing the tangent cones of a space curve. In CASC 2015 Proceedings, pages 45–60. Springer International Publishing, Cham, 2015.
- [3] Winfried Auzinger and Hans J Stetter. An elimination algorithm for the computation of all zeros of a system of multivariate polynomial equations. In Numerical Mathematics Singapore 1988, pages 11–30. Springer, 1988.
- [4] Daniel J Bates, Andrew J Sommese, Jonathan D Hauenstein, and Charles W Wampler. Numerically solving polynomial systems with Bertini. SIAM, 2013.
- [5] Wieb Bosma, John Cannon, and Catherine Playoust. The Magma algebra system. I. The user language. Journal of Symbolic Computation, 24(3-4):235–265, 1997. Computational algebra and number theory (London, 1993).
- [6] Yacine Bouzidi, Sylvain Lazard, Guillaume Moroz, Marc Pouget, Fabrice Rouillier, and Michael Sagraloff. Solving bivariate systems using rational univariate representations. Journal of Complexity, 37:34–75, 2016.
- [7] Xavier Caruso. Numerical stability of Euclidean algorithm over ultrametric fields. Journal de Théorie des Nombres de Bordeaux, 29(2):503–534, 2017.
- [8] Chengbo Chen and Marc Moreno Maza. Algorithms for computing triangular decompositions of polynomial systems. In Proceedings of ISSAC’11, pages 83–90, New York, NY, USA, 2011. ACM.
- [9] Jin-San Cheng and Xiao-Shan Gao. Multiplicity-preserving triangular set decomposition of two polynomials. Journal of Systems Science and Complexity, 27(6):1320–1344, 2014.
- [10] X. Dahan, M. Moreno Maza, É. Schost, and Y. Xie. On the complexity of the D5 principle. In Proc. of Transgressive Computing 2006, Granada, Spain, 2006.
- [11] X. Dahan and É. Schost. Sharp estimates for triangular sets. In ISSAC 2004, pages 103–110. ACM Press, 2004.
- [12] Xavier Dahan. Gcd modulo a primary triangular set of dimension zero. In Proceedings of ISSAC’17, pages 109–116, New York, NY, USA, 2017. ACM.
- [13] Xavier Dahan. On the bit-size of non-radical triangular sets. In MACIS 2017, Vienna, Austria, November 15-17, 2017, Proceedings, pages 264–269, Cham, 2017. Springer International Publishing.
- [14] Wolfram Decker, Gert-Martin Greuel, and Gerhard Pfister. Primary decomposition: algorithms and comparisons. In Algorithmic algebra and number theory, pages 187–220. Springer, 1999.
- [15] Dimitrios I Diochnos, Ioannis Z Emiris, and Elias P Tsigaridas. On the asymptotic and practical complexity of solving bivariate systems over the reals. Journal of Symbolic Computation, 44(7):818–835, 2009.
- [16] J. Della Dora, C. Dicrescenzo, and D. Duval. About a new method for computing in algebraic number fields. In EUROCAL ’85: Research Contributions from the European Conference on Computer Algebra-Volume 2, pages 289–290, London, UK, 1985. Springer-Verlag.
- [17] D. Duval. Algebraic numbers: an example of dynamic evaluation. Journal of Symbolic Computation, 18(5):429–445, 1994.
- [18] Ioannis Z Emiris and Victor Y Pan. Symbolic and numeric methods for exploiting structure in constructing resultant matrices. Journal of Symbolic Computation, 33(4):393 – 413, 2002.
- [19] J. C. Faugère, P. Gianni, D. Lazard, and T. Mora. Efficient computation of zero-dimensional gröbner bases by change of ordering. Journal of Symbolic Computation, 16(4):329–344, 1993.
- [20] Jean-Charles Faugère. A new efficient algorithm for computing Gröbner bases (F4). Journal of pure and applied algebra, 139(1-3):61–88, 1999.
- [21] Jean-Charles Faugère. A new efficient algorithm for computing Gröbner bases without reduction to zero (F5). In Proceedings of the 2002 international symposium on Symbolic and algebraic computation, pages 75–83, 2002.
- [22] B. Felszeghy, B. Ráth, and L. Rónyai. The lex game and some applications. Journal of Symbolic Computation, 41(6):663 – 681, 2006.
- [23] P. Gianni, B. Trager, and G. Zacharias. Gröbner bases and primary decomposition of polynomial ideals. Journal of Symbolic Computation, 6:149–167, 1988.
- [24] M. Giusti, G. Lecerf, and B. Salvy. A Gröbner free alternative for polynomial system solving. J. of Complexity, 17(2):154–211, 2001.
- [25] Laureano González-Vega and M’hammed El Kahoui. An improved upper complexity bound for the topology computation of a real algebraic plane curve. Journal of Complexity, 12(4):527–544, 1996.
- [26] Évelyne Hubert. Notes on triangular sets and triangulation-decomposition algorithms. I. Polynomial systems. In Symbolic and numerical scientific computation (Hagenberg, 2001), volume 2630 of Lecture Notes in Comput. Sci., pages 1–39. Springer, Berlin, 2003.
- [27] Serge Lang. Algebra (revised third edition), volume 211 of Graduate Texts in Mathematics. Springer Science and Media, 2002.
- [28] D. Lazard. Solving zero-dimensional algebraic systems. Journal of Symbolic Computation, 13:147–160, 1992.
- [29] Daniel Lazard. Gröbner bases, Gaussian elimination and resolution of systems of algebraic equations. In J. A. van Hulzen, editor, Computer Algebra, pages 146–156, Berlin, Heidelberg, 1983. Springer Berlin Heidelberg.
- [30] Daniel Lazard. Ideal bases and primary decomposition: case of two variables. Journal Symbolic Computation, 1(3):261–270, 1985.
- [31] Sylvain Lazard, Marc Pouget, and Fabrice Rouillier. Bivariate triangular decompositions in the presence of asymptotes. Journal of Symbolic Computation, 82:123–133, 2017.
- [32] F. Lemaire, M. Moreno Maza, and Y. Xie. The regularchains library. In Maple conference 2005, pages 355–368. I. Kotsireas Ed., 2005.
- [33] Bang-He Li. A method to solve algebraic equations up to multiplicities via Ritt-Wu’s characteristic sets. Acta Analysis Functionalis Applicata, 2:97–109, 2003.
- [34] Xin Li, Marc Moreno Maza, Raqeeb Rasheed, and Éric Schost. The modpn library: Bringing fast polynomial arithmetic into maple. Journal of Symbolic Computation, 46(7):841–858, 2011.
- [35] Steffen Marcus, Marc Moreno Maza, and Paul Vrbik. On Fulton’s algorithm for computing intersection multiplicities. In CASC 2012, Proceedings, pages 198–211. Springer Berlin Heidelberg, Berlin, Heidelberg, 2012.
- [36] M. G. Marinari and T. Mora. A remark on a remark by Macaulay or enhancing Lazard structural theorem. Bull. Iranian Math. Soc., 29(1):1–45, 85, 2003.
- [37] Esmaeil Mehrabi and Éric Schost. A softly optimal Monte Carlo algorithm for solving bivariate polynomial systems over the integers. Journal of Complexity, 34:78–128, 2016.
- [38] B Mishra. Algorithmic Algebra. Text and monographs in Computer Science. Springer-Verlag, New York-Berlin-Heidelberg, 1993.
- [39] T. Mora. Solving Polynomial Equation Systems I. The Kronecker-Duval Philosophy. Number 88 in Encyclopedia of Mathematics and its Applications. Cambridge University Press, 2003.
- [40] M. Moreno Maza and R. Rioboo. Polynomial gcd computations over towers of algebraic extensions. In Proc. AAECC-11, pages 365–382. Springer, 1995.
- [41] Guillaume Moroz and Éric Schost. A fast algorithm for computing the truncated resultant. In Proceedings of ISSAC’16, pages 341–348, New York, NY, USA, 2016. ACM.
- [42] David R Musser. Multivariate polynomial factorization. Journal of the ACM (JACM), 22(2):291–308, 1975.
- [43] Masayuki Noro. Modular dynamic evaluation. In Proceedings of the 2006 International Symposium on Symbolic and Algebraic Computation, ISSAC ’06, page 262–268, New York, NY, USA, 2006. Association for Computing Machinery.
- [44] Spaenlehauer Pierre-Jean. Résolution de systèmes multi-homogènes et déterminantiels. PhD thesis, Université de Pierre et Marie Curie - Paris VI, 2012. https://members.loria.fr/PJSpaenlehauer/data/these_spaenlehauer.pdf.
- [45] John M Pollard. Theorems on factorization and primality testing. Mathematical Proceedings of the Cambridge Philosophical Society, 76(3):521–528, 1974.
- [46] Joseph-F. Ritt. Differential equations from an algebraic standpoint. Colloquiium publications of the AMS, 14, 1932.
- [47] F. Rouillier. Solving zero-dimensional systems through the rational univariate representation. Appl. Algebra Eng. Commun. Computat., 9(5):433–461, 1999.
- [48] Joris Van Der Hoeven and Grégoire Lecerf. Directed evaluation. Journal of Complexity, page 101498, 2020.
- [49] Joris van der Hoeven and Grégoire Lecerf. Fast computation of generic bivariate resultants. Journal of Complexity, page 101499, 2020.
- [50] Jan Verschelde. Algorithm 795: Phcpack: A general-purpose solver for polynomial systems by homotopy continuation. ACM Transactions on Mathematical Software (TOMS), 25(2):251–276, 1999.
- [51] Gilles Villard. On computing the resultant of generic bivariate polynomials. In Proceedings of the 2018 ACM International Symposium on Symbolic and Algebraic Computation, ISSAC ’18, page 391–398, New York, NY, USA, 2018. Association for Computing Machinery.
- [52] Jocahim von zur Gathen and Jürgen Gerhard. Modern computer algebra. Cambridge University Press, New York, NY, USA, 2003. Second Edition.
- [53] Dongming Wang. Elimination Methods. Texts & Monographs in Symbolic Computation. Springer Vienna, 2012.
- [54] Dongming Wang. On the connection between Ritt characteristic sets and Buchberger–Gröbner bases. Mathematics in Computer Science, 10(4):479–492, 2016.
- [55] Wen-Tsu Wu. On zeros of algebraic equations - an application of Ritt principle. Kexue Tongbao, 5:1–5, 1986.
Appendix
In below, is proposed a version of the Chinese Remainder Theorem. Although probably not new, finding a precise reference appears to be not obvious.
Lemma 9.
Consider a family of ideals of and a polynomial . Take a monic generator of and assume that the polynomials ’s are pairwise coprime. Then .
Proof.
Write . Let be a partition of the set of indices and associate to it the ideal where stands for the cardinal of . We then have the equality of ideals:
(31) |
When , the ideal associated to the partition of the set of indices is then . As soon as , the ideal associated to the partition is . Therefore we have:
Since , it suffices to prove that . To this end, consider the monic polynomial generating the ideal . Let
The polynomials s are product of polynomials coprime with , hence is coprime with hence invertible modulo . Write in of degree smaller than that of . In particular for all . We have:
(32) |
Indeed, the polynomial is of degree in smaller than . Because as soon as , we have and since we have , whence . Since the are pairwise coprime, the Chinese remainder theorem implies that . But since this means . This ends the proof of Eq. (32).