Finding binomials in polynomial ideals

We describe an algorithm which finds binomials in a given ideal $I\subset\mathbb{Q}[x_1,\dots,x_n]$ and in particular decides whether binomials exist in $I$ at all. We demonstrate with several examples that binomials in polynomial ideals can be well hidden. For example, the lowest degree of a binomial cannot be bounded as a function of the number of indeterminates, the degree of the generators, or the Castelnuovo--Mumford regularity. We approach the detection problem by reduction to the Artinian case using tropical geometry. The Artinian case is solved with algorithms from computational number theory.


Introduction
Gröbner bases are the workhorse of computational algebra and algebraic geometry as they can be used to decide many fundamental questions about rings and their modules [2]. The present paper is concerned with the following harmless looking result, to which Gröbner bases do not offer an immediate proof. Theorem 1.1. There is a deterministic algorithm that, given generators, decides if an ideal I ⊂ Q[x 1 , . . . , x n ] contains nonzero binomials.
A binomial is a polynomial with at most two terms, that is, one that up to scaling can be written as x u − λx v with u, v ∈ N n , λ ∈ Q. Since Theorem 1.1 is trivially true if one allows the zero binomial, in this paper binomial means nonzero binomial. The question whether an ideal is a binomial ideal, that is, whether it can be generated by binomials alone, can be decided by computing a reduced Gröbner basis [7,Corollary 1.2]. In the case of a homogeneous ideal one can even do it with linear algebra only [6,Proposition 3.7]. Somewhat surprisingly, a proof of Theorem 1.1 is more involved. For example, monomials and binomials in an ideal do not need not show in Gröbner bases.
Example 1.2. The ideal I = x−y −z, (y +z) 2 y 2 z 2 ⊂ Q[x, y, z] contains the monomial x 2 y 2 z 2 . The universal Gröbner basis of I can be computed with gfan [11] and be seen to consist of four trinomials.
The monomials in the ideal in Example 1.2 are easily discovered by computing the ideal quotient (I : x 2 ) = x−y −z, y 2 z 2 . In general, an ideal I ⊂ Q[x 1 , . . . , x n ] contains a monomial if and only if ((· · · (I : x ∞ 1 ) · · · ) : x ∞ n ) = (I : (x 1 · · · x n ) ∞ ) = Q[x 1 , . . . , x n ]. The colon ideals (I : x ∞ i ) can readily be computed in any computer algebra system with Gröbner bases [9, Section 1. 8.9]. An extension of this yields all monomials (see [18] and [22,Algorithm 4.4.2]) For this reason, when searching for binomials, we often assume that I contains no monomials. Then we can work with the extension of I to the Laurent polynomial ring Q[x ± 1 , . . . , x ± n ], which is often more convenient. An easier problem than finding a binomial is to decide for given monomials x u and x v whether there exists some scalar λ such that x u − λx v is contained in a given ideal I. For this problem, it suffices to compute the unique normal forms of x u and x u modulo a reduced Gröbner basis of I and check whether they are scalar multiples of each other. From this observation it follows that an a priori degree bound on a binomial in an ideal gives an algorithm that realizes Theorem 1.1: compute normal forms of all monomials that satisfy the degree bound and look for scalar multiples. It is, however, too much to hope for such a general degree bound in terms of common invariants like Castelnuovo-Mumford regularity or primary decomposition as the following example demonstrates.
The Castelnuovo-Mumford regularity of I is 2 and it is primary over x − z, y − z . The binomial x n − yz n−1 is contained in I because an elementary computation shows that There is no binomial of degree less than n in I. To see this, consider the differential operators D 1 = ∂ x + n∂ y and D 2 = (1 − n)∂ y + ∂ z . Any element f ∈ I satisfies f (1, 1, 1) = 0, (D 1 f )(1, 1, 1) = 0 and (D 2 f )(1, 1, 1) = 0 as both generators have this property. Assume that I contains the binomial f = x u −λy v . First, note that f (1, 1, 1) = 0 implies that λ = 1. Further, (D 1 f )(1, 1, 1) = 0 and (D 2 f )(1, 1, 1) = 0 give two linear conditions on the vector u − v, which imply that u − v = λ(n, −1, 1 − n) for some λ ∈ Z. By exchanging u and v we may assume that λ > 0, so it follows that f = x λn −y λ z λ(n−1) . In particular, there is no binomial of degree less than n in I.
The first motivation for Theorem 1.1 came from mesoprimary decomposition of binomial ideals [13]. To implement the canonical version of this decomposition, a test for binomials is necessary. Indeed, in various steps of such an algorithm, one would need to test if congruences on commutative Noetherian monoids are trivial, which readily translates into the question whether an ideal contains a binomial. This problem also appears in the theory of retractions of polytopal algebras as defined in [4]. Conjecture B in that paper adresses a special structure of codimension one retractions which appears to be connected to the existence of binomials and monomials in the kernels of certain maps. Unfortunately our methods are not directly applicable to this situation since the binomial is sought only after a graded automorphism of the ambient ring. See [4,Section 5] for the details.
That paper also raises the question of the connection of binomials in an ideal to primary decomposition. Theorem 6.1 in [4] shows that an ideal which can be generated by segmentonomials-polynomials whose Newton polytopes are at most one-dimensionalhas binomial minimal primes (over an algebraically closed field). However, binomial minimal primes are far from sufficient for containment of a binomial as the simple example shows. Determining exactly which intersections of binomial ideals are binomial or contain binomials appears to be hard [13, Problem 17.1], [7,Problem 4.9]. Nevertheless segmentonomials have at most one-dimensional Newton polytopes and this is a structure we use in Section 3. It would be interesting, but beyond the present paper, to develop this connection further. Theorem 1.1 can also be seen as a first step to the broader problem of deciding if an ideal contains a sparse polynomial, or finding the sparsest polynomial. For example, Jürgen Herzog suggested the problem of determining the length of the shortest polynomial in a standard determinantal ideal. The question for sparse polynomials in an ideal also arises in applications in biology: in [23] Sontag argues that sparse polynomials in an ideal yield the best restrictions on the possible sign patterns of changes that a steady state of a chemical reaction network can undergo under perturbation.
While most of our algorithms work for any field in which the field operations are computable, eventually we need to restrict to Q or its finite extensions. The rational numbers and their finite field extensions are computably presentable, which means that in their isomorphism types there are computable fields. See [19,21] for an introduction to computational questions in algebra.
Our approach to Theorem 1.1 can be summarized as follows. Given an ideal J ⊂ Q[x 1 , . . . , x n ], we pass to its Laurent extension I = JQ[x ± 1 , . . . , x ± n ], which contains binomials if and only if J contains binomials (Lemma 2.3). We then show in Section 3 that there exists an ideal I ′ such that Q[x ± 1 , . . . , x ± n ]/I ′ is Artinian, and the sets of binomials in I and I ′ can be mapped onto each other bijectively by a computable transformation (Proposition 3.3 and Theorem 3.4). This reduction is achieved by means of the Sturmfels-Tevelev theorem from tropical geometry. The Artinian case is easier since the (images of the) indeterminates x 1 , . . . , x n in Q[x ± 1 , . . . , x ± n ]/I ′ have matrix representations that commute. This leads to the constructive membership problem for commutative matrix (semi)groups [1], which is already solved (see [10] for a survey).
Acknowledgement. The authors are grateful to Bernd Sturmfels for suggesting to approach the problem through tropical geometry and for constant encouragement. The application of tropical geometry to binomial containment was pointed out to the first author by Douglas Lind. Alice Silverberg and Hendrik W. Lenstra provided valuable help navigating the computational number theory literature, in particular, locating a copy of [8].

Binomials in ideals
As in the case of binomial ideals, it is more convenient to work not only with the binomials in an ideal, but with the entire subspace they generate. Throughout this section, let K be any fixed field and denote by S = K[x 1 , . . . , x n ] the polynomial ring in n indeterminates with coefficients in K. Proof. Let I ⊂ S be an ideal and B ⊂ I its binomial part. Then every element b ∈ B is a linear combination of binomials. Multiplying it with an arbitrary f ∈ S yields some linear combination of monomial multiples of the binomials in b. Since I is an ideal, those monomial multiples are contained in B too and so is f b. Thus B is an ideal. Moreover, the ideal B is binomial, since an ideal is in particular generated by any set that generates it as a vector space.
By the same argument, a binomial ideal is as a vector space spanned by the binomials it contains. In particular, a binomial ideal equals its binomial part.
We now discuss ring extensions in this context. Denote by T = K[x ± 1 , . . . , x ± n ] the Laurent polynomial ring corresponding to S. We extend the notion of Bin(I) to this ring in the natural way. Proof. The inclusion "⊇" is clear because I ⊂ IT . For the other inclusion, note that any binomial in IT can be multiplied with a monomial to obtain a binomial in I. The last statement follows from the fact the hypothesis implies that I = IT ∩ S.
The binomial part of a proper ideal I ⊂ T is determined by a lattice L ⊂ Z n and a homomorphism φ : L → K * (called a partial character in [7]). According to [7, Remark 2.4. For ideals in polynomial rings, a partial character is not a sufficient data structure to store all binomials, for there typically exist associated primes containing indeterminates. When passing to the Laurent ring, these associated primes are annihilated and many new binomials may be created. For example, x−y, x 2 , xy, y 2 ⊂ K[x, y] extends to the entire Laurent ring K[x ± , y ± ], while for the information about the index two lattice of binomials of degree two is lost by the appearance of x − y, which generates the extension to the Laurent ring. However, Lemma 2.3 guarantees that the extension to the Laurent ring only yields new binomials if binomials are present in the original ideal.
Lemma 2.5. Let K ′ /K be any field extension and T ′ := T ⊗ K K ′ be the Laurent polynomial ring over K ′ . Then, for any ideal I ⊂ T , it holds that In particular, I contains a binomial if and only if I ·T ′ contains a binomial and Bin(I) = Bin(I · T ′ ) ∩ T .
Proof. As above, the inclusion "⊇" is clear because I ⊂ I · T ′ . Moreover, the claim is clear if I · T ′ = T ′ , so we may assume that I is a proper ideal. Suppose now that I · T ′ contains the binomial x u − λx v with u, v ∈ Z n \ {0}, λ ∈ K ′ . Then there exists an expression When u, v, v i and f i are fixed, (2.1) can be interpreted as a system of linear equations in the unknowns λ and λ i . This system has a solution over K ′ , and because its coefficients are in K, it also has a solution over K. Moreover, there is only one value possible for λ, because otherwise x v ∈ I · T ′ and thus I · T ′ = T ′ . Hence λ ∈ K and x u − λx v ∈ I. Every element of Bin(I) can be written as a linear combination of binomials of this form, and the claim follows. For the last claim, we only need to show the inclusion Bin(I) ⊇ Bin(I ·T ′ )∩T . Choose a K-basis B of Bin(I). By the argument above, it is also a K ′ -basis of Bin(I · T ′ ) and thus every binomial b ∈ Bin(I · T ′ ) has a unique expansion in this basis. Hence, b lies in T if and only if its coefficients in this expansion lie in K. But the latter implies that b ∈ Bin(I).
Remark 2.6. Let I ⊂ Q[x ± 1 , . . . , x ± n ] be an ideal. Our algorithms usually construct the binomial part of the extension IK[x ± 1 , . . . , x ± n ] to the Laurent ring with coefficients in a finite extension K of Q. Lemma 2.5 guarantees that this yields a determination of the binomial part of an ideal . Example 2.7. Remark 2.6 shows that the binomial part is preserved when extending the coefficient field and then contracting back. It is not generally true that binomial parts survive contraction followed by extension. For example by Lemma 2.5.

Reducing to the Artinian case via tropical geometry
Our eventual goal it to compute Bin(I) for an arbitrary ideals I ⊂ K[x 1 , . . . , x n ]. In this section we use tropical geometry which means that we have to work with the extension of I to the Laurent polynomial ring. By Lemma 2.3 this is sufficient to determine whether Bin(I) is empty or not. Moreover, if (I : x 1 · · · x n ) = I then out methods determine all of Bin(I).
If I is a prime ideal over an algebraically closed field, then tropical geometry yields a complete answer: the ideal contains binomials if and only if the tropical variety is contained in a tropical hypersurface of a binomial i.e. in an ordinary hyperplane (Corollary 3.5). In fact, one implication is immediate from the following definitions. The algebraically closedness assumption is easy to relax, but if the ideal is not prime the tropical variety alone does not reveal binomial containment as the following example demonstrates. However, expanding on the idea from the prime case we can use tropical geometry to reduce binomial detection to the case of ideals with Artinian quotients, which we call Artinian ideals for short. The results in this section hold for more general coefficient fields than Q. To this end, let K be a field and K its algebraic closure. The reader interested only in Theorem 1.1 can mentally replace K by Q. It is notationally convenient to understand the Laurent ring K[x ± 1 , . . . , x ± n ] as the group ring K[Z n ]. This is the ambient ring for this section. If L = Z n and I is homogeneous, the definition can be stated in terms of initial ideals of homogeneous ideals in a polynomial ring. Then T (I) is the support of a subfan of the Gröbner fan of I ∩K[N n ], a fan in Q n that has one cone for each initial ideal of I ∩K[N n ]. Since in ω (I) = K[L] can be decided by Gröbner bases, the definition can be turned into an algorithm computing tropical varieties [3].
If a polynomial f is a binomial, then T ( f ) is a hyperplane (or empty) and the Newton polytope of f is a line segment orthogonal to T ( f ). The inclusion T ( f ) ⊃ T (I) for f ∈ I implies that if I contains a binomial f , then the Newton polytope of f must be perpendicular to T (I). Thus, if I contains a binomial then also I ∩K[T (I) ⊥ ∩L] contains a binomial. The following proposition extends this to all of Bin(I).  The Sturmfels-Tevelev theorem is originally stated for irreducible varieties-the generalization we use is obtained by primary decomposition. We also employ it when K is not algebraically closed, which is possible as we may apply the theorem to the extensions to the algebraic closure, which does not affect the tropical varieties since they are defined via initial ideals. Similarly, if the field does not come with a non-trivial valuation (which is the case here), one may extend it to the field of generalized Puiseux series which has a non-trivial valuation. See also [16,Theorem 3.1.3].
The preceding theorem allows us to determine when a prime ideal contains a binomial. The intention is to apply Theorem 3.4 and Proposition 3.3 to reduce the computation of Bin(I) to the Artinian case for arbitrary I ⊂ K[L]. To proceed, we must be able to compute the lattice T (I) ⊥ ∩ L. We formulate the following algorithms in the Laurent ring, but using saturations the necessary computations can be carried out in a polynomial ring.
It is possible to either compute the entire Gröbner fan or to apply the traversal strategy of [3] even if I is not homogeneous to find T (I), but both strategies have several drawbacks; a problematic one being that T (I) can easily consist of millions of polyhedral cones. For this reason we offer an approach to directly compute span(T (I)) ⊆ Q n . We will make the assumption that we have an algorithm with the following specification. One such algorithm relying on tropical bases is presented in [3]. Another one relying on projections and elimination can be found in Andrew Chan's thesis [5]. We use Algorithm 3.6 to find a non-trivial vector in T (I) as follows: Remark 3.8. The dimension condition in the first step holds for a Zariski open subset of span K {1, x 1 , . . . , x n }. Therefore these polynomials could be picked at random and checked to satisfy the dimension condition. There is also a deterministic way using stable intersections and rational functions as coefficients. Building on techniques similar to [12,Lemma 3.3] one can always find suitable univariate linear polynomials.
We can now state the algorithm to compute span(T (I)).   gives an algorithm to compute a basis for the lattice of exponents e ∈ Z n satisfying (4.1). A more general version can be found in [15,Algorithm 8.3]. Both rely on the LLL lattice basis reduction algorithm.
Remark 4.2. The commutativity of the matrices is key for algorithmic treatment. For general matrix semigroups, several problems are known to be algorithmically undecidable (see for example the Table in the end of [10]). In particular, there is no Turing machine program that can decide if there is a relation among given (3 × 3) matrices [14]. It is also undecidable if a semigroup generated by eight (3 × 3) integer matrices contains the zero matrix [20]. This result of Paterson is an important tool to prove other undecidability results. For invertible matrices, group membership is unsolvable for matrices of format (4 × 4) and larger [17]. Our methods are therefore not directly applicable to polynomials in non-commutative variables.
Finally, the binomial part of the radical of an Artinian ideal I ⊂ K[x ± 1 , . . . , x ± n ] can be computed without first computing the radical itself. Then L can be computed with the algorithm in [1]. It is clear from the observation above that for each e ∈ L, the matrix i (M i ) e i has only one eigenvalue. So L contains precisely the exponents of the binomials in the radical of I.