An Algorithm for Computing a Minimal Comprehensive Gröbner\, Basis of a Parametric Polynomial System
aa r X i v : . [ c s . S C ] M a r An Algorithm for Computing a Minimal ComprehensiveGröbner Basis of a Parametric Polynomial System ∗ Deepak Kapur
Department of Computer ScienceUniversity of New MexicoAlbuquerque, NM, USA [email protected] Yiming Yang
Department of Computer ScienceUniversity of New MexicoAlbuquerque, NM, USA [email protected]
ABSTRACT
An algorithm to generate a minimal comprehensive Gr¨obnerbasis of a parametric polynomial system from an arbitraryfaithful comprehensive Gr¨obner system is presented. A basisof a parametric polynomial ideal is a comprehensive Gr¨ob-ner basis if and only if for every specialization of parametersin a given field, the specialization of the basis is a Gr¨obnerbasis of the associated specialized polynomial ideal. The keyidea used in ensuring minimality is that of a polynomial be-ing essential with respect to a comprehensive Gr¨obner basis.The essentiality check is performed by determining whethera polynomial can be covered for various specializations byother polynomials in the associated branches in a compre-hensive Gr¨obner system. The algorithm has been imple-mented and successfully tried on many examples from theliterature.
Keywords comprehensive Gr¨obner basis,minimal comprehensive Gr¨obner basis,parametric polynomial system,specialization of polynomial systems,essentiality.
1. INTRODUCTION
The concepts of a comprehensive Gr¨obner system (CGS)and a comprehensive Gr¨obner basis (CGB) were introducedby Weispfenning [18] to associate Gr¨obner basis like objectsfor parametric polynomial systems (see also the notion ofa related concept of a parametric Gr¨obner basis (PGB) in-dependently introduced by Kapur [3]). For a specializationof parameters, a Gr¨obner basis of the specialized ideal canbe immediately recovered from a branch of the associated ∗ A preliminary extended abstract of this paper appeared inProc.
Conference Encuentros de Algebra Comptacional yAplicaciones (EACA),
Permission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copies arenot made or distributed for profit or commercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, torepublish, to post on servers or to redistribute to lists, requires prior specificpermission and/or a fee.
ISSAC 2015,
CGS. Similarly, given a CGB, one merely has to specializeit to construct a Gr¨obner basis of the specialized ideal.The above stated properties of CGS and CGB make themattractive in applications where a family of related prob-lems can be parameterized and specified using a parametricpolynomial system. For various specializations, they can besolved by specializing a parametric solution without hav-ing to repeat the computations. Because of their appli-cations, these concepts and related algorithms have beenwell investigated by researchers and a number of algorithmshave been proposed to construct such objects for paramet-ric polynomial systems ([10], [19],[15], [16], [17], [8], [13],[20], [9], [11], [4], [5]). An algorithm that simultaneouslycomputes a comprehensive Gr¨obner system and a compre-hensive Gr¨obner basis by Kapur, Sun and Wang (KSW) [5]is particularly noteworthy because of its many nice proper-ties: (i) fewer segments (branches) in a comprehensive Gr¨ob-ner system generated by the algorithm, (ii) all polynomialsin a CGS and CGB are faithful meaning that they are in theinput ideal, and more importantly, (iii) the algorithm hasbeen found efficient in practice [12].For the non-parametric case, Gr¨obner bases have a verynice property: once an admissible term ordering is fixed, ev-ery ideal has a canonical Gr¨obner basis associated with it; acanonical Gr¨obner basis is not only unique but also reducedand minimal. This property is quite useful in many appli-cations since equality of two ideals can be easily checked bychecking the equality of their unique reduced minimal Gr¨ob-ner bases. The final goal of this research project is to worktowards a similar property for parametric ideals. The prob-lem addressed here is to define a minimal CGB associatedwith a parametric ideal once an admissible term ordering(both on the parameters as well as variables) is fixed; thisseems to be the first step toward defining a canonical CGB.There are some proposals in the literature for defining acanonical CGB which are not satisfactory. Consider for in-stance, Weispfenning’s proposal in [19]: without reproducinghis definition, we give an example of a parametric ideal fromhis paper generated by a basis { f = uy + x, g = vz + x + 1 } ;Weispfenning reported { f, g, h, − h } as a canonical CGB ofthe ideal, where h is vz − uy + 1 using the lexicographicordering z > y > x ≫ v > u .We claim that each of f, g, h is essential whereas − h isnot: for any specialization σ , if σ ( h ) is in a GB of σ ( I ),then σ ( − h ) is reducible using σ ( h ) and vice versa; so onlythe smaller of the two has to be in a minimal CGB, whichis h because though their leading coefficients only differ onthe sign, h is monic while − h is not. Obviously both f and g are essential: for σ in which uv = 0, the leading term of ( f ) is y whereas the leading term of the other two is z ; for σ in which v = 0 but u = 0, the leading term of σ ( g ) is x while the leading term of the other two is y . Further, since h = g − f , the GB theory in the nonparametric case wouldsuggest that h is not essential, but that is not true: for thecase u = 0 , v = 0, σ ( I ) = h i , however, { σ ( f ) = x, σ ( g ) = x + 1 } is not a GB of σ ( I ), which implies that h is essential.The algorithm proposed in the paper generates { f, g, h } asthe minimal CGB of this parametric ideal, regardless of theorder in which these polynomials are checked for essentiality(see Section 3).Notice from this example that a minimal CGB is not re-duced in the conventional sense (since h can be reducedusing g ); further some of its specializations are neither re-duced nor minimal, whereas other specialization (e.g. for σ : u = 0 , v = 0), σ ( h ) is both reduced and minimal. Thereare examples also of minimal CGBs which are reduced buttheir specializations are neither reduced nor minimal.Montes and Wibmer [11] also define an object related to acanonical CGS in [11]; but unfortunately, this object cannotbe used to generate a canonical CGB since elements in theCGS are not faithful, i.e., not in the original ideal.In this paper, we give an algorithm for generating a mini-mal CGB from a given CGS having the property that associ-ated with every segment describing parameter specialization,there is a GB for that specialization in which every polyno-mial is in the original ideal, i.e. faithful. To illustrate theproposed algorithm, we assume that this algorithm takes asinput, the CGB generated by the KSW algorithm [5], whichis the union of all Gr¨obner basis associated with each branchin the associated CGS generated by the KSW algorithm.Recall that every polynomial in the CGB generated by theKSW algorithm is faithful since every polynomial in the GBof every segment of its CGS is faithful. In a related paper[7], we have proposed a Buchberger like completion algo-rithm for computing a minimal CGB directly from a basisof a parametric ideal.Given a CGB and the associated CGS of a parametricideal as well as an admissible term ordering as input, theproposed algorithm has to deal with two key issues: (i) re-dundnacy in a CGB: since the CGB is constructed as theunion of different branches of a CGS, it may include poly-nomials which while necessary and minimal for a subset ofspecializations, can be covered by other polynomials neededfor a different subset of specializations, (ii) nonredundantpolynomials could be further simplified using other polyno-mials. It first checks whether every polynomial in CGB is essential in the sense that there is at least one specializationof parameters under which it is essential (necessary) to in-clude the specialization of the polynomial in a Gr¨obner basisof the associated specialized ideal. This check is performedby testing whether the polynomial can be covered by otherpolynomials in CGB; this is done by identifying every branchin the associated CGS in which the polynomial appears inthe associated Gr¨obner basis and finding whether other poly-nomials in the CGB can cover it for all specializations cor-responding to the branch. If a polynomial is discovered tobe not essential, it is replaced by other polynomials coveringit in branches in CGS it used to appear, and also discardedfrom the CGB. The subset of essential polynomials in a givenCGB is a minimal CGB.As will be shown later, there can be multiple minimalCGBs being generated from a given CGS even when an ad- missble term ordering is fixed. To obtain the least minimalCGB among them, simplification (similar to normalization)on an essential polynomial by other essential polynomials isattempted; if the result is different from the original poly-nomial and covers the original polynomial with the help ofother essential polynomials in the CGB, it can replace theoriginal polynomial in the CGB. Despite this simplification,it is still possible to change heuristics in the proposed algo-rithm to generate different minimal CGBs.After discussing preliminaries in the next section, the algo-rithm is presented in Section 3. The concept of an essentialpolynomial in a CGB is defined, and the essentiality checkis explained. Covering of a polynomial under a set of spe-cializations defined by a segment by other polynomials isdefined. The termination and correctness of the algorithmare sketched. It is shown that the proposed algorithm cangenerate multiple minimal CGBs depending upon the orderin which essentiality check is performed. It is proved thatif the essentiality check is performed in desecnding order ofpolynomials, then the resulting minimal CGB is the leastamong all CGBs which are subsets of the input CGB. Togenerate minimal CGBs which are not subsets of the inputCGB, the concept of simplification of an essential polyno-mial by other essential polynomials is introduced. Section 4discusses the performance of our implementation of the pro-posed algorithm. It is shown that most CGBs computed byvarious algorithms have redundnant polynomials; in partic-ular, the KSW algorithm can sometimes generate CGBs inwhich about half of the polynomials are redundant.
2. PRELIMINARIES
The reader may consult [1] for definitions. Below we intro-duce notation and definitions necessary for the paper. Let K be a field, L an algebraically closed field extension of K , U and X the sets of parameters and variables respectively.Let > be an admissible total term ordering in which X ≫ U , i.e. variables are bigger than parameters. In the ring K [ X, U ], which regards parameters as the same as variables,for a polynomial f ∈ K [ X, U ], LC U ( f ) and LT X ( f ) are de-fined as its leading parametric coefficient and leading termw.r.t. > respectively. For example, let f = 32( u − x +4 uy ,where U = { u } , X = { x, y } , and > is a lexicographic termordering with x > y ≫ u . Then LC U ( f ) = 32( u −
1) and LT X ( f ) = x .A specialization σ is a ring homomorphism from K [ U ]to L , which can be extended canonically to K [ U ][ X ] → L [ X ] by keeping the identity on variables. For a polynomial f ∈ K [ U ][ X ], σ is given by f → f ( v , v , . . . , v m ), where v , . . . , v m ∈ L . In brief, denote this image of f as σ v ( f ),where v = ( v , . . . , v m ) ∈ L m , or simply σ ( f ) if it is clearfrom the context. Definition 2.1
Let
E, N be subsets of K [ U ] , then the tu-ple ( E, N ) is called a parametric segment . An associated constructible set A is given by V ( E ) − V ( N ) , where V ( E ) is the algebraic variety (the zero set) of E in L . ( E, N ) isconsistent if A = ∅ . Definition 2.2
Given an ideal I = h F i ⊆ K [ U ][ X ] , where F is finite, and an admissible term order > , let A , . . . , A l beconstructible sets of L m , and G , . . . , G l subsets of K [ U ][ X ] ,and S a subset of L m such that S ⊆ A ∪ · · · ∪ A l . Then a comprehensive Gr¨obner system (CGS) of I on S w.r.t. > is a finite set CGS = { ( A , G ) , . . . , ( A l , G l ) } , where for ≤ i ≤ l , σ i ( G i ) is a Gr¨obner basis of the ideal σ i ( I ) on L [ X ] under ∀ σ i ∈ A i .Each ( A i , G i ) is called a branch of CGS . Specifically, if S = L m , then CGS is called a comprehensive Gr¨obner system(CGS) of I . The above definition of a CGS does not require that G i be a subset of I ; in fact, there are algorithms ([10], [9], [17],[4]) for computing a CGS of an I in which G i need not be asubset. A CGS is called faithful if and only if each G i ⊆ I . Definition 2.3
Given an ideal I ⊆ K [ U ][ X ] , S ⊆ L m theparameter space, and an admissible term order > , let G bea finite subset of K [ U ][ X ] . G is called a comprehensiveGr¨obner basis (CGB) of I on S w.r.t. > , if for ∀ σ ∈ S , σ ( G ) is always a Gr¨obner basis of the ideal σ ( I ) on L [ X ] .Specifically, if S = L m , G is a CGB of I . Note that the above definition of a CGB requires it tobe faithful. From a faithful CGS, it is easy to compute theassociated CGB by taking the union of the set of polynomialsin each branch of the CGS. Further, a CGB can be defined ona constructible set (or equivalently, a parametric segment).The following proposition holds for any
CGS generated bythe KSW algorithm in [5]
Proposition 2.4
If a
CGS of an ideal I ⊆ K [ U, X ] w.r.t.an admissible term order > is faithful, for every branch ( A i , G i ) ∈ CGS , G i is a CGB of I on A i w.r.t. > . Further, a special kind of CGB is defined as follows:
Definition 2.5
Given a CGB G of an ideal I ⊆ K [ U ][ X ] w.r.t. an admissible term order > , G is minimal if the fol-lowing conditions are true –(i) No proper subset of G is a CGB of I w.r.t. > ;(ii) For ∀ g ∈ G , LC U ( g ) is a monic polynomial in K [ U ] . The
CGS and the associated CGB G computed by theKSW algorithm is adapted to Definition 2.5, by making poly-nomials in each branch of CGS and every polynomial in G have their leading coefficients as monic polynomials in K [ U ].
3. ALGORITHM FOR GENERATING MIN-IMAL CGB
The proposed algorithm takes a CGB G and its associ-ated faithful CGS as input, and outputs a minimal CGB(MCGB) of the same ideal. The structures generated by theKSW algorithm [5] satisfies this requirement. Two key op-erations are performed on G to get an MCGB: (i) removalof non-essential (or redundant) polynomials in G , and (ii)simplification of essential polynomials by other polynomialsin G . In subsequent sections, we discuss in detail how thesechecks are performed. We start with a top level descriptionof the algorithm first.A minimal Gr¨obner basis of an ideal I ⊆ K [ X ] is achievedby removing unnecessary polynomials from an arbitrary Gr¨ob-ner basis of I . Analogously, the concept of an essential poly-nomial in a CGB is defined: Definition 3.1
Given a CGB G of some ideal I ⊆ K [ U ][ X ] ,a polynomial p ∈ G is called essential w.r.t. G iff G − { p } isnot a CGB of I anymore. Otherwise, p is non-essential iff G − { p } remains to be a CGB of I . We are abusing the notation somewhat since in checkingwhether p ∈ G is essential, only polynomials in G − { p } areconsidered.The following proposition intuitively states that a poly-nomial p in the above G is essential if under at least onespecialization σ , σ ( p ) is necessary for σ ( G ) to be a Gr¨ob-ner basis of the specialized ideal σ ( I ). Further, Proposition 3.2
Given a CGB G of some ideal I , a poly-nomial p ∈ G is essential w.r.t. G if and only if there exists aspecialization σ such that for ∀ q ∈ G − { p } , LT ( σ ( q )) cannotdivide LT ( σ ( p )) . Corollary 3.3
Given a CGB G of an ideal I and a poly-nomial p ∈ G that is essential w.r.t. G , p remains essentialw.r.t. any CGB of I which is also a subset of G . A minimal CGB from a given CGB is computed by re-moving non-essential polynomials from it.
An easy and obvious redundancy check is when a CGBcontains a polynomial as well as its multiple with a polyno-mial purely in parameters as the multiplier. For any spe-cialization, the multiplier evaluates to a constant. Since theKSW algorithm computes the RGB in each branch w.r.t. K [ X, U ], a polynomial and its multiple can be part of theoutput in different branches as illustrated below.
Example 3.4
Given I = h f i = h ( a − b ) x + ( a + b +1) x + ( a − b )( b + 2) i ⊆ K [ a, b ][ x ] and a lexicographic termorder > with x ≫ a > b .A CGB of I computed by the KSW algorithm is G = { f, g = ( b − b + 32 b + 12 ) f, h = ( a + b ) f } . Both g and h are multiples of f with the multipliers beingpolynomials in K [ U ] (i.e. polynomials only in parameters).It is easy to see that both g and h are redundant, and afterremoving them, the resulting set G ′ = { f } is still a CGB of I . In general, Proposition 3.5
Let G be a CGB of ideal I ⊆ K [ U ][ X ] w.r.t. > . If there is S = { c f, . . . , c k f } ⊆ G with f ∈ G and c , . . . , c k ∈ K [ U ] , then G − S is still a CGB of I . The CGB output of the KSW algorithm is thus prepro-cessed to remove such multiples of polynomials with multi-pliers in K [ U ] if they are present; The asssociated CGS isupdated by replacing c i f by f in its branches. By this re-moval, we achieve a CGB of the same ideal of a smaller sizealong with a simpler CGS. The algorithm below is given the CGB G and its associ-ated CGS of I computed by the KSW algorithm as input.It preprocesses G as discussed in Section 3.1; if any polyno-mial is deleted in this step, the associated CGS is updatedaccordingly. Each polynomial in the result is checked forbeing essential.1. p is not essential: p is removed from G , and CGS isupdated as in Section 3.6, replacing p by other poly-nomials which cover p .2. p is essential: p is kept in G without changing CGS . lgorithm MCGBMain(
E, N, F ) Input: ( E, N, F ): E , N , finite subsets of k [ U ]; F , a finitesubset of ( K [ U, X ]) . Output: M : A minimal comprehensive Gr¨obner basis ofthe ideal h F i w.r.t. the given term ordering > .1. ( CGS, G ) := KSW ( E, N, F );2. if CGS = ∅ or G = ∅ then return ∅ ; endif
3. (
CGS, G ) := Preprocess( CGS, G );4. G := SortDesc ( G );5. M := G ;6. for each p i ∈ G from i := 1 to |G| :7. L := CheckEssential( p i , M , CGS );8. if L = ∅ then CGS := UpdateCGS(
CGS, p i , L );10. M := M − { p i } ; endifendfor return M ;In MCGBMain , procedures
KSW in Line 1 and
Prepro-cess in Line 3 represent the KSW algorithm and the prepro-cessing respectively. As discussed later in Section 3.5, the
CheckEssential procedure in Line 6 returns an empty listif the input polynomial is found to be essential; otherwise,it returns a list of branches with p substituted by its cor-responding coverings. This list is used for updating CGS ,using the
UpdateCGS procedure in Line 8.The result of the algorithm is sensitive to the order inwhich polynomials are checked for being essential. The
Sort-Desc procedure in Line 4 sorts polynomials in G in a descend-ing order w.r.t. > , so that the essentiality check starts fromthe largest polynomial to the least one. As proved later inSection 3.7, polynomials checked in decending order computethe smallest MCGB under the set ordering w.r.t. > . Before discussing further details of the above algorithm,we illustrate the key concepts of esssentiality and covering ofa polynomial by other polynomials using a simple examplebelow.
Example 3.6
Given I = h ( a − b ) x + y + ( a + b ) z, a x + y + bz i ⊆ K [ a, b ][ x, y, z ] and a lexicographic term order suchthat x > y > z ≫ a > b . The KSW algorithm computes thefollowing CGS : segment basis LT ∅ , { ab } ) { f , f } { y , x } { b } , { a } ) { f , f } { y , x } { a, b } , { } ) { f } { y } { a } , { b } ) { f , f } { y, x } and the associated CGB G = { f = a y + ( − a + 2 b ) y + φz,f = b x − a + 2 b y + 14 y − ψ z,f = ( a − b ) x + y + ( a + b ) z,f = abx − a y + 12 y − θ z,f = abxy − a − b x − a y − a y z − a + 2 ab − a yz − φ z − a + b z } , where φ = a + a b − ab + 2 b , ψ = a + 3 ab + 2 b − b and θ = a + ab − b . Preprocessing does not change G since there are no polyno-mials multiple of each other. Since f < f < f < f < f ,the essentiality check starts from f in the descending order.It suffices to check for specializations corresponding tobranches where f appears in the CGS whether f can becovered by other polynomials in G . f appears only in Branch4 with the specializations A : a = 0 , b = 0, and its lead-ing term is x . Since G is minimal under A due to theKSW algorithm, it is enough to check whether polynomialsin G − G = { f , f , f } can cover it for specializations of A . f contains x with coefficient b = 0 and has no higherterm, so { f } covers f under A . Thus, f is not essential;it can be replaced by f in the CGS and deleted from G giv-ing a smaller CGB of I . G in CGS becomes { f , f } and G = { f , f , f , f } .The essentiality of f is checked similarly . It appears onlyin Branch 4 and its leading term is y under A . Further, only { f , f } , which is G − G can possibly cover it. f contains y with coefficient − a + 2 b = 0; f has a higher term y , but itscoefficient a = 0, thus implying that the leading term of f under A is determined to be y . So f covers f under A ,implying f is non-essential. Update G and CGS by deleting f and replacing f by f respectively: G = { f , f , f } , and G becomes { f , f } in CGS . f appears only in Branch 2 has x as its leading term x inthis branch. No polynomial in G − G contains x , implying f has no covering under A . Thus f is essential; consequently, CGS and G do not change.To check f for essentiality, all branches need to be con-sidered. In Branch 1, the leading term of f is x . f isthe only polynomial in G − G , which contains x and hasno higher term. But the coefficient a − b is not deter-mined. This means f covers f only under the subsegment A = A ∪ {− a + 2 b = 0 } which is a subset of A , but notunder A = A ∪ {− a + 2 b = 0 } . There is no other poly-nomial that has x in it, so f has no covering under A .Thus f is essential, and there is no need to consider otherbranches.Finally, to check f for essentiality, branches 1 and 4 needconsideration. In Branch 1, the leading term of f is y . f isthe only polynomial in G − G and it contains y with coeffi-cient 1 = 0. But it has a higher term x with coefficient a − b that is not determined under A . So it cannot cover f undersegment A = A ∪ { a − b = 0 } . Since there is no otherpolynomial left to cover f , f has no covering under A . f is essential, and the algorithm after having found f , f as nonessential with a smaller CGB = { f , f , f } consist-ing only of essential polynomials, with the updated smaller CGS as well.
As illustrated by the above example, the essentiality checkof a polynomial p in a CGB is performed by identifying otherpolynomials in the CGB which can possibly cover p . For abranch with an associated segment A i in a CGS in which p appears, only those polynomials in the CGB can cover p that have the leading term of p w.r.t. A i appearing in themwith a possibly nonzero coefficient. Since p in the CGB maye contributed by many branches in the CGS, for every suchbranch and its associated segment, we need to check whetherpolynomials appearing in other branches of CGS can cover p .We exploit the strucuture of the associated CGS computedby the KSW algorithm and its properties to perform thischeck (particularly that each branch ( A j , G j ) ∈ CGS , G j isa minimal Gr¨obner basis under specializations in A j and allbranches are disjoint). It is thus not necessary to considerother polynomials in the same branch as p and further, weonly need to consider polynomials which have the leadingterm of p under the segment under consideration appearingwith a possibly nonzero coefficient. If a single polynomial q covers p for the branch under consideration, then q canreplace p in that branch as well as in the GB of the CGSof that branch. For different branches in which p appears,there may be different such q ’s covering p . If for at least onebranch in the CGS in which p appears, it cannot be covered,then p is declared essential and kept in the CGB as well asthe CGS. If p can be covered in all branches of the CGSin which it appears, then p is not essential and can thus bediscarded from the CGB and the CGS; further, p is replacedby the corresponding q ’s in respective branches in the CGS.It can be that for a particular branch in which p appears, p cannot be covered by a single polynomial but instead mul-tiple polynomials are needed for covering it. This especiallyarises if the leading term of p appears in another polyno-mial in CGB but whose coefficient under the segment cannotbe completely determined to be nonzero. Then, the branch(i.e., segment of specializations) needs to be split into mul-tiple sub-branches so that multiple polynomials can cover p .This aspect is also illustrated below in the next subsectionas well as in the case of the essentiality check of f , f in theexample above. Definition 3.7
Given a CGB G of an ideal I , a finite set Q = { q , . . . , q n } ⊆ G − { p } is said to be a covering of apolynomial p ∈ G over a set A of specializations, if for ∀ σ ∈ A , there is some q i ∈ Q such that LT ( σ ( q i )) | LT ( σ ( p )) . Proposition 3.8
Given a CGB G and the associated CGS of I generated by the KSW algorithm, p ∈ G is non-essentialw.r.t. G , iff in each of branch ( A i , G i ) ∈ CGS where p ap-pears (i.e. p ∈ G i ), p has a covering Q i = { q , . . . , q n } ⊆G − G i , such that for ∀ σ i ∈ A i , there is some q j ∈ Q with LT ( σ i ( q j )) = LT ( σ i ( p )) . As alluded above, a polynomial p in a branch correspond-ing to the segment A j may not be covered by a single poly-nomial q but instead may require a set of polynomials Q = { q , . . . , q n } with each polynomial in Q only covers p in aproper subset of A j , but their union is A j .For example, in K [ u, v ][ y, x ] and a lexicographic term or-der with y > x ≫ u > v , in a branch A j = ( { u − v } , { u } ) ∈ CGS of an ideal, G j = { p = ( u − v ) y + ux } and Q = { q =( u + v ) x, q = ( u − v ) x } . To check if Q can cover p in A j ,it is easy to see that both q and q partially cover p , sinceneither of their leading coefficients is determined. So A j ispartitioned w.r.t. u + v : q covers p in A j and q covers p in A j . So Q = { q , q } is a covering of p in A j . Thiskind of branch partition deals with the case when the lead-ing term of p appears in q but with the coefficient that isnot determined to be nonzero. A j = V ( u − v ) − V ( u ) A j = V ( u − v ) − V ( u ( u + v )) u + v = 0 A j = V ( u + v ) − V ( u ) u + v = 0 Algorithm
CheckEssential( p, G , CGS ) Input: p : a polynomial in G whose essentiality is beingchecked; G : a CGB of some ideal; CGS : the associated CGSof G . Output:
An empty list, if p is essential w.r.t. G ; a non-empty list, otherwise.1. L := ∅ ;2. for each B i = ( A i , G i ) ∈ CGS with p ∈ G i :3. L i := CheckInBranch( p, G − G i , B i );4. if L i = ∅ then return ∅ endif L := L ∪ L i ; endfor return L ;As illustrated above, to check whether a polynomial p in aCGB G is essential, the algorithm goes through each branch( A i , G i ) where p ∈ G i , looking for a covering of p by polyno-mials in G − G i . In CheckInBranch , let ( A i , G i ) be a branchwhere p ∈ G i , and let t be the leading term of p under A i ;then a set of candidate polynomials G can is first computedfrom G − G i by removing polynomials in which the coeffi-cient of the term t is determined to be 0. In Example 3.6, tocheck f under A with t = x , G can = { f , f } is computedout of G − G = { f , f , f } , since f contains no x .The algorithm then looks for a covering of p from G can .There are multiple cases based on how the leading term of p under the segment being considered appears in the polyno-mials in G can . • Case 1 : G can = ∅ , then p has no covering in A i ,implying it is essential. The check for f in Example3.6 is such a case. • Case 2 : q in G can such that the coefficient of theleading term t of p is determined to be non-zero in A i : q then covers p under A i iff either it has no higher term(In Example 3.5, f covers f under A is such a case),or the coefficient of all of its higher terms is 0 (in theabove example, f covers f under A is such a case).Otherwise, q cannot cover p if there is a higher termwith non-zero coefficient, or q can partially cover p ifa higher term has a coefficient that is not determinedto be 0 (as f partially covers f under A ). • Case 3 : q in G can such that the coefficient of theleading term t of p is not determined in A i to be 0: q can only partially cover p under A i . A i is partitionedinto two segments, and the check is continued in eachof them. The check of f in Example 3.6 and Examplein Section 3.4.2 are such cases. If a polynomial p is found to be not essential, it is dis-carded not only from the CGB but it must be replaced by thepolynomials from CGB covering it in the associated
CGS ; UpdateCGS procedure accomplishes that. In every branch ofhe CGS in which p appears, p is replaced by the polynomialscovering it for that branch. As a result, the updated CGS remains to be a CGS of I , with the union of polynomials in G i ’s being G − { p } , the new CGB.In Example 3.6, when removing f , G is changed to { f , f } . Then f is still non-essential w.r.t. G − { f } . Soremove it, and update G to be { f , f } . After then, all theremaining polynomials are essential, and M = { f , f , f } isa minimal CGB of I .Sometimes, a branch in CGS may need to be split if p iscovered by two (or more) different polynomials for two (ormore) different parts of the segment. Consider the examplein Section 3.4.2: in Branch ( A j = ( { u − v } , { u } ) , G j = { p = ( u − v ) y + ux } ), Q = { q = ( u + v ) x, q = ( u − v ) x } covers p . In case p is non-essential w.r.t. the CGB G ofthat ideal, then Branch ( A j , G j ) must be partitioned intotwo new branches: ( A j = ( { u + v } , { u } ) , G j = { q } ) and( A j = ( { u − v } , { u ( u + v ) } ) , G j = { q } ). which replace inthe updated CGS, the original branch ( A j , G j ). Proposition 3.9
The
MCGBMain algorithm terminates andcomputes a minimal CGB of the given ideal I w.r.t. the giventerm ordering > . It should be obvious from the algorithm description thatits output is always a subset of the input CGB G . As statedearlier, the order in which polynomials are checked for es-sentiality affects the output of the algorithm. In Example3.6, there are 4 different MCGBs which are subsets of G : M = { f , f , f } , M = { f , f , f } , M = { f , f , f } , M = { f , f , f } . It is possible to generate all of these minimal CGBs bychanging the order in which the essentiality check is per-formed.Various MCGBs are comparable if the ordering > on poly-nomials is extended to sets of polynomials in the usual way.Using the desecnding order on polynomials in a CGB G forthe essentiality checking (Line 4 in MCGBMain ), the leastMCGB that is a subset of G under the set ordering w.r.t. > can be generated. Proposition 3.10
Given a CGB G of an ideal I w.r.t. > computed by the KSW algorithm, then MCGBMain algo-rithm computes the least MCGB among all MCGBs whichare subsets of G under the set ordering w.r.t. > . For Example 3.6, the algorithm indeed computes the small-est MCGB M . By Proposition 3.10 above,
MCGBMain algorithm onlycomputes an MCGB that is the least among all subsets ofthe input CGB G that are MCGBs. However, this resultneed not be the least one among all MCGBs of the ideal I as illustrated below. Example 3.11
For I = h ux − y + (4 u + 4 v ) z, ( − u +2 v ) x − y + 4 vz i ⊆ K [ u, v ][ x, y, z ] and a lexicographic termorder > with x > y > z ≫ u > v , the CGS computed by theKSW algorithm is: branch basis LT ∅ , { v (3 u − v ) } ) { f , f } { y, x } { u − v } , { v } ) { f , f } { z, x } { u, v } , { } ) { f } { y } { v } , { u } ) { f , f } { y, x } and the CGB is: G = { f = ( u − v ) y + ( − u − uv + 43 v ) z,f = vx − y + (4 u + 6 v ) z,f = ( u − v ) x + 413 y + 12 u − v z,f = ( u − v ) x + 43 uz } . The output of
MCGBMain is M = { f , f , f } . How-ever, even a smaller MCGB can be obtained from M bysimplifying f further.Simplification for parametric polynomials can be extremelytricky however; particularly, replacing a parametric polyno-mial in a CGB by another parametric polynomial obtained ingeneral after simplifying using the CGB need not preserveCGBness. As illustrated earlier, trivial simplification of apolynomial p by another polynomial q to 0 when p = a ∗ q and a is a polynomial in parameters, leading to discarding p preserves CGBness (see Example 3.4 as well as Proposi-tion3.5). The polynomial − h , which is a multiple of h ∈ G in the example from Weispfenning discussed in the Intro-duction, is also such an example. However, h can also besimplified to 0 by { f, g } , but removing h does not preserveCGBness since the resulting set { f, g } is not CGB of I any-more.An obvious way to ensure that replacing a polynomial byits simplified form preserves CGBness is to check that thesimplified form covers the original polynomial along withother polynomials in the CGB as defined in the previoussection. That means essentiality check must be performedafter simplification to maintain the correctness.We have extended MCGBMain to apply simplification onCGBs and the result is an extended MCGB algorithm called
MCGBSimpl . The extended algorithm is conservative in thefollowing sense: when p is checked to be essential, it is sim-plified by M − { p } to the normal form e p . If e p is a non-zeropolynomial different from p , then check whether e p with otherpolynomials in M−{ p } can cover p , in which case substituteit for p in M and CGS ; otherwise, keep p in M .To illustrate the extended algoritm on Example 3.11 M := M − { f } since f is non-essential; G = { f , f } and G = { f , f } . f is essential. Instead of keeping it in M , the algo-rithm reduces f by M − { f } to the normal form g = ux − y +(4 u +4 v ) z . The essentiality check on f w.r.t. { f , f , g } concludes that f is non-essential. So f is replaced by g in M , and the CGS is updated by setting G = { f , f } and G = { f , g } . Both f and f are essential, and already intheir normal form modulo the other polynomials in M . TheMCGB computed by MCGBSimpl algorithm is { f , f , g } ,which is smaller than M and not a subset of G .As the reader would have noticed that the extended al-gorithm is extremely conservative in applying simplification:if a polynomial f is essential and its normal form is g , f iskept in G if the substituted basis fails to be a CGB. However,there may exist some intermediate form f ′ along the reduc-tion chain f → g , such that f > f ′ > g and ( G − { f } ) ∪ { f ′ } remains being a CGB of the same ideal. So a reasonableodification is to repeatedly perform one-step simplificationassociated with the essentiality check, instead of checking thenormal form only. One step simplification has not yet beenintegrated into our implementation, but we plan to do so inthe near future and compare its performance with multi-stepsimplification with the goal of generating more and smallerminimal CGBs. An indepth investigation of the KSW algorithm [5] revealsthat for each branch A j = ( E j , N j ), the corresponding Gr¨ob-ner basis G j is a minimal Dickson basis (MDB) of the RGB of F + N j , where F is the given basis. There can in gen-eral be many minimal Dickson bases of the same RGB , andthe original KSW algorithm chooses the one with minimalnon-zero parts in A j in its attempt to compute the least GB(after specialization) for every branch. However, this choicesometimes results in larger faithful polynomials in CGS andhence CGB, producing a larger CGB G and thus a largerMCGB as illustrated below.Consider F = { ax y + a x − a, ab y + 4 b − } ⊆ K [ a, b ][ x, y ] with a graded lexicographic term order such that x > y ≫ a > b . By the original KSW algorithm, we havebranch basis LT1 ( ∅ , { ab ( a b + b − } ) { f , f } { y , x } { a b + b − } , { a } ) { f , f } { y, x } { a, b − } , { } ) ∅ ∅ { a } , { b − } ) { f } { } { b } , { a } ) { f } { } CGB is G = { f = ab y + b − ,f = ( a b + b − x + 3 ab y − a b ,f = ( a b + 2 a b − a + b − b ) x + (3 a b + 3 ab ) y − (3 a b + 3 a b ) ,f = ( a b + 2 a b − a + b − b ) x − (6 a b + 6 a b ) x + 9 a b + 9 ab } . And the MCGB computed by
MCGBMain is M = { f , f , f } .A smaller CGB can be generated however by choosing aminimal Dickson basis with the least faithful forms as theGr¨obner basis for each branch. For the above example, inbranch 2, G = { f , f } , can be picked where f =( a b + a b − a ) x + 3 a b y − a b ,f =( a b + ab − a ) x − a b x + 9 a b , with other branches unchanged. So the new CGB G ′ = { f , f , f , f } resulting in the MCGB M ′ = { f , f , f } ,smaller than M above since f < f < f < f .We have implemented this modification to the KSW algo-rithm to choose the least minimal Dickson basis w.r.t. thefaithful version of polynomials instead of just considering thenon-zero parts as in the original KSW algorithm with betterresults, leading to smaller minimal CGBs.
4. EXPERIMENTS
The algorithms discussed in the paper are implemented inSINGULAR [2]. We tested the implementation on a largesuite of examples including those from [5], [9], [11], [12],[14], [17] and [19]. For instance, there are 70 out of 100 examples which have non-essential polynomials in the CGBsgenerated by the KSW algorithm, which is considered thebest algorithm so far for computing smaller CGSs and CGBs[12]. Below we list some of the results.Table 1: Resulted MCGB and CGSExample | KSWCGS | |
CGS | |G| |M| % reducedbad test 6 6 8 6 33%KSW51 6 5 7 6 17%higher 1 4 4 9 6 50%higher 3 6 6 6 4 50%linear 4 4 4 3 33%montes 3 12 10 11 6 83%GBCover 7 5 12 7 71%SS 1 4 4 12 10 20%SS 3 19 17 36 27 41%Sit 21 5 5 6 3 100%Weispfenning 4 4 4 3 2 50%Principal 6 5 3 1 200%CTD 5 5 6 4 50%S 10 4 4 14 12 17%S 12 18 15 15 8 88%S 13 11 10 9 6 50%S 16 19 19 15 9 67%S 53 7 5 13 6 117%Nonlinear 1 6 6 9 4 125%In Table 1, the complexity of an example is characterizedby the size of its CGS (i.e. the number of branches) andCGB, which are the columns with labels | KSW CGS | and |G| . The size of an MCGB computed by MCGBMain al-gorithm is shown in the column with label |M| , with thepercentage of how many non-essential polynomials are re-moved from G caclulated as ( |G| − |M| ) / |M| . The columnwith label | CGS | shows the size of CGS reconstructed from M . As the table illustrates, a minimal CGB can reduce thesize of an input CGB by as much as 100% sometimes.
5. CONCLUDING REMARKS
We have proposed an algorithm for computing a minimalCGB from a given CGB consisting of faithful polynomials.The concept of an essential polynomial with respect to aCGB is introduced; the check for essentiality of a polyno-mial is performed using the associated CGS by identifyingwhether polynomials in other branches can cover the givenpolynomial. Only essential polynomials are kept in a CGBproducing a minimal CGB. These two checks only produceminimal CGBs which are subsets of an input CGB. The con-cept of a simplification of an essential polynomial by otheressential polynomials in a CGB is introduced using whichminimal CGBs that are not necessarily subsets of an inputCGB can be generated. The algorithms have been imple-mented and their effectiveness is demonstrated on exampleswhich show that most CGBs produced by various algorithmsreported in the literature including the KSW algorithm haveinessential or redundant polynomials.From a minimal CGB generated by the proposed algo-rithm, an algorithm to compute a CGS from the outputminimal CGB has been developed; the output CGS of thisalgorithm is often simpler and more compact from the origi-nal CGS used to generate the minimal CGB. The discussionof the algorithm could not be included in the paper becuaseof lack of space.s stated in the introduction, our ultimate goal is to de-fine the concept of a canonical CGB of a parametric ideal I ,consisting of faithful polynomials and uniquely determinedby I and term order > . This implies that a canonical CGBshould be minimal, as otherwise, from a nonminimal canon-ical CGB, it is possible to identify its proper subset whichis both canonical and even smaller, which contradicts theuniqueness property. Also, it should be reduced in somesense, since otherwise a canonical and smaller CGB can beachieved by replacing some polynomial by its reduced form.Given an ideal I ⊆ K [ X ] and a term order > , it is easy tosee that the RGB of I is the least Gr¨obner basis under theset ordering w.r.t. > . However, an analogous definition ofcanonical CGB turns out to be difficult.One major issue is that specialization is not monotonic ingeneral. To explain it, let I = h f = uz + x, g = ( u + 1) y − x i ⊆ K [ u ][ z, y, x ] with a lexicographic term order > suchthat z > y > x ≫ u . By the KSW algorithm, we have CGSi branch basis σ i ( G i )1 u = 0 , u + 1 = 0 { f, g } { ( u + 1) y − x, uz + x } u + 1 = 0 { g, h } { x, z } u = 0 { f, h } { x, y } Its CGB G = { f, g, h = f + g = uz + ( u + 1) y } isnot minimal, while σ ( G ), σ ( G ) and σ ( G ) are all re-duced. A smaller CGB computed by the MCGBMain al-gorithm is M = { f, g } , which is also minimal. However, G = { g, f } and G = { f, g } now, with σ ( G ) = { x, z − x } and σ ( G ) = { x, y − x } become larger. Namely, we cannotachieve the canonical CGB by simply reducing the special-ized corresponding Gr¨obner bases.Another issue is that a CGB of an ideal I has no relation-ship with its reduced Gr¨obner basis (RGB) w.r.t. K [ U, X ].It is possible that the CGB generated by the KSW of algo-rithm I is neither a subset of its RGB nor RGB is a subsetof the CGB. So starting with an RGB to compute a mini-mal CGB may not be helpful, especially when RGB is not aCGB. However, if the RGB of I is a CGB, it can be shownto be minimal as well as canonical CGB. Acknowledgement
A preliminary version of this paper was delivered as an in-vited talk at
EACA, 2014 in Barcelona, in June 2014 [6].The first author would like to thank Prof. Yao Sun for manyhelpful discussions on this topic. The help provided by Prof.Montes through emails is appreciated.This research project is partially supported by an NSFaward DMS-1217054. Some of this work was done duringthe first author’s sabbatical at the Institute of Software, theChinese Academy of Sciences in Beijing, China.
6. REFERENCES [1] D. Cox, J. Little, and D. OSHEA.
Ideals, varieties, andalgorithms: an introduction to computational algebraicgeometry and commutative algebra , Springer, 2007.[2] W. Decker, G.-M. Greuel, G. Pfister, H. Sch¨onemann,
Singular
An approach for solving systems ofparametric polynomial equations , In: Saraswat, Vijay,Van Hentenryck, Pascal (Eds.), Principles andPractices of Constraints Programming, MIT Press, pp.217-224, 1995 [4] D. Kapur, Y. Sun, D. Wang,
An efficient algorithm forcomputing a comprehensive Gr¨obner system of aparametric polynomial system , Journal of SymbolicComputation 49 (2013): 27-44, 2013.[5] D. Kapur, Y. Sun, D. Wang,
An efficient method forcomputing comprehensive Gr¨obner bases , Journal ofSymbolic Computation 52: 124-142, 2013.[6] D. Kapur, Y. Yang,
An algorithm for computing aminimal comprehensive Gr¨obner basis of a parametricpolynomial system,
Invited Talk, Proc.
ConferenceEncuentros de Algebra Comptacional y Aplicaciones(EACA),
An algorithm to check whether abasis of a parametric polynomial system is acomprehensive Gr¨obner basis and the associatedcompletion algorithm , 2015 (draft).[8] M. Manubens, A. Montes,
Improving the DISPGBalgorithm using the discriminant ideal , Journal ofSymbolic Computation 41.11: 1245-1263, 2006[9] M. Manubens, A. Montes,
Minimal canonicalcomprehensive Gr¨obner systems , Journal of SymbolicComputation 44.5: 463-478, 2009[10] A. Montes,
A new algorithm for discussingGr¨obner bases with parameters , Journal of SymbolicComputation 33.2: 183-208, 2002[11] A. Montes, M. Wibmer,
Gr¨obner bases for polynomialsystems with parameters , Journal of SymbolicComputation 45.12: 1391-1425, 2010[12] A. Montes,
Using Kapur-Sun-Wang algorithm for theGr¨obner cover , In Proceedings of EACA 2012. Ed.:J.R. Sendra, C. Villarino. Universidad de Alcal´a deHenares., pp. 135-138, 2012[13] K. Nabeshima,
A speed-up of the algorithm forcomputing comprehensive Gr¨obner systems ,Proceedings of the 2007 international symposium onSymbolic and Algebraic Computation (pp. 299-306),ACM, 2007[14] W. Sit,
An algorithm for solving parametric linearsystems , Journal of Symbolic Computation, 13.4:353-394, 1992.[15] A. Suzuki, Y. Sato,
An alternative approach tocomprehensive Gr¨obner bases , Journal of SymbolicComputation 36.3: 649-667, 2003[16] A. Suzuki, Y. Sato,
Comprehensive Gr¨obner bases viaACGB , ACA2004: 65-73, 2004[17] A. Suzuki, Y. Sato,
A simple algorithm to computecomprehensive Gr¨obner bases using Gr¨obner bases ,Proceedings of the 2006 international symposium onSymbolic and Algebraic Computation (pp. 326-331),ACM, 2006[18] V. Weispfenning,
Comprehensive Gr¨obner bases ,Journal of Symbolic Computation 14.1: 1-29, 1992[19] V. Weispfenning,
Canonical comprehensiveGr¨obner bases , Journal of Symbolic Computation 36.3:669-683, 2003[20] M. Wibmer,