=Paper=
{{Paper
|id=Vol-3717/paper8
|storemode=property
|title=Under-Approximation of a Single Algebraic Cell (Extended Abstract)
|pdfUrl=https://ceur-ws.org/Vol-3717/short3.pdf
|volume=Vol-3717
|authors=Valentin Promies,Jasper Nalbach,Erika Abraham
|dblpUrl=https://dblp.org/rec/conf/paar/PromiesNA24
}}
==Under-Approximation of a Single Algebraic Cell (Extended Abstract)==
Under-Approximation of a Single Algebraic Cell (Extended
Abstract)
Valentin Promies1,* , Jasper Nalbach1 and Erika ΓbrahΓ‘m1
1
RWTH Aachen University, Germany
Abstract
Single cell construction is a crucial subroutine in modern SMT solvers for non-linear real arithmetic. In this
extended abstract, we adapt a recent approach by dynamically under-approximating the cell boundaries using
linear polynomials, which can greatly reduce the effort of resultant computations, while maintaining the sign-
invariance properties of the cell. Although one must be careful to ensure termination, first experiments suggest
that this modification pays off in the context of SMT solving.
Keywords
Single Cell Construction, Approximation, Real Algebra, Cylindrical Algebraic Decomposition
1. Introduction
The NLSAT algorithm [1] is a modern and complete approach for deciding the satisfiability of quantifier-
free formulas in the theory of non-linear real arithmetic, and it relies heavily on a subroutine for single
cell construction (SCC): Given a sample point π β Rπ and a finite set π β Q[π₯1 , . . . , π₯π ] of polynomials,
the task is to compute the representation of a cell π β Rπ , so that π β π and the polynomials in π are
sign-invariant over π. The cell π is connected and algebraic, i.e. its boundaries are defined by the roots
of some polynomials.
NLSAT invokes this subroutine when it finds a sample π at which the given formula is conflicting: the
conflict is generalized to π, which is then excluded from the search space. Accordingly, the excluded
cell should be as large as possible. However, the representation should be efficiently usable by NLSAT,
and, as SCC is based on the cylindrical algebraic decomposition [2], its computational effort can grow
quickly. Thus, π is generally not inclusion-maximal in practice.
Recently, Nalbach et al. introduced a levelwise approach to SCC [3], which evolved from the method
of Brown and KoΕ‘ta [4]. We modify this approach by allowing it to dynamically under-approximate cell
boundaries using low-degree polynomials. This reduces the computational effort of the construction,
but it also affects the quality of the cell for NLSAT and the methodsβ completeness.
2. Levelwise Single Cell Construction
Originally, Nalbach et al. [3] formulated the levelwise single cell construction by means of a proof
system, which offers great flexibility in heuristic choices. We now give a brief recall of the method, but
we omit details and focus here on those parts that we will adapt later, in Section 3.
For a given finite set π β Q[π₯1 , . . . , π₯π ] of π-variate polynomials and a given sample point π β Rπ ,
the method constructs a representation I = (πΌ1 , . . . , πΌπ ) of a cell π β Rπ so that π β π and for all π β π
holds βπ β² β π. π πππ(π(π β² )) = π πππ(π(π )). In the output representation, each πΌπ is a symbolic interval
which bounds the value of π₯π w.r.t the variables π₯1 , . . . , π₯πβ1 of the lower levels, either by a lower and
an upper bound (π(π₯1 , . . . , π₯πβ1 ) < π₯π < π’(π₯1 , . . . , π₯πβ1 )) or by an equality (π₯π = π(π₯1 , . . . , π₯πβ1 )).
9th International Workshop on Satisfiability Checking and Symbolic Computation, July 2, 2024, Nancy, France, Collocated with
IJCAR 2024
*
Corresponding author.
$ promies@cs.rwth-aachen.de (V. Promies); nalbach@cs.rwth-aachen.de (J. Nalbach); abraham@cs.rwth-aachen.de
(E. ΓbrahΓ‘m)
0000-0002-3086-9976 (V. Promies); 0000-0002-2641-1380 (J. Nalbach); 0000-0002-5647-6134 (E. ΓbrahΓ‘m)
Β© 2024 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).
CEUR
ceur-ws.org
Workshop ISSN 1613-0073
Proceedings
The method maintains a working set π* of polynomials, which is initialized as π* := π .
For π = π, . . . , 1 (i.e. starting with πΌπ and iterating down to πΌ1 ), the interval πΌπ at level π is then
computed as follows.
1. Let ππ := (π* β© Q[π₯1 , . . . π₯π ]) β Q[π₯1 , . . . π₯πβ1 ].
2. Isolate the real roots πβππ {π β R | π(π 1 , . . . , π πβ1 , π) = 0} and order them, together with the
βοΈ
sample coordinate π π , giving ββ < π1 β€ . . . β€ ππ < π π < ππ+1 β€ . . . β€ ππ < β. In this
paper, we only consider the case that π is not a root of any polynomial in π* .
3. In a neighborhood of the sample, each root can be generalized to a continuous function, encoded
as an indexed root expression (IRE) of the form rootπ₯π [π, π] : Rπβ1 β R βͺ {β₯}, which maps a given
(π β 1)-dimensional sample to the π-th real root of the polynomial π in π₯π if it exists and otherwise
returns β₯ (i.e. βundefinedβ). For an IRE π, we refer to the according polynomial by π.π.
4. For π β {1, . . . , π}, let ππ be the IRE corresponding to the root ππ , and let Ξ = {π1 , . . . , ππ }.
5. Set πΌπ := (ππ (π₯1 , . . . , π₯πβ1 ) < π₯π < ππ+1 (π₯1 , . . . , π₯πβ1 )).
6. The symbolic interval πΌπ is only correct in a certain neighborhood of the sample, which is why
the underlying cell defined by (πΌ1 , . . . , πΌπβ1 ) is restricted using a projection.
a) To ensure well-definedness of the root functions over the underlying cell, it is restricted
so that the polynomials are delineable, by adding discriminants discπ₯π [π] β Q[π₯1 , . . . , π₯πβ1 ]
and some coefficients of the polynomials π from ππ to the working set π* .
b) To ensure that no root function crosses the boundaries defined by πΌπ , choose a relation βͺ― β
Ξ Γ Ξ so that (ππ , ππ+1 ) β βͺ―, {(ππ , ππ ) | π < π} β βͺ―* and {(ππ+1 , ππ ) | π + 1 < π β€ π} β βͺ―* ,
where βͺ―* is the transitive closure of βͺ―. Then update π* := π* βͺ {resπ₯π [π.π, π β² .π] | π βͺ― π β² },
where the resultant resπ₯π [π, π] β Q[π₯1 , . . . , π₯πβ1 ] of π, π β Q[π₯1 , . . . , π₯π ] is a polynomial
whose roots are exactly the points π‘ β Rπβ1 where π(π‘, π₯π ) β R[π₯π ] and π(π‘, π₯π ) β R[π₯π ]
have a common root. If the resultant is order-invariant, then the roots of π and π do not
cross. This way, the boundaries are protected.
Figure 1 illustrates an example with a given sample π β R2 and polynomials π = {π1 , π2 , π3 } β
Q[π₯1 , π₯2 ]. For π β {1, 2, 3}, the line labeled with ππ shows those points π β R2 with ππ (π) = 0. We
start at level 2, where π2 = π . Fixing π₯1 to π 1 and isolating the real roots of π2 yields one root of π2
below π 2 and one root of each polynomial above π 2 . The IREs corresponding to the roots closest to π 2
define the symbolic interval πΌ2 = (rootπ₯2 [π2 , 1](π₯1 ) < π₯2 < rootπ₯2 [π3 , 1](π₯1 )), as shown in Figure 1a.
Now, we need to ensure that this interval is correct for all values of π₯1 in the underlying cell which will
be computed at level 1. We choose π1 βͺ― π2 , π2 βͺ― π3 and π2 βͺ― π4 , and add thus the resultants of π3 with
π1 and π2 , whose roots are given by the dashed lines in Figure 1b. On level 1, we again isolate those
roots and use the closest to π 1 as interval boundaries, giving πΌ1 = (π1β² < π₯1 < π2β² ) and thus, (πΌ1 , πΌ2 )
define the shaded area shown in Figure 1c. Note that the crossing of π3 and π4 over πΌ1 is irrelevant, and
the corresponding resultant of π1 and π2 was avoided.
π₯2 π π₯2 π π₯2 π
1 π4 1 π4 1
π2 π3 π2 π3 π2
π2 π2
π πΌ2 π
π
π3 π1 π3 π1 π3 π1β² π 1 π2β² π3β²
π₯1 π₯1 π₯1
πΌ1 πΌ1 πΌ1
(a) (b) (c)
Figure 1: Illustration of the levelwise single cell construction.
3. Under-Approximation with Low-Degree Polynomials
The most resource-intensive part of single cell construction is the computation of resultants and
discriminants, and we tackle the former. The computational effort and the degree of resπ₯π [π, π] scales
with πππ(π) Β· πππ(π). Thus, if π and π have high degree, then not only is their resultant more expensive
to compute, but it also yields a polynomial of even higher degree which will be involved in resultants
in the subsequent levels. On the other hand, if π is of the form π₯π β π, then its resultant with π is simply
equal to π(π₯1 , . . . , π₯πβ1 , π).
As seen in the example, one can choose the relation βͺ― so that all resultants in the current projection
take one of the boundary-defining polynomials as input. In [3], this is called the Biggest-Cell heuristic.
Our idea is to dynamically add artificial cell boundaries defined by linear polynomials and use that
heuristic so that the required resultants will be easy to calculate.
When computing the interval πΌπ , if the upper (or lower) bound
of the interval would be defined by a high-degree polynomial, we
insert an βartificialβ root π* between the sample π π and the actual π1
π3 π4
bound. This root is generalized to an IRE π defined by a low-degree
*
polynomial, e.g. β(π₯π ) = π₯π β π* , and now we use π * as the upper π2 π2
interval bound. π₯ 2
Figure 2 illustrates our idea. Interestingly, while we under- β π*
approximate the symbolic interval πΌ2 , the resulting cell is not a subset π
of the cell in Figure 1, because πΌ1 is now defined by the resultants π3 π1
of β with π2 and π3 . This means that our approximated interval can π₯1
lead to larger underlying cells.
Our modification has two main benefits: the following projection Figure 2: Approximated cell
step is much easier to compute; and it is easier for NLSAT to check using an additional linear
whether a sample lies in the excluded cell, due to a less complex cell polynomial.
description that avoids algebraic number computations.
Correctness The approximation does not affect the correctness of the construction. To see this,
consider the original construction, but for a modified input π βͺ π», where π» contains the approximation
polynomials that were dynamically added. This will yield the same cell as our version gives for the
input π , and by the correctness of the original method, this cell contains π and all polynomials in π βͺ π»
(in particular those in π ) are sign-invariant over it.
Incompleteness When used in NLSAT, the approximation can lead to an incomplete (non-
terminating) algorithm, because the union of the approximated cells might converge to the inclusion-
maximal cell without ever covering it entirely and thus without ever considering the entire solution
space. This behavior can be circumvented by allowing NLSAT to only approximate a limited number of
cells before resorting to the original construction, which assures completeness.
4. Conclusions
Many SMT problems can be solved efficiently using approximative methods, like incremental lineariza-
tion [5] or ICP [6], though they are incomplete. We presented an approach that weaves dynamically
into the complete NLSAT method.
Experiments The levelwise SCC and a prototype of our modification are implemented as backends
for an NLSAT-style algorithm in the SMT-RAT solver [7, 8], and we conducted first experiments with
promising results. We obtained the best performance when applying linear approximations to cell
boundaries that are defined by a polynomial with degree 5 or higher, and not approximating after 50
calls to the SCC. When executed on the QF_NRA benchmark set from SMT-LIB [9], our modification
solved 44 instances more than the original version. When using the approximation, the solver needs
more calls to the SCC on average, but these calls are processed faster, leading to a lower mean runtime.
Next Steps We are currently working on different generalizations of our idea. Firstly, one can use
more intricate approximations, e.g. piecewise linear functions or Taylor polynomials, which hopefully
results in a cell that is more similar to the original one, but which also induces a larger overhead. In the
case of Taylor polynomials, a closer approximation could be obtained by using degree two or three,
instead of linear polynomials.
Secondly, the levelwise framework also allows us to add artificial roots between any two root functions,
not just as a cell boundary. In our example, we could have inserted π * (and β) between π2 and π3 . With
an appropriate choice of βͺ―, this lets us replace resπ₯2 [π3 , π1 ] by the less complex resultants resπ₯2 [π3 , β]
and resπ₯2 [β, π1 ], while maintaining the original interval πΌ2 = (π1 < π₯2 < π2 ). This might still lead to
smaller intervals at the lower levels, due to the new resultants.
Finally, we are interested in transferring our ideas to the cylindrical algebraic coverings method [10],
which also uses the framework of the levelwise method.
Acknowledgments
Jasper Nalbach and Valentin Promies were supported by the Deutsche Forschungsgemeinschaft (DFG,
German Research Association) as part of AB 461/9-1 SMT-ART. Jasper Nalbach was supported by the
DFG RTG 2236 UnRAVeL.
References
[1] D. Jovanovic, L. M. de Moura, Solving non-linear arithmetic, in: Proc. of the 6th Int. Joint
Conf. on Automated Reasoning (IJCARβ12), volume 7364 of LNCS, Springer, 2012, pp. 339β354.
doi:10.1007/978-3-642-31365-3_27.
[2] G. E. Collins, Quantifier elimination for real closed fields by cylindrical algebraic decomposition,
in: H. Barkhage (Ed.), Automata Theory and Formal Languages, 2nd GI Conference, Kaiserslautern,
May 20-23, 1975, volume 33 of Lecture Notes in Computer Science, Springer, 1975, pp. 134β183.
doi:10.1007/3-540-07407-4_17.
[3] J. Nalbach, E. ΓbrahΓ‘m, P. Specht, C. W. Brown, J. H. Davenport, M. England, Levelwise construc-
tion of a single cylindrical algebraic cell, Journal of Symbolic Computation 123 (2024) 102288.
doi:10.1016/j.jsc.2023.102288.
[4] C. W. Brown, M. KoΕ‘ta, Constructing a single cell in cylindrical algebraic decomposition, J. Symb.
Comput. 70 (2015) 14β48. doi:10.1016/J.JSC.2014.09.024.
[5] A. Cimatti, A. Griggio, A. Irfan, M. Roveri, R. Sebastiani, Invariant checking of NRA transition
systems via incremental reduction to LRA with EUF, CoRR abs/1801.08718 (2018). URL: http:
//arxiv.org/abs/1801.08718. arXiv:1801.08718.
[6] P. Van Hentenryck, D. McAllester, D. Kapur, Solving polynomial systems using a branch
and prune approach, SIAM Journal on Numerical Analysis 34 (1997) 797β827. doi:10.1137/
S0036142995281504.
[7] F. Corzilius, G. Kremer, S. Junges, S. Schupp, E. ΓbrahΓ‘m, SMT-RAT: An open source C++
toolbox for strategic and parallel SMT solving, in: Proc. of the 18th Int. Conf. on Theory and
Applications of Satisfiability Testing (SATβ15), volume 9340 of LNCS, Springer, 2015, pp. 360β368.
doi:10.1007/978-3-319-24318-4_26.
[8] SMT-RAT, a toolbox for strategic and parallel satisfiability modulo theories solving, https://github.
com/ths-rwth/smtrat, accessed 2024-06-01.
[9] C. Barrett, A. Stump, C. Tinelli, The SMT-LIB standard β version 2.0, in: Proc. of the 8th Int.
Workshop on Satisfiability Modulo Theories (SMT β10), 2010. URL: http://theory.stanford.edu/
~barrett/pubs/BST10.pdf.
[10] E. ΓbrahΓ‘m, J. H. Davenport, M. England, G. Kremer, Deciding the consistency of non-linear real
arithmetic constraints with a conflict driven search using cylindrical algebraic coverings, J. Log.
Algebraic Methods Program. 119 (2021) 100633. doi:10.1016/J.JLAMP.2020.100633.