Cylindrical Algebraic Decomposition with Equational Constraints
CCylindrical Algebraic Decompositionwith Equational Constraints
Matthew England a , Russell Bradford b , James H. Davenport b a Faculty of Engineering, Environment and Computing, Coventry University, UK b Faculty of Science, University of Bath, UK
Abstract
Cylindrical Algebraic Decomposition (CAD) has long been one of the mostimportant algorithms within Symbolic Computation, as a tool to performquantifier elimination in first order logic over the reals. More recently itis finding prominence in the Satisfiability Checking community as a tool toidentify satisfying solutions of problems in nonlinear real arithmetic.The original algorithm produces decompositions according to the signsof polynomials, when what is usually required is a decomposition accordingto the truth of a formula containing those polynomials. One approach toachieve that coarser (but hopefully cheaper) decomposition is to reduce thepolynomials identified in the CAD to reflect a logical structure which reducesthe solution space dimension: the presence of Equational Constraints (ECs).This paper may act as a tutorial for the use of CAD with ECs: we describeall necessary background and the current state of the art. In particular, wepresent recent work on how McCallum’s theory of reduced projection may beleveraged to make further savings in the lifting phase: both to the polynomi-als we lift with and the cells lifted over. We give a new complexity analysisto demonstrate that the double exponent in the worst case complexity boundfor CAD reduces in line with the number of ECs. We show that the reductioncan apply to both the number of polynomials produced and their degree.
Keywords: cylindrical algebraic decomposition, non linear real arithmetic
Email addresses:
[email protected] (Matthew England),
[email protected] (Russell Bradford),
[email protected] (JamesH. Davenport)
Preprint submitted to Elsevier a r X i v : . [ c s . S C ] M a r . Introduction A Cylindrical Algebraic Decomposition (CAD) splits R n into cells tomaintain an invariance structure relative to an input. Traditionally, the cellsare produced to be sign-invariant for a set of input polynomials: meaningthat throughout each cell, each of those polynomials has a constant sign. Thefirst CAD algorithm was introduced by Collins (1975) to perform QuantifierElimination (QE) over real closed fields. We describe the necessary detailsand terminology for CAD in Section 2.1. The invariance property of a CADmeans that problems for non-linear polynomial systems such as QE are re-duced to testing a finite number of sample points; with the nature of the cellsproduced allowing for the easy generation of solution descriptions.However, the use of CAD is often limited by the complexity of computingone. CAD is known to have worst case complexity doubly exponential in thenumber of variables (Davenport and Heintz, 1988; Brown and Davenport,2007). Broadly speaking (see Theorem 5 for a precise result) if the input has m polynomials of degree at most d then CAD complexity could be in theorder of (2 dm ) O ( n ) . For some problems there exist algorithms with bettercomplexity (see the textbook by Basu et al. (2006) for example), and thereare also many specialised algorithms for restricted inputs; but CAD imple-mentations remain the only general purpose approach for many problems.This complexity statement is obtained by considering the necessary sizeof the output for certain examples, and so can only be reduced with changesto the output requirements. Further, unlike some other theoretical results,this one is clearly felt in practice: when increasing dimensionality one will hitthe “doubly exponential wall” where progress becomes infeasible. However,extensive investigation into CAD and its sub-algorithms has allowed for thewall to be “pushed back” to the point of allowing many useful computations.Applications of CAD include: motion planning (Schwartz and Sharir,1983), weight minimisation for truss design (Charalampakis and Chatzigian-nelis, 2018), epidemic modelling (Brown et al., 2006), steady state analysisof biological networks (Bradford et al., 2017), economic reasoning (Mulliganet al., 2018a), artificial intelligence to pass exams (Wada et al., 2016), para-metric optimisation (Fotiou et al., 2005), theorem proving (Paulson, 2012),derivation of optimal numerical schemes (Erascu and Hong, 2016), reasoningwith multi-valued functions (Davenport et al., 2012), and much more.2 .2. CAD and SC CAD has long been important within Symbolic Computation with imple-mentations in multiple computer algebra systems. However, in recent yearsCAD has been of interest to the separate community of Satisfiability Check-ing. There, search based algorithms developed for the Boolean SAT problem,make use of heuristics and learning (see the textbook by Biere et al. (2009)for details). Success here led to research on domains other than the Booleans,and Satisfiability Module Theory (SMT)-Solvers which use SAT algorithmson the Boolean skeleton of a problem with queries to theory solvers to see ifa satisfying Boolean assignment is valid in the domain (learning new clausesif not) (Barrett et al., 2009; Kroening and Strichman, 2013).For the SMT domain of non-linear real arithmetic (NRA), CAD andmore generally computer algebra systems can play the role of such theorysolvers . SMT-RAT contains a tailored CAD implementation for use inSMT (Loup et al., 2013; Kremer and ´Abrah´am, 2019), while Z3 containsan algorithm by Jovanovic and de Moura (2012) which uses CAD theorywithout producing actual CADs. The latter inspired new developments insymbolic computation such as non-uniform CAD by Brown (2015). Furthercollaboration is informed by the SC project: forging interaction between S ymbolic C omputation and S atisfiability C hecking ( ´Abrah´am et al., 2016).CADs are produced relative to a problem statement expressed in logicconnectives between atoms involving (potentially non-linear) polynomialswith integer coefficients. The original CAD algorithm produces decompo-sitions according to the signs of these polynomials, essentially ignoring thelogical structure entirely and so producing decompositions fine enough tosolve all problems for all logical formulae formed by those polynomials. ASatisfiability Checking approach like that of Jovanovic and de Moura (2012)takes an opposite focus, analysing and extending the logical skeleton of theformula until a solution is found with the correct algebraic properties. Inorder to derive a full solution from a CAD what is truly required is a decom-position on whose cells the truth of the overall logical formula is constant . However, as discussed by ´Abrah´am et al. (2016) a more custom approach is beneficial. A sign-invariant decomposition for the polynomials in the formula achieves this, butwith far more cells and computation than required. .3. Equational constraints A CAD complexity analysis, such as that in Section 6, does not justconclude the upper bound (2 dm ) O ( n ) : it actually shows that in one dimensionwe must isolate the roots of at most M polynomials of degree D , where D = d O ( n ) and M = m O ( n ) . The same orders have been found for lowerbounds: for D by Davenport and Heintz (1988) and for M by Brown andDavenport (2007). The formulae demonstrating this are not straightforwardbut the underlying polynomials are surprisingly simple (all bar two linearwith each only involving a bounded number of variables, independent of n ). This demonstrates that the difficulty of CAD resides in the complicatednumber of ways simple polynomials can interact. Improvement must comefrom reducing the number of interactions we track. Definition 1. A Quantifier Free Tarski Formula (QFF) is made up of afinite number of atoms connected by the standard Boolean operators ∧ , ∨ and ¬ . The atoms are statements about the signs of polynomials with integercoefficients: f σ where σ ∈ { = , <, > } (and by combination also {≤ , ≥ , (cid:54) = } ). Definition 2. An Equational Constraint (EC) is a polynomial equation logi-cally implied by a QFF. If it is an atom of the formula it is said to be explicit and if not then it is implicit . Example 1.
Let f and g be polynomials. (a) The formula f = 0 ∧ g > hasexplicit EC f = 0 . (b) The formula f = 0 ∨ g = 0 has no explicit EC but itdoes have the implicit EC f g = 0 . (c) The formulae f + g ≤ also has noexplicit EC but this one has two implicit ECs f = 0 and g = 0 . Collins (1998) was the first to suggest that CAD could be simplified inthe presence of an EC. He noted that a CAD need only be sign-invariantfor the defining polynomial of an EC, and sign-invariant for any others onlywithin those cells where the EC polynomial is zero. He sketched an intuitiveapproach to produce this by refining the polynomials identified by his CADalgorithm. This approach was formalised and verified by McCallum (1999b).A complexity analysis (Bradford et al., 2016, Section 2) showed that makinguse of a single EC in this way reduces the double exponent of m in thecomplexity bound for CAD by 1. Some natural questions arising are: • Can savings be made iteratively in the presence of multiple ECs? • Do those savings further reduce the double exponent? • Can corresponding savings be made for the double exponent of d ?4he first question was answered affirmatively by McCallum (2001), althoughthe extension was not trivial . The other questions are answered affirma-tively by the present paper. Such questions are of growing importance asCAD finds new application domains with increasing numbers of equations:e.g. in biology by Bradford et al. (2017) and England et al. (2017); and ineconomics by Mulligan et al. (2018a,b). Indeed, many problems that arise inthe Satisfiability Checking context contain far more equalities than inequal-ities (see the NRA benchmarks in the SMT-LIB (Barrett et al., 2016)). In Section 2 we define the necessary CAD terminology and revise thetheory for projection, and reduced projection in the presence of an EC, ofMcCallum (1998, 1999b, 2001). Then in Section 3 we present recent work onhow to leverage this for savings elsewhere in CAD. In Section 4 we proposeand verify the corresponding algorithm.We demonstrate the benefit first with a worked example in Section 5and then a complexity analysis in Section 6. The latter observes the doubleexponent in the bound on the number of projection polynomials reducing bythe number of ECs. In Section 7 and 8 we explain how a similar reductioncan be observed for their degree if we assume CAD input is pre-processedwith a Gr¨obner Basis: a common step in CAD implementations but this isthe first theoretical justification for it. Together these show that CAD isdoubly exponential in number of variables minus number of ECs.In Section 9 we examine the main caveat: an assumption of primitivityto the ECs. We demonstrate its presence in the key results of Davenportand Heintz (1988); Brown and Davenport (2007) proving worst case CADcomplexity, and discuss what might be done. We finish by discussing lessonsfor the Satisfiability Checking community who may call CAD within SMT-solvers in Section 10, and giving a summary in Section 11.The main contributions in this paper were presented at ISSAC 2015 (Eng-land et al., 2015) and CASC 2016 (England and Davenport, 2016). Theseconference publications addressed the savings in the number of polynomialsand their degrees separately. The present paper unifies the results into acoherent whole providing a single statement of the state of the art. It alsoexpands on some details, such as the need for primitivity in Section 9. and contained a small mistake as described in Remark 3.
5e include all necessary background theory, allowing the paper to act asa tutorial for CAD with ECs, timely given the increased use of CAD outsideof computer algebra systems, as part of satisfiability checkers. We furtherexpose the results to the wider SC by considering implications for CAD inSMT-solvers in Section 10.
2. Background Material
We work under variable ordering x = x ≺ . . . ≺ x n . The main variable of a polynomial or formula (mvar) is the greatest present under the ordering. Definition 3. A Cylindrical Algebraic Decomposition (CAD) is a decompo-sition of R n into connected cells such that: • each cell is a semi-algebraic set meaning it is defined by a finite sequenceof polynomial equations or inequalities; and • the cells are arranged cylindrically meaning the projections of any twocells in the decomposition on any lower dimensional space with respectto the ordering are either equal of disjoint. The latter condition means that each CAD cell is defined by a sequence ofconditions: c ( x ) , c ( x , x ) , . . . , c n ( x , . . . , x n ) where each c i is one of: (cid:96) i ( x , . . . , x i − ) Sectors are usually defined as the regionsbetween two sections as in (2), corresponding to the intervals between realroots of a univariate polynomial. The exceptions are the two infinite sectionsat either end of the decomposition as in (3) and (1); or if there was no needto decompose at all there may be a single infinite sector with no restrictionson x . In each case the sample point is extended from that of the underlyingcell: for sections to include the algebraic number isolated for the real rootand for sectors to include any convenient number from the interval (certainlyin Q ). Together the sections and sectors form a stack over the cell in R .Taking the union of these stacks gives the CAD of R . The process maythen be repeated, each time producing a CAD of larger R i , until a CADof R n is produced. The subspaces R i decomposed are those implied by theordering: ( x )- space, ( x , x )-space, ( x , x , x )-space etc.Cells are represented at a minimum with a sample point and index . Thelatter is a list of integers, with the k th describing variable x k according to theordered real roots of the projection polynomials. If the integer is 2 i the cellis a section corresponds to the i th root (counting low to high) and if 2 i + 1it is the adjacent sector . The projection operator is chosen so polynomialsare delineable in a cell: the portion of their zero set in the cell consistsof disjoint sections. A set of polynomials are delineable if each is delineableindividually, and the sections of different polynomials are identical or disjoint.If all projection polynomials are delineable then the input polynomials mustbe sign-invariant : have constant sign in each cell of the CAD.There have been a great many extensions and optimisations of CADsince its inception, with the survey article by Collins (1998) highlightingthose from the first 20 years. Since then further highlights have included: The dimension of a cell is hence easily identified from the index. A key improvement to CAD has been in the projection operator to reducethe number of projection polynomials computed (Hong, 1990; McCallum,1998, 1999b, 2001; Brown, 2001; Bradford et al., 2013a; Han et al., 2014;Bradford et al., 2016).The minimal complete projection operator (for sign-invariant CAD) pro-posed is that of Lazard (1994), however the proof of its correctness was shownto be flawed by McCallum and Hong (2016). Shortly before this article wentto press a corrected proof was published by McCallum et al. (2019) (requiringchanges elsewhere in the CAD lifting phase). The theory in the present pa-per uses the family of projection operators by McCallum (1998, 1999b, 2001)but, in due course they may be improved by extending Lazard’s family intothe EC theory. We note that the relative savings from the ECs laid out inthe present paper would still be maintained if recast into Lazard projection.Throughout, let cont, prim, disc, ldcf and coeff denote the content, prim-itive part, discriminant, leading coefficient, and set of all coefficients of poly-nomials respectively (in each case taken with respect to a given mvar). Whenapplied to a set of polynomials we interpret these as applying the operationto each polynomial in the set. e.g.cont( A ) = { cont( f ) | f ∈ A } , coeff( A ) = ∪ f ∈ A coeff( A ) . We let res denote the resultant of a pair of polynomials, and for a setres( A ) = { res( f i , f j ) | f i ∈ A, f j ∈ A, f i (cid:54) = f j } . Recall that a set B ⊂ Z [ x ] is an irreducible basis if the elements of B areof positive degree in the mvar, irreducible and pairwise relatively prime.Throughout this section suppose B is an irreducible basis for a set of poly-nomials, and further that every element of B has mvar x n and that F ⊆ B .8e may now define the projection operators introduced respectively byMcCallum (1998, 1999b, 2001): P ( B ) := res( B ) ∪ disc( B ) ∪ coeff( B ) , (5) P F ( B ) := P ( F ) ∪ { res( f, g ) | f ∈ F, g ∈ B \ F } , (6) P ∗ F ( B ) := P F ( B ) ∪ disc( B \ F ) ∪ coeff( B \ F ) . (7)In the general case with A a set of polynomials and E ⊆ A we proceed withprojection by: letting B and F be irreducible bases of the primitive partsof A and E respectively; applying the operators as defined above; and thentaking the union of the output with cont( A ). Remark 1. We see that (6) is contained in (5) and will usually be smaller.It excludes discriminants and coefficients of B \ F which are then reinstatedby (7). It also excludes those resultants which involve two polynomials from B \ F , an exclusion that is maintained by (7). Thus we have (6) ⊆ (7) ⊆ (5) . Remark 2. The full set of coefficients of a polynomial is usually unneces-sary for CAD (Brown, 2001). We require knowledge of when the polynomial’sdegree drops, and thus the vanishing of the leading coefficient is of most im-portance. But in the case that it did vanish then the next coefficient becomesleading and thus must also be studied. To guarantee correctness in all casesthe full set is taken but most implementations will safely optimise this. E.g.if the leading coefficient is constant then it can never vanish and no furthercoefficients need to considered. Remark 3. Operator (7) is different to the P ∗ F ( B ) of McCallum (2001),which excluded the coefficients of B \ F . The 2001 definition was a mistake,pointed out to us by the anonymous referee of this paper and confirmed in aprivate communication with McCallum. However, it is not necessary for usto prove a corrected version of the theorems from that paper because, as wasnoted by McCallum (2001) (just after Theorem 2.1) if we allow the additionalcoefficients then we can assume degree invariance and thus use the existingtheorems of McCallum (1998) to validate P ∗ F ( B ) .2.3. Sign invariant CAD Projection The theorems below use the idea of order-invariance , meaning each poly-nomial has constant order of vanishing within each cell, which of courseimplies sign-invariance. We say that a polynomial with mvar x k is nullified over a cell in R k − if it vanishes identically throughout.9 heorem 1 (McCallum (1998), Thm. 1) . Let S be a connected submanifoldof R n − in which each element of P ( B ) is order-invariant. Then on S , eachelement of B is either nullified or analytic delineable . Further, the sectionsof elements of B that are not nullified are either identical or pairwise disjoint,and each element of B is order-invariant on such sections. Suppose we apply P repeatedly to generate projection polynomials. Re-peated use of Theorem 1 concludes that a CAD produced by lifting withrespect to these projection polynomials is order-invariant so long as no pro-jection polynomial with mvar x k is nullified over a cell in the CAD of R k − .This condition is known as well-orientedness . It is common for problems tobe well oriented and the condition can be easily checked for during lifting .In the case that a problem is not well-oriented we cannot conclude sign-invariance (at least over the cell in which nullification occurred). There aresome cases where we can rescue the computation (see the report by Brown(2005)) but in some cases the only option will be to use an alternative com-plete projection operator, such as that of Hong (1990). We note that theLazard operator, recently validated by McCallum et al. (2019), removes thewell-orientedness condition for sign-invariant CAD . A second theorem allows us to understand how P E ( A ) is validated. Theorem 2 (McCallum (1999b), Thm. 2.2) . Let f and g be integral poly-nomials with mvar x n and r ( x , . . . , x n − ) be their resultant. Suppose r (cid:54) = 0 .Let S be a connected subset of R n − on which f is delineable and r order-invariant. Then g is sign-invariant in every section of f over S . Suppose A was derived from a formula with EC defined by E = { f } ,and that we apply P E ( A ) once and then P repeatedly to generate projectionpolynomials. Assuming the input is well-oriented, we can use Theorem 1 toconclude the CAD of R n − order invariant for P E ( A ). The CAD of R n is thensign-invariant for E using Theorem 1 and sign-invariant for A in the sectionsof E using Theorem 2. Hence the CAD is truth-invariant for the formula. A variant on delineability defined by McCallum (1998). Recall that to lift over a cell we first substitute the cell sample point into the polyno-mials with main variable one higher: so at this stage we check if any vanish entirely. Instead a modified lifting stage checks for nullification and adapts such polynomialsto recover the lost information. .5. CAD projection with multiple ECs We now consider the case of multiple ECs. We could of course apply theprevious technology by designating one EC for special use and treating therest as any other constraint (heuristics can help with the choice (Bradfordet al., 2013b)). But this does not gain any further advantage from the addi-tional ECs, which should be reducing the dimension of our solution space. Itis important to note that we cannot simply add multiple EC defining poly-nomials into E and use P E ( A ). That would result in a CAD truth-invariantfor the disjunction of the ECs, not the conjunction implied by multiple ECs.Let us first assume that we have two ECs: one whose mvar is that ofthe system, x n , and another whose mvar is x n − . Consider applying firstthe operator P E ( A ) where E defines the first EC and then P E (cid:48) ( A (cid:48) ) where A (cid:48) = P E ( A ) and E (cid:48) ⊆ A (cid:48) contains the second EC. Unfortunately, Theorem 2does not validate this approach. While it could be applied once for the CADof R n − it cannot then validate the CAD of R n because the first application ofthe theorem provided sign-invariance while the second requires the strongercondition of order invariance. The approach is acceptable if n = 3 (since intwo variables the conditions are equivalent for squarefree bases). Example 2. We consider the formula φ = f = 0 ∧ f = 0 ∧ g ≥ with thefollowing polynomials: f = x + y + z, f = x − y + z, g = x + y + z − . The polynomials are graphed in Figure 1 where g is the sphere, f the uppersurface and f the lower. We see that f and f only meet when y = 0 andthis projection is on the right of Figure 1. It shows that the solution requires | x | ≥ √ / and z = − x . How could this be ascertained using CAD?With variable ordering z (cid:31) y (cid:31) x a sign-invariant CAD for ( f , f , g ) has 1487 cells using the Qepcad-B program by Brown (2003). We couldthen test a sample point of each cell to identify the ones where φ is true.It is preferable to use the presence of ECs. Declaring an EC to Qepcad will ensure it uses the algorithm by McCallum (1999b) based on a single useof P E ( A ) followed by P . Either choice results in 289 cells. In particular,the solution set is described using 8 cells: all have y = 0 , z = − x but the x -coordinate unnecessarily splits cells at (1 ± √ . This is identified due tothe projection polynomial d = disc y (res z ( f i , g )) . For problems with n > igure 1: The polynomials from Example 2. order-invariance of the non-EC polynomials in the sections of ECs. Thefollowing theorem explains that discriminants are required to maintain orderinvariance, along with degree invariance (and hence coefficients). Theorem 3 (McCallum (1998), Thm. 2) . Let f be a polynomial with mainvariable x n with positive degree and d = disc( f ) which we suppose to benon-zero. Let S be a connected submanifold of R n − on which f is degreeinvariant, and does not vanish identically, and in which d is order invariant.Then f is analytic delineable on S and is order-invariant in each section of f over S . Theorem 3 was used originally as a tool to prove Theorem 1: it gives usthe order invariance of polynomials and individual delineability (adding theresultants then extends this to delineability of the set). We can use it againnow to show that the strengthening of (6) with the added discriminants andcoefficients to form (7) allows for the order invariance conclusion needed forcontinued application and validation of the operator.Suppose we have a formula with two ECs, one with mvar x n and theother with mvar x n − . We may now use a reduced operator twice. We firstcalculate A (cid:48) = P E ( A ) where E contains the defining polynomial of the firstEC, and then P ∗ E (cid:48) ( A (cid:48) ) where E (cid:48) contains the defining polynomial of the other.Subsequent projections simply use P . When lifting we use: first Theorem 112o verify the CAD of R n − as order-invariant for P ∗ E (cid:48) ( A (cid:48) ); then Theorem 1 toverify the CAD of R n − delineable and order-invariant for E (cid:48) , and Theorem3 to verify it order-invariant and delineable for the individual polynomials of A (cid:48) in the sections of E (cid:48) ; and finally Theorem 1 and 2 to verify the CAD of R n order-invariant for E and sign-invariant for A in those cells that are bothsections of E and E (cid:48) . We can now maximise savings in projection when we have ECs in differentmain variables. Further, if we have two ECs with the same mvar we canusually derive another with a lower mvar by taking the resultant of the twodefining polynomials. McCallum (2001) defined this as EC propagation . Theprocess requires the two original ECs to be independent, i.e. the satisfactionof one does not imply the satisfaction of the other.Given additional ECs one can perform multiple rounds of propagation toobtain implicit ECs in a sequence of different main variables. Actually inthis case there will be more ECs than we are able to use. For example, given(independent) ECs f i ( x, y, z ) = 0 for i = 1 , , z ≺ y ≺ x thena further three implicit ECs can be found with main variable y and anotherthree with main variable x : r = res z ( f , f ) , r = res z ( f , f ) , r = res z ( f , f ) ,R = res y ( r , r ) , R = res y ( r , r ) , R = res y ( r , r ) . Of course, the latter three will not be independent (the vanishing of oneshould imply the vanishing of another) but even then there may still bequestions of efficiency over which to use. While Bradford et al. (2013b)hhave developed heuristics to help with the choice of which EC to use, thereis likely room for improvement . Example 3. Consider again the example problem from Example 2. We canpropagate the two ECs f = 0 and f = 0 to find implicit EC r = 0 asdefined above. The resultant of the two defining polynomials is − y so wemay simplify the EC to y = 0 . One possibility is the use of machine learning classifiers to make such choices. Thisis a growing topic within mathematical software, with a recent survey given by England(2018). It has been applied to CAD by Huang et al. (2014, 2016). f we declare both ECs in z to Qepcad then it will perform the propa-gation for us and use reduced projection twice. It will actually apply P E ( A ) twice (allowed since n = 3 ) to produce a CAD with 133 cells. The solutionset is now described using only 4 cells (the minimum possible). Note that d (see Example 2) was no longer produced as a projection polynomial. 3. Reductions in the Lifting Stage The first main contribution of the present paper is to realise that thetheorems from the previous section allow for significant savings in the liftingphase (beyond those achieved from reduced projection). To implement thesewe must discard two embedded principles of CAD: • That the projection polynomials are a fixed set. • That the invariance structure of the final CAD can be expressed interms of sign-invariance of polynomials.The first was also abandoned by Chen et al. (2009); Bradford et al. (2014);Jovanovic and de Moura (2012); Brown (2015), while the second by Brownand McCallum (2005); McCallum and Brown (2009). Consider Theorem 2: it allows us to conclude that g is sign-invariant in thesections of f produced over a CAD of R n − order-invariant for P { f } ( { f, g } ).Therefore, it is sufficient to perform the final lift with respect to f only (de-compose cylinders according to the roots of f but not g ). The decompositionimposes sign-invariance for f while Theorem 2 guarantees it for g in the cellswhere it matters (where those signs could change the truth of the formula). Example 4. We return to Example 2. Recall that designating either EC andusing the algorithm by McCallum (1999b) produced a CAD with 289 cells. Ifwe follow this approach but lift only with respect to the designated EC at thefinal step (implemented in the Maple package by England et al. (2014b)) weobtain a CAD with 141 cells: less than half the output. This improved lifting follows from the theorems of McCallum (1999b),but was only noticed 15 years later during the generalisation of that work14o the case of multiple formulae by Bradford et al. (2013a, 2016). Exper-iments there demonstrated its importance, particularly for problems withmany constraints: see Section 8.3 of (Bradford et al., 2016).When we apply a reduced operator at two levels then we can make suchreductions at both the corresponding lifts. Example 5. We return to the problem from Example 2. Set A = { f , f , g } and E = { f } . The first projection to eliminate z finds P E ( A ) = { y, y + 2 xy + 2 x + y − } . These are the resultants of f with f and g (after the first is simplified asdiscussed in Example 3). The discriminant of f was a constant and so couldbe discarded, as was its leading coefficient (meaning no further coefficientswere required as explained in Remark 2). Set A (cid:48) = P E ( A ) and E (cid:48) = y (since y defines an EC for the problem as discussed in Example 3). We have P E (cid:48) ( A (cid:48) ) = { R } where R = res y ( y, y + 2 xy + 2 x + y − 1) = 2 x − . The other possible entries (the discriminants and coefficients from E (cid:48) ) areall constants. We hence build a 5 cell CAD of the real line with respect tothe two real roots of R . We then lift above each cell with respect to y only,in each case splitting the cylinder into three cells about y = 0 , to give a CADof R with 15 cells.Finally, we lift over each of these 15 cells with respect to f to give 45 cellsof R . This compares to 133 from Qepcad , which used reduced projectionbut then lifted with all projection polynomials. No polynomials were nullified,so using Theorems 1 and 2, the output is concluded truth-invariant for φ . Remark 4. We note that not only is the additional lifting that Qepcad performed unnecessary for the problem at hand, it also provides no furtherstructure on the output. For example, if we had lifted with respect to f atthe final stage in Example 5 then we would be doing so without the knowledgethat it is delineable. Hence splitting the cylinder at the sample point offers noguarantee that the cells produced are sign-invariant away from that samplepoint. So the extra work does not allow us to conclude that f is sign-invariant(except on sections of f where we could have concluded it already). emark 5. The improvement outlined above not only decreases output size(and computation time) but also the risk of failure from non well-orientedinput: we only need worry about nullification of polynomials we lift with.3.2. Minimising the cells for stack generation We can achieve more savings by abandoning the aim of producing a CADsign-invariant with respect to any polynomial, instead insisting only on truth-invariance. We may then lift cells already known to be false trivially tocylinders. The idea of avoiding computations over false cells was presentedby Seidl (2006), and one could argue that it is the basis of the Partial CADfor QE problems by Collins and Hong (1991). Our contribution here is toexplain how such cells can easily be identified in the presence of ECs. Wedemonstrate with our example. Example 6. Return to the problem from Examples 2 − R produced with 15 cells in Example 5. On 5 of these 15 cellsthe polynomial R is zero and on the others it is either positive or negative.Now, φ can only be satisfied above the 5 cells, as elsewhere the two explicitEC defining polynomials cannot share a root and thus cannot vanish together.We can already conclude the truth value for the 10 cells (false) and thus wedo not need to lift over them, except in the trivial sense of extending them toa cylinder in R . Lifting over the 5 cells where R = 0 with respect to f gives15 cells, which when combined with the 10 cylinders gives a CAD of R with25 cells that is truth-invariant for φ . Remark 6. The improvements in this subsection are affecting the concludedstructure of the output . The final 25 cell truth-invariant CAD in Example6 is not sign-invariant for f . The cylinders above the 10 cells in R where R (cid:54) = 0 may have f varying sign, but since f can never equal zero at thesame time as f in these cells it does not affect the truth of φ . Identifying the 5 cells in R where R = 0 was trivial since they are simplythe sections of the second lift: those cells with second entry even in thecell index. Similarly, all sections in the third lift are those where f is zero,however, we cannot conclude that f is also zero on these as Theorem 2 Although we note that if the recent work of McCallum et al. (2019) can be extendedto ECs then such worries may be unnecessary altogether. In comparison with Remark 4. f is sign-invariant on them. So we must still finish byevaluating the polynomials at the sample points, but only for the sections.Reducing the number of cells for stack generation clearly decreases outputsize, and since the cells can be identified using only an integer parity checkcomputation time decreases (less real root isolation is performed). As de-scribed in Remark 5 for the improvements in Section 3.1, this also decreasesthe risk of non well-oriented input. 4. Algorithm We present Algorithm 1 (note that it is split into two parts) to build atruth-invariant CAD for a formula through the use of ECs. The input is aquantifier free formula in x , . . . , x n (we assume a fixed variable ordering).The output is a CAD of R n which we interpret as a set of cells where each cellcomes with a cell index and sample point. Each of these is a list of n numbers(recall Section 2.1 for how sample points and indices are represented andextended). This is the minimum information needed, but implementationsmay choose to store more, such as the formulae for cells.The first two steps process the input formula into sets of polynomials: A n contains all polynomials in the input formula; while the E k are subsetsof A n which each contain the defining polynomial for a primitive EC of mainvariable x k if one is available, and are empty otherwise. Step 2 is a simpleextraction but Step 1 is non-trivial: it must identify suitable ECs for use inprojection, and these may not be explicit in the formula (see Definition 2 andExample 1). In practice this will likely require EC propagation (as describedin Section 2.6); and EC designation (choosing which of a variety of potentialECs with the same mvar to identify for reduced projection). We discuss theintricacies of this latter step in more detail later.Steps 3 − 13 run the projection phase of the algorithm. Each projectionstarts by identifying contents and primitive parts. This is not required for E i : since we assume primitive ECs we have cont( E i ) = ∅ , prim( E i ) = E i andthe set of factors of E i contained in B i for each i .When there is no declared EC ( E i is empty) the projection operator (5)is used (step 8). Otherwise the operator (7) is used (step 13), unless it isthe very first or very last projection (step 11) when we use (6). This followsthe theory detailed in Section 2. In each case the output of the projection iscombined with the contents to form the next layer of projection polynomials.17 lgorithm 1: CAD using multiple ECs (part 1 of 2) Input : A QFF φ in variables x , . . . , x n Output: Either: D , a truth-invariant CAD of R n for φ formed from aset of cells each defined by an index and a sample point; or FAIL , if not well-oriented. Identify from φ a sequence of sets E k , k = 1 , . . . , n , each either emptyor containing a single primitive polynomial with mvar x k , where eachpolynomial defines an EC for φ ; Extract the set of defining polynomials A n ; for k = n, . . . , do Set B k to the finest squarefree basis for prim( A k ); Set C to cont( A k ); Set F k to the finest squarefree basis for E k ; if F k is empty then Set A k − := C ∪ P ( B k ); else if k = n or k = 2 then Set A k − := C ∪ P F i ( B i ); else Set A k − := C ∪ P ∗ F i ( B i ); If E is not empty then set p to be its element; otherwise set p to theproduct of polynomials in A ; Build a CAD of the real line, D , according to the real roots of p ; if n = 1 then return D ;Steps 14 − 17 construct a CAD for the real line (returning it for univariateinput), in what is called the base phase . If there is a declared EC in thesmallest variable then the real line is decomposed according to its roots;otherwise according to the roots of all the univariate projection polynomials.Steps 18 − 34 run the lifting phase, incrementally building CADs of R k for k = 2 , . . . , n . For each k there are two considerations:18 lgorithm 1: CAD using multiple ECs (part 2 of 2) for k = 2 , . . . , n do Initialise D k to be an empty set; if F k is empty then Set L := B k ; else Set L := F k ; if E k − is empty then Set C a := D k − and C b empty; else Set C a to be cells in D k − whose cell index final entry is even; Set C b := D k − \ C a ; for each cell c ∈ C a do if An element of L is nullified over c then return FAIL; Generate a stack of cells over c with respect to the polynomialsin L . Form new sample points and cell indicies as extensionsof those from c ; for each cell c ∈ C b do Extend to a single cell in R k (cylinder over c ) (the extension tothe index is simply 1 and the extension to the sample pointcan be any number); return D n . • First, whether there is a declared EC with mvar x k . If so we lift onlywith respect to this (step 23) and if not we use all projection polyno-mials with mvar x k (step 21). See Section 3.1. • Second, whether there is a declared EC with mvar x k − . If so we restrictstack generation to those cells where the EC was satisfied. These aresimply those with the final entry of the cell index I k − even (step 27).We lift the other cells trivially to a cylinder in step 34. See Section 3.2.Algorithm 1 clearly terminates. We will verify that it produces a truth-invariant CAD for the formula if the input is well-oriented, as defined below.19 efinition 4. For k = 2 , . . . , n define sets: • L k − the lifting polynomials : defining polynomial of the declared ECwith mvar x k if it exists; else all projection polynomials with mvar x k . • C k − the lifting cells : those cells in the CAD of R k − in which thedesignated EC with mvar x k − vanishes if it exists, and all cells in thatCAD otherwise.The input of Algorithm 1 is well-oriented if for k = 2 , . . . , n no element of L k is nullified over an element of C k . Theorem 4. Algorithm 1 satisfies its specification.Proof. We must show the CAD is truth-invariant for φ , unless the input isnot well-oriented when FAIL is returned.First consider input with n = 1. The projection phase would not run,with the algorithm jumping to the CAD construction in step 14, returning theoutput in step 17. If there was no declared EC then the CAD is sign-invariantfor all polynomials defining φ and thus every cell is truth invariant for φ . Ifthere was a declared EC then the output is sign-invariant for its definingpolynomial. Cells would either be intervals where the formula must be false;or points, where the EC is satisfied, and the formula either identically trueor false depending on the signs of the other polynomials.Next suppose that the input were not well-oriented (Definition 4). Fora fixed k , the conditional in steps 20 − 23 sets the lifting polynomials L k to L and the conditional in steps 24 − 28 the lifting cells C k to C a . Thusit is exactly the conditions of Definition 4 which are checked by step 30,returning FAIL in step 31 when they are not satisfied. Hence if the liftingphase completes then the input is well-oriented.From now on we suppose n > k with 2 ≤ k ≤ n define admissible cells to be those in the CAD D k − of R k − produced by Algorithm 1 where all declared ECs with mvar smallerthan x k are satisfied, or to be all cells in that CAD if there are no such ECs.Then let I ( k ) be the following statement in italics. Over admissible cells (in R k − ) the CAD D k of R k produced by Algorithm1 is: (a) order-invariant for any EC with mvar x k ; (b) order- (sign- if k = n )invariant for all projection polynomials with mvar x k on sections of the ECover admissible cells, or over all admissible cells if no EC exists. 20e shall prove that, for all k with 1 ≤ k ≤ n , I ( k ) is true. We havealready proved I (1) (the induction base). Now let 1 < k ≤ n and assume I ( k − 1) as the induction hypothesis. The truth of I ( k ), which completes theinduction, is then a consequence of the following remarks: • When E k is empty we use Theorem 1 to assert all projection polynomi-als with mvar x k are order-invariant in the stacks over admissible cellsgiving (a) and (b). • When E k is not empty and k = 2 we used the projection operator (6).Theorem 2 allows us to conclude (b) and that the EC is sign-invariantin admissible cells. The stronger property of order-invariance followssince the lifting polynomials form a squarefree basis in two variables. • When E k is not empty and k = n we used the projection operator (6).Theorem 2 allows us to conclude (b), but also (a) since in the case k = n the statement requires only sign-invariance. • When E k is not empty and 2 < k < n we used the projection oper-ator (7). Theorem 3 explains that the additions (7) makes to (6) aresufficient to conclude the statement.In each case the assumptions of the theorems are met by the inductive hy-pothesis exactly over admissible cells, according to whether E k − was empty.From the definition of admissible cells, we know that φ is false (andthus trivially truth invariant) upon all cells in the CAD of R n built overan inadmissible cell of R k , k < n . Coupled with the truth of (a) for k =1 , . . . , n , this implies the CAD of R n is truth-invariant for the conjunction ofECs (although it may not be truth-invariant for any one individually). Thetruth of (b) implies that on those cells where all ECs are satisfied, the otherpolynomials in φ are sign-invariant and thus φ is truth-invariant. 5. Worked Example We consider an example with sufficient variables to show all the featuresof the algorithm but still small enough to discuss in text. Assume variableordering z (cid:31) y (cid:31) x (cid:31) u (cid:31) v and define f := x − y + z , f := z − u + v − , g := x − ,f := x + y + z , f := z + u − v − , h := z. We consider the formula φ = f = 0 ∧ f = 0 ∧ f = 0 ∧ f = 0 ∧ g ≥ ∧ h ≥ . f and f are graphed in ( x, y, z )-space on the left of Figure 2.They meet only on the plane y = 0 and this projection is shown on the right.The surfaces f and f are graphed in ( z, u, v )-space on the left of Figure 3and meet only when z = ± 1. We consider only z = +1 due to h ≥ 0, withthis projection plotted on the right. We thus see that the solution set is { u = ± v, x = − , y = 0 , z = 1 } . To ascertain this by Algorithm 1 we must first propagate and designateECs in Step 1. We choose to use f first, calculateres z ( f , f ) = ( v − u + y − x − and assign r := v − u + y − x − 1. So r is the defining polynomial for anEC with mvar y . Similarly considerres y (cid:0) r , res z ( f , f ) (cid:1) = 16( u − v + x + 1) , res y (cid:0) r , res z ( f , f ) (cid:1) = 4( u − v ) and assign r := u − v + x + 1, r := u − v . These are defining polynomialsfor ECs with mvar x and u respectively. There is no series of resultants thatleads to an EC with mvar v (they all result in constants by that stage). Wehence identify { E j } nk =1 := { f } , { r } , { r } , { r } , { } in Step 1.The algorithm continues by extracting the defining polynomials A = { f , f , f , f , g, h } and finds B = A , F = E (in fact F i = E i for all i = 1 , . . . , A := P F ( B ) = { ( x − , ( − u + v − x + y − , ( u − v − x + y − , y , x − y } . Hence C := { x − } and B := { y, y − x, − u + v − x + y − , u − v − x + y − } . For the next projection we must use operator (7), giving A := C ∪ P ∗ F ( B ) = { x − , u − v + x + 1 , u − v , u − v + 1 } . igure 2: The polynomials f and f from Section 5.Figure 3: The polynomials f and f from Section 5. B := { x − , u − v + x + 1 } , C := { u − v , u − v + 1 } , and the next projection also uses (7) to produce A := { u − v , u − v + 1 , u − u v + v + 2 u − v } . For the final projection there is no EC and so we use operator (5) to find A := { v } . The base phase of the algorithm hence produces a 3-cell CAD ofthe real line isolating 0.For the first lift we have L = { u − v } and C a containing all 3 cells.Above the two intervals we split into 5 cells by the curves u = ± v , whileabove v = 0 we split into three cells about the origin. From these 13 cellsof R we select the 5 which were sections of u − v for C a . These are liftedwith respect to L = { r } , and the other 8 are simply extended to cylindersin R . Together this gives a CAD of R with 23 cells. The next two lifts aresimilar, producing first a CAD of R with 53 cells and finally a CAD of R with 113 cells. The entire calculation takes less than a second in Maple . Algorithm 1 could have been initialised with alternative EC designations.There were the 4 explicit ECs with mvar z , and by taking repeated resultantswe discover the following implicit ECs, in sets with decreasing mvar: { y , u − v + x − y + 1 , − u + v + x − y + 1 ,u − v + x + y + 1 , − u + v + x + y + 1 } , { x + 1 , − u + v + x + 1 , u − v + x + 1 } , { u − v } . There are hence 60 possible permutations of EC designation, but they lead toonly 3 different output sizes: 113, 103 and 93 cells. Heuristics for other ques-tions of CAD problem formulation (Dolzmann et al., 2004; Bradford et al.,2013b; Huang et al., 2014; Wilson et al., 2014) could perhaps be adapted toassist here. None of these are the minimal truth invariant CAD for φ as allsplit the CAD of R at v = 0 (from the discriminant u − v ).24 .2. Comparison with previous EC theory A sign-invariant CAD of R for the 6 input polynomials can be producedby Qepcad with 1,118,205 cells. Neither the RegularChains Library in Maple (Chen et al., 2009) nor our Maple package (England et al., 2014b)could do this in under an hour.Our implementation of the algorithm by McCallum (1999b), which usesoperator (6) once but also performs the final lift with respect to the EConly, can produce a CAD with either 3023, 10,935 or 48,299 (twice) cellsdepending on which EC is designated. The Qepcad implementation of thatalgorithm gives 11,961, 30,233, 158,475, or 158,451 cells. Comparing thesesets of figures we see the dramatic improvements from just a single reducedlift.Allowing Qepcad to propagate the four ECs (so a similar projectionphase as Algorithm 1 but then a normal CAD lifting phase) produces a CADwith 21,079 cells. By declaring only a subset of the four (which presumablychanges the designations of implicit ECs) a CAD with 5,633 cells can beproduced, still much more than using Algorithm 1.The RegularChains Library can also make use of multiple ECs , asdetailed by Bradford et al. (2014), a CAD can be produced instantly. Thereare choices with analogies to designation (England et al., 2014a)), but theyall lead to a 137 cell output. In particular, they all have an induced CAD ofthe real line which splits at v = ± v = 0.We note that our Maple implementation is unrefined and unoptimised.We do not claim it as a leading CAD implementation. The purpose of thepaper is to illustrate the state of the art in CAD with EC theory, that all CADimplementations should adapt to reproduce. The worked example shows theclear benefits of the improved lifting techniques, which we next generalisewith a complexity analysis. 6. Complexity Analysis of CAD with EC We build on recent work by Bradford et al. (2016) to measure the dom-inant term in bounds on the number of CAD cells produced. Numerousstudies have shown this to be closely correlated to the computation time(Dolzmann et al., 2004; Bradford et al., 2013a, 2014). We assume CADinput with m polynomials of maximum degree d in any one of n variables. but only the latest version from efinition 5. Consider a set of polynomials p j . The combined degree ofthe set is the maximum degree (taken with respect to each variable) of theproduct of all the polynomials in the set: max i (deg x i ( (cid:81) j p j )) . The set has the (m,d)-property if it may be partitioned into m subsets,each with maximum combined degree d . For example, { y − x, y + 1 } has combined degree 4 and thus the (1 , , { f, g } with { f g } we canreduce the number at the cost of increasing the degree, but since it is mucheasier to find the roots of { f, g } than { f g } , we do not want to do that.The ( m, d )-property, introduced in the thesis of McCallum (1985), is in somesense the optimal measure of these properties.Bradford et al. (2016) proved that if A has the ( m, d )-property then P ( A ) ∪ cont( A ) has the ( M, d )-property with M = (cid:4) ( m + 1) (cid:5) . When m > 1, we can bound M by m (but we need 2 m to cover m = 1). If A has the ( m, d )-property then so does its squarefree basis. Henceapplying this result recursively (as in Table 1) measures the growth in ( m, d )-property during projection under operator (5). After the first projection thereare multiple polynomials and so the tighter bound for M is used. Table 1: Projection under operator (5). Variables Number Degree n m dn − m d n − m d ... ... ... n − r r − m r r − d r ... ... ...1 2 n − m n − n − − d n − The number of real roots in a set with the ( m, d )-property is at most md (although in practice many will be in C \ R ). The number of cells in the26AD of R is thus bounded by twice the product of the final two entries,plus 1. Similarly, if we let d i and m i be the entries in the Number and Degreecolumns of Table 1 from the row corresponding to i variables, then the totalnumber of cells in the CAD of R n is bounded by n (cid:89) i =1 [2 m i d i + 1] = (2 md + 1) n − (cid:89) r =1 (cid:104) (cid:16) r − m r (cid:17) (cid:0) r − d r (cid:1) + 1 (cid:105) . (8)Omitting the +1s will leave us with the dominant term of the bound, whichevaluates to give the following result. Theorem 5. The dominant term in the bound on the number of CAD cellsin R n produced using (5) is (2 d ) n − m n − n − − . (9) From now on assume (cid:96) equational constraints, 0 < (cid:96) ≤ min( m, n ), all withdifferent mvar. For simplicity we assume these variables are x n , . . . , x n − (cid:96) +1 ,i.e. the first (cid:96) projections are the reduced ones. Lemma 6. Suppose A is a set with the ( m, d ) -property and E ⊂ A has the (1 , d ) -property. Then cont( A ) ∪ P ∗ E ( A ) has the (3 m, d ) -property.Proof. Bradford et al. (2016) proved that applying P E ( A ) ∪ cont( A ) gives aset of polynomials of size at most (cid:4) (3 m + 1) (cid:5) with combined degree 2 d .We now have the additional discriminant and coefficients of (7) to takecare of. Each polynomial in A \ E will generate an additional discriminantof degree at most d ( d − 1) and ( d + 1) additional coefficients of degree atmost d . Multiplying all these polynomials together gives a single polynomialof degree at most 2 d . There are m − A \ E and so in totalthis projection generates (cid:4) (3 m + 1) (cid:5) + ( m − < m polynomials of degree 2 d .We apply this recursively in the top part of Table 2, with the bottomderived via the process for P , as in Table 1.27 able 2: Projection with (7) (cid:96) times and then (5). Variables Number Degree n m dn − m d ... ... ... n − (cid:96) (cid:96) m (cid:96) − d (cid:96) n − ( (cid:96) + 1) 3 (cid:96) m (cid:96) +1 − d (cid:96) +1 ... ... ... n − ( (cid:96) + r ) 3 r (cid:96) m r (cid:96) + r − d (cid:96) + r ... ... ...1 3 ( n − − (cid:96) ) (cid:96) m n − − (cid:96) n − − d n − Define d i and m i as the entries in the Number and Degree columns ofTable 2 from the row corresponding to i variables. We can bound the numberof real roots of projection polynomials in i variables by m i d i . If we lifted withrespect to all projection polynomials the cell count would be bounded by n (cid:89) i =1 [2 m i d i + 1] = n − ( (cid:96) +1) (cid:89) i =1 [2 m i d i + 1] × n (cid:89) i = n − (cid:96) [2 m i d i + 1] (10)= (cid:96) (cid:89) s =0 (cid:2) s m ) (cid:0) s − d s (cid:1) + 1 (cid:3) × n − (cid:96) − (cid:89) r =1 (cid:104) (cid:0) r (cid:96) m r (cid:1) (cid:16) (cid:96) + r − d (cid:96) + r (cid:17) + 1 (cid:105) . Omitting the +1 from each product allows us to calculate the dominant termof the bound explicitly as(2 d ) n − m n − (cid:96) + (cid:96) − (cid:96) n − (cid:96) + (cid:96) ( (cid:96) − / . (11) Now we consider the benefit of improved lifting. Start by considering theCAD of R n − ( (cid:96) +1) . There can be no reduced lifting until this point and sothe cell count bound is given by the second product in (10), which we willdenote by ( † ). The lift to R n − (cid:96) will involve stack generation over all cells,but only with respect to the EC. This can have at most d n − (cid:96) real roots andso the CAD at most (2 d n − (cid:96) + 1) × ( † ) cells.28he next lift, to R n − (cid:96) − , will lift the sections with respect to the EC, andthe sectors only trivially (to produce the same number of cylinders). Hencethe cell count bound is(2 d n − ( (cid:96) − + 1)( d n − (cid:96) )( † ) + ( d n − (cid:96) + 1)( † )with dominant term 2 d n − ( (cid:96) − d n − (cid:96) ( † ). Subsequent lifts follow the same pat-tern and so 2 d n d n − . . . d n − ( (cid:96) − d n − (cid:96) ( † ) is the dominant term in the bound for R n . This evaluates to give the following result. Theorem 7. Consider the CAD of R n produced using Algorithm 1 in thepresence of ECs in the top (cid:96) variables of the ordering. The dominant termin the bound on the number of cells is (cid:96) (cid:89) s =0 (cid:2) s − d s (cid:3) n − (cid:96) − (cid:89) r =1 (cid:104) (cid:16) r (cid:96) m r (cid:96) + r − d (cid:96) + r (cid:17)(cid:105) = (2 d ) n − m n − (cid:96) − − (cid:96) (cid:96) n − (cid:96) − (cid:96) . (12) The bound in Theorem 7 is strictly less than the one in Theorem 5. Thedouble exponent of m has decreased by the number of ECs; the result of theimproved projection in (11). Then improved lifting has reduced the singleexponents in the bound further still in (12).However, even with this maximal use of ECs, CAD is still doubly expo-nential in the number of variables due to the first term in (12), the one whosedegree is the degree term. This should not be surprising: the theory of ECsis based around reducing the number of polynomials identified in each pro-jection, but not the number of projections which controls the degree growth.Indeed, we can see directly from Tables 1 and 2 that at the end of projectionwe are dealing with univariate polynomials of degree doubly exponential in n regardless of whether we used ECs or not. Reduced lifting allows us toavoid isolating the real roots of many of these polynomials, but we will al-ways need to consider at least one (the EC defining polynomial). To controldegree growth we must show this to be of a lower degree. 7. Controlling Degree Growth The doubly exponential degree comes from the use of iterated resultantcalculations during projection: the resultant of two degree d polynomials is29he determinant of a 2 d × d matrix whose entries all have degree at most d , and thus a polynomial of degree at most 2 d . This increase in degreecompounded by ( n − 1) projections gives the first term of the bound (9).Note that the derivation of ECs themselves via EC propagation (Section 2.6)is itself such an iterated resultant calculation. So even though the EC theoryof the previous sections allows us to avoid constructing or lifting with manysuch polynomials, the ECs themselves encode the degree.The purpose of the resultant in CAD construction is to ensure that thepoints in lower dimensional space where polynomials vanish together areidentified, and thus that the behaviour over a sample point in a lower di-mensional cell is indicative of the behaviour over the cell as a whole. Theiterated resultant (and discriminant) calculations involved in CAD have beenstudied previously, for example by McCallum (1999a) and Lazard and Mc-Callum (2009). We will follow the work of Bus´e and Mourrain (2009) whoconsider the iterative application of the univariate resultant to multivariatepolynomials, demonstrating decompositions into irreducible factors involv-ing the multivariate resultants . They show that the approach will identifypolynomials of higher degree than the true multivariate resultant and thusmore than required for the purpose of identifying implicit equational con-straints. For example, given 3 polynomials in 3 variables of degree d the truemultivariate resultant has degree O ( d ) rather than O ( d ).The key result of Bus´e and Mourrain (2009) for our purposes follows.Note that this considers polynomials of a given total degree . However, theCAD complexity analysis discussed above and later is (following previouswork on the topic) with regards to polynomials of degree at most d in a givenvariable. For clarity we use the Fraktur font when discussing total degreeand Roman fonts when the maximum degree. Corollary 8 (Bus´e and Mourrain (2009, Cor. 3.4)) . Given three polynomials f k ( x , y, z ) of the form f k ( x , y, z ) = (cid:88) | α | + i + j ≤ d k a ( k ) α,i,j x α y i z j ∈ S [ x ][ y, z ] , where S is any commutative ring, then the iterated univariate resultant res y (cid:0) res z ( f , f ) , res z ( f , f ) (cid:1) ∈ S [ x ] They follow the formalisation of Jouanolou (1991) as laid out in (Bus´e and Mourrain,2009, § s of total degree at most d d d in x , and we may express it in multivariateresultants (Jouanolou, 1991), denoted Res , as res y (cid:0) res z ( f , f ) , res z ( f , f ) (cid:1) = ( − d d d Res y,z ( f , f , f ) × Res y,z,z (cid:48) (cid:0) f ( x , y, z ) , f ( x , y, z ) , f ( x , y, z (cid:48) ) , δ z,z (cid:48) ( f ) (cid:1) . (13) Moreover, if the polynomials f , f , f are sufficiently generic and n > , thenthis iterated resultant has exactly total degree d d d in x and both resultantson the right hand side of the above equality are distinct and irreducible. Remark 7. Although not stated as part of the result by Bus´e and Mour-rain (2009), under these generality assumptions, Res y,z ( f , f , f ) has totaldegree d d d and the second resultant on the right hand side of (13) has totaldegree d ( d − d d (see (Bus´e and Mourrain, 2009, Proposition 3.3) and(McCallum, 1999a, Theorem 2.6)). Bus´e and Mourrain (2009) interpret this result in the following quote: .The resultant r := res z ( f , f ) defines the projection of the in-tersection curve between the two surfaces { f = 0 } and { f = 0 } .Similarly, r := res z ( f , f ) defines the projection of the inter-section curve between the two surfaces { f = 0 } and { f = 0 } .Then the roots of res y ( r , r ) can be decomposed into two dis-tinct sets: the set of roots x such that there exists y and z suchthat f ( x , y , z ) = f ( x , y , z ) = f ( x , y , z ) , and the set of roots x such that there exist two distinct points( x , y , z ) and ( x , y , z (cid:48) ) such that f ( x , y , z ) = f ( x , y , z ) and f ( x , y , z (cid:48) ) = f ( x , y , z (cid:48) ) . The first set gives rise to the term Res y,z ( f , f , f ) in the factor-ization of the iterated resultant res y (res , res ), and the secondset of roots corresponds to the second factor.If the f i are all ECs then only the first set are of interest to us as the truthof the formula of interest needs them all to vanish at once. However, for ageneral CAD construction, the second set of roots may also be necessary asthey indicate points where the geometry of the sectors changes. The quote contains a correction in the description of the second set of roots (removinga dash from y in the second distinct point). The mistake was identified by the anonymousreferees of (England and Davenport, 2016). .2. How large are these resultants? Consider three ECs defined by f , f and f of degree at most d in eachvariable separately ; and that we wish to eliminate two variables z = x n and y = x n − . We may na¨ıvely set each d i = nd to bound the total degree.The following approach does better. Let K = S [ x , . . . , x n − , y, z ] and L = S [ ξ , . . . , ξ N , y, z ]. Only a finite number of monomials in x , . . . , x n − occur as coefficients of the powers of y , z in f , f and f . Map each suchmonomial x α = (cid:81) n − i =1 x α i i to (cid:102) m j := ξ max α i j (using a different ξ j for each mono-mial ) and let (cid:101) f i ∈ L be the result of applying this map to the monomialsin f i . Operation (cid:101) commutes with taking resultants in y and z (but not x i ).The total degree in the ξ j of (cid:101) f i is the same as the maximum degree in allthe x , . . . , x n − of f i , i.e. bounded by d , and hence the total degree of the (cid:101) f i in all variables is bounded by 3 d ( d for the ξ i , d for y and d for z ). If weapply (13) to the (cid:101) f i , we see that res y (cid:0) res z ( (cid:101) f , (cid:101) f ) , res z ( (cid:101) f , (cid:101) f ) (cid:1) has a factorRes y,z ( (cid:101) f , (cid:101) f , (cid:101) f ) of total degree (in the ξ j ) (3 d ) . Hence, by inverting (cid:101) , wemay conclude Res y,z ( f , f , f ) has maximum degree, in each x i , of (3 d ) .The results of Jouanolou (1991) and Bus´e and Mourrain (2009) applyto any number of eliminations. In particular, if we have eliminated not2 but (cid:96) − x n − (cid:96) +1 ...x n ( f n − (cid:96) , . . . , f n )of maximum degree (cid:96) (cid:96) d (cid:96) in the remaining variables x , . . . , x n − (cid:96) as the lastimplicit EC. Therefore the multivariate resultants we need, Res x n − (cid:96) +1 ...x n , onlyhave singly-exponential growth, rather than the doubly-exponential growthof the iterated resultants: can we compute them? A Gr¨obner Basis G is a particular generating set of an ideal I (within thering of polynomials over an algebraically closed field) defined with respectto a monomial ordering. One definition is that the ideal generated by theleading terms of I is generated by the leading terms of G . Gr¨obner Bases(GB) allow properties of the ideal to be deduced such as dimension andnumber of zeros and so are one of the main practical tools for working withpolynomial systems. Their properties and an algorithm to derive a GB forany ideal were introduced in the 1965 PhD thesis of Buchberger (2006) (sincerepublished). There has been much research to improve and optimise GB We could economise: if x x (cid:55)→ ξ , then we could map x x to ξ rather than a new ξ . Since this is for the analysis and not in implementation, we ignore such possibilities. F algorithm of Faug`ere (2002) perhaps the most usedapproach currently.Like CAD the calculation of a GB is necessarily doubly exponential inthe worst case (Mayr and Meyer, 1982) (with lexicographic monomial order-ing). Recent work by Mayr and Ritscher (2013) showed that rather thanbeing doubly exponential with respect to the number of variables present thedependency is in fact on the dimension of the ideal. Despite this bound GBcomputation can often be done very quickly usually to the point of instan-taneous for any problem tractable by CAD, as demonstrated for example byWilson et al. (2012).A reasonably common CAD technique is to precondition systems withmultiple ECs by replacing the ECs by their GB. I.e. let E = { e , e , . . . } be a set of polynomials; G = { g , g , . . . } a GB for E ; and B any Booleancombination of constraints, f i σ i 0, where σ i ∈ { <, >, ≤ , ≥ , (cid:54) = , = } ) and F = { f , f , . . . } is another set of polynomials. ThenΦ := ( e = 0 ∧ e = 0 ∧ . . . ) ∧ B and Ψ := ( g = 0 ∧ g = 0 ∧ . . . ) ∧ B are equivalent. A truth-invariant CAD for Ψ is also truth-invariant for Φ.If we consider GB preconditioning of CAD in the knowledge of the im-proved projection schemes for ECs then we see an additional benefit. Itprovides implicit ECs which are not in the main variable of the system re-moving the need for EC propagation. Since our aim is to produce one ECin each of the last (cid:96) variables, we need to choose an ordering on monomialswhich is lexicographic with respect to x n (cid:31) x n − (cid:31) · · · (cid:31) x n − (cid:96) +1 : it does notactually matter (in regards to the theory) how we tie-break after that .Let us suppose that we have (cid:96) ECs f , . . . , f (cid:96) (at least one of them, say f must include x n , and similarly we can assume f includes x n − and so on),such that these imply (even over C ) that the last (cid:96) variables are determined(not necessarily uniquely) by the values of x , . . . , x n − (cid:96) . Then the vanishingof polynomials f , Res x n ( f , f ), Res x n ,x n − ( f , f , f ) etc. are all implied bythe ECs. Hence either they are in the GB, or they are reduced to 0 by theGB, which implies that smaller polynomials are in the GB. Hence our GB willcontain polynomials (which are ECs) of degree (in each variable separately)at most d, d , d , . . . , (( (cid:96) + 1) d ) (cid:96) +1 . Research suggests that ‘total degree reverse lexicographic in the rest’ is most efficient. (cid:96) reduced CAD projections in the presence of ECs before reverting to standardprojection), to the more general case of having any (cid:96) of the projections bereduced. There are two routes to include the above suggestion in Algorithm 1.1. Directly replace the explicit ECs in φ by those from the GB as suggestedabove. This is a pre-processing of the input to Algorithm 1. Theidentification of ECs in Step 1 involves only a minimal designationchoice when there are multiple explicit ECs in φ with the same mvar.2. Encode this process into a sub-algorithm for Step 1. The GB polyno-mials become additional options for designated ECs along with thosefrom EC propagation and choices are made based on minimal degree orsome other criteria (Wilson et al., 2012; Huang et al., 2016). However,in this case, if GB polynomials are designated they must be added tothe input set A n (a reinterpreting of Step 2 so it extracts both from φ and { E k } nk =1 ).The first approach is the one commonly used in implementations (and theone assumed in later discussions). The benefit of the second is that it capsany increase in the number of polynomials from the use of GBs.It is unlikely that the GB would produce more polynomials in the mainvariable than explicit ECs (since we are starting with a generating set all inthe main variable and deriving another which would mostly not be) but wehave yet to rule it out. Of course, the number of polynomials in the inputcan bear little relation to the number generated by projection. But withthe second approach any increase in the initial m is capped to the numberof additional designated ECs taken from the GB. The second option maybecome preferable in the event of development of a good (cheap) heuristic.34 . Evaluating the Use of GBs for ECs Let us work with variable ordering z (cid:31) y (cid:31) x (cid:31) w ; polynomials f := xy − z − w + 2 z, f := x + y + z + w + z,f := − w − y − z + x + z h := z + w ;and the following QFF for which we seek a truth-invariant CAD. φ := f = 0 ∧ f = 0 ∧ f = 0 ∧ h > . In theory, we could analyse this system with a sign-invariant CAD for thefour polynomials however none of the CAD implementations in Maple coulddo this within 30 minutes. Instead, let us take advantage of the ECs. Thereare 3 explicit ECs all with mvar z meaning only one can be designated forthe first projection. We can propagate to find additional implicit ECs: r = res z ( f , f ) = y + 2 xy + (3 x − w + 2 w + 6) y + (2 x − w x + 2 wx − x ) y + x − w x + 2 wx + 6 x + w − w + 4 w + 6 w,r = res z ( f , f ) = y + 2 xy + ( x − x + 2) y + ( x − x ) y + w + x − xr = res z ( f , f ) = 4 y + x + 2 x − w x + 2 wx + 3 x − w x + 2 wx − x + w − w + 3 w + 2 w ;all with main variable y . Continuing the propagation with R := res y ( r , r ) , R := res y ( r , r ) , R := res y ( r , r );gives the three polynomials in the Appendix, each degree 16 in x . These aredifferent polynomials but a numerical plot shows them all to have overlap-ping real part. All possible resultants to eliminate x evaluate to 0.Step 1 could hence produce 3 × × , when using a time limit of 30 minutes. Ofthe 6 completed there was an average of 423 cells calculated in 113 seconds. most easily verified by comparing the final lines of each. The common factor of these 6 was the designation of r for second projection. f , r and R .Now consider instead taking a GB of { f , f , f } . We use a plex monomialordering on the same variable ordering as the CAD to achieve a basis: g = 2 z + x + x − w + w,g = 4 y + x + 2 x + ( − w + 2 w + 3) x + (2 w + 2 w − x + w − w + 3 w + 2 w,g = 4 yx − x − x + (2 w − w − x + (2 w − w − x − w + 2 w − w − w,g = (4 w − w + 4 w + 16 w ) y + x + 4 x + ( − w + 4 w + 18) x + ( − w + 12 w + 36) x + (5 w − w − w + 40 w + 53) x + (10 w − w − w + 52 w + 32) x − (2 w − w − w + 32 w − w − w − x − w + 6 w − w − w + 12 w + 16 w,g = x + 4 x + ( − w + 4 w + 18) x + ( − w + 12 w + 36) x + (6 w − w − w + 44 w + 53) x + 4(3 w − w − w + 15 w + 8) x + ( − w + 12 w + 6 w − w + 26 w + 64 w + 16) x + ( − w + 12 w − w − w + 24 w + 32 w ) x + w − w + 6 w + 4 w − w + 8 w + 16 w . This is an alternative generating set for the ideal defined by the explicitECs and thus all g i = 0 are ECs for φ . Note that the degrees of the GBpolynomials (with respect to any one variable) are on average lower (andnever greater) than those of the (corresponding) iterated resultants.Deriving ECs this way removes the choice for EC with mvar z or x butthere are 3 possibilities for the designation with mvar y . Designating g yields83 cells while either g or g result in 55 cells. All 3 configurations took lessthan 20 seconds to compute (with designating g the quickest). We now consider how using a GB to produce the designated ECs willimprove the complexity analysis of Section 6. The number of polynomialswill be the same as found earlier in Table 2. But we must now track sepa-rately the degree of the designated EC and the degree of the main projectionpolynomials as they are derived differently. For simplicity we will ignore theconstant term and focus on the exponents.36s described above, the designated ECs will have degrees d, d , d , . . . as tracked in the middle column of Table 3. For the projection polynomialsin the top half of the table the reduced projection operator P F ( B ) will takediscriminants and coefficients of the EC polynomial; and resultants of themwith the other projection polynomials. Thus the highest degree polynomialproduced will have degree that is the sum of the degree of the EC polynomialand the highest degree other polynomial. This generates the right columnof Table 3. We see that the degree exponents here form the so called LazyCaterer’s sequence otherwise known as the Central Polygonal Numbers .The remaining projections recorded in the bottom half of the table use thesign-invariant projection operator and so the degree is squared each time. Table 3: Maximum degree of projection polynomials produced for CAD when using pro-jection operator (7) for the first (cid:96) projections and then (5) for the remaining. Variables Maximum DegreeEC Others n d dn − d d n − d d n − d d ... ... ... n − (cid:96) (cid:96) (cid:96) d (cid:96) +1 d (cid:96) ( (cid:96) +1)( / )+1 n − ( (cid:96) + 1) d (cid:96) ( (cid:96) +1)+2 n − ( (cid:96) + 2) d (cid:96) ( (cid:96) +1)+2 n − ( (cid:96) + 3) d (cid:96) ( (cid:96) +1)+2 ... ... n − ( (cid:96) + r ) d r − (cid:96) ( (cid:96) +1)+2 r ... ...1 d n − (cid:96) − (cid:96) ( (cid:96) +1)+2 n − (cid:96) − Now let us use the the top line of equation (10) derived earlier as the The On-Line Encyclopedia of Integer Sequences (2010), Sequence Number A000124,https://oeis.org/A000124 d i . The term with base d may be computed by (cid:81) (cid:96)s =0 (cid:0) (cid:96) (cid:96) d s +1 (cid:1) (cid:81) n − (cid:96) − r =1 (cid:0) d r − (cid:96) ( (cid:96) +1)+2 r (cid:1) . The exponent of d evaluates to2 ( n − (cid:96) ) 12 ( (cid:96) + (cid:96) + 2) − ( (cid:96) + (cid:96) ) − . (14) Above, we tracked only the degree of the monomial in the bound, and notthe constants that multiply it. As well as for simplicity, this was because wecould not find a closed form expression for the product of constants generated.However, it is simple to check that the constant factors derived by the GBgrow exponentially in (cid:96) while those from iterated resultants grow doublyexponentially. Further, the constant term can be shown to be strictly lowerfor all but the first few projections. Finally, note that in Section 7.1 we sawthat the multivariate resultant was itself a factor of the iterated resultant. m term Let us compare the derived exponent (14) with that for the term withbase m from (12): 2 n − (cid:96) − 2. We see that both show the double exponent ofthe complexity bound reducing by (cid:96) , the number of ECs used. However, thereduction in degree is not quite as clean as the exponential term in the singleexponent is multiplied by a quadratic in (cid:96) . This is to be expected as thesingly exponential dependency on (cid:96) in the Number column of Table 1 wasonly in the term with constant base while for Table 2 the term with base d is itself single exponential in (cid:96) . In Section 8.1 we showed the significant savings available if one derivedECs with GBs and in Section 8.2 we showed this follows through into atheoretical lowering of the worse case complexity bound. The latter offersthe first theoretical justification for what is a widely used CAD optimisation.However, experimental studies by Buchberger and Hong (1991); Wilsonet al. (2012); Huang et al. (2016) have shown that it is not always benefi-cial to pre-process CAD with GB. The most recent experiment by Huanget al. (2016) found that 75% of a data set of 1200 randomly generated CAD38roblems benefited from GB preconditioning. So it is certainly worth givingconsideration to how ECs are derived. As noted earlier, the cost of com-puting the GB itself is usually negligible in comparison to the CAD so it isreasonable to first compute the GB and then decide whether or not to use it.A simple man-made heuristic was presented by Wilson et al. (2012) to makethe decision while Huang et al. (2016) described the training of a machinelearning classifier to decide.There is no contradiction here with the complexity analysis above: theanalysis is for the worst case and large input and makes no claim to the aver-age complexity or what happens for smaller input. However, we hypothesisethat repeating those studies using the new multiple EC technology would seea reduction in the cases where GB hindered CAD. 9. Caveats and the Need for Primitivity There are a few caveats to the results presented above. First, Algorithm1 can fail for non-well oriented input, but as noted earlier, this restrictionmay be lifted if the new theory for Lazard’s projection operator validatedby McCallum et al. (2019) can be extended to the EC case. Second, thecomplexity analysis (both in Section 6 and 8.2) assumes the designated ECsare in strict succession at the start of projection. For the first analysis it wasonly made to simplify the working, but for the second analysis it was crucial.However, Algorithm 1 itself does not carry this restriction and savings willstill clearly be made in this case.The only substantial restriction in the paper is that the designated ECs be defined by primitive polynomials in the main variable of the projection.The restriction is common in the literature and present in all the underlyingtheory of McCallum (1999b, 2001).There are analogies to be made with the well-oriented issue (when aprojection factor is nullified). Non-primitive projection factors are not aproblem for general CAD because we can factorize prior to projection (order-invariance of factors implies order-invariance of the product). We cannot dothe same for a non-primitive EC though, as the next example shows. Also,unlike the well-orientedness issue, the primitivity restriction it is not likelyto be removed by developing a Lazard family of EC projection operators. whether they be explicit in the formula or calculated via iterated results or GBs. .1. Possibilities to use non-primitive ECs? Example 7. Consider φ := zy = 0 ∧ ϕ. under ordering · · · (cid:31) z (cid:31) y (cid:31) . . . .Polynomial zy is not primitive, so Algorithm 1 cannot use the explicit EC. We may be tempted to take E = { z } as the primitive part, project withoperator (6) and include the content y in the first projection. The CAD of( y, . . . )-space would be sign-invariant for y and thus the CAD of ( z, y, . . . )-space truth invariant for the EC (over admissible cells). But we can no longersay only sections are admissible for the next lift as there may be cells with z (cid:54) = 0 and y = 0. We must instead lift over all cells of ( y, . . . )-space, saying: • Over sections of y : z is no longer an EC (as zy = 0 is forced by y = 0),so we lift onto all polynomials. • Over sectors of y : z is an EC, so we only lift with respect to this.In ( z, y, . . . )-space, some cells are admissible (either y = 0 or z = 0) and therest are not ( zy (cid:54) = 0). There are difficulties in forming a general algorithm:1. What would happen if the main variable of the content with respect to x i were not x i − ?2. What if the content with respect to x i were itself not primitive as apolynomial in x i − ?3. What if there were another equational constraint in x i − ?The first two can probably (but we have not implemented this yet) be solvedby replacing the logic at lines 24– in the algorithm by a dynamic determina-tion of which cells were admissible.Alternatively in that example we might rewrite φ as φ := ( z = 0 ∧ ϕ ) ∨ ( y = 0 ∧ ϕ ) , (15)so each clause has its own EC. The theory of truth-table invariant CADs(TTICADs) developed by Bradford et al. (2013a, 2016) is designed to dealwith such input. More generally, given a formula of the form( f = 0 ∧ g > ∨ ( f = 0 ∧ g > , (16)TTICAD allows for an improvement on the standard EC theory. Since f f = 0 is an implicit EC of (16) standard EC theory allows us to avoidstudying the g i away from where any f i is zero. By utilising a TTICAD from(Bradford et al., 2013a) we can also avoid studying the g i away from where40he corresponding f i is zero. This approach was extended in (Bradford et al.,2016) to also consider formulae such as( f = 0 ∧ g > ∨ ( f > ∧ g > , (17)where there is no single implicit EC. Although (15) looks closer to (16) it isactually more like (17) since y is not an EC in the main variable.Although there is the possibility of applying TTICAD for this problemit would first require its own extension to use beyond the first projection(analogous to the present work for standard ECs). We can see the importance of the primitivity restriction in the classiccomplexity results of Brown and Davenport (2007), Davenport and Heintz(1988). Both rest on the following construction. Let P k ( x k , y k ) be the state-ment x k = f ( y k ) and then define recursively P k − ( x k − , y k − ) := (18) ∃ z k ∀ x k ∀ y k (cid:124) (cid:123)(cid:122) (cid:125) Q k (( y k − = y k ∧ x k = z k ) ∨ ( y k = z k ∧ x k − = x k )) (cid:124) (cid:123)(cid:122) (cid:125) L k ⇒ P k ( x k , y k ) . This is ∃ z k ( z k = f ( y k − ) ∧ x k − = f ( z k )), i.e. x k − = f ( f ( y k − )). Repeatednesting of this procedure builds the doubly-exponential growth. So P k − ( x k − , y k − ) = Q k − L k − ⇒ ( Q k L k ⇒ P k ( x k , y k )) , (19)gives x k − = f ( f ( f ( f ( y k − )))) etc. Rewriting (19) in prenex form gives P k − ( x k − , y k − ) = Q k − Q k ¬ L k − ∨ ¬ L k ∨ P k ( x k , y k ) . (20)The negation of (20) is therefore ¬ P k − ( x k − , y k − ) = Q k − Q k L k − ∧ L k ∧ ¬ P k ( x k , y k ) , (21)where the operator interchanges ∀ and ∃ . Now, L k can be rewritten as L k = ( y k − = y k ∨ y k = z k ) ∧ ( y k − = y k ∨ x k − = x k ) ∧ ( x k = z k ∨ y k = z k ) ∧ ( x k = z k ∨ x k − = x k ) (22)41nd further L k = ( y k − − y k )( y k − z k ) = 0 ∧ ( y k − − y k )( x k − − x k ) = 0 ∧ ( x k − z k )( y k − z k ) = 0 ∧ ( x k − z k )( x k − − x k ) = 0 , (23)which shows L k to be a conjunction of (non primitive) ECs. This is truefor any L i , hence the propositional part of (21) is a conjunction of eightECs, mostly non primitive, and ¬ P k ( x k , y k ). Hence by induction we havethat the whole family of examples ¬ P i may be written as complete conjunc-tion of (mostly non primitive) ECs. Furthermore there are equalities whosemain variables are the first variables to be projected if we try to producea quantifier-free form of (21). But that quantifier-free form describes thecomplement of the semi-algebraic varieties in (Brown and Davenport, 2007)or (Davenport and Heintz, 1988) (depending which P k we take) and thesehave doubly-exponential complexity in n .So we observe that the classical results proving the doubly exponentialcomplexity of CAD are not tackled by our EC technology. 10. Lessons for SC The SC community already appreciates that the logical structure of CADinput is important and should be exploited where ever possible. The mainadditional lesson from the present paper is that this exploitation can takeplace not only at the Boolean skeleton level but also in the computer algebra. There are high barriers to implementing CAD without the support ofa computer algebra system, however, SMT solvers such as SMT-RAT byLoup et al. (2013); Kremer and ´Abrah´am (2019) and Z3 by Jovanovic andde Moura (2012) show it is possible. Indeed, the developers of SMT-RAT are now beginning to expand their CAD module to include a variety of projec-tion operators (Viehmann et al., 2017) and even EC functionality as describedby Haehn et al. (2018).One particular barrier is the need multivariate factorization algorithms,which those developing in a computer algebra system can take for granted butrepresent a significant implementation cost. On this point we highlight to theSMT community the availability of CoCoALib which is a free C++ librarythat can perform computer algebra computations without the requirement for42he accompanying Computer Algebra System (in this case CoCoA ) (Abbottand Bigatti, 2014). Further, CoCoA is now actively developing features foruse in SMT as described by Abbott and Bigatti (2017); Abbott et al. (2018). A key requirement for the effective use of CAD by SMT-solvers is thatthe CAD technology be incremental: that polynomials can be added andremoved to the input with the data structures of the CAD edited ratherthan recalculated. Such incremental CAD algorithms are now under devel-opment as part of the SC by Kremer and ´Abrah´am (2019); Cowen-Riversand England (2018).An additional advantage from incremental CAD would be with regardsto the issue of well-orientedness. I.e. if a particular operator is found to notbe well-oriented at the end of a CAD calculation the next step would be torevert to a less efficient operator which is a superset of the original. Refiningan existing decomposition should be cheaper than recomputing from scratch.Although on this point, the development of the Lazard projection theory mayremove the well-orientedness condition all together.However, the use of CAD with ECs incrementally requires additionaldevelopment work. First, it introduces additional decisions to be taken suchas EC designation and whether to pre-processing with GB (not to mentionwhether that can also be done incrementally). Second, this growing numberof decisions needs to be taken in tandem, prompting exponential growthin the number of possibilities that overwhelms existing heuristics. Machinelearning techniques may be one way forward, as outlined by England (2018).Finally, existing heuristics that guide the Boolean search may not besuitable since the use of ECs could prompt what appears as strange behaviourin the SMT context. For example, removing a constraint that was equationalcould actually grow the output CAD since it necessitates the use of a largerprojection operator. Correspondingly, adding an equational constraint couldallow a smaller operator and shrink the output. SMT solver search heuristicswill need to be adapted to handle these possibilities.43 1. Summary We have presented much of the state of the art in the theory of CAD withEquational Constraints. This included how ECs may be leveraged for savingsin the lifting phase as well as projection. We demonstrated the benefits ofthe theory with worked examples and complexity analysis. The latter showsthat the worst CAD bound has double exponent that reduced from n bythe number of ECs. Crucially, this is the global double exponent coveringboth the number and degree of polynomials, if we allow for Groebner Basispre-processing.The main avenues for future work are an exploration of dealing with non-primitive ECs; the extension of the Lazard projection operator to a familyof operators for ECs; the development of heuristics for choosing which ECsto designate; and the development of incremental EC technology. We notethat the current results and any future progress have benefits not only forSymbolic Computation but the wider SC community. Acknowledgements This work was originally supported by EPSRC grant EP/J003247/1 andlater by EU H2020-FETOPEN-2016-2017-CSA project SC (712689).We are grateful to all the anonymous referees of this paper, and alsothose of our conference papers at ISSAC 2015 (England et al., 2015) andCASC 2016 (England and Davenport, 2016), for many helpful comments.We are particularly grateful to the referee who pointed out the mistake inthe literature on operator (7) and Dr McCallum for discussing this with us.We also thank Prof. Buchberger for reminding JHD that Gr¨obner baseswere applicable to the problem of degree growth.44 ppendix A. The Iterated Resultants From Section 8.1 R := res( r , r , y ) = x + 8 x + ( − w + 8 w + 64) x + ( − w + 56 w + 288) x + (28 w − w − w + 400 w + 1138) x + (168 w − w − w + 1552 w + 2912) x + ( − w + 168 w + 648 w − w − w + 5328 w + 6336) x + ( − w + 840 w + 1400 w − w − w + 11368 w + 7808) x + (70 w − w − w + 3080 w − w − w + 4860 w + 20816 w + 7381) x + (280 w − w + 80 w + 6080 w − w − w + 22840 w + 20192 w + 920) x + ( − w + 280 w − w − w + 4960 w + 3200 w − w + 2584 w + 40840 w + 16040 w + 2024) x + ( − w + 840 w − w − w + 12016 w − w − w + 30136 w + 22032 w + 624 w + 736) x + (28 w − w + 396 w + 160 w − w + 6576 w + 4520 w − w + 13154 w + 37456 w + 1464 w − w + 5968) x + (56 w − w + 1192 w − w − w + 12496 w − w − w + 37240 w + 13472 w − w + 1984 w + 3072) x + ( − w + 56 w − w + 520 w + 72 w − w + 7664 w − w − w + 20424 w + 20056 w − w − w + 4608 w + 2304) x + ( − w + 56 w − w + 808 w − w − w + 6184 w − w − w + 19696 w + 3872 w − w − w + 4608 w ) x + w − w + 52 w − w + 454 w − w − w + 3352 w − w − w + 8200 w + 2080 w − w − w + 2304 w R := res( r , r , y ) = x + 8 x + ( − w + 8 w + 28) x + ( − w + 56 w + 48) x + (28 w − w − w + 160 w − x + (168 w − w + 80 w + 184 w − x + ( − w + 168 w + 108 w − w + 852 w − w − x + ( − w + 840 w − w + 360 w + 1872 w − w + 2000) x + (70 w − w + 220 w + 560 w − w + 3232 w − w + 224 w + 4537) x + (280 w − w + 2720 w − w − w + 6016 w − w + 7496 w + 2552) x + ( − w + 280 w − w + 480 w + 2488 w − w + 9384 w − w − w + 12008 w − x + ( − w w − w + 5840 w − w − w + 21104 w − w + 12552 w + 3888 w − x + (28 w − w + 612 w − w + 498 w + 3648 w − w + 17360 w − w − w + 19032 w − w − x + (56 w − w + 1552 w − w + 7296 w − w − w + 25880 w − w + 13472 w + 1856 w − w + 1536) x + ( − w + 56 w − w + 880 w − w + 1616 w + 2468 w − w + 15828 w − w − w + 9792 w − w + 2304) x + ( − w + 56 w − w + 1096 w − w + 4600 w − w − w + 9592 w − w + 5312 w + 4672 w − w + 4608 w ) x + w − w + 52 w − w + 646 w − w + 2012 w − w − w + 4328 w − w + 2368 w + 2320 w − w + 2304 w R := res( r , r , y ) = x + 8 x + ( − w + 8 w + 44) x + ( − w + 56 w + 160) x + (28 w − w − w + 272 w + 430) x + (168 w − w − w + 856 w + 816) x + ( − w + 168 w + 444 w − w − w + 1952 w + 1092) x + ( − w + 840 w + 560 w − w + 32 w + 3032 w + 736) x + (70 w − w − w + 2240 w − w − w + 2716 w + 3120 w − x + (280 w − w + 480 w + 3440 w − w − w + 5840 w + 1128 w − x + ( − w + 280 w − w − w + 3128 w + 960 w − w + 3216 w + 5860 w − w − x + ( − w + 840 w − w − w + 5568 w − w − w + 7848 w + 984 w − w − x + (28 w − w + 276 w + 400 w − w + 2848 w + 1880 w − w + 3582 w + 5704 w − w − w + 720) x + (56 w − w + 880 w − w − w + 4800 w − w − w + 6968 w + 32 w − w + 448 w + 512) x + ( − w + 56 w − w + 208 w + 308 w − w + 1972 w + 432 w − w + 2920 w + 2552 w − w − w + 1024 w + 256) x + ( − w + 56 w − w + 424 w − w − w + 1744 w − w − w + 2928 w − w − w + 384 w + 512 w ) x + w − w + 36 w − w + 150 w − w − w + 672 w − w − w + 1096 w − w + 128 w + 256 w eferences Abbott, J., Bigatti, A., 2014. What is new in CoCoA? In: Hong, H., Yap, C. (Eds.),Mathematical Software – ICMS 2014. Vol. 8592 of Lecture Notes in Computer Science.Springer Heidelberg, pp. 352–358.URL https://doi.org/10.1007/978-3-662-44199-2_55 Abbott, J., Bigatti, A., 2017. New in CoCoA-5.2.0 and CoCoALib-0.99550 for SC-Square.In: England, M., Ganesh, V. (Eds.), Proceedings of the 2nd International Workshopon Satisfiability Checking and Symbolic Computation ( SC http://ceur-ws.org/Vol-1974/ Abbott, J., Bigatti, A., Palezzato, E., 2018. New in CoCoA-5.2.4 and CoCoALib-0.99570for SC-Square. In: Bigatti, A., Brain, M. (Eds.), Proceedings of the 3rd Workshopon Satisfiability Checking and Symbolic Computation ( SC http://ceur-ws.org/Vol-2189/ ´Abrah´am, E., Abbott, J., Becker, B., Bigatti, A., Brain, M., Buchberger, B., Cimatti,A., Davenport, J., England, M., Fontaine, P., Forrest, S., Griggio, A., Kroening, D.,Seiler, W., Sturm, T., 2016. SC : Satisfiability checking meets symbolic computation.In: Kohlhase, M., Johansson, M., Miller, B., de Moura, L., Tompa, F. (Eds.), Intelli-gent Computer Mathematics: Proceedings CICM 2016. Vol. 9791 of Lecture Notes inComputer Science. Springer International Publishing, pp. 28–43.URL https://doi.org/10.1007/978-3-319-42547-4_3 Barrett, C., Fontaine, P., Tinelli, C., 2016. The Satisfiability Modulo Theories Library(SMT-LIB). Online Resource. URL .Barrett, C., Sebastiani, R., Seshia, S., Tinelli, C., 2009. Satisfiability modulo theories.In: Biere, A., Heule, M., van Maaren, H., Walsh, T. (Eds.), Handbook of Satisfiability(Volume 185 Frontiers in Artificial Intelligence and Applications), Chapter 26. IOSPress, pp. 825–885.Basu, S., Pollack, R., Roy, M., 2006. Algorithms in Real Algebraic Geometry. Volume 10of Algorithms and Computations in Mathematics. Springer-Verlag.Biere, A., Heule, M., van Maaren, H., Walsh, T., 2009. Handbook of Satisfiability (Volume185 Frontiers in Artificial Intelligence and Applications). IOS Press.Bradford, R., Chen, C., Davenport, J., England, M., Moreno Maza, M., Wilson, D.,2014. Truth table invariant cylindrical algebraic decomposition by regular chains. In:Gerdt, V., Koepf, W., Seiler, W., Vorozhtsov, E. (Eds.), Computer Algebra in ScientificComputing. Vol. 8660 of Lecture Notes in Computer Science. Springer InternationalPublishing, pp. 44–58.URL http://dx.doi.org/10.1007/978-3-319-10515-4_4 Bradford, R., Davenport, J., England, M., Errami, H., Gerdt, V., Grigoriev, D., Hoyt, C.,Koˇsta, M., Radulescu, O., Sturm, T., Weber, A., 2017. A case study on the parametricoccurrence of multiple steady states. In: Proceedings of the 2017 ACM International ymposium on Symbolic and Algebraic Computation. ISSAC ’17. ACM, pp. 45–52.URL https://doi.org/10.1145/3087604.3087622 Bradford, R., Davenport, J., England, M., McCallum, S., Wilson, D., 2013a. Cylindricalalgebraic decompositions for boolean combinations. In: Proceedings of the 38th Inter-national Symposium on Symbolic and Algebraic Computation. ISSAC ’13. ACM, pp.125–132.URL http://dx.doi.org/10.1145/2465506.2465516 Bradford, R., Davenport, J., England, M., McCallum, S., Wilson, D., 2016. Truth tableinvariant cylindrical algebraic decomposition. Journal of Symbolic Computation 76, 1–35.URL http://dx.doi.org/10.1016/j.jsc.2015.11.002 Bradford, R., Davenport, J., England, M., Wilson, D., 2013b. Optimising problem for-mulations for cylindrical algebraic decomposition. In: Carette, J., Aspinall, D., Lange,C., Sojka, P., Windsteiger, W. (Eds.), Intelligent Computer Mathematics. Vol. 7961 ofLecture Notes in Computer Science. Springer Berlin Heidelberg, pp. 19–34.URL http://dx.doi.org/10.1007/978-3-642-39320-4_2 Brown, C., 2001. Improved projection for cylindrical algebraic decomposition. Journal ofSymbolic Computation 32 (5), 447–465.URL https://doi.org/10.1006/jsco.2001.0463 Brown, C., 2003. QEPCAD B: A program for computing with semi-algebraic sets usingCADs. ACM SIGSAM Bulletin 37 (4), 97–108.URL https://doi.org/10.1145/968708.968710 Brown, C., 2005. The McCallum projection, lifting, and order-invariance. Tech. rep., U.S.Naval Academy, Computer Science Department.URL Brown, C., 2013. Constructing a single open cell in a cylindrical algebraic decomposition.In: Proceedings of the 38th International Symposium on Symbolic and Algebraic Com-putation. ISSAC ’13. ACM, pp. 133–140.URL https://doi.org/10.1145/2465506.2465952 Brown, C., 2015. Open non-uniform cylindrical algebraic decompositions. In: Proceedingsof the 2015 International Symposium on Symbolic and Algebraic Computation. ISSAC’15. ACM, pp. 85–92.URL https://doi.org/10.1145/2755996.2756654 Brown, C., Davenport, J., 2007. The complexity of quantifier elimination and cylindri-cal algebraic decomposition. In: Proceedings of the 2007 International Symposium onSymbolic and Algebraic Computation. ISSAC ’07. ACM, pp. 54–60.URL https://doi.org/10.1145/1277548.1277557 Brown, C., Kahoui, M. E., Novotni, D., Weber, A., 2006. Algorithmic methods for inves-tigating equilibria in epidemic modeling. Journal of Symbolic Computation 41, 1157–1173.URL https://doi.org/10.1016/j.jsc.2005.09.011 Brown, C., McCallum, S., 2005. On using bi-equational constraints in CAD construction.In: Proceedings of the 2005 International Symposium on Symbolic and Algebraic Com-putation. ISSAC ’05. ACM, pp. 76–83.URL https://doi.org/10.1145/1073884.1073897 uchberger, B., 2006. Bruno Buchberger’s PhD thesis (1965): An algorithm for finding thebasis elements of the residue class ring of a zero dimensional polynomial ideal. Journalof Symbolic Computation 41 (3-4), 475–511.URL https://doi.org/10.1016/j.jsc.2005.09.007 Buchberger, B., Hong, H., 1991. Speeding up quantifier elimination by Gr¨obner bases.Tech. rep., 91-06. RISC, Johannes Kepler University.URL Bus´e, L., Mourrain, B., 2009. Explicit factors of some iterated resultants and discriminants.Mathematics of Computation 78, 345–386.URL https://doi.org/10.1090/S0025-5718-08-02111-X Caviness, B., Johnson, J., 1998. Quantifier Elimination and Cylindrical Algebraic Decom-position. Texts & Monographs in Symbolic Computation. Springer-Verlag.Charalampakis, A., Chatzigiannelis, I., 2018. Analytical solutions for the minimum weightdesign of trusses by cylindrical algebraic decomposition. Archive of Applied Mechanics88 (1), 39–49.URL https://doi.org/10.1007/s00419-017-1271-8 Chen, C., Moreno Maza, M., Xia, B., Yang, L., 2009. Computing cylindrical algebraicdecomposition via triangular decomposition. In: Proceedings of the 2009 InternationalSymposium on Symbolic and Algebraic Computation. ISSAC ’09. ACM, pp. 95–102.URL https://doi.org/10.1145/1576702.1576718 Collins, G., 1975. Quantifier elimination for real closed fields by cylindrical algebraicdecomposition. In: Proceedings of the 2nd GI Conference on Automata Theory andFormal Languages. Springer-Verlag (reprinted in the collection Caviness and Johnson(1998)), pp. 134–183.URL https://doi.org/10.1007/3-540-07407-4_17 Collins, G., 1998. Quantifier elimination by cylindrical algebraic decomposition – 20 yearsof progress. In: Caviness, B., Johnson, J. (Eds.), Quantifier Elimination and CylindricalAlgebraic Decomposition. Texts & Monographs in Symbolic Computation. Springer-Verlag, pp. 8–23.URL https://doi.org/10.1007/978-3-7091-9459-1_2 Collins, G., Hong, H., 1991. Partial cylindrical algebraic decomposition for quantifier elim-ination. Journal of Symbolic Computation 12, 299–328.Cowen-Rivers, A., England, M., 2018. Towards incremental cylindrical algebraic decom-position in Maple. In: Bigatti, A., Brain, M. (Eds.), Proceedings of the 3rd Workshopon Satisfiability Checking and Symbolic Computation ( SC http://ceur-ws.org/Vol-2189/ Davenport, J., Bradford, R., England, M., Wilson, D., 2012. Program verification in thepresence of complex numbers, functions with branch cuts etc. In: 14th InternationalSymposium on Symbolic and Numeric Algorithms for Scientific Computing. SYNASC’12. IEEE, pp. 83–88.URL http://dx.doi.org/10.1109/SYNASC.2012.68 Davenport, J., Heintz, J., 1988. Real quantifier elimination is doubly exponential. Journal f Symbolic Computation 5 (1-2), 29–35.URL https://doi.org/10.1016/S0747-7171(88)80004-X Dolzmann, A., Seidl, A., Sturm, T., 2004. Efficient projection orders for CAD. In: Pro-ceedings of the 2004 International Symposium on Symbolic and Algebraic Computation.ISSAC ’04. ACM, pp. 111–118.URL https://doi.org/10.1145/1005285.1005303 England, M., 2018. Machine learning for mathematical software. In: Davenport, J.,Kauers, M., Labahn, G., Urban, J. (Eds.), Mathematical Software – Proc. ICMS 2018.Vol. 10931 of Lecture Notes in Computer Science. Springer International Publishing,pp. 165–174.URL https://doi.org/10.1007/978-3-319-96418-8_20 England, M., Bradford, R., Chen, C., Davenport, J., Moreno Maza, M., Wilson, D., 2014a.Problem formulation for truth-table invariant cylindrical algebraic decomposition byincremental triangular decomposition. In: Watt, S., Davenport, J., Sexton, A., Sojka,P., Urban, J. (Eds.), Intelligent Computer Mathematics. Vol. 8543 of Lecture Notes inArtificial Intelligence. Springer International, pp. 45–60.URL http://dx.doi.org/10.1007/978-3-319-08434-3_5 England, M., Bradford, R., Davenport, J., 2015. Improving the use of equational con-straints in cylindrical algebraic decomposition. In: Proceedings of the 2015 InternationalSymposium on Symbolic and Algebraic Computation. ISSAC ’15. ACM, pp. 165–172.URL http://dx.doi.org/10.1145/2755996.2756678 England, M., Davenport, J., 2016. The complexity of cylindrical algebraic decompositionwith respect to polynomial degree. In: Gerdt, V., Koepf, W., Werner, W., Vorozhtsov,E. (Eds.), Computer Algebra in Scientific Computing: 18th International Workshop,CASC 2016. Vol. 9890 of Lecture Notes in Computer Science. Springer InternationalPublishing, pp. 172–192.URL http://dx.doi.org/10.1007/978-3-319-45641-6_12 England, M., Errami, H., Grigoriev, D., Radulescu, O., Sturm, T., Weber, A., 2017.Symbolic versus numerical computation and visualization of parameter regions for mul-tistationarity of biological networks. In: Gerdt, V., Koepf, W., Seiler, W., Vorozhtsov,E. (Eds.), Computer Algebra in Scientific Computing (CASC). Vol. 10490 of LectureNotes in Computer Science. Springer International Publishing, pp. 93–108.URL https://doi.org/10.1007/978-3-319-66320-3_8 England, M., Wilson, D., Bradford, R., Davenport, J., 2014b. Using the Regular ChainsLibrary to build cylindrical algebraic decompositions by projecting and lifting. In: Hong,H., Yap, C. (Eds.), Mathematical Software – ICMS 2014. Vol. 8592 of Lecture Notes inComputer Science. Springer Heidelberg, pp. 458–465.URL http://dx.doi.org/10.1007/978-3-662-44199-2_69 Erascu, M., Hong, H., 2016. Real quantifier elimination for the synthesis of optimal nu-merical algorithms (Case study: Square root computation). Journal of Symbolic Com-putation 75, 110–126.URL https://doi.org/10.1016/j.jsc.2015.11.010 Faug`ere, J., 2002. A new efficient algorithm for computing Gr¨obner bases without reduc-tion to zero (F5). In: Proceedings of the 2002 International Symposium on Symbolic nd Algebraic Computation. ISSAC ’02. ACM, pp. 75–83.URL https://doi.org/10.1145/780506.780516 Fotiou, I., Parrilo, P., Morari, M., 2005. Nonlinear parametric optimization using cylin-drical algebraic decomposition. In: Decision and Control, 2005 European Control Con-ference. CDC-ECC ’05. pp. 3735–3740.URL https://doi.org/10.1109/CDC.2005.1582743 Fukasaku, R., Iwane, H., Sato, Y., 2015. Real quantifier elimination by computation ofcomprehensive Gr¨obner systems. In: Proceedings of the 2015 International Symposiumon Symbolic and Algebraic Computation. ISSAC ’15. ACM, pp. 173–180.URL https://doi.org/10.1145/2755996.2756646 Haehn, R., Kremer, G., ´Abrah´am, E., 2018. Evaluation of equational constraints for CADin SMT solving. In: Bigatti, A., Brain, M. (Eds.), Proceedings of the 3rd Workshopon Satisfiability Checking and Symbolic Computation ( SC http://ceur-ws.org/Vol-2189/ Han, J., Dai, L., Xia, B., 2014. Constructing fewer open cells by gcd computation inCAD projection. In: Proceedings of the 39th International Symposium on Symbolicand Algebraic Computation. ISSAC ’14. ACM, pp. 240–247.URL https://doi.org/10.1145/2608628.2608676 Hong, H., 1990. An improvement of the projection operator in cylindrical algebraic decom-position. In: Proceedings of the International Symposium on Symbolic and AlgebraicComputation. ISSAC ’90. ACM, pp. 261–264.URL https://doi.org/10.1145/96877.96943 Huang, Z., England, M., Davenport, J., Paulson, L., 2016. Using machine learning todecide when to precondition cylindrical algebraic decomposition with Groebner bases.In: 18th International Symposium on Symbolic and Numeric Algorithms for ScientificComputing (SYNASC ’16). IEEE, pp. 45–52.URL https://doi.org/10.1109/SYNASC.2016.020 Huang, Z., England, M., Wilson, D., Davenport, J., Paulson, L., Bridge, J., 2014. Applyingmachine learning to the problem of choosing a heuristic to select the variable orderingfor cylindrical algebraic decomposition. In: Watt, S., Davenport, J., Sexton, A., Sojka,P., Urban, J. (Eds.), Intelligent Computer Mathematics. Vol. 8543 of Lecture Notes inArtificial Intelligence. Springer International, pp. 92–107.URL http://dx.doi.org/10.1007/978-3-319-08434-3_8 Iwane, H., Yanami, H., Anai, H., Yokoyama, K., 2009. An effective implementation ofa symbolic-numeric cylindrical algebraic decomposition for quantifier elimination. In:Proceedings of the 2009 conference on Symbolic Numeric Computation. SNC ’09. pp.55–64.URL https://doi.org/10.1145/1577190.1577203 Jouanolou, J., 1991. Le formalisme du r´esultant. Advances in Mathematics 90 (2), 117–263.URL https://doi.org/10.1016/0001-8708(91)90031-2 Jovanovic, D., de Moura, L., 2012. Solving non-linear arithmetic. In: Gramlich, B., Miller,D., Sattler, U. (Eds.), Automated Reasoning: 6th International Joint Conference (IJ- AR). Vol. 7364 of Lecture Notes in Computer Science. Springer, pp. 339–354.URL https://doi.org/10.1007/978-3-642-31365-3_27 Kremer, G., ´Abrah´am, E., 2019. Fully incremental CAD. In Press.Kroening, D., Strichman, O., 2013. Decision Procedures: An Algorithmic Point of View.Springer, New York.Lazard, D., 1994. An improved projection for cylindrical algebraic decomposition. In:Bajaj, C. (Ed.), Algebraic Geometry and its Applications: Collections of Papers fromAbhyankar’s 60th Birthday Conference. Springer Berlin, pp. 467–476.URL https://doi.org/10.1007/978-1-4612-2628-4_29 Lazard, D., McCallum, S., 2009. Iterated discriminants. Journal of Symbolic Computation44 (9), 1176–1193.URL https://doi.org/10.1016/j.jsc.2008.05.006 Loup, U., Scheibler, K., Corzilius, F., ´Abrah´am, E., Becker, B., 2013. A symbiosis ofinterval constraint propagation and cylindrical algebraic decomposition. In: Bonacina,M. (Ed.), Automated Deduction (CADE-24). Vol. 7898 of Lecture Notes in ComputerScience. Springer Berlin Heidelberg, pp. 193–207.URL https://doi.org/10.1007/978-3-642-38574-2_13 Mayr, E., Meyer, A., 1982. The complexity of the word problems for commutative semi-groups and polynomial ideals. Advances in Mathematics 46 (3), 305–329.URL https://doi.org/10.1016/0001-8708(82)90048-2 Mayr, E., Ritscher, S., 2013. Dimension-dependent bounds for Gr¨obner bases of polynomialideals. Journal of Symbolic Computation 49, 78–94.URL https://doi.org/10.1016/j.jsc.2011.12.018 McCallum, S., 1985. An improved projection operation for cylindrical algebraic decompo-sition. PhD Thesis (Computer Sciences Technical Report 578), University of Wisconsin-Madison.McCallum, S., 1998. An improved projection operation for cylindrical algebraic decom-position. In: Caviness, B., Johnson, J. (Eds.), Quantifier Elimination and CylindricalAlgebraic Decomposition. Texts & Monographs in Symbolic Computation. Springer-Verlag, pp. 242–268.URL https://doi.org/10.1007/978-3-7091-9459-1_12 McCallum, S., 1999a. Factors of iterated resultants and discriminants. Journal of SymbolicComputation 27 (4), 367–385.URL https://doi.org/10.1006/jsco.1998.0257 McCallum, S., 1999b. On projection in CAD-based quantifier elimination with equationalconstraint. In: Proceedings of the 1999 International Symposium on Symbolic andAlgebraic Computation. ISSAC ’99. ACM, pp. 145–149.URL https://doi.org/10.1145/309831.309892 McCallum, S., 2001. On propagation of equational constraints in CAD-based quantifierelimination. In: Proceedings of the 2001 International Symposium on Symbolic andAlgebraic Computation. ISSAC ’01. ACM, pp. 223–231.URL https://doi.org/10.1145/384101.384132 McCallum, S., Brown, C., 2009. On delineability of varieties in CAD-based quantifierelimination with two equational constraints. In: Proceedings of the 2009 International ymposium on Symbolic and Algebraic Computation. ISSAC ’09. ACM, pp. 71–78.URL https://doi.org/10.1145/1576702.1576715 McCallum, S., Hong, H., 2016. On using Lazard’s projection in CAD construction. Journalof Symbolic Computation 72, 65–81.McCallum, S., Parusi´niski, A., Paunescu, L., 2019. Validity proof of Lazard’s method forCAD construction. Journal of Symbolic Computation 92, 52–69.URL https://doi.org/10.1016/j.jsc.2017.12.002 Mulligan, C., Bradford, R., Davenport, J., England, M., Tonks, Z., 2018a. Non-linear realarithmetic benchmarks derived from automated reasoning in economics. In: Bigatti,A., Brain, M. (Eds.), Proceedings of the 3rd Workshop on Satisfiability Checking andSymbolic Computation ( SC http://ceur-ws.org/Vol-2189/ Mulligan, C., Davenport, J., England, M., 2018b. TheoryGuru: A Mathematica packageto apply quantifier elimination technology to economics. In: Davenport, J., Kauers, M.,Labahn, G., Urban, J. (Eds.), Mathematical Software – Proc. ICMS 2018. Vol. 10931of Lecture Notes in Computer Science. Springer International Publishing, pp. 369–378.URL https://doi.org/10.1007/978-3-319-96418-8_44 Paulson, L., 2012. Metitarski: Past and future. In: Beringer, L., Felty, A. (Eds.), Interac-tive Theorem Proving. Vol. 7406 of Lecture Notes in Computer Science. Springer, pp.1–10.URL https://doi.org/10.1007/978-3-642-32347-8_1 Schwartz, J., Sharir, M., 1983. On the “Piano-Movers” Problem: II. General techniquesfor computing topological properties of real algebraic manifolds. Adv. Appl. Math. 4,298–351.URL https://doi.org/10.1016/0196-8858(83)90014-3 Seidl, A., 2006. Cylindrical decomposition under application-oriented paradigms. Ph.D.thesis, Universitt Passau, Fakultt fr Informatik und Mathematik.URL https://opus4.kobv.de/opus4-uni-passau/files/46/Seidl_Andreas.pdf Strzebo´nski, A., 2006. Cylindrical algebraic decomposition using validated numerics. Jour-nal of Symbolic Computation 41 (9), 1021–1038.URL https://doi.org/10.1016/j.jsc.2006.06.004 Strzebo´nski, A., 2016. Cylindrical algebraic decomposition using local projections. Journalof Symbolic Computation 76, 36–64.URL https://doi.org/10.1016/j.jsc.2015.11.018 Viehmann, T., Kremer, G., ´Abr´aham, E., 2017. Comparing different projection operatorsin the cylindrical algebraic decomposition for smt solving. In: England, M., Ganesh, V.(Eds.), Proceedings of the 2nd International Workshop on Satisfiability Checking andSymbolic Computation ( SC http://ceur-ws.org/Vol-1974/ Wada, Y., Matsuzaki, T., Terui, A., Arai, N., 2016. An automated deduction and itsimplementation for solving problem of sequence at university entrance examination.In: Greuel, G.-M., Koch, T., Paule, P., Sommese, A. (Eds.), Mathematical Software –Proceedings of ICMS 2016. Vol. 9725 of Lecture Notes in Computer Science. Springer nternational Publishing, pp. 82–89.URL https://doi.org/10.1007/978-3-319-42432-3_11 Wilson, D., Bradford, R., Davenport, J., 2012. Speeding up cylindrical algebraic decompo-sition by Gr¨obner bases. In: Jeuring, J., Campbell, J., Carette, J., Reis, G., Sojka, P.,Wenzel, M., Sorge, V. (Eds.), Intelligent Computer Mathematics. Vol. 7362 of LectureNotes in Computer Science. Springer, pp. 280–294.URL https://doi.org/10.1007/978-3-642-31374-5_19 Wilson, D., England, M., Davenport, J., Bradford, R., 2014. Using the distribution of cellsby dimension in a cylindrical algebraic decomposition. In: 16th International Sympo-sium on Symbolic and Numeric Algorithms for Scientific Computing. SYNASC ’14.IEEE, pp. 53–60.URL http://dx.doi.org/10.1109/SYNASC.2014.15http://dx.doi.org/10.1109/SYNASC.2014.15