Subtropical Satisfiability

Quantifier-free nonlinear arithmetic (QF_NRA) appears in many applications of satisfiability modulo theories solving (SMT). Accordingly, efficient reasoning for corresponding constraints in SMT theory solvers is highly relevant. We propose a new incomplete but efficient and terminating method to identify satisfiable instances. The method is derived from the subtropical method recently introduced in the context of symbolic computation for computing real zeros of single very large multivariate polynomials. Our method takes as input conjunctions of strict polynomial inequalities, which represent more than 40% of the QF_NRA section of the SMT-LIB library of benchmarks. The method takes an abstraction of polynomials as exponent vectors over the natural numbers tagged with the signs of the corresponding coefficients. It then uses, in turn, SMT to solve linear problems over the reals to heuristically find suitable points that translate back to satisfying points for the original problem. Systematic experiments on the SMT-LIB demonstrate that our method is not a sufficiently strong decision procedure by itself but a valuable heuristic to use within a portfolio of techniques.


Introduction
Satisfiability Modulo Theories (SMT) has been blooming in recent years, and many applications rely on SMT solvers to check the satisfiability of numerous and large formulas [3,2]. Many of those applications use arithmetic. In fact, linear arithmetic has been one of the first theories considered in SMT.
We present here an incomplete but efficient method to detect the satisfiability of large conjunctions of constraints of the form p > 0 where p is a multivariate polynomial with strictly positive real variables. The method quickly states that the conjunction is satisfiable, or quickly returns unknown. Although seemingly restrictive, 40% of the quantifier-free non-linear real arithmetic (QF_NRA) category of the SMT-LIB is easily reducible to the considered fragment. Our method builds on a subtropical technique that has been found effective to find roots of very large polynomials stemming from chemistry and systems biology [27,12]. Recall that a univariate polynomial with a positive head coefficient diverges positively as x increases to infinity. Intuitively, the subtropical approach generalizes this observation to the multivariate case and thus to higher dimensions.
In Sect. 2 we recall some basic definitions and facts. In Sect. 3 we provide a short presentation of the original method [27] and give some new insights for its foundations. In Sect. 4, we extend the method to multiple polynomial constraints. We then show in Sect. 5 that satisfiability modulo linear theory is particularly adequate to check for applicability of the method. In Sect. 6, we provide experimental evidence that the method is suited as a heuristic to be used in combination with other, complete, decision procedures for non-linear arithmetic in SMT. It turns out that our method is quite fast at either detecting satisfiability or failing. In particular, it finds solutions for problems where stateof-the-art non-linear arithmetic SMT solvers time out. Finally, in Sect. 7, we summarize our contributions and results, and point at possible future research directions.

Basic Facts and Definitions
For a ∈ R, a vector x = (x 1 , . . . , x d ) of variables, and p = (p 1 , . . . , p d ) ∈ R d we use notations a p = (a p1 , . . . , a p d ) and is uniquely determined, and written frame(f ). It can be partitioned into a positive and a negative frame, according to the sign of f p : for all p, q ∈ S. Furthermore, given any S ⊆ R d , the convex hull conv(S) ⊆ R d is the unique inclusion-minimal convex set containing S. The Newton polytope of a polynomial f is the convex hull of its frame, newton(f ) = conv(frame(f )). Fig. 1a illustrates the Newton polytope of which is the convex hull of its frame {(0, 1), (1, 3), (2, 2), (3, 0), (4, 4)} ⊂ N 2 . As a convex hull of a finite set of points, the Newton polytope is bounded and thus indeed a polytope [26].
The face [26] of a polytope P ⊆ R d with respect to a vector n ∈ R d is face(n, P ) = { p ∈ P | n T p ≥ n T q for all q ∈ P }.
Faces of dimension 0 are called vertices. We denote by V(P ) the set of all vertices of P . We have p ∈ V(P ) if and only if there exists n ∈ R d such that n T p > n T q for all q ∈ P \ {p}. In Fig.1a, (4,4) is a vertex of the Newton polytope with respect to (1,1). It is easy to see that for finite S ⊂ R d we have The following lemma gives a characterization of V(conv(S)): Lemma 1. Let S ⊂ R d be finite, and let p ∈ S. The following are equivalent: (i) p is a vertex of conv(S) with respect to n.
(ii) There exists a hyperplane H : n T x + c = 0 that strictly separates p from S \ {p}, and the normal vector n is directed from H towards p.
Proof. Assume (i). Then there exists n ∈ R d such that n T p > n T q for all q ∈ S \ {p} ⊆ conv(S) \ {p}. Choose q 0 ∈ S \ {p} such that n T q 0 is maximal, and choose c such that n T p > −c > n T q 0 . Then n T p + c > 0 and n T q + c ≤ n T q 0 + c < 0 for all q ∈ S \ {p}. Hence H : n T p + c = 0 is the desired hyperplane. Assume (ii). It follows that n T p + c > 0 > n T q + c for all q ∈ S \ {p}. If q ∈ S\{p}, then n T p > n T q. If, in contrast, q ∈ (conv(S)\S)\{p} = conv(S)\S, then q = s∈S t s s, where t s ∈ [0, 1], s∈S t s = 1, and at least two t s are greater than 0. It follows that Let S 1 , . . . , S m ⊆ R d , and let n ∈ R d . If there exist p 1 ∈ S 1 , . . . , p n ∈ S m such that each p i is a vertex of conv(S i ) with respect to n, then the (unique) vertex cluster of {S i } i∈{1,...,m} with respect to n is defined as (p 1 , . . . , p m ).

Subtropical Real Root Finding Revisited
This section improves on the original method described in [27]. It furthermore lays some theoretical foundations to better understand the limitations of the heuristic approach. The method finds real zeros with all positive coordinates of a multivariate polynomial f in three steps: 1. Evaluate f (1, . . . , 1). If this is 0, we are done. If this is greater than 0, then consider −f instead of f . We may now assume that we have found f (1, . . . , 1) < 0. We focus here on Step 2. Our technique builds on [27,Lemma 4], which we are going to restate now in a slightly generalized form. While the original lemma required that p ∈ frame(f )\{0}, inspection of the proof shows that this limitation is not necessary: Lemma 2. Let f be a polynomial, and let p ∈ frame(f ) be a vertex of newton(f ) with respect to n ∈ R d . Then there exists a 0 ∈ R + such that for all a ∈ R + with a ≥ a 0 the following holds: 1. |f p a n T p | > | q∈frame(f )\{p} f q a n T q |, 2. sign(f (a n )) = sign(f p ).
In order to find a point with all positive coordinates where f > 0, the original method iteratively examines each p ∈ frame + (f ) \ {0} to check if it is a vertex of newton(f ) with respect to some n ∈ R d . In the positive case, Lemma 2 guarantees for large enough a ∈ R + that sign(f (a n )) = sign(f p ) = 1, in other words, f (a n ) > 0. Figure 1a illustrates the frame and the Newton polytope of f , of which (1, 3) is a vertex with respect to (−2, 3). Lemma 2 ensures that f (a −2 , a 3 ) is strictly positive for sufficiently large positive a. For example, f (2 −2 , 2 3 ) = 51193 256 . Figure 1b shows how the moment curve (a −2 , a 3 ) with a ≥ 2 will not leave the sign invariant region of f that contains (2 −2 , 2 3 ).
An exponent vector 0 ∈ frame(f ) corresponds to an absolute summand f 0 in f . Its above-mentioned explicit exclusion in [27,Lemma 4] originated from the false intuition that one cannot achieve sign(f (a n )) = sign(f 0 ) because the monomial f 0 is invariant under the choice of a. However, inclusion of 0 can yield a normal vector n which renders all other monomials small enough for f 0 to dominate.
Given a finite set S ⊂ R d and a point p ∈ S, the original method uses linear programming to determine if p is a vertex of conv(S) w.r.t. some vector n ∈ R d . Indeed, from Lemma 1, the problem can be reduced to finding a hyperplane H : n T x + c = 0 that strictly separates p from S \ {p} with the normal vector n pointing from H to p. This is equivalent to solving the following linear problem with d + 1 real variables n and c: Notice that with the occurrence of a nonzero absolute summand the corresponding point 0 is generally a vertex of the Newton polytope with respect to −1 = (−1, . . . , −1). This raises the question whether there are other special points that are certainly vertices of the Newton polytope. In fact, 0 is a lexicographic minimum in frame(f ), and it is not hard to see that minima and maxima with respect to lexicographic orderings are generally vertices of the Newton polytope.
We are now going to generalize that observation. A monotonic total preorder ⊆ Z d × Z d is defined as follows: The difference to a total order is the missing anti-symmetry. As an example in Then −2 2 and 2 −2 but −2 = 2. Our definition of on the extended domain Z d guarantees a cancellation law x + z y + z −→ x y also on N d . The following lemma follows by induction using monotonicity and cancellation: Any monotonic preorder on Z d can be extended to Q d : Using a suitable principle denominator n ∈ N \ {0} define This is well-defined. Given x y we have either y x or y x. In the former case we say that x and y are strictly preordered and write x ≺ y. In the latter case they are not strictly preordered, i.e., x ⊀ y although we might have x = y. In particular, reflexivity yields x x and hence certainly x ⊀ x.
Example 5. Lexicographic orders are monotonic total orders and thus monotonic total preorders. Hence our notion covers our discussion of the absolute summand above. Here are some further examples: Our last example is going to be instrumental with the proof of the next theorem: Fix n ∈ R d , and define for p, p ∈ Z d that p n p if and only if n T p ≤ n T p .
, and let p ∈ frame(f ). Then the following are equivalent: Proof. Let p be a vertex of newton(f ) specifically with respect to n. By our definition of a vertex in Sect. 2, p is the maximum of frame(f ) with respect to ≺ n .
Let, vice versa, be a monotonic total preorder on Z d , and let p = max ≺ (frame(f )). Shortly denote V = V(newton(f )), and assume for a con- According to (1) in Sect. 2 we know that V ⊆ frame(f ) ⊆ newton(f ). It follows that s ≺ p for all s ∈ V , and using monotony we obtain On the other hand, we know that generally p ⊀ p, a contradiction.
, and let p ∈ frame(f ). If p = max(frame(f )) or p = min(frame(f )) with respect to an admissible term order in the sense of Gröbner Basis theory [7], then p ∈ V(newton(f )). It is one of our research goals to identify and characterize those polynomials where the subtropical heuristic succeeds in finding positive points. We are now going to give a necessary criterion.
and denote by Π(f ) its closure with respect to the natural topology. In Lemma 2, when a tends to ∞, a n will tend to some r ∈ {0, ∞} d . If r = 0, then 0 ∈ Π(f ). Otherwise, Π(f ) is unbounded. Consequently, for the method to succeed, Π must have at least one of those two properties. Figure 2 illustrates four scenarios: the subtropical method succeeds in the first three cases while it fails to find a point in Π(f ) in the last one. The first sub-figure presents a case where Π(f ) is unbounded. The second and third sub-figures illustrate cases where the closure of Π(f ) contains (0, 0). In the fourth sub-figure where neither Π(f ) is unbounded nor its closure contains (0, 0), the method cannot find any positive value of the variables for f to be positive.

Positive Values of Several Polynomials
The subtropical method as presented in [27] finds zeros with all positive coordinates of one single multivariate polynomial. This requires to find a corresponding point with a positive value of the polynomial. In the sequel we restrict ourselves to this sub-task. This will allow us generalize from one polynomial to simultaneous positive values of finitely many polynomials.

A Sufficient Condition
With a single polynomial, the existence of a positive vertex of the Newton polytope guarantees the existence of positive real choices for the variables with a positive value of that polynomial. For several polynomials we introduce a more general notion: A sequence (p 1 , . . . , p m ) (p 1 , . . . , p m ) of {frame(f i )} i∈{1,...,m} with respect to n ∈ R n , then there exists a 0 ∈ R + such that the following holds for all a ∈ R + with a ≥ a 0 and all i ∈ {1, . . . , m}: 1. |(f i ) pi a n T pi | > | q∈frame(fi)\{pi} (f i ) q a n T q |, 2. sign(f i (a n )) = sign((f i ) pi ).
Proof. From [27,Lemma 4], for each i ∈ {1, . . . , m}, there exist a 0,i ∈ R + such that for all a ∈ R + with a ≥ a 0,i the following holds: It now suffices to take a 0 = max{a 0,i | 1 ≤ i ≤ m}.
Similarly to the case of one polynomial, the following Proposition provides a sufficient condition for the existence of a common point with positive value for multiple polynomials.

Proposition 9.
If there exists a positive vertex cluster (p 1 , . . . , p m ) of the polynomials {f i } i∈{1,...,m} with respect to a vector n ∈ R d , then there exists a 0 ∈ R + such that for all a ∈ R + with a ≥ a 0 the following holds: The exponent vector 0 is a vertex of newton(f 1 ), newton(f 2 ), and newton(f 3 ) with respect to (−1, −1, −1). Choose a 0 = 2 ∈ R + . Then for all a ∈ R with a ≥ a 0 we have f 1

Existence of Positive Vertex Clusters
Given polynomials f 1 , . . . , f m , Proposition 9 provides a sufficient condition, i.e. the existence of a positive vertex cluster of {f i } i∈{1,...,m} , for the satisfiability of m i=1 f i > 0. A straightforward method to decide the existence of such a cluster is to verify whether each (p 1 , . . . , p m ) ∈ frame + (f 1 ) × · · · × frame + (f m ) is a positive vertex cluster by checking the satisfiability of the formula i∈{1,...,m} where ϕ is defined as in (2) on p.5. This is a linear problem with d + m variables n, c 1 , . . . , c m . Since frame(f 1 ), . . . , frame(f m ) are finite, checking all m-tuples (p 1 , . . . , p m ) will terminate, provided we rely on a complete algorithm for linear programming, such as the Simplex algorithm [10], the ellipsoid method [22], or the interior point method [21]. This provides a decision procedure for the existence of a positive vertex cluster of {f i } i∈{1,...,m} . However, this requires checking all candidates in frame + (f 1 ) × · · · × frame + (f m ).
We propose to use instead state-of-the-art SMT solving techniques over linear real arithmetic to examine whether or not {f i } i∈{1,...,m} has a positive vertex cluster with respect to some n ∈ R d . In the positive case, a solution for m i=1 f i > 0 can be constructed as a n with a sufficiently large a ∈ R + .
To start with, we provide a characterization for the positive frame of a single polynomial to contain a vertex of the Newton polytope.
Lemma 11. Let f ∈ Z[x]. The following are equivalent: (i) There exists a vertex p ∈ frame + (f ) of newton(f ) = conv(frame(f )) with respect to n ∈ R d . (ii) There exists a vertex p ∈ frame + (f ) such that p is also a vertex of conv(frame − (f ) ∪ {p }) with respect to n ∈ R d .
Proof. Assume (i). Take p = p and n = n. Since p is a vertex of newton(f ) with respect to n, n T p > n T p 1 for all p 1 ∈ frame(f ) \ {p}. This implies that n T p > n T p 1 for all which is a contradiction. As a result, there must be some p ∈ frame + (f ) which is a vertex of newton(f ) with respect to some n ∈ R d .
Thus some p ∈ frame + (f ) is a vertex of the Newton polytope of a polynomial f if and only if the following formula is satisfiable: For the case of several polynomials, the following theorem is a direct consequence of Lemma 11.
The formula m i=1 ψ(f i , n, c i ) can be checked for satisfiability using combinations of linear programming techniques and DPLL(T ) procedures [11,16], i.e., satisfiability modulo linear arithmetic on reals. Any SMT solver supporting the QF_LRA logic is suitable. In the satisfiable case {f i } i∈{1,...,m} has a positive vertex cluster and we can construct a solution for m i=1 f i > 0 as discussed earlier.

More General Solutions
So far all variables were assumed to be strictly positive, i.e., only solutions x ∈ ]0, ∞[ d were considered. This section proposes a method for searching over R d by encoding sign conditions along with the condition in Theorem 12 as a quantifier-free formula over linear real arithmetic.
Let V = {x 1 , . . . , x d } be the set of variables. We define a sign variant of V as a function τ : (p 1 , . . . , p m ) is a variant positive vertex cluster of {f i } i∈{1,...,m} with  respect to a vector n ∈ R d and a sign variant τ if (p 1 , . . . , p m ) is a positive vertex cluster of {τ (f i )} i∈{1,...,m} . Note that the substitution of τ into a polynomial f does not change the exponent vectors in f in terms of their exponents values, but only possibly changes signs of monomials. Given p = (p 1 , . . . , p d ) ∈ N d and a sign variant τ , we define a formula ϑ(p, τ ) such that it is true if and only if the sign of the monomial associated with p is changed after applying the substitution defined by τ : Note that this xor expression becomes true if and only if an odd number of its operands are true. Furthermore, a variable can change the sign of a monomial only when its exponent in that monomial is odd. As a result, if ϑ(p, τ ) is true, then applying the substitution defined by τ will change the sign of the monomial associated with p. In conclusion, some p ∈ frame(f ) is in the positive frame of τ (f ) if and only if one of the following mutually exclusive conditions holds: (i) p ∈ frame + (f ) and ϑ(p, τ ) = false (ii) p ∈ frame − (f ) and ϑ(p, τ ) = true.
In other words, p is in the positive frame of τ (f ) if and only if the formula Θ(p, f, τ )= f p > 0 ∧ ¬ϑ(p, τ ) ∨ f p < 0 ∧ ϑ(p, τ ) holds. Then, the positive and negative frames of τ (f ) parameterized by τ are defined as respectively. The next lemma provides a sufficient condition for the existence of a solution in R d of

Lemma 14.
If there exists a variant positive vertex cluster of {f i } i∈{1,...,m} with respect to n ∈ R d and a sign variant τ , then there exists a 0 ∈ R + such that for all a ∈ R + with a ≥ a 0 the following holds: Proof. Since {τ (f i )} i∈{1,...,m} has a positive vertex cluster with respect to n, Proposition 9 guarantees that there exists a 0 ∈ R such that for all a ∈ R with a ≥ a 0 , we have A variant positive vertex cluster exists if and only if there exist n ∈ R d , c 1 , . . . , c m ∈ R, and a sign variant τ such that the following formula becomes true: . . . , f m , n, c 1 , . . . , c m where for i ∈ {1, . . . , m}: The sign variant τ can be encoded as d Boolean variables . . . , f m , n, c 1 , . . . , c m , τ ) can be checked for satisfiability using an SMT solver for quantifier-free logic with linear real arithmetic.

Application to SMT Benchmarks
A library STROPSAT implementing Subtropical Satisfiability, is available on our web page 4 . It is integrated into veriT [6] as an incomplete theory solver for non-linear arithmetic benchmarks. We experimented on the QF_NRA category of the SMT-LIB on all benchmarks consisting of only inequalities, that is 4917 formulas out of 11601 in the whole category. The experiments thus focus on those 4917 benchmarks, comprising 3265 sat-annotated ones, 106 unknowns, and 1546 unsat benchmarks. We used the SMT solver CVC4 to handle the generated linear real arithmetic formulas Ψ (f 1 , . . . , f m , n, c 1 , . . . , c m , τ ), and we ran veriT (with STROPSAT as the theory solver) against the clear winner of the SMT-COMP 2016 on the QF_NRA category, i.e., Z3 (implementing nlsat [20]), on a CX250 Cluster with Intel Xeon E5-2680v2 2.80GHz CPUs. Each pair of benchmark and solver was run on one CPU with a timeout of 2500 seconds and 20 GB memory. The experimental data and the library are also available on Zenodo 5 .
Since our method focuses on showing satisfiability, only brief statistics on unsat benchmarks are provided. Among the 1546 unsat benchmarks, 200 benchmarks are found unsatisfiable already by the linear arithmetic theory reasoning in veriT. For each of the remaining ones, the method quickly returns unknown within 0.002 to 0.096 seconds, with a total cumulative time of 18.45 seconds (0.014 seconds on average). This clearly shows that the method can be applied with a very small overhead, upfront of another, complete or less incomplete procedure to check for unsatisfiability. Table 1 provides the experimental results on benchmarks with sat or unknown status, and the cumulative times. The meti-tarski family consists of small benchmarks (most of them contain 3 to 4 variables and 1 to 23 polynomials with degrees between 1 and 4). Those are proof obligations extracted from the Meti-Tarski project [1], where the polynomials represent approximations of elementary real functions; all of them have defined statuses. The zankl family consists of large benchmarks (large numbers of variables and polynomials but small degrees) stemming from termination proofs for term-rewriting systems [14]. Although Z3 clearly outperforms STROPSAT in the number of solved benchmarks, the results also clearly show that our method is a useful complementing heuristic with little drawback, to be used either upfront or in portfolio with other approaches. As already said, it returns unknown quickly on unsat benchmarks. In particular, on all benchmarks solved by Z3 only, STROPSAT returns unknown quickly (see Fig. 4).
When both solvers can solve the same benchmark, the running time of STROPSAT is comparable with Z3 (Fig. 3). There are 11 large benchmarks (9 of them have the unknown status) that are solved by STROPSAT but time out with Z3. STROPSAT times out for only 15 problems, on which Z3 times out as well. STROPSAT provides a model for 15 unknown benchmarks, whereas Z3 times out on 9 of them. The virtual best solver (i.e. running Z3 and STROPSAT in parallel and using the quickest answer) decreases the execution time for the meti-tarski problems to 54.43 seconds, solves all satisfiable zankl problems in 1120 seconds, and 24 of the unknown ones in 4502 seconds.
Since the exponents of the polynomials become coefficients in the linear formulas, high degrees do not hurt our method significantly. As the SMT-LIB does not currently contain any inequality benchmarks with high degrees, our experimental results above do not demonstrate this claim. However, formulas like in Example 13 are totally within reach of our method (STROPSAT returned sat within a second) while Z3 runs out of memory (20 GB) after 30 seconds for the constraint f 1 > 0 ∧ f 2 > 0.

Conclusion
We presented some extensions of a heuristic method to find simultaneous positive values of nonlinear multivariate polynomials. Our techniques turn out useful to handle SMT problems. In practice, our method is fast, either to succeed or to fail, and it succeeds where state-of-the-art solvers do not. Therefore it establishes a valuable heuristic to apply either before or in parallel with other more complete methods to deal with non-linear constraints. Since the heuristic translates a conjunction of non-linear constraints one to one into a conjunction of linear constraints, it can easily be made incremental by using an incremental linear solver.
To improve the completeness of the method, it could be helpful to not only consider vertices of Newton polytopes, but also faces. Then, the value of the coefficients and not only their sign would matter. Consider {p 1 , p 2 , p 3 } = face(n, newton(f )), then we have n T p 1 = n T p 2 = n T p 3 . It is easy to see that f p1 x p1 + f p2 x p2 + f p3 x p3 will dominate the other monomials in the direction of n. In other words, there exists a 0 ∈ R such that for all a ∈ R with a ≥ a 0 , sign(f (a n )) = sign(f p1 + f p2 + f p3 ). We leave for future work the encoding of the condition for the existence of such a face into linear formulas. In the last paragraph of Section 3, we showed that, for the subtropical method to succeed, the set of values for which the considered polynomial is positive should either be unbounded, or should contain points arbitrarily near 0. We believe there is a stronger, sufficient condition, that would bring another insight to the subtropical method.
We leave for further work two interesting questions suggested by a reviewer, both concerning the case when the method is not able to assert the satisfiability of a set of literals. First, the technique could indeed be used to select, using the convex hull of the frame, some constraints most likely to be part of an unsatisfiable set; this could be used to simplify the work of the decision procedure to check unsatisfiability afterwards. Second, a careful analysis of the frame can provide information to remove some constraints in order to have a provable satisfiable set of constraints; this could be of some use for in a context of max-SMT.
Finally, on a more practical side, we would like to investigate the use of the techniques presented here for the testing phase of the raSAT loop [28], an extension the interval constraint propagation with testing and the Intermediate Value Theorem. We believe that this could lead to significant improvements in the solver, where testing is currently random.