OOn µ -Symmetric Polynomials ∗ Jing Yang † and Chee K. Yap ‡ Abstract.
In this paper, we study functions of the roots of a univariate polynomial in which the roots have agiven multiplicity structure µ . Traditionally, root functions are studied via the theory of symmetricpolynomials; we extend this theory to µ -symmetric polynomials. We were motivated by a conjecturefrom Becker et al. (ISSAC 2016) about the µ -symmetry of a particular root function D + ( µ ), calledD-plus. To investigate this conjecture, it was desirable to have fast algorithms for checking if a givenroot function is µ -symmetric. We designed three such algorithms: one based on Gr¨obner bases,another based on preprocessing and reduction, and the third based on solving linear equations. Weimplemented them in Maple and experiments show that the latter two algorithms are significantlyfaster than the first. Key words. µ -symmetric polynomial, multiple roots, symmetric function, D-plus discriminant, gist polynomial,lift polynomial AMS subject classifications.
1. Introduction.
Suppose P ( x ) ∈ Z [ x ] is a polynomial with m distinct complex roots r , . . . , r m where r i has multiplicity µ i . Write µ = ( µ , . . . , µ m ) where we may assume µ ≥ µ ≥ · · · ≥ µ m ≥
1. Thus n = (cid:80) mi =1 µ i is the degree of P ( x ). Consider the following functionof the roots D + ( P ( x )) := (cid:89) ≤ i D-plus root function. The form of this root function was introduced by Beckeret al [1] in their complexity analysis of a root clustering algorithm. The origin of this paperwas to try to prove that D + ( P ( x )) is a rational function in the coefficients of P ( x ). Thisresult is needed for obtaining an explicit upper bound on the complexity of the algorithm oninteger polynomials [2]. This application is detailed in our companion paper [5].We may write “ D + ( µ )” instead of D + ( P ( x )) since the expression in terms of the roots r = ( r , . . . , r m ) depends only on the multiplicity structure µ . For example, if µ = (2 , 1) then ∗ Submitted to the editors on January 21, 2020. Funding: Jing’s work is supported by National Natural Science Foundation of China (Grant † SMS-KLSE School of Mathematics and Physics, Guangxi University for Nationalities, Nanning, China.([email protected]). ‡ Courant Institute of Mathematical Sciences, NYU, New York, USA. ([email protected]). In [1], the D-plus function was called a “generalized discriminant” and denoted by “ D ∗ ( P ( x ))” or D-star . On the suggestion of Prof. Hoon Hong, we now reserve the D-star notation for the following root function D ∗ ( P ( x )) := (cid:81) ≤ i 1. Intuitively, the x i ’s are roots (not necessarily distinct), z i ’s are variablesrepresenting the elementary symmetric functions of the roots, and r i ’s are the distinct roots.Let µ be a partition of n with m parts. In other words, µ = ( µ , . . . , µ m ) where n = µ + · · · + µ m and µ ≥ µ ≥ · · · ≥ µ m ≥ 1. We denote this relation by µ (cid:96) n. We call µ an m -partition if it has m parts. A specialization σ is any function of the form σ : { x , . . . , x n } → { r , . . . , r m } . We say σ is of type µ if σ − ( r i ) = µ i for i = 1 , . . . , m .Throughout the paper, we use | · | to denotethe length of a sequence. In particular, | µ | = | r | = m . We say σ is canonical if σ ( x i ) = r j N µ -SYMMETRIC POLYNOMIALS 3 and σ ( x i +1 ) = r k implies j ≤ k . Clearly the canonical specialization of type µ is unique, andwe may denote it by σ µ .Consider the polynomial rings K [ x ] and K [ r ]. Any specialization σ : { x , . . . , x r } →{ r , . . . , r m } can be extended naturally into a K -homomorphism σ : K [ x ] → K [ r ]where P = P ( x ) ∈ K [ x ] is mapped to σ ( P ) = P ( σ ( x ) , . . . , σ ( x n )). When σ is understood,we may write “ P ” for the homomorphic image σ ( P ).We denote the i -th elementary symmetric functions ( i = 1 , . . . , n ) in K [ x ] by e i = e i ( x ). For instance, e := n (cid:88) i =1 x i ,e := (cid:88) ≤ i 1) then e = 2 r + r and e = r + 2 r r .The key definition is the following: a polynomial F ∈ K [ r ] is said to be µ -symmetric ifthere is a symmetric polynomial (cid:98) F ∈ K [ x ] such that σ µ ( (cid:98) F ) = F . We call (cid:98) F the µ -lift (orsimply “lift”) of F . If ˚ F ∈ K [ z ] satisfies ˚ F ( e , . . . , e n ) = (cid:98) F ( x ) then we call ˚ F the µ -gist of F . Remark (cid:16) F (cid:17) ∧ for any lift of F . Note that the µ -lift and µ -gistof F are defined if and only if F is µ -symmetric.(ii) We view the z i ’s as symbolic representation of the symmetric polynomials e i ( x )’s. More-over, we can write σ µ ( ˚ F ( e , . . . , e n )) as ˚ F ( e , . . . , e n ).(iii) Since ˚ F ( e , . . . , e n ) is symmetric in x , . . . , x n , we could use any specialization σ of type µ instead of the canonical specialization σ µ , since σ ( ˚ F ( e , . . . , e n )) = σ µ ( ˚ F ( e , . . . , e n )).(iv) Although (cid:98) F and ˚ F are mathematically equivalent, the gist concept lends itself to directevaluation based on coefficients of P ( x ). Example Let µ = (2 , and F ( r ) = 3 r + r +2 r r . We see that F ( r ) is µ -symmetricsince F ( r ) = (2 r + r ) − ( r + r r ) = e − e = σ µ ( e − e ) . Hence lift of F is (cid:98) F = e − e =( x + x + x ) − ( x x + x x + x x ) and its gist is ˚ F ( z ) = z − z . We have this consequence of the Fundamental Theorem on Symmetric Functions: Proposition Assume P ( x ) = n (cid:88) i =0 c i x n − i ∈ K [ x ] J. YANG AND C. YAP has m distinct roots ρ = ( ρ , . . . , ρ m ) of multiplicity µ = ( µ , . . . , µ m ) .(i) If F ∈ K [ r ] is µ -symmetric, then F ( ρ ) is an element in K .(ii) If ˚ F ∈ K [ z ] is the µ -gist of F , then F ( ρ , . . . , ρ m ) = ˚ F ( − c /c , . . . , ( − n c n /c ) . Proof. F ( r ) = σ µ ( (cid:98) F ( x )) (by definition of µ -symmetry)= σ µ (˚ F ( e , . . . , e n )) (by the Fundamental Theorem of SymmetricFunctions, as (cid:98) F is symmetric)= ˚ F ( e , . . . , e n ) (since e i = σ µ ( e i )) F ( ρ ) = ˚ F ( e ( ρ ) , . . . , e n ( ρ ))= ˚ F ( − c /c , . . . , ( − n c n /c ) (by Vieta’s formula for roots) This proves the formula in (ii). The assertion of (i) follows from the fact that ˚ F ∈ K [ z ] and c i ’s belong to K . Q.E.D. Example Consider the polynomial F ( r , r ) in Example 1. Suppose the polynomial P ( x ) = c x + · · · + c ∈ K [ x ] has two distinct roots ρ and ρ of multiplicities and ,respectively. Then Proposition 1 says that F ( ρ , ρ ) = 3 ρ + ρ + 2 ρ ρ is equal to ˚ F ( − c /c , c /c , − c /c ) = ( − c /c ) − c /c ∈ K since ˚ F ( z , z , z ) = z − z . It is an interesting question to prove some converse of Proposition 1. We plan to take thisup in a future work. µ -Ideal. We want to study the lift (cid:98) F ∈ K [ x ] of a µ -symmetricpolynomial F ∈ K [ r ] of total degree δ . If we write F as the sum of its homogeneous parts, F = F + · · · + F δ , then (cid:98) F = (cid:98) F + · · · + (cid:98) F δ . Hence, we may restrict F to be homogeneous.Next consider a polynomial H ( z ) ∈ K [ z ]. Suppose there is a weight function ω : { z , . . . , z n } → N = { , , . . . } then for any term t = (cid:81) ni =1 z d i i , its ω -degree is (cid:80) ni =1 d i ω ( z i ). Normally, ω ( z i ) = 1 for all i ;but in this paper, we are also interested in the weight function where ω ( z i ) = i . For short, wesimply call this ω -degree of t its weighted degree , denoted by ω -deg( t ). The weighted degreeof a polynomial H ( z ) is just the maximum weighted degree of terms in its support, denoted by ω -deg( H ). A polynomial H ( z ) is said to be weighted homogeneous or ω -homogeneous ifall of its terms have the same weighted degree. Note that the weighted degree of a polynomial H ∈ K [ z ] is the same as the degree of H ( e , . . . , e n ) ∈ K [ x ].The gist ˚ F of F is not unique: for any gist ˚ F , we can decompose it as ˚ F = ˚ F + ˚ F where ˚ F is the weighted homogeneous part of ˚ F of degree δ , and ˚ F := ˚ F − ˚ F . Then ˚ F ( e , . . . , e n ) = F implies that ˚ F ( e , . . . , e n ) = F and ˚ F ( e , . . . , e n ) = 0. We can always omit ˚ F from the gistof F . We shall call any polynomial H ( z ) ∈ K [ z ] a µ -constraint if H ( e , . . . , e n ) = 0. Thus,˚ F is a µ -constraint. N µ -SYMMETRIC POLYNOMIALS 5 It follows that when trying to check if F is µ -symmetric, it is sufficient to look for gists˚ F among weighted homogeneous polynomials of the same degree as F , i.e., δ . But even thisrestriction does not guarantee uniqueness of the gist of F because there could be µ -constraintsof weighted homogeneous degree deg( F ). To illustrate this phenomenon, we consider thefollowing example. Example Let µ = (2 , . Consider the polynomial F = r + 2 r r + 2 r r + r . It iseasy to verify that both (cid:98) F = e − e and (cid:98) F (cid:48) = e e − e are the lifts of F . Therefore, ˚ F = z − z and ˚ F (cid:48) = z z − z are the gists of F . It follows that the difference H = ˚ F − ˚ F (cid:48) = 18 (cid:16) z + 8 z − z z ) is a µ -constraint. We may check that H ( e , . . . , e ) = 18 (2 r + 2 r ) + (2 r r + 2 r r ) − 12 (2 r + 2 r )( r + 4 r r + r ) = 0 . It is easy to check that the set of all µ -constraints forms an ideal in K [ z ] which we maycall the µ -ideal , denoted by J µ . Note that H ( e , . . . , e n ) is in K [ r ] but H is in K [ z ]. So weintroduce an ideal in K [ z , r ] to connect them:(2.1) I µ := (cid:104) z − e , . . . , z n − e n (cid:105) . Actually J µ can be generated by I µ as indicated by Theorem 4.3. Example The following set of polynomials generates the (2 , -ideal: G : z − z z + 8 z G : z z + 2 z z − z + 16 z G : z z + 8 z z − z z G : z z − z G :4 z z z − z z − z z G :2 z z z − z z + z z + 16 z G :8 z z − z z z + z G : z z − z z + 2 z z + 32 z z + 8 z z G :16 z z − z z z + z − z . We computed this by first computing the Gr¨obner basis of the ideal (cid:104) z − e , z − e , z − e , z − e (cid:105) = (cid:10) z − (2 r + 2 r ) , z − ( r +4 r r + r ) , z − (2 r r + 2 r r ) , z − r r (cid:11) . By Theorem 4.3, the restriction of the Gr¨obner basis to K [ z ] is the above set of generators. J. YANG AND C. YAP µ -symmetric Polynomials. Although µ -symmetric polynomials origi-nated from symmetric polynomials, they differ in many ways as seen in these examples. • A µ -symmetric polynomial need not be symmetric. Let µ = (2 , 1) and n = 2 + 1 = 3.Then 2 r + r is µ -symmetric whose lift is e , but it is not symmetric. • A symmetric polynomial need not be µ -symmetric. Consider the symmetric polyno-mial F = r + r ∈ K [ r , r ]. It is not µ -symmetric with µ = (2 , (cid:98) F = ce such that σ µ ( (cid:98) F ) = r + r . But clearlysuch (cid:98) F does not exist. • Symmetric polynomials can be µ -symmetric. Note that ( r − r ) is obviously symmet-ric in K [ r , r ]. According to Lemma 2.2, it is also µ -symmetric for any µ = ( µ , µ ).In the following we will use this notation: [ n ] := { , . . . , n } , and let (cid:0) [ n ] k (cid:1) denote the set ofall k -subsets of [ n ]. For k = 0 , . . . , n − 2, we may define the function(2.2) S nk = S nk ( x ) := (cid:88) I ∈ ( [ n ] n − k ) (cid:89) i (cid:54) = j ∈ I (cid:16) x i − x j (cid:17) called the k th subdiscriminant in n variables. By extension, we could also define S nn − = 1.When k = 0, we have S n = (cid:81) i (cid:54) = j ∈ [ n ] (cid:16) x i − x j (cid:17) . In applications, the x i ’s are roots of apolynomial P ( x ) of degree n , and S n is the standard discriminant of P ( x ). Clearly S nk is asymmetric polynomial in x . Lemma 2.2. Define ∆ := (cid:81) ≤ i 3. Explicit Formulas for Special Cases of D + . The following two theorems show the µ -symmetry of some special D + polynomials. In other words, they confirmed our conjectureabout D + . Theorem 3.1. There exists ˚ F n ∈ K [ z ] such that for all µ satisfying µ = ( µ , µ ) and µ + µ = n , we have ˚ F n ( e , e ) = D + ( µ ) . More explicitly, • n is even: ˚ F n = (cid:16) ( n − z − nz µ µ (cid:17) n/ • n is odd: ˚ F n = (cid:16) ( n − z − nz µ µ (cid:17) n − (cid:16) k z + k z z + k z (cid:17) where k = − ( n − n − d , k = n ( n − d , k = − n d and d = µ µ ( µ − µ ) .Proof. From Lemma 2.2(b), we know that ( r − r ) is µ -symmetric for arbitrary n and( r − r ) = ( n − e − ne µ µ . When n is even, D + ( µ ) = (cid:0) ( r − r ) (cid:1) n = (cid:18) ( n − e − ne µ µ (cid:19) n = (cid:18) ( n − e − ne µ µ (cid:19) n = ˚ F n ( e , e ) . Thus the case for even n is proved. It remains to prove the case for odd n . First, it may beverified that ( r − r ) = k e + k e e + k e , where k = − ( n − n − d , k = 3 n ( n − d , k = − n d and d = µ µ ( µ − µ ) . J. YANG AND C. YAP It follows that D + ( µ ) = (cid:0) ( r − r ) (cid:1) n − ( r − r ) = (cid:18) ( n − e − ne µ µ (cid:19) n − (cid:0) k e + k e e + k e (cid:1) = (cid:32) ( n − e − ne µ µ n (cid:33) (cid:0) k e + k e e + k e (cid:1) = ˚ F n ( e , e , e )where k = − ( n − n − d , k = 3 n ( n − d , k = − n d and d = µ µ ( µ − µ ) . Q.E.D. Another special case of D + ( µ ) is where µ = ( µ, µ, . . . , µ ). Theorem 3.2. If all µ i ’s are equal to µ , then D + ( µ ) is µ -symmetric with lift given by (cid:98) F n ( x ) = (cid:16) µ m · S nn − m (cid:17) µ where S nn − m is given by Lemma 2.2(a).Proof. Since µ i = µ (1 ≤ i ≤ m ), D + ( µ ) = (cid:89) i The following example shows two ways to compute D + . One is using the definition andthe other is using the formula of D + in coefficients. Example Let P ( x ) = ( x − x − ( x − 1) = (1 , − , , , − , − · ( x , x , . . . , x, T . Then ( ρ , ρ , ρ ) = ( φ, (cid:98) φ, are the roots with multiplicity µ = (2 , , . Here φ = (1 + √ / isthe golden ratio and (cid:98) φ = 1 − φ is its conjugate. It turns out that in this case, D + ( µ ) = − as directly computed from the formula in the roots ( ρ , ρ , ρ ) . We can also compute it usingthe gist ˚ D + ( z ) of D + , i.e., D + ( µ ) = ˚ D + ( e , . . . , e ) . Here is the gist of D + (which can beobtained from our algorithms below): ˚ D + ( z , z , z , z , z ) = 101254 z − z z z − z z z + 67 z z z − z z z + 25174 z z z + 171 z z z − z z z + 6152 z z z − z z + 12 z z + z z + 6 z z + 92 z z + 48 z z + 17374 z z + 2774 z z − z z z z . N µ -SYMMETRIC POLYNOMIALS 9 According to Vieta’s formula for n = 5 , ( e , . . . , e ) = ( − c , c , − c , c , − c ) = (3 , , − , − , .Then, substituting z i by e i = ( − i c i , we also obtain D + (2 , , 1) = − . 4. Computing Gists via Gr¨obner Bases. In this section, we consider a Gr¨obner basisalgorithm to compute the µ -gist of a given polynomial F ∈ K [ r ], or detect that it is not µ -symmetric. In fact, we first generalize our concept of gist: fix an arbitrary (ordered) set D = ( d , . . . , d (cid:96) ) , d i ∈ K [ r ] . Call D the basis. If F ∈ K [ r ] and ˚ F ∈ K [ y ] where y = ( y , . . . , y (cid:96) ) are (cid:96) new variables, then˚ F ( y ) is called a D -gist of F if F ( r ) = ˚ F ( d , . . . , d (cid:96) ). Note that if D = ( e , . . . , e n ) (so (cid:96) = n )then a D -gist is just a µ -gist (after renaming y to z ).We now give a method to compute a D -gist of F using Gr¨obner bases. To this end, definethe ideal I D := (cid:104) v , . . . , v (cid:96) (cid:105) ⊆ K [ r , y ]where v i := y i − d i . Moreover, let G D be the Gr¨obner basis of I D relative to the the termordering ≺ ry . The ordering is defined as follows: r α y β ≺ ry r α (cid:48) y β (cid:48) iff r α ≺ r r α (cid:48) or else α = α (cid:48) and y β ≺ y y β (cid:48) . Here ≺ r and ≺ y are term orderings in K [ r ]and K [ y ] respectively. Note that ≺ ry is called the lexicographic product of ≺ r and ≺ y in [6, § I D , and the second about itsGr¨obner basis G D . Lemma 4.1. For all R ∈ K [ y ] , R ( y ) − R ( D ) ∈ I D . Proof. Consider any term y α where α = ( α , . . . , α (cid:96) ). Its image in the quotient ring K [ y ] / I D is: y α + I D = (cid:16) (cid:96) (cid:89) i =1 y α i i (cid:17) + I D = (cid:16) (cid:96) (cid:89) i =1 ( d i + ( y i − d i )) α i (cid:17) + I D = (cid:16) (cid:96) (cid:89) i =1 d α i i + I D (cid:17) + I D = (cid:16) (cid:96) (cid:89) i =1 d α i i (cid:17) + I D = D α + I D . Thus y α − D α ∈ I D . Since R ( y ) − R ( D ) is a linear combination of y α − D α ’s, our lemma isproved. Q.E.D. By a weighted homogeneous ideal we mean one that is generated by weighted homo-geneous polynomials. The following is a generalization of [6, Theorem 12.20, p.385], wherethe result is stated for homogeneous ideals.The following is a consequence of [6, Theorem 12.21, p.387]: Lemma 4.2. G D ∩ K [ y ] is a Gr¨obner basis for the elimination ideal I D ∩ K [ y ] with respectto the term ordering ≺ y . If R ( D ) = 0, then R ( y ) is called a D -constraint, which generalizes the concept of µ -constraint. Similar to µ -constraints, one may verify that all D -constraints forms an ideal,denoted by J D . Then we have the following theorem. Theorem 4.3. J D = I D ∩ K [ y ] .Proof. We will prove the theorem with the following two inclusions. • J D ⊆ I D ∩ K [ y ].Consider any R ∈ J D . Then R ( D ) = 0 implies R ( y ) = R ( y ) − R ( D ) ∈ I D byLemma 4.1. • J D ⊇ I D ∩ K [ y ].For any R ∈ I D ∩ K [ y ], R ∈ I D . Thus there exist B , . . . , B n ∈ K [ r , y ] such that R ( y ) = n (cid:88) i =1 ( y i − d i ) · B i . Substitution of y i = d i leads to R ( d , . . . , d n ) = 0, which implies R ∈ J D . Q.E.D. The following is a generalization of Proposition 4 in Cox [3, Chapter 7, Section 1] (exceptfor claims about uniqueness): Theorem 4.4. Fix the above Gr¨obner basis G D . Let R ∈ K [ r , y ] be the normal form of F ∈ K [ r ] relative to G D .(i) If R ∈ K [ y ] , then R is a D -gist of F .(ii) If F has a D -gist, then R ∈ K [ y ] .Proof. In the following, we use the specialization σ : y i (cid:55)→ d i for all i . This induces thehomomorphism σ : K [ r , y ] → K [ r ] taking every polynomial f ( r , y ) in the ideal I D to 0, i.e., σ ( f ) = 0.(i) Since R is the normal form of F , F − R ∈ I D . Thus σ ( F − R ) = 0 or σ ( F ) = σ ( R ).But F ∈ K [ r ] implies σ ( F ) = F . The assumption that R ∈ K [ y ] implies that σ ( R ) = R ( D ) = R ( d , . . . , d (cid:96) ). We conclude that R is a D -gist of F : F ( r ) = R ( D )(ii) By assumption, F has a D -gist ˚ F ∈ K [ y ], i.e., ˚ F ( D ) = F . Let (cid:101) R be the normal formof ˚ F . CLAIM: R − (cid:101) R ∈ I D . To see this, we write R − (cid:101) R as a sum R − (cid:101) R = ( R − F ) + ( F − ˚ F ) + ( ˚ F − (cid:101) R ) . We only need to verify that each of the three summands belong to I D : in part (i),we noted that R − F ∈ I D ; the third summand ˚ F − (cid:101) R ∈ I D for the same reason. N µ -SYMMETRIC POLYNOMIALS 11 The second summand F − ˚ F ∈ I D by an application of Lemma 4.1. To conclude that R ∈ K [ y ], we assume (by way of contradiction) that R / ∈ K [ y ]. By our choice of termordering for G D , we know that Lt ( R − (cid:101) R ) = Lt ( R ). But R − (cid:101) R ∈ I D implies thatthere is polynomial g ∈ G D such that Lt ( g ) | Lt ( R ). This contradicts the fact that R isa normal form. Q.E.D. Now we consider the special case when y i − d i is weighted homogeneous relative to a weightfunction: ω : ( y , r ) → N . A set of polynomials is said to be weighted homogeneous or ω -homogeneous if everypolynomial in the set is ω -homogeneous. Let K ω [ y , r ] denote the set of all the ω -homogeneouspolynomials in K [ y , r ]. It is obvious that all polynomials in K ω [ y , r ] of weighted degree δ form a K -vector space, denoted by K δω [ y , r ] where we assume 0 ∈ K δω [ y , r ]. Therefore, wedefine the weighted degree of 0 to be δ when 0 is viewed as an element in K δω [ y , r ]. When ω ≡ 1, we simplify K δω [ y , r ] into K δ [ y , r ].Assume f, f (cid:48) ∈ K ω [ y , r ]. Then the following properties can be easily verified.(i) ω -deg( f, f (cid:48) ) = max( ω -deg( f ) , ω -deg( f (cid:48) )).(ii) ω -deg( f ± f (cid:48) ) ≤ max( ω -deg( f ) , ω -deg( f (cid:48) )).(iii) ω -deg( f · f (cid:48) ) = ω -deg( f ) + ω -deg( f (cid:48) ).(iv) The S-polynomial of f and f (cid:48) is weighted homogeneous.(v) If G ⊆ K [ y , r ] is a weighted homogeneous Gr¨obner basis, then the normal form of f relative to G is weighted homogeneous of weighted degree ω -deg( f ).(vi) If F ⊆ K [ y , r ] is weighted homogeneous, so is the Gr¨obner basis of F .(vii) Let F = (cid:80) δi =0 F i ∈ K [ y , r ] where ω -deg( F i ) = i and G ⊆ K ω [ y , r ] is a Gr¨obner basis.Then the normal form of F relative to G is the sum of the normal form of F i relativeto G .If F ⊆ K [ y , r ] is weighted homogeneous, we say a polynomial H ∈ K [ y , r ] is F -minimal if for all H (cid:48) ∈ K [ y , r ], H ≡ H (cid:48) ( mod I F ) implies ω -deg( H ) ≤ ω -deg( H (cid:48) ) . Then we have the following lemma. Lemma 4.5. If G ⊆ K ω [ y , r ] is a Gr¨obner basis and F is weighted homogeneous, then thenormal form of F relative to G is G -minimal, i.e., for any F (cid:48) ≡ F ( mod I G ) , ω -deg ( F (cid:48) ) ≥ ω -deg ( F ) .Proof. Note that any F (cid:48) ∈ K [ y , r ] can be decomposed into weighted homogeneous com-ponents, i.e., F (cid:48) = (cid:80) i F (cid:48) i where F (cid:48) i is weighted homogeneous. Let R (cid:48) and R (cid:48) i be the normalforms of F (cid:48) and F (cid:48) i relative to G respectively. Then R (cid:48) = (cid:80) i R (cid:48) i . Let R be the normal form of F relative to G . Then there exists i such that R (cid:48) i = R and R (cid:48) j = 0 if j (cid:54) = i . Therefore, ω -deg( F (cid:48) ) ≥ ω -deg( F (cid:48) i ) = ω -deg( R (cid:48) i ) = ω -deg( R ) = ω -deg( F ) . The lemma is proved. Q.E.D. Theorem 4.6. If R ∈ K [ y ] is the normal form of F ∈ K [ r ] relative to G D where D isweighted homogeneous and G D is the Gr¨obner basis of I D = (cid:104) y − d , . . . , y (cid:96) − d (cid:96) (cid:105) , then R is a minimal D -gist of F .Proof. First by Theorem 4.4, R is a D -gist of F . If D is weighted homogeneous, so is G D .By Lemma 4.5, R is G -minimal. Since I G = I D , R is D -minimal by definition. Q.E.D. Theorems 4.4 and 4.6 lead to the following algorithm after specializing y i − d i to z i − e i and ω to ω ( z i ) = i, ω ( r i ) = 1 . G - gist ( F, µ ): Input : F ∈ K δ [ r ] and µ = ( µ , . . . , µ m ). Output : a minimal µ -gist of F or say “ ˚ F does not exist” B ← { z − e ( r ) , . . . , z n − e n ( r ) } ord ← plex ( r , . . . , r m , z , . . . , z n ) G ← GroebnerBasis ( B , ord ) R ← N ormalF orm ( F, G , ord )If deg( R, r ) > F does not exist”Else Return R Figure 1. The G - gist algorithm. Example We carry out the algorithm G - gist for F = 3 r + r + 2 r r and µ = (2 , as follows.Step 1 Construct B = { z − (2 r + r ) , z − ( r + 2 r r ) , z − r r } .Step 2 Compute the Gr¨obner basis of B with the lexicographical order z ≺ z ≺ z ≺ r ≺ r to get G = { z z − z z − z z z + 4 z + 27 z , r z + 4 z z z − z z − r z + 36 z z − z z , r z z − r z − z z + z z + 3 z z , r z z − r z + 6 z z − z , r z − r z − z z + 9 z , r − r z + z , − z + 2 r + r } . Step 3 Compute the normal form of F relative to G to get R = z − z .Step 4 Since deg( R, r ) = 0 , the algorithm outputs R = z − z . 5. Computing Gists via Preprocessing Approach. In the previous section, we show howto compute µ -gists using Gr¨obner bases. This algorithm is quite slow when µ (cid:54) = (1 , , . . . , K -vector spaces: N µ -SYMMETRIC POLYNOMIALS 13 • K δ sym [ x ]: the set of symmetric homogeneous polynomials of degree δ in K [ x ] • K δ µ [ r ]: the set of µ -symmetric polynomials of degree δ in K [ r ]The first method is based on preprocessing and reduction: we first compute a basis for K δ µ [ r ],and then use the basis to reduce F ( r ). The second method directly computes the µ -gist of F ( r ) by solving linear equations. µ -Symmetric Polynomial Set. We first consider K δ sym [ x ], the sym-metric homogeneous polynomials of degree δ . This is a K -vector space. By a weak par-tition of an integer k , we mean a sequence α = ( α , α , . . . , α k ) where (cid:80) ki =1 α i = k and α ≥ α ≥ · · · ≥ α k ≥ 0. Thus, in contrast to an ordinary partition, a weak partition allowszero parts. Given δ , if α is a weak partition of δ and no part α i larger than n , we will write α (cid:96) ( δ, n ) . Let e α := δ (cid:89) i =1 e α i For instance if δ = 4 , n = 2 , α = (2 , , , 0) then e α = e e e e = e e .Let T ( x ) denote the set of terms of x , and T δ ( x ) denote those terms of degree δ . Atypical element of T δ ( x ) is (cid:81) ni =1 x d i i where d + · · · + d n = δ . We totally order the terms in T δ ( x ) using the lexicographic ordering in which x ≺ x ≺ · · · ≺ x n . Given any F ∈ K ( x ),its support is Supp ( F ) ⊆ T ( x ) such that F can be uniquely written as(5.1) F = (cid:88) p ∈ Supp ( F ) c ( p ) p where c : Supp ( F ) → K \ { } denote the coefficients of F . Let the leading term Lt ( F ) beequal to the p ∈ Supp ( F ) which is the largest under the lexicographic ordering. For instance, Supp ( e ) = { x , . . . , x n } and Lt ( e ) = x n . Also Supp ( e e ) = { x i x j x k : 1 ≤ i (cid:54) = j ≤ n, ≤ k ≤ n } and Lt ( e e ) = x n x n − . The coefficient of Lt ( F ) in F is the leading coefficient of F , denoted by Lc ( F ). Call Lm ( F ) := Lc ( F ) Lt ( F ) the leading monomial of F . This iswell-known: Proposition The set B := { e α : α (cid:96) ( δ, n ) } is a K -basis for the vector space K δ sym [ x ] . Example Let n = 4 and δ = 3 . Then B = (cid:8) e , e e , e (cid:9) forms a basis of the K -vectorspace K δ sym [ x ] . Now we consider the set K δ µ [ r ] comprising the µ -symmetric functions of degree δ . Themap σ µ : K δ sym [ x ] → K δ µ [ r ]is an onto K -homomorphism. Note that K δ µ [ r ] is a vector space which is generated by the set B := (cid:8) G : G ∈ B (cid:9) where G is a short hand for writing σ µ ( G ). It follows that there is a maximal independent set B ⊆ B that is a basis for K δ µ [ r ]. The set B may be a proper subset of B , which is seen in this example: let µ = (2 , 2) and δ = 3. From Example 7, we have B = (cid:8) e , e e , e (cid:9) . Then B = (cid:8) A : e , B : e e , C : e (cid:9) . We can check that B is linearly dependent since A + 8 C = 4 B . Furthermore, it is easy toverify that any 2-subset of B forms a basis for K δ µ [ r ]. In general, we have the followinglemma. Proposition For all µ = ( µ , µ ) , B = { e , e } is a linearly independent set.Proof. Assume there exist k and k such that(5.2) k e + k e = 0 . Let µ = ( µ , . . . , µ m ). Then(5.3) e = m (cid:88) i =1 µ i r i , e = m (cid:88) i =1 (cid:18) µ i (cid:19) r i + (cid:88) i From the previous discussion, we saw that the dimension of K δ µ [ r ] may be smaller than thatof K δ sym [ x ]. There are two special cases: when µ = (1 , , . . . , dim ( K δ sym [ x ]) = dim ( K δ µ [ r ]);when µ = ( n ), dim ( K δ µ [ r ]) = 1. The following table shows the dimensions of K δ sym [ x ] and K δ µ [ r ] for some cases. One can see that it is quite common to have a dimension drop from thespecialization σ µ (these lower dimensions are underlined in the table). This subsection is devoted to generating thebasis of the vector space K δ µ [ r ] with which one could easily check whether a given polynomialis in this vector space or not. For this purpose, we introduce a reduction procedure and itsapplications. This yields a more efficient method to check for µ -symmetry and to computethe gists in the affirmative case.A set B ⊆ K [ r ] is linearly independent if any non-trivial K -linear combination over B is non-zero; otherwise, B is linearly dependent . We say C = ( C , . . . , C (cid:96) ) is a canonicalsequence if the set { C , . . . , C (cid:96) } is linearly independent and Lt ( C i ) ≺ Lt ( C j ) for all i < j . N µ -SYMMETRIC POLYNOMIALS 15 n µ δ dim ( K δ sym [ x ]) dim ( K δ µ [ r ]) n µ δ dim ( K δ sym [ x ]) dim ( K δ µ [ r ])3 (2 , 1) 2 2 2 5 (2 , , , 1) 4 5 53 3 3 5 7 74 4 4 6 10 104 (2 , , 1) 3 3 3 5 (2 , , 1) 4 5 54 5 5 5 7 75 6 6 6 10 104 (3 , 1) 3 3 3 5 (3 , , 1) 4 5 54 5 4 5 7 75 6 5 6 10 104 (2 , 2) 3 3 2 5 (3 , 2) 4 5 44 5 3 5 7 55 6 3 6 10 65 (4 , 1) 4 5 45 7 56 10 6 Table 1 Dimensions of K δ sym [ x ] and K δ µ [ r ] In this subsection, we work in the vector space K δ [ r ] of all homogeneous polynomials of degree δ in K [ r ].We will introduce the concept of reduction. As motivation, first express any non-zeropolynomial G as G = Lm ( G ) + R where R is the tail of G (i.e., remaining terms of G ). In theterminology of term rewriting systems (e.g., [4] and [6, Section 12.3.4]), we then view G as arule for rewriting an arbitrary polynomial F in which any occurrence of Lt ( G ) in Supp ( F ) isremoved by an operation of the form F (cid:48) ← F − c · G , with c ∈ K chosen to eliminate Lt ( G )from Supp ( F (cid:48) ). For instance, consider F = r + 2 r r − r and G = r r + r − r where wehave underlined the leading monomials of F and G . Here we use the above convention that r ≺ r . Then F (cid:48) = F − G = r − r + 2 r . We say that F has been reduced by G to F (cid:48) = F − G . The Supp ( F (cid:48) ) no longer has r r , but has gained other terms which are smallerin the ≺ -ordering.If Lt ( G ) / ∈ Supp ( F ), we say F is reduced relative to G . For a sequence C , if F is reducedwith relative to each G ∈ C , we say F is reduced relative to C . Then we have this basicproperty: Proposition Let F (cid:54) = 0 and C = ( C , . . . , C (cid:96) ) be a canonical sequence. If F is reducedrelative to C , then { F, C , . . . , C (cid:96) } is linearly independent.Proof. By way of contradiction, assume F is linearly dependent on C , say F = (cid:80) (cid:96)i =1 k i C i .This implies Lt ( F ) = Lt ( (cid:80) (cid:96)i =1 k i C i ) (cid:22) Lt ( C (cid:96) ). So there is a smallest j ≤ (cid:96) such that Lt ( F ) (cid:22) Lt ( C j ). Since F is reduced relative to C , we have Lt ( F ) ≺ Lt ( C j ). It is easy to see that thisimplies k j , k j +1 , . . . , k (cid:96) are all zero. It follows that j ≥ F = (cid:80) (cid:96)i =1 k i C i = 0).Moreover, we have Lt (cid:16) (cid:80) (cid:96)i =1 k i C i (cid:17) (cid:22) Lt ( C j − ) ≺ Lt ( F ). This contradicts the assumption (cid:80) (cid:96)i =1 k i C i = F . Q.E.D. We next introduce the reduce subroutine in Figure 2 which takes an arbitrary polynomial F ∈ K [ r ] and a canonical sequence C as input to produce a reduced polynomial relative to C . Example Consider F = 3 r + 4 r r + r and µ = (2 , . Given a canonical sequence C = ( r + 2 r r , r + r ) with r ≺ r , we proceed to compute the reduced polynomial of F relative to C using the above reduce algorithm.Step 1 Initialization . Let R = 0 and i = 2 . reduce ( F, C ): Input : F ∈ K [ r ], C = ( C , . . . , C (cid:96) ) is canonical and each C i ∈ K δ [ r ] Output : R such that F = (cid:80) (cid:96)i =1 c i C i + R with c i ∈ K and R is reduced relative to C .Let R ← i ← (cid:96) While ( F (cid:54) = 0 and i > p ← Lt ( F )If p (cid:31) Lt ( C i ) then R ← R + Lc ( F ) · p ; F ← F − Lc ( F ) · p else If p = Lt ( C i ) then F ← F − Lc ( F ) Lc ( C i ) C i i ← i − R + F Figure 2. The reduce algorithm. Step 2 First iteration . For F (cid:54) = 0 and i > , p = Lt ( F ) = r which is equal to Lt ( C ) . Thus F isupdated with F − Lc ( F ) Lc ( C ) C = r + 4 r r and i is updated with i − .Step 3 Second iteration . For F (cid:54) = 0 and i > , p = Lt ( F ) = r r which is equal to Lt ( C ) . Thus F is updated with F − Lc ( F ) Lc ( C ) C = − r and i is updated with i − .Step 4 Finalization . Since i = 0 , the iteration stops and the algorithm outputs R + F = − r . Proposition The algorithm reduce ( F, C ) halts and takes at most Supp ( F ) − (cid:80) (cid:96)i =1 Supp ( C i ) loops. Moreover, this bound is tight in the worst case.Proof. Let F denote the input polynomial. The variable F in the algorithm is initiallyequal to F . In general, let F j ( j = 1 , , . . . ) be the polynomial denoted by F at the beginningof the j th iteration of the while-loop. Thus p j = Lt ( F j ) is the term denoted by the variable p in the j th iteration. Note that F j transforms to F j +1 by losing its leading term p j orfurthermore, if i ( j ) is the current value of the variable i , and p j = Lt ( C i ( j ) ) where C i ( j ) ∈ C ,we also subtract the tail of Lc ( F j ) Lc ( C i ( j ) ) · C i ( j ) from F j +1 . Thus, Supp ( F ) ⊆ Supp ( F ) ∪ Supp ( C ).Since p (cid:31) p (cid:31) · · · and p j ∈ Supp ( F ) ∪ Supp ( C ), this proves that the algorithm halts afterat most Supp ( F ) + Supp ( C ) iterations.Let L be the actual number of iterations. We now give a refined argument to show that L ≤ Supp ( F ) − Supp ( C ), i.e., we can improve the previous upper bound on L by one.Note that we exit the while-loop when F = 0 or i = 0 holds. There are two cases.CASE 1: F = 0 and i = 0 both hold. This implies that in the previous iteration, p L = Lt ( C ), and i was decremented from 1 to 0. Since p L came from Supp ( F ) or Supp ( C , . . . , C (cid:96) ), this implies L ≤ Supp ( F ) ∪ Supp ( C )) ≤ Supp ( F ) − Supp ( C ) . CASE 2: F (cid:54) = 0 or i > 0. Each iteration can be “charged” to an element of Supp ( F ) ∪ N µ -SYMMETRIC POLYNOMIALS 17 Supp ( C )). If i > 0, then some elements in Supp ( C ) are not charged. If F (cid:54) = 0, then Supp ( F ) ⊆ Supp ( F ) ∪ Supp ( C ) also implies that some elements of Supp ( F ) ∪ Supp ( C ) are not charged.Thus CASE 2 implies L ≤ Supp ( F ) − Supp ( C ) . This proves our claimed upper bound on L .To prove that this bound is tight, let F = p + q + · · · + q s and C = ( p , . . . , p (cid:96) ) withthe term ordering p ≺ · · · ≺ p (cid:96) ≺ q ≺ · · · ≺ q s . In the first s loops, since Lt ( F ) (cid:31) p (cid:96) , i isunchanged and q , . . . , q s are removed from F . In the next (cid:96) − Lt ( F ) = p ≺ p ≺· · · ≺ p (cid:96) , F is unchanged and i will drop to 1. In the last loop, since Lt ( F ) = p = Lt ( C ), F will be reduced relative to C to 0. So the total number of loops is s + (cid:96) = Supp ( F ) − (cid:80) (cid:96)i =1 Supp ( C i ). Q.E.D. Proposition (Correctness) The reduce subroutine is correct.Proof. Correctness of the output R ∗ in the reduce subroutine amounts to two assertions.(A1) The output R ∗ is reduced relative to C .(A2) F − R ∗ is a linear combination of the polynomials in C where F is the input polynomial.To prove these assertions, assume that the while-loop terminates after the L -th iteration. Alsolet F j , R j and i j denote the values of the variables F , R and i at the start of the j th iteration(for j = 1 , . . . , L, L + 1). Thus, F is the input polynomial, R = 0 and i = (cid:96) . Assertion(A2) follows from the fact that in each iteration, the value of F + R does not change or itchanges by a scalar multiple of some C i ∈ C . To see Assertion (A1), we use induction on j to conclude that F j is reduced with respect to C j := ( C i j , C i j , . . . , C (cid:96) ), and R j is reducedwith respect to C . Finally, the output R ∗ is equal to R L +1 + F L +1 , At termination, there aretwo cases: either F L +1 = 0 (so R ∗ = R L +1 ) or i L +1 = 0 (so R ∗ = R L +1 + F L +1 ). In the firstcase, Assertion (A1) holds because R ∗ = R L +1 and R L +1 is reduced w.r.t. C . In the secondcase, Assertion (A1) holds because F L +1 is reduced w.r.t. C L +1 = C . Q.E.D. Proposition If C = ( C , . . . , C (cid:96) ) is canonical, then reduce ( F, C ) = 0 iff { F, C , . . . , C (cid:96) } is linearly dependent.Proof. One direction is immediate: reduce ( F, C ) = 0 implies that F is a linear combinationof the elements of C . Conversely, if reduce ( F, C ) = F (cid:48) (cid:54) = 0, then { F (cid:48) , C , . . . , C (cid:96) } is linearlyindependent by Proposition 4. Moreover, F (cid:48) = F − (cid:80) (cid:96)i =1 k (cid:48) i C i for some k (cid:48) , . . . , k (cid:48) (cid:96) . By wayof contradiction, assume that { F, , C , . . . , C (cid:96) } is linearly dependent, i.e., F = (cid:80) (cid:96)i =1 k i C i forsome k , . . . , , k (cid:96) . It follow that F (cid:48) = (cid:80) (cid:96)i =1 ( k i − k (cid:48) i ) C i , contradicting the linear independenceof { F (cid:48) , C , . . . , C (cid:96) } . Q.E.D. This gives rise to the canonize algorithm in Figure 3 to construct a canonical sequence.We view the sequence C = ( C , . . . , C m ) as a sorted list of polynomials, with Lt ( C i ) ≺ Lt ( C i +1 ). Thus insert ( B, C ) which inserts B into C , can be implemented in O (log m ) timewith suitable data structures. The overall complexity is O ( (cid:96) + m log m ) where m is the lengthof the output C . Alternatively, we could initialize the input B as a priority queue can pop thepolynomial B ∈ B with the largest Lt ( B ). This design yields a complexity of O ( (cid:96) log (cid:96) ) whichis inferior when (cid:96) (cid:29) m . canonize ( B ): Input : B = ( B , . . . , B (cid:96) ) where B i ∈ K δ [ r ]. Output : a canonical C whose linear span satisfies span( B ) =span( C )Let C ← () (empty sequence)For i = 1 to (cid:96)B ← reduce ( B i , C )If B (cid:54) = 0 then C ← insert ( B, C )Return C Figure 3. The canonize algorithm. Example Consider a polynomial set B = (cid:8) r + 4 r r + r , r + 2 r r (cid:9) . We proceedto compute a canonical sequence from B relative to r ≺ r using the canonize algorithm.Step 1 Initialization . Let C = () .Step 2 First iteration . Let B = r + 2 r r . Note that C = () . Thus B (cid:48) = reduce ( B, C ) = B and C isupdated with ( r + 2 r r ) .Step 3 Second iteration . Let B = 4 r + 4 r r + r . Then carry out the reduction of B relative to C and we get B (cid:48) = reduce ( B, C ) = 2 r + r . After inserting B (cid:48) into C , C is updated with ( r + 2 r r , r + r ) .Step 4 Finalization . Now the iteration stops and the algorithm outputs C = ( r + 2 r r , r + r ) . The termination of canonize ( B ) is immediate from the termination of reduce ( F, C ). Thecorrectness of the output of canonize ( B ) comes from two facts: the returned C is clearlycanonical. It is also maximal because any element B ∈ B that does not contribute to C isclearly dependent on C .It should be pointed out that by tracking the “quotients” of F relative to C in the reduce algorithm and integrating the information into the canonize algorithm, we can derive therelationship between B = { e α : α (cid:96) ( δ, n ) } and C = canonize ( B ) and write polynomialsin C as linear combinations of polynomials in B . By “quotients”, we mean the coefficients c i ’s in the expression F = (cid:80) (cid:96)i =1 c i C i + R . When the quotient information is required, weuse algorithms reduce ( F, C , ‘ q ‘) and canonize ( B , ‘ Q ‘) where q and Q represents the quotient(column) vector and quotient matrix, respectively. More explicitly, F = C · q + R and C = B · Q where B and C are viewed as row vectors. These notations will be used in the CR - gist algorithm in Figure 4 of the following subsection. µ -gist via reduction. In this subsection, we use reduce and canonize algorithms to construct the CR - gist algorithm for computing the µ -gist of a polynomial. Example Consider the polynomial F = 3 r + 4 r r + r and µ = (2 , as in Example6. In what follows, we check whether F is µ -symmetric or not and compute its µ -gist in theaffirmative case. N µ -SYMMETRIC POLYNOMIALS 19 CR - gist ( F, µ ): Input : F ∈ K δ [ r ], µ = ( µ , . . . , µ m ) Output : the µ -gist of F if F is µ -symmetric; otherwisereturn “ F is not µ -symmetric”. δ ← deg( F, r ) n ← (cid:80) mi =1 µ i B ← ( e α : α (cid:96) ( δ, n )) Z ← ( z α : α (cid:96) ( δ, n )) C , Q ← canonize ( B , ‘ Q ‘) R, q ← reduce ( F, C , ‘ q ‘)If R = 0 thenReturn Z · Q · q Return “ F is not µ -symmetric” Figure 4. The CR - gist algorithm. Step 1 Let δ = deg( F, r ) = 2 and n = (cid:80) mi =1 µ i = 3 .Step 2 From δ and n , construct B = (cid:8) (2 r + r ) , r + 2 r r (cid:9) and Z = ( z , z ) .Step 3 Compute a canonical C from B and its quotient Q relative to B . Then we get C = canonize ( B )= ( r + 2 r r , r + r ) and Q = (cid:18) − (cid:19) . The detailed computation can be found inExample 9.Step 4 Compute R = reduce ( F, C ) and the quotient q . By the result of Example 8, R = − r (cid:54) = 0 and q = (2 , T . Thus the output is “No”, which means that F is not µ -symmetric.If we replace F with F = 3 r + 2 r r + r , then after carrying out the same procedure asabove, we will get R = 0 and q = (1 , , which means F is µ -symmetric and its µ -gist is ˚ F = ( z , z ) · Q · q T = z − z . Since termination of the algorithm CR - gist is immediate from that of canonize and reduce , we only show its correctness. Assume deg( F, r ) = δ . Recall that F ∈ K [ r ] is µ -symmetric iff there exists a homogeneous symmetric polynomial (cid:98) F ∈ K [ x ] of degree δ suchthat σ µ ( (cid:98) F ) = F ( r ). By Proposition 2, (cid:98) F is symmetric and with degree δ iff (cid:98) F ∈ K δ sym [ x ].Thus F = σ µ ( (cid:98) F ) ∈ K δ µ [ r ] where K δ µ [ r ] is a K -vector space with the basis generated by B = { e α : α (cid:96) ( δ, n ) } . If C = canonize ( B ), then C is the basis we want to obtain. Therefore,if F is µ -symmetric iff reduce ( F, C ) = 0. When F is µ -symmetric, F = C · q = B · Q · q . Bythe definition of µ -gist, ˚ F = ( z α : α (cid:96) ( δ, n )) · Q · q . In this subsection, weconsider an alternative reduction process where each reduction step is non-deterministic. Weprove that this version can be exponential in the worst case.For any term p , let Coef ( F, p ) denote the coefficient of p in F . If p / ∈ Supp ( F ), then Coef ( F, p ) = 0. For any polynomial C , define reduceStep ( F, C ) ← F − Coef ( F, Lt ( C )) Lc ( C ) C. We call reduceStep ( F, C ) a C -reduction step or a C -reduction step in case C ∈ C . We seethat reduceStep ( F, C ) = F iff Lt ( C ) does not occur in F . We say the reduction is improperin this case.Let nreduce ( F, C ) denote the subroutine that repeatedly transforms F by applying proper C -reduction steps to F until no more more change is possible. It returns the final value of F .We call this the nondeterministic reduction of F . Proposition For any linearly independent set C , we have nreduce ( F, C ) = reduce ( F, C ) . Then nreduce ( F, C ) has ≤ (cid:96) C -reduction steps where (cid:96) = |C| . Moreover, (cid:96) steps may beneeded.Proof. Let R = nreduce ( F, C ) and R = reduce ( F, C ). Then there exists k , . . . , k (cid:96) and k (cid:48) , . . . , k (cid:48) (cid:96) such that F = (cid:96) (cid:88) i =1 k i C i + R = (cid:96) (cid:88) i =1 k (cid:48) i C i + R . It is immediate that R − R = (cid:96) (cid:88) i =1 ( k i − k (cid:48) i ) C i . If R (cid:54) = R , there exists i such that k i (cid:54) = k (cid:48) i and k j = k (cid:48) j ( j = 1 , . . . , i − Lt ( R − R ) = Lt ( C i ). This implies that Lt ( C i ) ∈ Supp ( R ) or Lt ( C i ) ∈ Supp ( R ). Hence R or R is notreduced relative to C . This contradicts with the output requirements of reduce or nreduce .Let us define a (cid:96) to be the longest C -derivation for any C with (cid:96) elements. CLAIM A: a (cid:96) ≤ (cid:96) − 1. Let C (cid:96) = ( C , . . . , C (cid:96) ) be any canonical sequence with (cid:96) elements. Let(5.4) F → F → · · · → F N be any C (cid:96) -derivation. We must prove that N ≤ (cid:96) − (cid:96) . Clearly, if (cid:96) = 1, then a ≤ − 1. Next, inductively assume that a (cid:96) − ≤ (cid:96) − − 1. Suppose there does not existan i < N such that F i → F i +1 is a C (cid:96) -reduction step. In that case, (5.4) is a C (cid:96) − -derivation.By induction hypothesis, N ≤ (cid:96) − − < (cid:96) − 1, as claimed. Otherwise, we may choose thesmallest i such that F i → F i +1 is a C (cid:96) -reduction step. Note that this implies that Lt ( C (cid:96) )does not appear in the support of F j for all j ≥ i + 1. In other words, F → · · · → F i and F i +1 → · · · → F N are both C (cid:96) − -derivations. By induction hypothesis, both these lengths areat most a (cid:96) − ≤ (cid:96) − − 1. Thus the length of (5.4) is at most 2 a (cid:96) − + 1 ≤ (cid:96) − 1. Thus CLAIMA is proved. N µ -SYMMETRIC POLYNOMIALS 21 The last assertion of our proposition amounts to CLAIM B: a (cid:96) ≥ (cid:96) − 1. To show thisclaim, let C (cid:96) = ( C , . . . , C (cid:96) ) as before. But we now choose C i := (cid:80) ij =1 p j where p j ’s are termssatisfying p j ≺ p j +1 . Let us write F C −→ k G to mean that there is a C -derivation of length k from F to G . Our claim follows if we showthat C (cid:96) C (cid:96) −−−→ (cid:96) − . The basis is obvious: C C l −→ . Inductively, assume that(5.5) C (cid:96) − C (cid:96) − −−−−→ (cid:96) − − . The inductive assumption implies C (cid:96) = p (cid:96) + C (cid:96) − C (cid:96) − −−−−→ (cid:96) − − p (cid:96) . Next, in one step, we have p (cid:96) C (cid:96) −→ − C (cid:96) − and, again from the induction hypothesis, − C (cid:96) − C (cid:96) − −−−−→ (cid:96) − − . Concatenating these 3 derivations, shows that C (cid:96) C (cid:96) −−−→ (cid:96) − 0. This proves CLAIM B. Q.E.D. 6. Computing Gists via Solving Linear Equations. In this section, we introduce a directmethod to compute gist of F ( r ) without preprocessing. Such methods depend on the choiceof basis for K δ sym [ r ]. Our default basis is elementary symmetric polynomials.Our algorithm that takes as input F ∈ K [ r ] and µ , and either outputs the µ -gist ˚ F of F or detects that F is not µ -symmetric. The idea is this: F is µ -symmetric iff ˚ F exists. Theexistence of ˚ F is equivalent to the existence of a solution to a linear system of equations. Moreprecisely, there is an polynomial identity of the form ˚ F ( e , . . . , e n ) = F. To turn this identityinto a system of linear equations, we first construct a polynomial G ( k ; z ) ∈ K [ k ][ z ]in z with indeterminate coefficients in k , with homogeneous weighted degree δ in z (see Section2.1 for definition of weighted degree). Here δ is the degree of F . Each term is of weighteddegree δ and has the form z α := δ (cid:89) i =1 z α i where α = ( α , . . . , α δ ) is a weak partition of δ with parts at most n , i.e., α (cid:96) ( δ, n ). Then G ( k ; z ) can be written as G ( k ; z ) := (cid:88) α (cid:96) ( δ,n ) k α z α = T δn ( z ) · k where T δn ( z ) := ( z α : α (cid:96) ( δ, n )) and k := ( k α : α (cid:96) ( δ, n )) T viewed as a column vector areindeterminates. Next, we plug in e i ’s for the z i ’s to get H ( k ; r ) := G ( k ; e , . . . , e n )viewed as a polynomial in K [ k ][ r ] . We then set up the equation(6.1) H ( k ; r ) = F ( r )to solve for the values of k . Note that total degree of G in k is 1, i.e., deg( G, k ) = 1. Therefore,deg( H, k ) = 1. Thus (6.1) amounts to solving a linear system of equations in k .To illustrate this process, consider the polynomial F = 3 r + 2 r r + r and µ = (2 , δ = deg( F, r ) = 2 and n = (cid:80) mi =1 µ i = 3.Step 2: Since the weak partitions of 2 with parts at most 3 are (1 , 1) and (2 , z and z .Step 3: Construct the polynomial G ( k ; z ) := k z + k z where k = ( k , k ) are the indetermi-nate coefficients.Step 4: Using e = 2 r + r , e = r + 2 r r , construct the polynomial H ( k ; r ) := G ( k ; e , . . . , e n ) = (4 k + k ) r + (4 k + 2 k ) r r + k r . Step 5: Extract the coefficient vector Coeffs ( H, r ) of H ( k ; r ) viewed as a polynomial in r .The entries of this vector are linear in k . Thus H = Coeffs ( H, r ) · T δ ( r ) where T δ ( r )is the vector of all terms of T ( r ) of degree δ .Step 6: Extract the coefficient vector Coeffs ( F, r ) of F ( r ). This vector is a constant (3 , , T where T ( r , r ) = ( r , r r , r ).Step 7: The last two steps enables the construction of a system of linear equations, A k = b : H ( k ; r ) = F ( r )(4 k + k ) r + (4 k + 2 k ) r r + k r = 3 r + 2 r r + r Coeffs ( H, r ) = Coeffs ( F, r ) · (cid:20) k k (cid:21) = A · k = b where the last equation is the linear system to be solved for k = (cid:20) k k (cid:21) . N µ -SYMMETRIC POLYNOMIALS 23 Step 8: If A k = b has no solutions, we conclude that F is not µ -symmetric. Otherwise,choose any solution for k and plugging into G ( k ; r ), we obtain a gist of F ( r ). Here k = (cid:20) − (cid:21) is a solution and thus the input polynomial is (2 , z − z . Note that there may be multiple solutions for k because of the presence of µ -constraints.We now summarize the above procedure as the LS - gist algorithm: LS - gist ( F, µ ): Input : F ∈ K δ [ r ] and µ = ( µ , . . . , µ m ) Output : the µ -gist of F if F is µ -symmetric; otherwisereturn “ F is not µ -symmetric”. δ ← deg( F, r ); n ← (cid:80) mi =1 µ i G ← (cid:80) α (cid:96) ( δ,n ) k α z α H ← G ( k ; e , . . . , e n )Extract Coeffs ( H, r ) and Coeffs ( F, r ).Find a solution k = k of the linear system Coeffs ( H, r ) = Coeffs ( F, r ).If k is nondefinedReturn “ F is not µ -symmetric” Else Return H ( k ; r ) Figure 5. The LS - gist algorithm. The correctness of the algorithm LS - gist lies in the fact that F is µ -symmetric iff F ∈ K δ µ [ r ] which is generated by { e α : α (cid:96) ( δ, n ) } . 7. Gists Relative to Other Bases of K δ sym [ x ] . In this section, We briefly sketch how toextend the above methods to computing gists relative to other bases of K δ sym [ x ].The set K sym [ x ] of symmetric functions can be viewed as a K -algebra generated by somefinite set G . The following are three well-known choices of G with n elements each: • (Elementary symmetric polynomials) G e := { e , . . . , e n } where e i is the i -th elementarysymmetric function of x . • (Power-sum symmetric polynomials) G p := { p , . . . , p n } where p i = x i + · · · + x in . • (Complete homogeneous symmetric polynomials) G c := { c , . . . , c n } where c i is thesum of all distinct monomials of degree i in the variables x , . . . , x n .For each δ ≥ 1, the vector space K δ sym [ x ] of symmetric polynomials of degree δ has a basis B δ that corresponds to a given generator set G . The following are bases of K δ sym [ x ]: • ( e -basis ) B δe := { e α : α (cid:96) ( δ, n ) } where e α = (cid:81) δi =1 e α i and α = ( α , . . . , α δ ); • ( p -basis ) B δp := { p α : α (cid:96) ( δ, n ) } where p α = (cid:81) δi =1 p α i ; • ( c -basis ) B δc := { c α : α (cid:96) ( δ, n ) } where c α = (cid:81) δi =1 c α i .But K δ sym [ x ] can also be generated with monomial symmetric polynomials. In this case, we use α (cid:96) ( δ ) n to denote α = ( α , . . . , α n ) which is a weak partition of δ with exactly n parts: α ≥ · · · ≥ α n ≥ 0. We also write x α for the product (cid:81) ni =1 x α i i . This yields yet another basisfor K δ sym [ x ]: • ( m -basis ) B δm := { m α : α (cid:96) ( δ ) n } where m α = (cid:80) β x β where β ranges over all per-mutations of α which are distinct.For instance, if α = (2 , , 0) then β ranges over the set { (2 , , , (0 , , , (0 , , } and m α = x + x + x .So far, this paper has focused on the e -basis. But concepts and algorithms relative to thechoice of this basis (e.g., the µ -gist and G - gist ) can be reformulated using the other bases. Ineach algorithm, there are two parameters, i.e., the generator polynomials (e.g., e i and e i ) andthe index set (e.g., α (cid:96) ( δ, n )). When using p -basis or c -basis, we only need to replace e i usedby the algorithms G - gist , CR - gist and LS - gist by p i := σ µ ( p i ) or c i := σ µ ( c i ), respectively;when using the m -basis, the index set α (cid:96) ( δ, n ) should be replaced by α (cid:96) ( δ ) n and e i shouldbe replaced by m α := σ µ ( m α ). The relative performance of the algorithms using differentbases will be evaluated in Section 8. 8. Experiments. In this section, we report some experimental results to show the effec-tiveness and efficiency of the two approaches presented in this paper. These experiments wereperformed using Maple on a Windows laptop with an Intel(R) Core(TM) i7-7660U CPU in2.50GHz and 8GB RAM.In Table 2, we compare the performance of the three algorithms described in this paperfor checking the µ -symmetry of polynomials: G - gist , LS - gist and CR - gist . We use a testsuite of 12 polynomials of degrees ranging from 6–20 (see Table 2), with corresponding µ with n = | µ | ranging from 4–6. These polynomials are either D + polynomials or subdiscriminants,or some perturbations (to create non- µ -symmetric polynomials). Table 2 Comparing the performance of G - gist , LS - gist and CR - gist . Computing the µ -gist of F of degree δ . Here n = (cid:80) mi =1 µ i , canonize is a preprocessing step in CR - gist and total= canonize time + reduce time. F δ µ n Y/N G - gist LS - gist speedup CR - gist speedupTime Time ( G - gist / canonize reduce total ( G - gist /(sec) (sec) LS - gist ) (sec) (sec) (sec) CR - gist )F1 12 [1, 1, 1, 1] 4 Y 0.453 0.235 1.9 0.094 0.000 0.094 4.8F2 8 [2, 1, 1] 4 Y 0.328 0.015 21.9 0.016 0.015 0.031 10.6F3 20 [1, 1, 1, 1, 1] 5 Y 34.1 188 0.2 3.77 0.031 3.80 9.0F4 15 [2, 1, 1, 1] 5 Y > 600 1.88 > 320 0.391 0.015 0.406 > > 600 0.015 > × > × F5 6 [2, 2, 1] 5 Y 68.0 0.032 2126 0.000 0.000 0.000 InfF5x 6 [2, 2, 1] 5 N 0.078 0.000 Inf 0.000 0.016 0.016 4.9F6 10 [2, 2, 1] 5 Y 0.438 0.078 5.6 0.031 0.000 0.031 14.1F6x 10 [2, 2, 1] 5 N 0.406 0.047 8.6 0.031 0.016 0.047 8.6F7 18 [3, 1, 1, 1] 6 Y > 600 9.00 > > > 600 0.360 > > From Table 2, it is clear that LS - gist is significantly faster than G - gist . There is oneanomaly in the table: for the polynomial F , G - gist is 5 times faster than LS - gist . This iswhen µ is (1 , . . . , I µ = (cid:104) v , . . . , v n (cid:105) has a symmetric structurein r . We believe it is because the Gr¨obner basis of I can be computed very efficiently forcertain types of structures.From Table 3, we observe that the algorithm m - LSgist is more efficient than the other N µ -SYMMETRIC POLYNOMIALS 25Table 3 Timing for computing the gists of µ -symmetric polynomials with Gr¨obner basis method using different bases(i.e., e - Ggist , p - Ggist and c - Ggist ), with canonize + reduce using different bases (i.e., e - CRgist , p - CRgist , c - CRgist and m - CRgist ) and with linear system solving using different bases (i.e., e - LSgist , p - LSgist , c - LSgist and m - LSgist ). The most efficient method for each case is marked with * next to the running time. F Gr¨obner basis method canonize + reduce Linear system solving e - Ggist p - Ggist c - Ggist e - CRgist p - CRgist c - CRgist m - CRgist e - LSgist p - LSgist c - LSgist m - LSgist (sec) (sec) (sec) (sec) (sec) (sec) (sec) (sec) (sec) (sec) (sec)F1 0.219 0.344 0.187 0.063 0.187 0.078 0.094 0.297 0.094 0.500 0.031 ∗ F2 0.328 387 565 0.015 1.00 0.032 0.015 0.016 0.000 ∗ ∗ F3 20.9 61.2 60.3 3.19 313 14.7 2.17 79.3 3.11 2109 0.391 ∗ F4 > > > ∗ F4x > > > ∗ ∗ F5 41.2 > > ∗ ∗ F5x 0.047 > > ∗ ∗ F6 0.234 > > ∗ ∗ > > ∗ ∗ ∗ F7 > > > ∗ F8 > > > ∗ > > ∗ ∗ algorithms in general because it doesn’t require polynomial expansion and thus can save a lotof time, especially when δ is big (see F3, F4 and F7). The algorithm p - LSgist also behaveswell because power-sum symmetric polynomials have fewer terms than elementary symmetricpolynomials and complete homogeneous symmetric ones and this property may help savetime during polynomial expansion. Overall, algorithms based on canonize + reduce are notas competitive as those based on linear system solving because the preprocessing procedure canonize charges more time in order to generate a canonical sequence. Table 4 Timing for computing the gists using G - gist , canonize + reduce and linear system solving with e -basiswhen µ and δ are fixed. Here µ = (2 , , and δ = 10 ) e - Ggist e - CRgist e - LSgist F Y/N GroebnerBasis NormalF orm canonize reduce TimeTime (sec) Time (sec) Time (sec) Time (sec) (sec)F10 Y 37.2 0.188 0.063 0.000 0.063F11 Y 0.203 0.016 0.016F12 Y 0.203 0.000 0.046F13 N 0.344 0.000 0.062Total time 38.1 0.079 ∗ However, from Table 4, we see that for fixed µ and δ , once we have computed the canonicalset in the preprocessing step, the time cost for reduce is small. Therefore, when evaluatingthe total time for several examples sharing the same canonical set, the algorithm based on canonize + reduce can be superior to the linear solving method. Although the Gr¨obner basismethod also contains a preprocessing procedure, the time cost for computing normal forms isquite expensive and thus it is not as competitive as algorithms based on canonize + reduce and linear system solving. Furthermore, for algorithms using p -basis, the algorithm p - LSgist shows higher efficiency than p - Ggist and p - CRgist , especially for big δ and n (See F3, F4and F7). This could be attributed to the small number of terms in the generator polynomi-als. In contrast, for e -basis and c -basis, the algorithms e - CRgist and c - CRgist prevail over e - LSgist and c - LSgist . The possible reason might be that many terms will get canceledwhen computing a canonical sequence. 9. Conclusion. We have introduced the concept of µ -symmetric polynomial which gen-eralizes the classical symmetric polynomial. Such µ -symmetric functions of the roots of apolynomial can be written as a rational function in its coefficients. Our original motivationwas to study a conjecture that a certain polynomial D + ( µ ) is µ -symmetric. In order to ex-plore such properties for different µ ’s and other root functions, we introduce three algorithmsto compute the µ -gist of a polynomial (or detect that no such gists exist). With the help ofthese algorithms, we verified the µ -symmetry of D + for many specific cases. In a companionpaper [5], we will prove the µ -symmetry conjecture on D + and show its application in thecomplexity analysis of root clustering. Acknowledgments. The authors would like to thank Professor Dongming Wang for hisgenerous support and the use of the resources of the SMS International. This work is done dur-ing Chee’s sabbatical year in China with the generous support of GXUN, Beihang Universityand Chinese Academy of Sciences in Beijing. REFERENCES [1] R. Becker, M. Sagraloff, V. Sharma, J. Xu, and C. Yap , Complexity analysis of root clustering fora complex polynomial , in 41st Int’l Symp. Symbolic and Alge. Comp., 2016, pp. 71–78. ISSAC 2016.July 20-22, Wilfrid Laurier University, Waterloo, Canada.[2] R. Becker, M. Sagraloff, V. Sharma, and C. Yap , A near-optimal subdivision algorithm for complexroot isolation based on Pellet test and Newton iteration , J. Symbolic Computation, 86 (2018), pp. 51–96.[3] D. Cox, J. Little, and D. O’Shea , Ideals, Varieties and Algorithms: An Introduction to ComputationalAlgebraic Geometry and Commutative Algebra , Springer-Verlag, New York, 3rd ed., 2007.[4] N. F. N. Sculthorpe and A. Gill , The kansas university rewrite engine , Journal of Functional Pro-gramming, 24 (2014), pp. 434–473.[5] J. Yang and C. Yap , The D-plus discriminant and complexity of root clustering , Submitted, (2020).[6]