Demonstration of the QuantifierElimination and QuantifierTools packages in Maple
with( QuantifierElimination );
CylindricalAlgebraicDecompose,DeleteFormula,InsertFormula,PartialCylindricalAlgebraicDecompose,QuantifierEliminate,QuantifierTools
with( QuantifierTools );
AlphaConvert,ConvertRationalConstraintsToTarski,ConvertToPrenexForm,GetAllPolynomials,GetEquationalConstraints,GetUnquantifiedFormula,NegateFormula,SuggestCADOptions
This worksheet is an in-depth demonstration of ways to use the routines of QuantifierElimination and QuantifierTools.
Throughout, QE and CAD are abbreviations of Quantifier Elimination and Cylindrical Algebraic Decomposition, respectively.
It also offers a wealth of typical examples on how to interact with QEData and CADData objects returned in the course of incrementality or stock CAD.
QE or CAD formulae as examples that originally have an academic source are appended with a reference on formula definition (generally [3] or [9]). Both works are either repositories of data or works that cite a repository of data. Other references appended at the bottom of the worksheet are general major works of interest in terms of implementation of the QuantifierElimination package. An extremely comprehensive source of reference for the package and in particular its implementation is [8].
Quantifier Elimination & Tarski formulae
Below demonstrates some general usage of the package, in particular in terms of what to expect from QuantifierEliminate in terms of input syntax for formulae. By default, when no keyword options are used, the quantifier-free equivalent of a formula is returned.
expr := exists( [ x, y ], And( 3*x^2 - 2*y > 0, Or( x > 0, y > 0 ) ) );
expr≔∃⁡x,y,0<3⁢x2−2⁢y∧0<x∨0<y
QuantifierEliminate( expr );
true
expr := exists( x, forall( y, exists( z, And(4*x^2 + x*y^2 - z + 1/4 = 0, 2*x + y^2*z + 1/2 = 0, x^2*z - 1/2*x - y^2 = 0 ) ) ) );
expr≔∃⁡x,∀⁡y,∃⁡z,4⁢x2+x⁢y2−z+14=0∧2⁢x+y2⁢z+12=0∧x2⁢z−12⁢x−y2=0
false
Generic boolean operators such as Implies are supported. Under the hood, QuantifierElimination routines work with 'prenex' formulae only.
expr := Implies( forall( x, x > 0 ), x^2 > 0 );
expr≔∀⁡x,0<x⇒0<x2
The conversion to prenex form can be realized by the QuantifierTools routine ConvertToPrenexForm.
prenexExpr := ConvertToPrenexForm( expr );
prenexExpr≔∃⁡x,0≤−x∨−x2<0
QuantifierEliminate( prenexExpr );
QuantifierEliminate accepts formulae involving rational functions:
expr := exists( x, x / y > 0 );
expr≔∃⁡x,0<xy
y<0∨−y<0
These rational functions are interpreted in terms of equivalent Tarski formulae under the hood. This conversion is realizable by the QuantifierTools routine ConvertRationalConstraintsToTarski:
ConvertRationalConstraintsToTarski( expr );
∃⁡x,0<x⁢y
Witnesses for QE [5] on fully quantified formulae [3], relation to Satisfiability Modulo Theories (SMT)
For formulae where every variable is quantified in terms of exactly one quantifier symbol, the quantifier-free equivalent of the formula must be identically 'true' or 'false'.
expr := exists([v__1, v__2, v__3, v__4, v__5, v__6, v__7, v__8],And(v__7 < 0,0 < v__8,0 < v__4,v__2*v__6+v__3*v__8 = v__4,v__1*v__5+v__3*v__7 = v__4,v__6 = 1,v__5 = 1, 0 < v__1)); # [3], Economics QE example 0001
expr≔∃⁡v__1,v__2,v__3,v__4,v__5,v__6,v__7,v__8,v__7<0∧0<v__8∧0<v__4∧v__2⁢v__6+v__3⁢v__8=v__4∧v__1⁢v__5+v__3⁢v__7=v__4∧v__6=1∧v__5=1∧0<v__1
In the scenario where a formula is equivalent to 'true' in the existentially quantified case, or 'false' in the universally quantified case, there exists a set of assignments of the quantified variables to real algebraic numbers that realizes the equivalence of the quantified formula to its quantifier-free equivalent. This is called a set of 'witnesses'. Witnesses can be requested as an output argument by including the symbol 'witnesses' as part of the list for the keyword option 'output':
( q, w ) := QuantifierEliminate( expr, 'output = [ qf, witnesses]' ); # provide some witnesses for proof of the example
q,w≔true,true,v__8=92,v__7=−12,v__6=1,v__5=1,v__4=14,v__3=12,v__2=−2,v__1=12
wit := w[][ 2 .. -1 ];
wit≔v__8=92,v__7=−12,v__6=1,v__5=1,v__4=14,v__3=12,v__2=−2,v__1=12
map( evalb@eval, GetUnquantifiedFormula( expr ), wit ); # the witnesses work
true∧true∧true∧true∧true∧true∧true∧true
# evalb@eval composition of evalb with eval
( q, w ) := QuantifierEliminate( expr, 'output = [ qf, witnesses ]', 'processwitnesses' = false );
q,w≔true,true,v__8=−v__2⁢v__6−v__4v__3,v__7=−v__1⁢v__5−v__4v__3,v__6=1,v__5=1,v__4=ε,v__3=ε,v__2=−∞,v__1=ε
Satisfy from the SMTLIB package offers similar functionality when judging the unquantified part of the quantified formula to be an SMT formula under the theory of real arithmetic.
exprUnq := GetUnquantifiedFormula( expr );
exprUnq≔v__7<0∧0<v__8∧0<v__4∧v__2⁢v__6+v__3⁢v__8=v__4∧v__1⁢v__5+v__3⁢v__7=v__4∧v__6=1∧v__5=1∧0<v__1
SMTWitnesses := SMTLIB:-Satisfy( exprUnq );
SMTWitnesses≔v__1=178,v__2=18,v__3=1,v__4=98,v__5=1,v__6=1,v__7=−1,v__8=1
map( evalb@eval, exprUnq, convert( SMTWitnesses, 'list' ) );
Usage of a low value for the 'eagerness' keyword option can provide a more comprehensive set of witnesses at the cost of more exploration of the solution space by the QE algorithm(s) used.
( q, w ) := QuantifierEliminate( expr, 'output = [ qf, witnesses ]', 'eagerness' = 1 ): # get a covering of all possible witnesses q; map(print, w):
true,v__8=92,v__7=−12,v__6=1,v__5=1,v__4=14,v__3=12,v__2=−2,v__1=12
true,v__8=12,v__7=−12,v__6=1,v__5=1,v__4=14,v__3=12,v__2=0,v__1=12
true,v__8=114,v__7=−37,v__6=1,v__5=1,v__4=27,v__3=12,v__2=14,v__1=12
true,v__8=121,v__7=−128,v__6=1,v__5=1,v__4=47,v__3=−2,v__2=23,v__1=12
true,v__8=12,v__7=−2,v__6=1,v__5=1,v__4=12,v__3=0,v__2=12,v__1=12
for wit in w do # all witness results work map( evalb@eval, GetUnquantifiedFormula( expr ), wit[ 2.. -1 ] ); end do;
Exploring a universally quantified problem equivalent to false provides the same functionality:
expr := forall([v__1, v__2, v__3, v__4, v__5, v__6, v__7, v__8],Implies(And(v__7 < 0,0 < v__8,0 < v__4,v__2*v__6+v__3*v__8 = v__4,v__1*v__5+v__3*v__7 = v__4,v__6 = 1, v__5 = 1),0 < v__1)); # [3], Economics QE theorem 0001
expr≔∀⁡v__1,v__2,v__3,v__4,v__5,v__6,v__7,v__8,v__7<0∧0<v__8∧0<v__4∧v__2⁢v__6+v__3⁢v__8=v__4∧v__1⁢v__5+v__3⁢v__7=v__4∧v__6=1∧v__5=1⇒0<v__1
( q, w ) := QuantifierEliminate( expr, 'output = [ qf, witnesses ]' );
q,w≔false,false,v__8=18,v__7=−98,v__6=1,v__5=1,v__4=14,v__3=−2,v__2=12,v__1=−2
map( evalb@eval, ConvertToPrenexForm( GetUnquantifiedFormula( expr ) ), w[][ 2.. -1 ] );
false∨false∨false∨false∨false∨false∨false∨false
QE specifically requested by CAD using PartialCylindricalAlgebraicDecompose offers the same functionality as QuantifierEliminate.
( q, w, data ) := PartialCylindricalAlgebraicDecompose( expr, 'output = [ qf, witnesses, data ]', 'eagerness = 1' ); # CAD provides the same functionality
q,w,data≔false,false,v__2=1,v__8=1,v__7=−1,v__6=1,v__5=1,v__3=−23,v__1=−13,v__4=13,false,v__2=1,v__8=1,v__7=−1,v__6=1,v__5=1,v__3=−12,v__1=0,v__4=12,Variables=⁢v__2,v__8,v__7,v__6,v__5,v__3,v__1,v__4Input Formula=⁢∀⁡v__2,v__8,v__7,v__6,v__5,v__3,v__1,v__4,−v__7≤0∨v__8≤0∨v__4≤0∨v__2⁢v__6+v__3⁢v__8−v__4≠0∨v__1⁢v__5+v__3⁢v__7−v__4≠0∨v__6−1≠0∨v__5−1≠0∨−v__1<0# Cells=⁢451Projection polynomials for level 1=⁢v__2Projection polynomials for level 2=⁢v__8Projection polynomials for level 3=⁢v__7v__7−v__8Projection polynomials for level 4=⁢v__6v__6−1Projection polynomials for level 5=⁢v__5v__5−1Projection polynomials for level 6=⁢v__3v__2⁢v__6+v__3⁢v__8v__2⁢v__6−v__3⁢v__7+v__3⁢v__8Projection polynomials for level 7=⁢v__1v__1⁢v__5+v__3⁢v__7v__1⁢v__5−v__2⁢v__6+v__3⁢v__7−v__3⁢v__8Projection polynomials for level 8=⁢v__4v__2⁢v__6+v__3⁢v__8−v__4v__1⁢v__5+v__3⁢v__7−v__4
map( evalb@eval, ConvertToPrenexForm( GetUnquantifiedFormula( expr ) ), w[2][ 2.. -1 ] );
Full incrementality for QE [1,2,4] & homogeneously quantified problems
QuantifierElimination offers the opportunity to perform QE in an entirely 'evolutionary' fashion. The word 'evolutionary' is roughly synonymous with the word 'incrementality' usually used in academic literature for QE in this context. This means that solution of a QE problem can be performed incrementally in terms of intermediate formulae, reusing returned data structures to make successive calls adding extra parts of the formula more performant. In this way, if an intermediate quantified formula is equivalent to a fixed point (such as 'true' or 'false'), one can terminate computation early without needing to perform successive calls with extra parts of the formula. More generally, incrementality allows for more granular and powerful inspection of quantified formulae. The term 'evolutionary' is intended to make the definition of 'incrementality' less loose—the InsertFormula and DeleteFormula routines in QuantifierElimination strictly correspond to incrementality (addition of data to a previous formula) and decrementality (removal of data from a previous formula).
expr := forall( x, Implies( x > 0, x^2 > 0 ) );
forall( x, Implies( x >= 0, x^2 > 0 ) );
∀⁡x,0≤x⇒0<x2
ConvertToPrenexForm( expr );
∀⁡x,0≤−x∨−x2<0
With a formula in prenex form, one can explore manipulation of the formula from a QE perspective. Note that the symbol 'data' must appear in the list requested for output via the keyword option 'output'. The QEData object returned contains the data structures necessary to enable further evolutionary operations via InsertFormula and DeleteFormula.
( q, w, data ) := QuantifierEliminate( expr, 'output = [ qf, witnesses, data ]' );
q,w,data≔true,,QEData for⁢∀⁡x,x≤0∨−x2<0
Perform QE with the operand of the quantified formula at atomic position 1 removed. In other words, we consider a change to the originally quantified formula such that 0 <= -x is removed. Atomic positions simply refer to the position of an operand of a formula in terms of traversal of the formula as a DAG.
( q, w, data ) := DeleteFormula( data, 1, 'output = [ qf, witnesses, data ]' );
q,w,data≔false,false,x=0,QEData for⁢∀⁡x,−x2<0
Having removed the operand 0 <= -x, we now investigate its replacement with the atomic formula x < 0. In terms of the original formula featuring the Implies symbol, the quantified formula below is equivalent to Implies( 0 <= x, 0 < x^2 ), which should be false, because of x = 0. InsertFormula requires an operand corresponding to 'And' or 'Or', as more generally one can "build" a new disjunction or conjunction at an atomic position in usage of this parameter. Here, we are essentially rebuilding the disjunction which we lost as of the last call.
( q, w, data ) := InsertFormula( data, 'Or', 1, x < 0, 'output = [ qf, witnesses, data ]' );
q,w,data≔false,false,x=0,QEData for⁢∀⁡x,x<0∨−x2<0
Formulae which are "SMT-like" in the sense they have many variables which are all quantified with the same symbol, and are essentially a large conjunction of formulae (i.e. the formula is in conjunctive normal form) admit usage of this incrementality very well.
expr := exists([v__1, v__2, v__3, v__4, v__5, v__6, v__7, v__8],And(v__2 = v__1,v__3* v__5+v__4*v__7 = v__1,v__3*v__6+v__4*v__7 = v__1,v__3*v__6+v__4*v__8 = v__2,0 < v__3,0 < v__4,v__6 < v__5,v__7 < v__8)); # [3], Economics QE example 0018
expr≔∃⁡v__1,v__2,v__3,v__4,v__5,v__6,v__7,v__8,v__2=v__1∧v__3⁢v__5+v__4⁢v__7=v__1∧v__3⁢v__6+v__4⁢v__7=v__1∧v__3⁢v__6+v__4⁢v__8=v__2∧0<v__3∧0<v__4∧v__6<v__5∧v__7<v__8
Eliminate the quantifiers without incrementality:
To instead perform QE incrementally in terms of the operands of the formula, start with the quantified formula corresponding to quantification of just the first operand:
exprIn := op( 0, expr )( op( 1, expr ), op( [ 2, 1 ], expr ) );
exprIn≔∃⁡v__1,v__2,v__3,v__4,v__5,v__6,v__7,v__8,v__2=v__1
( q, w, data ) := QuantifierEliminate( exprIn, 'output = [ qf, witnesses, data ]' );
q,w,data≔true,true,v__2=0,v__3=0,v__4=0,v__5=0,v__6=0,v__7=0,v__8=0,v__1=0,QEData for⁢∃⁡v__3,v__4,v__5,v__6,v__7,v__8,v__1,v__2,v__1−v__2=0
One can then do a loop to successively add in the further operands from the formula. If the quantified formula we are building is ever equivalent 'false', no addition of further operands will make the formula 'true' due to the conjunctive nature of the formula.
for i from 2 to nops( op( 2, expr ) ) do print( op( [ 2, i ], expr ) ); ( q, w, data ) := InsertFormula( data, ':-And', i, op( [ 2, i ], expr ), 'output = [ qf, witnesses, data ]' ); if q then print( map( is, eval( ':-And'( op( [ 2, 1 .. i ], expr ) ), w[ 1 ][ 2 .. -1 ] ) ) ); end if; until not q;
v__3⁢v__5+v__4⁢v__7=v__1
q,w,data≔true,true,v__2=0,v__1=0,v__6=0,v__8=0,v__3=0,v__4=0,v__5=0,v__7=0,QEData for⁢∃⁡v__6,v__8,v__3,v__4,v__5,v__7,v__1,v__2,v__1−v__2=0∧−v__3⁢v__5−v__4⁢v__7+v__1=0
true∧true
v__3⁢v__6+v__4⁢v__7=v__1
q,w,data≔true,true,v__2=0,v__1=0,v__5=0,v__3=0,v__8=0,v__4=0,v__7=0,v__6=0,QEData for⁢∃⁡v__8,v__4,v__7,v__6,v__3,v__5,v__1,v__2,v__1−v__2=0∧−v__3⁢v__5−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__7+v__1=0
true∧true∧true
v__3⁢v__6+v__4⁢v__8=v__2
q,w,data≔true,true,v__2=0,v__1=0,v__5=0,v__3=0,v__7=0,v__4=0,v__6=0,v__8=0,QEData for⁢∃⁡v__6,v__8,v__4,v__7,v__3,v__5,v__1,v__2,v__1−v__2=0∧−v__3⁢v__5−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0
true∧true∧true∧true
0<v__3
q,w,data≔true,true,v__2=0,v__1=0,v__5=0,v__3=12,v__7=0,v__4=0,v__6=0,v__8=0,QEData for⁢∃⁡v__6,v__8,v__4,v__7,v__3,v__5,v__1,v__2,v__1−v__2=0∧−v__3⁢v__5−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3<0
true∧true∧true∧true∧true
0<v__4
q,w,data≔true,true,v__2=0,v__1=0,v__5=0,v__3=12,v__7=0,v__4=12,v__6=0,v__8=0,QEData for⁢∃⁡v__6,v__8,v__4,v__7,v__3,v__5,v__1,v__2,v__1−v__2=0∧−v__3⁢v__5−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3<0∧−v__4<0
true∧true∧true∧true∧true∧true
v__6<v__5
q,w,data≔false,,QEData for⁢∃⁡v__6,v__8,v__4,v__7,v__3,v__5,v__1,v__2,v__1−v__2=0∧−v__3⁢v__5−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3<0∧−v__4<0∧v__6−v__5<0
q;
In this case, the formula is actually equivalent to false without usage of all the operands. The unsatisfiable core of the formula is smaller than the set of all the operands.
i, op( [ 2, i ], expr ), op( [ 2, -1 ], expr ); # the clause where we obtained 'false', and the last clause
7,v__6<v__5,v__7<v__8
j := 1;
j≔1
Using DeleteFormula, we can "go backwards" to remove operands (remove them from the opposite side we were appending to):
do print( op( [ 2, j ], expr ) ); ( q, w, data ) := DeleteFormula( data, 1, 'output = [ qf, witnesses, data ]' ); j++; if q then print( map( is, eval( ':-And'( op( [ 2, j .. i ], expr ) ), w[ 1 ][ 2 .. -1 ] ) ) ); end if; until j = nops( op( 2, expr ) ) - 1; # note these deletions happen in reverse order, ie. we're deleting the clause we started with first
v__2=v__1
q,w,data≔false,,QEData for⁢∃⁡v__6,v__8,v__4,v__7,v__3,v__5,v__1,v__2,−v__3⁢v__5−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3<0∧−v__4<0∧v__6−v__5<0
j≔2
q,w,data≔true,true,v__2=0,v__1=0,v__5=12,v__3=12,v__4=12,v__6=0,v__8=0,v__7=0,QEData for⁢∃⁡v__6,v__8,v__7,v__4,v__3,v__5,v__1,v__2,−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3<0∧−v__4<0∧v__6−v__5<0
j≔3
q,w,data≔true,true,v__2=0,v__1=0,v__5=12,v__3=12,v__4=12,v__8=0,v__7=0,v__6=0,QEData for⁢∃⁡v__8,v__7,v__6,v__4,v__3,v__5,v__1,v__2,−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3<0∧−v__4<0∧v__6−v__5<0
j≔4
q,w,data≔true,true,v__2=0,v__5=12,v__3=12,v__4=12,v__8=0,v__7=0,v__1=0,v__6=0,QEData for⁢∃⁡v__8,v__7,v__1,v__6,v__4,v__3,v__5,v__2,−v__3<0∧−v__4<0∧v__6−v__5<0
j≔5
q,w,data≔true,true,v__2=0,v__5=12,v__3=0,v__4=12,v__8=0,v__7=0,v__1=0,v__6=0,QEData for⁢∃⁡v__8,v__7,v__1,v__6,v__4,v__3,v__5,v__2,−v__4<0∧v__6−v__5<0
j≔6
q,w,data≔true,true,v__2=0,v__5=12,v__8=0,v__7=0,v__1=0,v__6=0,v__4=0,v__3=0,QEData for⁢∃⁡v__8,v__7,v__1,v__6,v__4,v__3,v__5,v__2,v__6−v__5<0
j≔7
∧⁡true
Investigate a similar occurrence but using a universally quantified formula. Note that witnesses are always being requested, and are kept up to date with the current state of the quantifier-free equivalent for the formula.
expr := exists([v__1, v__2, v__3, v__4, v__5, v__6, v__7, v__8],And(v__2 = v__1,v__3* v__5+v__4*v__7 = v__1,v__3*v__6+v__4*v__7 = v__1,v__3*v__6+v__4*v__8 = v__2,0 < v__3,0 < v__4,v__6 < v__5,v__7 < v__8)); # [3], Economics QE theorem 0001
q,w,data≔false,,QEData for⁢∃⁡v__4,v__1,v__2,v__3,v__5,v__6,v__7,v__8,v__1−v__2=0∧−v__3⁢v__5−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3<0∧−v__4<0∧v__6−v__5<0∧v__7−v__8<0
( q, w, data ) := DeleteFormula( data, 1, 'output = [ qf, witnesses, data ]' ); # delete -v__7 <= 0
q,w,data≔false,,QEData for⁢∃⁡v__4,v__1,v__2,v__3,v__5,v__6,v__7,v__8,−v__3⁢v__5−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3<0∧−v__4<0∧v__6−v__5<0∧v__7−v__8<0
( q, w, data ) := InsertFormula( data, 'Or', 1, -v__7 < 0, 'output = [ qf, witnesses, data ]' ); # insert v__7 < 0
q,w,data≔true,true,v__8=3,v__7=2,v__6=−2,v__5=0,v__3=12,v__2=12,v__1=0,v__4=12,QEData for⁢∃⁡v__4,v__1,v__2,v__3,v__5,v__6,v__7,v__8,−v__3⁢v__5−v__4⁢v__7+v__1=0∨−v__7<0∧−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3<0∧−v__4<0∧v__6−v__5<0∧v__7−v__8<0
( q, w, data ) := DeleteFormula( data, 1, 'output = [ qf, witnesses, data ]' ); # delete v__7 < 0
q,w,data≔true,true,v__8=3,v__7=2,v__6=−2,v__5=0,v__3=12,v__2=12,v__1=0,v__4=12,QEData for⁢∃⁡v__4,v__1,v__2,v__3,v__5,v__6,v__7,v__8,−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3<0∧−v__4<0∧v__6−v__5<0∧v__7−v__8<0
( q, w, data ) := DeleteFormula( data, 1, 'output = [ qf, witnesses, data ]' ); # delete v__8 <= 0
q,w,data≔true,true,v__8=2,v__7=−3,v__6=−2,v__5=0,v__3=12,v__4=12,v__1=0,v__2=0,QEData for⁢∃⁡v__1,v__2,v__4,v__3,v__5,v__6,v__7,v__8,−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3<0∧−v__4<0∧v__6−v__5<0∧v__7−v__8<0
( q, w, data ) := DeleteFormula( data, 1, 'output = [ qf, witnesses, data ]' ); # delete v__4 <= 0
q,w,data≔true,true,v__8=12,v__7=0,v__6=−2,v__5=0,v__3=12,v__4=12,v__1=0,v__2=0,QEData for⁢∃⁡v__1,v__2,v__4,v__3,v__5,v__6,v__7,v__8,−v__3<0∧−v__4<0∧v__6−v__5<0∧v__7−v__8<0
( q, w, data ) := DeleteFormula( data, 3, 'output = [ qf, witnesses, data ]' ); # delete -1 + v__5 <> 0
q,w,data≔true,true,v__8=12,v__7=0,v__6=0,v__5=0,v__3=12,v__4=12,v__1=0,v__2=0,QEData for⁢∃⁡v__1,v__2,v__4,v__3,v__5,v__6,v__7,v__8,−v__3<0∧−v__4<0∧v__7−v__8<0
( q, w, data ) := DeleteFormula( data, 3, 'output = [ qf, witnesses, data ]' ); # delete -v__1 < 0
q,w,data≔true,true,v__8=0,v__3=12,v__4=12,v__1=0,v__2=0,v__5=0,v__6=0,v__7=0,QEData for⁢∃⁡v__1,v__2,v__5,v__6,v__7,v__4,v__3,v__8,−v__3<0∧−v__4<0
( q, w, data ) := DeleteFormula( data, 6, 'output = [ qf, witnesses, data ]' ); # delete -v__4 < 0
q,w,data≔false,,QEData for⁢∃⁡v__4,v__1,v__2,v__3,v__5,v__6,v__7,v__8,v__1−v__2=0∧−v__3⁢v__5−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3<0∧v__6−v__5<0∧v__7−v__8<0
( q, w, data ) := DeleteFormula( data, 5, 'output = [ qf, witnesses, data ]' ); # delete -v__3 < 0
q,w,data≔true,true,v__8=12,v__7=0,v__6=−2,v__5=0,v__3=0,v__2=0,v__1=0,v__4=0,QEData for⁢∃⁡v__4,v__1,v__2,v__3,v__5,v__6,v__7,v__8,v__1−v__2=0∧−v__3⁢v__5−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧v__6−v__5<0∧v__7−v__8<0
( q, w, data ) := InsertFormula( data, 'And', 5, -v__3 <= 0, 'output = [ qf, witnesses, data ]' ); # insert -v__3 <= 0
q,w,data≔true,true,v__8=12,v__7=0,v__6=−2,v__5=0,v__3=0,v__2=0,v__1=0,v__4=0,QEData for⁢∃⁡v__4,v__1,v__2,v__3,v__5,v__6,v__7,v__8,v__1−v__2=0∧−v__3⁢v__5−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3≤0∧v__6−v__5<0∧v__7−v__8<0
( q, w, data ) := InsertFormula( data, 'And', 6, -v__4 <= 0, 'output = [ qf, witnesses, data ]' ); # insert -v__4 <= 0
q,w,data≔true,true,v__8=12,v__7=0,v__6=−2,v__5=0,v__3=0,v__2=0,v__1=0,v__4=0,QEData for⁢∃⁡v__4,v__1,v__2,v__3,v__5,v__6,v__7,v__8,v__1−v__2=0∧−v__3⁢v__5−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3≤0∧−v__4≤0∧v__6−v__5<0∧v__7−v__8<0
Get the current corresponding quantified formula for the QEData in terms of the evolutionary operations performed:
expr := GetInputFormula( data );
expr≔∃⁡v__4,v__1,v__2,v__3,v__5,v__6,v__7,v__8,v__1−v__2=0∧−v__3⁢v__5−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__7+v__1=0∧−v__3⁢v__6−v__4⁢v__8+v__2=0∧−v__3≤0∧−v__4≤0∧v__6−v__5<0∧v__7−v__8<0
Check the current witnesses are correct:
map( is@eval, ConvertToPrenexForm( GetUnquantifiedFormula( expr ) ), w[1][2..-1] );
map( eval, ConvertToPrenexForm( GetUnquantifiedFormula( expr ) ), w[1][2..-1] );
0=0∧0=0∧0=0∧0=0∧0≤0∧0≤0∧−2<0∧−12<0
Due to the default poly-algorithm used by QuantifierEliminate, InsertFormula and DeleteFormula, evolutionary operations are only supported for QEData when the problem is homogeneously quantified as the examples above. For evolutionary methods in any context, QE by CAD must be used in isolation. The following demonstrates examples of this, by acquiring a CADData object from PartialCylindricalAlgebraicDecompose. PartialCylindricalAlgebraicDecompose performs QE purely by CAD. A CADData object is amenable to usage of InsertFormula and DeleteFormula with the same syntax as QEData otherwise.
expr := exists(z,forall(y,exists(x,And(4*x^2+x*y^2-z+1/4 = 0,2*x+y^2*z+1/2 = 0,x^2*z-1/ 2*x-y^2 = 0)))); # [9], "Random A", QEExamples
expr≔∃⁡z,∀⁡y,∃⁡x,4⁢x2+x⁢y2−z+14=0∧2⁢x+y2⁢z+12=0∧x2⁢z−12⁢x−y2=0
op( [ 2, 2, 2 ], expr ); # the unquantified conjunction from the formula
4⁢x2+x⁢y2−z+14=0∧2⁢x+y2⁢z+12=0∧x2⁢z−12⁢x−y2=0
exprIn := exists( z, forall( y, exists( x, 4*x^2 + x*y^2 - z + 1/4 = 0 ) ) );
exprIn≔∃⁡z,∀⁡y,∃⁡x,4⁢x2+x⁢y2−z+14=0
( q, w, data ) := PartialCylindricalAlgebraicDecompose( exprIn, 'output = [ qf, witnesses, data ]' );
q,w,data≔true,true,z=−1,y=−4,x=RootOf⁡16⁢_Z2+64⁢_Z+5,−578532164786941965111147573952589676412928..−2314128659147767860417590295810358705651712,true,z=−1,y=RootOf⁡_Z4−20,−186014719844738796093022208..−93007359922234398046511104,x=−RootOf⁡_Z4−20,−186014719844738796093022208..−9300735992223439804651110428,true,z=14,y=−1,x=−14,true,z=14,y=0,x=0,true,z=14,y=1,x=−14,Variables=⁢z,y,xInput Formula=⁢∃⁡z,∀⁡y,∃⁡x,4⁢x⁢y2+16⁢x2−4⁢z+1=0# Cells=⁢11Projection polynomials for level 1=⁢4⁢z−1Projection polynomials for level 2=⁢y4+16⁢z−4Projection polynomials for level 3=⁢4⁢x⁢y2+16⁢x2−4⁢z+1
for i from 2 to nops( op( [ 2, 2, 2 ], expr ) ) do # demonstrating incrementality with loop printf( "Adding clause %a\n", op( [ 2, 2, 2, i ], expr ) ); ( q, data ) := InsertFormula( data, ':-And', i, op( [ 2, 2, 2, i ], expr ), 'output = [ qf, data ]' ); printf( "Number of leaf cells in CAD: %d\n", NumberOfLeafCells( data ) ); until not q: # because of the innermost quantifier which is universal
Adding clause 2*x+y^2*z+1/2 = 0 Number of leaf cells in CAD: 61
i, nops( op( [ 2, 2, 2 ], expr ) );
2,3
data;
Variables=⁢z,y,xInput Formula=⁢∃⁡z,∀⁡y,∃⁡x,4⁢x⁢y2+16⁢x2−4⁢z+1=0∧2⁢y2⁢z+4⁢x+1=0# Cells=⁢61Projection polynomials for level 1=⁢z2⁢z−14⁢z−164⁢z3−48⁢z2+8⁢z+1Projection polynomials for level 2=⁢2⁢y2⁢z+1y4+16⁢z−44⁢y4⁢z2−2⁢y4⁢z+4⁢y2⁢z−y2−4⁢z+2Projection polynomials for level 3=⁢2⁢y2⁢z+4⁢x+14⁢x⁢y2+16⁢x2−4⁢z+1
q, data, NumberOfLeafCells( data );
false,Variables=⁢z,y,xInput Formula=⁢∃⁡z,∀⁡y,∃⁡x,4⁢x⁢y2+16⁢x2−4⁢z+1=0∧2⁢y2⁢z+4⁢x+1=0# Cells=⁢61Projection polynomials for level 1=⁢z2⁢z−14⁢z−164⁢z3−48⁢z2+8⁢z+1Projection polynomials for level 2=⁢2⁢y2⁢z+1y4+16⁢z−44⁢y4⁢z2−2⁢y4⁢z+4⁢y2⁢z−y2−4⁢z+2Projection polynomials for level 3=⁢2⁢y2⁢z+4⁢x+14⁢x⁢y2+16⁢x2−4⁢z+1,61
infolevel[ PartialCylindricalAlgebraicDecompose ] := 4:
( q, data ) := PartialCylindricalAlgebraicDecompose( expr, 'output = [ qf, data ]' ):
projectAllOrders: Exact triangular system deduced for equational constraints
projectAllOrders: 3 elements in Groebner basis for equational constraints
PartialCylindricalAlgebraicDecompose: Prenex conversion of input formula: exists(z,forall(y,exists(x,And(4*x*y^2+16*x^2-4*z+1 = 0,2*y^2*z+4*x+1 = 0,2*x^2*z-2*y^2-x = 0))))
PartialCylindricalAlgebraicDecompose: 2 polynomials used in restricted projection operations due to equational constraints
PartialCylindricalAlgebraicDecompose: 4 polynomials in projection basis for z
PartialCylindricalAlgebraicDecompose: 1 polynomials in projection basis for y
PartialCylindricalAlgebraicDecompose: 1 polynomials in projection basis for x
PartialCylindricalAlgebraicDecompose: 6 total polynomials in projection
PartialCylindricalAlgebraicDecompose: 111 total cells created in CAD
PartialCylindricalAlgebraicDecompose: 45 leaf cells on termination
false,Variables=⁢z,y,xInput Formula=⁢∃⁡z,∀⁡y,∃⁡x,4⁢x⁢y2+16⁢x2−4⁢z+1=0∧2⁢y2⁢z+4⁢x+1=0∧2⁢x2⁢z−2⁢y2−x=0# Cells=⁢45Projection polynomials for level 1=⁢z−137104⁢z6−600⁢z5+2111⁢z4+122062⁢z3+232833⁢z2−680336⁢z+28881476752⁢z6−1272⁢z5+4197⁢z4+251555⁢z3+481837⁢z2−1407741⁢z+59566616⁢z6+8⁢z5+9⁢z4+61⁢z3+136⁢z2−206⁢z+60Projection polynomials for level 2=⁢−76752⁢z6+1272⁢z5−4197⁢z4−251555⁢z3+1988⁢y2−481837⁢z2+1407741⁢z−595666Projection polynomials for level 3=⁢37104⁢z6−600⁢z5+2111⁢z4+122062⁢z3+232833⁢z2+3976⁢x−680336⁢z+288814,45
infolevel[ PartialCylindricalAlgebraicDecompose ] := 0:
Poly-algorithmic QE [5,6]
The implementation of the default routine offered for QE in QuantifierElimination, QuantifierEliminate, is a poly-algorithm between two main algorithms for QE: VTS (Virtual Term Substitution) and CAD (Cylindrical Algebraic Decomposition). Briefly, because VTS is currently only applicable up to certain polynomial degrees, CAD can be used as a failover when VTS is no longer applicable in intermediate processing of the formula. However, the usage of CAD within the poly-algorithm is highly incremental at such stages by default.
expr := exists([a, b, c, d],And(a^2+b^2 = r^2,0 <= a,b < 0,1 <= c,d < -1,c-(1+b)*(c-a) = 0,d-(1-a)*(d-b) = 0)); # [9], "Piano Movers Problem (Wang)", QEExamples
expr≔∃⁡a,b,c,d,a2+b2=r2∧0≤a∧b<0∧1≤c∧d<−1∧c−1+b⁢c−a=0∧d−1−a⁢d−b=0
Most QuantifierElimination routines offer printing of verbose information via infolevel.
infolevel[ QuantifierEliminate ] := 3;
infolevelQuantifierEliminate≔3
Usage of the poly-algorithm is controllable via keyword options. The 'hybridmode' option controls how the algorithm should traverse nodes of the VTS tree when switching to CAD:
QuantifierEliminate( expr, 'hybridmode = depth' ); # actually default option in QuantifierEliminate
QuantifierEliminate: Prenex conversion of input formula: exists([a, b, c, d],And(a^2+b^2-r^2 = 0,-a <= 0,b < 0,-c <= -1,d < -1,a*b-b*c+a = 0,a*b-a*d-b = 0))
QuantifierEliminate: All quantifiers are the same: exists, so problem is amenable to poly-algorithmic QE
QuantifierEliminate: Eliminating last block of quantifiers in a formula exists([a, b, c, d],And(a^2+b^2-r^2 = 0,-a <= 0,b < 0,-c <= -1,d < -1,a*b-b*c+a = 0,a*b-a*d-b = 0)) via poly-algorithmic QE
ModuleCopy: Eliminating last block of quantifiers in a formula exists(a,0 < 1-a) via poly-algorithmic QE
ModuleCopy: 0 unused calculated VTS test points
ModuleCopy: 1 leaf formulae on termination of VTS
ModuleCopy: Eliminating last block of quantifiers in a formula exists(a,0 < a-1) via poly-algorithmic QE
ModuleCopy: Eliminating last block of quantifiers in a formula exists(b,0 < b) via poly-algorithmic QE
ModuleCopy: Eliminating last block of quantifiers in a formula exists(b,0 < -b) via poly-algorithmic QE
ModuleCopy: Eliminating last block of quantifiers in a formula exists(a,0 < a) via poly-algorithmic QE
ModuleCopy: Eliminating last block of quantifiers in a formula exists(a,0 < -a) via poly-algorithmic QE
QuantifierEliminate: 0 unused calculated VTS test points
QuantifierEliminate: 2 leaf formulae on termination of VTS
QuantifierEliminate: Entering CAD for the first time to solve QE problem(s) of excessive degree for VTS
QuantifierEliminate: Producing new CAD on QE problem of excessive degree: exists(a,And(a^2-r^2 <= 0,a <> 0,-a <= 0,a^2-r^2 < 0,Or(And(a^2 < 0,-a^6+a^4*r^2+2*a^5-2*a^3*r^2-2*a^4+a^2*r^2 < 0),And(-a^2+a <= 0,Or(a^2 < 0,a^6-a^4*r^2-2*a^5+2*a^3*r^2+2*a^4-a^2*r^2 < 0))),a^2-r^2 = 0,-a^2 <= 0,a^4-a^2*r^2+a^2 = 0))
QuantifierEliminate: 1 polynomials used in restricted projection operations due to equational constraints
QuantifierEliminate: 1 polynomials in projection basis for a
QuantifierEliminate: 5 polynomials in projection basis for a
QuantifierEliminate: 6 total polynomials in projection
QuantifierEliminate: 30 total cells created in CAD
QuantifierEliminate: 27 leaf cells on termination
QuantifierEliminate: Modifying existing CAD to solve QE problem of excessive degree: exists(a,And(a^2-r^2 <= 0,a^2-r^2 <> 0,a <> 0,-a <= 0,a^2-r^2 < 0,Or(And(a^3-a*r^2-a^2+r^2 <= 0,-a^6+2*a^4*r^2-a^2*r^4+2*a^5-4*a^3*r^2+2*a*r^4-2*a^4+3*a^2*r^2-r^4 <= 0),And(a <= 0,a^6-2*a^4*r^2+a^2*r^4-2*a^5+4*a^3*r^2-2*a*r^4+2*a^4-3*a^2*r^2+r^4 <= 0)),Or(And(a^2 < 0,-a^6+a^4*r^2+2*a^5-2*a^3*r^2-2*a^4+a^2*r^2 < 0),And(-a^2+a <= 0,Or(a^2 < 0,a^6-a^4*r^2-2*a^5+2*a^3*r^2+2*a^4-a^2*r^2 < 0)))))
modifyCADResult: 0 new quantified variables involved in CAD in VTS to CAD incrementality
modifyCADResult: 1 polynomials are used in restricted projection operations due to equational constraints
modifyCADResult: 4 new polynomials in r from incremental projection
modifyCADResult: 0 new polynomials in a from incremental projection
modifyCADResult: 168 total cells created in CAD
modifyCADResult: 135 leaf cells on termination
QuantifierEliminate: Modifying existing CAD to solve QE problem of excessive degree: exists(a,And(a^2-r^2 <= 0,a^2-r^2 <> 0,-a <= 0,a^2-r^2 < 0,Or(And(a^3-a*r^2-a^2+r^2 <= 0,-a^6+2*a^4*r^2-a^2*r^4+2*a^5-4*a^3*r^2+2*a*r^4-2*a^4+3*a^2*r^2-r^4 <= 0),And(a <= 0,a^6-2*a^4*r^2+a^2*r^4-2*a^5+4*a^3*r^2-2*a*r^4+2*a^4-3*a^2*r^2+r^4 <= 0)),a = 0,a^4-a^2*r^2-2*a^3+2*a*r^2+a^2-r^2 = 0))
modifyCADResult: 0 new polynomials in r from incremental projection
modifyCADResult: 143 leaf cells on termination
QuantifierEliminate: Modifying existing CAD to solve QE problem of excessive degree: exists(a,And(a^2-r^2 <= 0,a <> 0,-a <= 0,a^2-r^2 < 0,Or(And(a^2 < 0,-a^6+a^4*r^2+2*a^5-2*a^3*r^2-2*a^4+a^2*r^2 < 0),And(-a^2+a <= 0,Or(a^2 < 0,a^6-a^4*r^2-2*a^5+2*a^3*r^2+2*a^4-a^2*r^2 < 0))),-a^2+a <= 0,a^4-a^2*r^2-2*a^3+2*a*r^2+2*a^2-r^2 = 0))
QuantifierEliminate: Modifying existing CAD to solve QE problem of excessive degree: exists(a,And(a^2-r^2 <= 0,-a <= 0,a^2-r^2 < 0,-a^2+a <= 0,a^4-a^2*r^2-2*a^3+2*a*r^2+2*a^2-r^2 = 0,a = 0,a^4-a^2*r^2-2*a^3+2*a*r^2+a^2-r^2 = 0))
QuantifierEliminate: Modifying existing CAD to solve QE problem of excessive degree: exists(a,And(a < 1,a^2-a <> 0,a^4-a^2*r^2-2*a^3+2*a*r^2+2*a^2-r^2 = 0,-a <= 0,-a^2+a < 0,a = 0))
QuantifierEliminate: Modifying existing CAD to solve QE problem of excessive degree: exists(a,And(-a < -1,a^2-a <> 0,a^4-a^2*r^2-2*a^3+2*a*r^2+2*a^2-r^2 = 0,-a <= 0,-a^2+a < 0,a = 0))
QuantifierEliminate: Modifying existing CAD to solve QE problem of excessive degree: exists(a,And(a-1 <> 0,a^4-a^2*r^2-2*a^3+2*a*r^2+2*a^2-r^2 = 0,-a <= 0,-a^2+a < 0,a = 0))
−r2≤0∧−r2<0∧r2=0∨r−RootOf⁡_Z2−8,−796131459065725281474976710656..−1592262918131423562949953421312<0∨RootOf⁡_Z2−8,20870108520532451539373786976294838206464..417402170410649030813147573952589676412928−r<0
QuantifierEliminate( expr, 'hybridmode = whole' );
QuantifierEliminate: Entered CAD to solve (whole) QE problem of excessive degree for VTS: exists(a,Or(And(a-1 <> 0,a^4-a^2*r^2-2*a^3+2*a*r^2+2*a^2-r^2 = 0,-a <= 0,-a^2+a < 0,a = 0),And(a^2-r^2 <= 0,-a <= 0,a^2-r^2 < 0,-a^2+a <= 0,a^4-a^2*r^2-2*a^3+2*a*r^2+2*a^2-r^2 = 0,a = 0,a^4-a^2*r^2-2*a^3+2*a*r^2+a^2-r^2 = 0),And(-a < -1,a^2-a <> 0,a^4-a^2*r^2-2*a^3+2*a*r^2+2*a^2-r^2 = 0,-a <= 0,-a^2+a < 0,a = 0),And(a < 1,a^2-a <> 0,a^4-a^2*r^2-2*a^3+2*a*r^2+2*a^2-r^2 = 0,-a <= 0,-a^2+a < 0,a = 0),And(a^2-r^2 <= 0,a^2-r^2 <> 0,-a <= 0,a^2-r^2 < 0,Or(And(a^3-a*r^2-a^2+r^2 <= 0,-a^6+2*a^4*r^2-a^2*r^4+2*a^5-4*a^3*r^2+2*a*r^4-2*a^4+3*a^2*r^2-r^4 <= 0),And(a <= 0,a^6-2*a^4*r^2+a^2*r^4-2*a^5+4*a^3*r^2-2*a*r^4+2*a^4-3*a^2*r^2+r^4 <= 0)),a = 0,a^4-a^2*r^2-2*a^3+2*a*r^2+a^2-r^2 = 0),And(-r^2 <= 0,-r^2 < 0,r^2 = 0),And(a^2-r^2 <= 0,a <> 0,-a <= 0,a^2-r^2 < 0,Or(And(a^2 < 0,-a^6+a^4*r^2+2*a^5-2*a^3*r^2-2*a^4+a^2*r^2 < 0),And(-a^2+a <= 0,Or(a^2 < 0,a^6-a^4*r^2-2*a^5+2*a^3*r^2+2*a^4-a^2*r^2 < 0))),-a^2+a <= 0,a^4-a^2*r^2-2*a^3+2*a*r^2+2*a^2-r^2 = 0),And(a^2-r^2 <= 0,a^2-r^2 <> 0,a <> 0,-a <= 0,a^2-r^2 < 0,Or(And(a^3-a*r^2-a^2+r^2 <= 0,-a^6+2*a^4*r^2-a^2*r^4+2*a^5-4*a^3*r^2+2*a*r^4-2*a^4+3*a^2*r^2-r^4 <= 0),And(a <= 0,a^6-2*a^4*r^2+a^2*r^4-2*a^5+4*a^3*r^2-2*a*r^4+2*a^4-3*a^2*r^2+r^4 <= 0)),Or(And(a^2 < 0,-a^6+a^4*r^2+2*a^5-2*a^3*r^2-2*a^4+a^2*r^2 < 0),And(-a^2+a <= 0,Or(a^2 < 0,a^6-a^4*r^2-2*a^5+2*a^3*r^2+2*a^4-a^2*r^2 < 0)))),And(a^2-r^2 <= 0,a <> 0,-a <= 0,a^2-r^2 < 0,Or(And(a^2 < 0,-a^6+a^4*r^2+2*a^5-2*a^3*r^2-2*a^4+a^2*r^2 < 0),And(-a^2+a <= 0,Or(a^2 < 0,a^6-a^4*r^2-2*a^5+2*a^3*r^2+2*a^4-a^2*r^2 < 0))),a^2-r^2 = 0,-a^2 <= 0,a^4-a^2*r^2+a^2 = 0)))
QuantifierEliminate: 0 polynomials used in restricted projection operations due to equational constraints
QuantifierEliminate: 7 polynomials in projection basis for r
QuantifierEliminate: 6 polynomials in projection basis for a
QuantifierEliminate: 13 total polynomials in projection
QuantifierEliminate: 314 total cells created in CAD
QuantifierEliminate: 283 leaf cells on termination
r<RootOf⁡_Z2−8,−796131459065725281474976710656..−1592262918131423562949953421312∨RootOf⁡_Z2−8,20870108520532451539373786976294838206464..417402170410649030813147573952589676412928<r
infolevel[ QuantifierEliminate ] := 0:
The 'maxvsdegree' keyword option controls the maximum applicable degree QuantifierEliminate will consider for usage of VTS. As such, 'maxvsdegree = 0' is completely equivalent to usage of PartialCylindricalAlgebraicDecompose, which offers QE completely by CAD under all circumstances.
Working with Cylindrical Algebraic Decompositions [1]
PartialCylindricalAlgebraicDecompose is the routine offered by QuantifierElimination to perform QE purely by CAD:
expr := exists(c,forall([b, a],Implies(Or(And(a-d = 0,b-c = 0),And(a-c = 0,b-1 = 0)),a^2-b = 0))); # [9], "Davenport-Heintz", QEExamples
expr≔∃⁡c,∀⁡b,a,a−d=0∧b−c=0∨a−c=0∧b−1=0⇒a2−b=0
PartialCylindricalAlgebraicDecompose( expr );
d=−1∨d=1
However CADs can be used to achieve more generic things in real algebraic geometry. CylindricalAlgebraicDecompose is the routine which allows you to retrieve a full "stock" CAD for a formula, via a CADData object.
C := CylindricalAlgebraicDecompose( GetUnquantifiedFormula( expr ), 'variablestrategy' = [ d, c, b, a ] ); # variable strategy as it would have to be for QE
C≔Variables=⁢d,c,b,aInput Polynomials=⁢bcda−ca−db−1b−cc−1c+1c+d−d+cd−1d+1−c2+b−d2+b−d2+cd2+1a2−b# Cells=⁢4949Projection polynomials for level 1=⁢dd−1d+1d2+1Projection polynomials for level 2=⁢cc−1c+1c+d−d+c−d2+cProjection polynomials for level 3=⁢bb−1b−c−c2+b−d2+bProjection polynomials for level 4=⁢a−ca−da2−b
Various methods are available on a CADData object. One can examine the underlying projection bases for the CAD in terms of the projection and lifting methodology of QuantifierElimination's CAD:
PrintProjection( C, 'verbose = true' );
Factors of polynomials from inequalities at level 4 for variable a: [ a-c, a-d, a^2-b ]
No equational constraints at level 4 for variable a
Factors of polynomials from inequalities at level 3 for variable b: [ b, b-1, b-c, -c^2+b, -d^2+b ]
No equational constraints at level 3 for variable b
Factors of polynomials from inequalities at level 2 for variable c: [ c, c-1, c+1, c+d, -d+c, -d^2+c ]
No equational constraints at level 2 for variable c
Polynomials at level 1 for variable d: [ d, d-1, d+1, d^2+1 ]
NumberOfLeafCells( C );
4949
leaves := GetCells( C )[ 1 .. 5 ]: # a few of the leaf cells map(print, leaves):
Description=⁢1<d∧d2<c∧c2<b∧RootOf⁡_Z2−b,index=real2<aSample Point=⁢d=2,c=5,b=26,a=7Index=⁢7,13,11,9
Description=⁢1<d∧d2<c∧c2<b∧a=RootOf⁡_Z2−b,index=real2Sample Point=⁢d=2,c=5,b=26,a=RootOf⁡_Z2−26,481588776929776967857859444732965739290427392..240794388464888483929334722366482869645213696Index=⁢7,13,11,8
Description=⁢1<d∧d2<c∧c2<b∧c<a∧a<RootOf⁡_Z2−b,index=real2Sample Point=⁢d=2,c=5,b=26,a=6112Index=⁢7,13,11,7
Description=⁢1<d∧d2<c∧c2<b∧a=cSample Point=⁢d=2,c=5,b=26,a=5Index=⁢7,13,11,6
Description=⁢1<d∧d2<c∧c2<b∧d<a∧a<cSample Point=⁢d=2,c=5,b=26,a=3Index=⁢7,13,11,5
GetCells is a method on a CADData object allowing for access to all cells of the CAD.
cell := leaves[ -2 ];
cell≔Description=⁢1<d∧d2<c∧c2<b∧a=cSample Point=⁢d=2,c=5,b=26,a=5Index=⁢7,13,11,6
A CADCell is an object representing a CAD cell. The following demonstrates usage of two methods to query properties of a CADCell:
GetFullDescription( cell );
1<d∧d2<c∧c2<b∧a=c
GetSamplePoints( cell );
d=2,c=5,b=26,a=5
SignOfPolynomialOnCell allows for querying the sign of a polynomial on a single CAD cell. It uses data from the overall CAD data structure, so is principally a method on CADData:
SignOfPolynomialOnCell( C, c - a, cell );
0
SignOfPolynomialOnCell( C, d - 1, cell );
1
SignOfPolynomialOnCell( C, ( c - a )*( d - 1 ), cell );
SignOfPolynomialOnCell will produce warnings when the query is ill defined in terms of the sign invariance of the CAD.
SignOfPolynomialOnCell( C, b + c, cell );
Warning, factor b+c of b+c could not be found in projection bases in CADData, and hence the given polynomial is not guaranteed sign invariant on this cell
GetCellContainingPoint is a more specific method to retrieve a cell from a CAD containing a specific point in real space. This is a CADData method.
GetCellContainingPoint( C, [ d = 10, c = 0, a = -1, b = 2 ] );
Description=⁢1<d∧c=0∧1<b∧b<d2∧RootOf⁡_Z2−b,index=real1<a∧a<0Sample Point=⁢d=2,c=0,b=2,a=−1Index=⁢7,6,5,3
GetCellDescriptionContainingPoint( C, [ d = 10, c = 0, a = -1, b = 2 ] );
1<d∧c=0∧1<b∧b<d2∧RootOf⁡_Z2−b,index=real1<a∧a<0
The method produces warnings when the request is non-specific or otherwise not well defined in terms of the CAD.
GetCellContainingPoint( C, [ a = 4 ] );
Warning, variables {b, c, d} in CAD not defined in point, and hence cell returned may not be unique
Description=⁢d<−1∧c<d∧b<c∧d<aSample Point=⁢d=−2,c=−3,b=−4,a=−1Index=⁢1,1,1,5
cells := GetCells( CylindricalAlgebraicDecompose( x^2 + y^2 - 2 ) ):
for c in cells do GetFullDescription( c ); end do;
RootOf⁡_Z2−2,208701085205324515393147573952589676412928..417402170410649030813295147905179352825856<y
y=RootOf⁡_Z2−2,208701085205324515393147573952589676412928..417402170410649030813295147905179352825856∧0<x
y=RootOf⁡_Z2−2,208701085205324515393147573952589676412928..417402170410649030813295147905179352825856∧x=0
y=RootOf⁡_Z2−2,208701085205324515393147573952589676412928..417402170410649030813295147905179352825856∧x<0
RootOf⁡_Z2−2,−796131459065725562949953421312..−15922629181314231125899906842624<y∧y<RootOf⁡_Z2−2,208701085205324515393147573952589676412928..417402170410649030813295147905179352825856∧RootOf⁡_Z2+y2−2,index=real2<x
RootOf⁡_Z2−2,−796131459065725562949953421312..−15922629181314231125899906842624<y∧y<RootOf⁡_Z2−2,208701085205324515393147573952589676412928..417402170410649030813295147905179352825856∧x=RootOf⁡_Z2+y2−2,index=real2
RootOf⁡_Z2−2,−796131459065725562949953421312..−15922629181314231125899906842624<y∧y<RootOf⁡_Z2−2,208701085205324515393147573952589676412928..417402170410649030813295147905179352825856∧RootOf⁡_Z2+y2−2,index=real1<x∧x<RootOf⁡_Z2+y2−2,index=real2
RootOf⁡_Z2−2,−796131459065725562949953421312..−15922629181314231125899906842624<y∧y<RootOf⁡_Z2−2,208701085205324515393147573952589676412928..417402170410649030813295147905179352825856∧x=RootOf⁡_Z2+y2−2,index=real1
RootOf⁡_Z2−2,−796131459065725562949953421312..−15922629181314231125899906842624<y∧y<RootOf⁡_Z2−2,208701085205324515393147573952589676412928..417402170410649030813295147905179352825856∧x<RootOf⁡_Z2+y2−2,index=real1
y=RootOf⁡_Z2−2,−796131459065725562949953421312..−15922629181314231125899906842624∧0<x
y=RootOf⁡_Z2−2,−796131459065725562949953421312..−15922629181314231125899906842624∧x=0
y=RootOf⁡_Z2−2,−796131459065725562949953421312..−15922629181314231125899906842624∧x<0
y<RootOf⁡_Z2−2,−796131459065725562949953421312..−15922629181314231125899906842624
The 'data' output of the QuantifierEliminate routine of QuantifierElimination will be a QEData or CADData object. However, it is guaranteed to be a CADData object when the methodology of the routine is in some way forced to be pure CAD, such as the existence of radicals (where the radical is equivalent to a real algebraic number):
expr := exists( x, sqrt( 2 ) * x - 2 > 0 );
expr≔∃⁡x,0<2⁢x−2
q,w,data≔true,true,x=3,Variables=⁢xInput Formula=⁢∃⁡x,−RootOf⁡_Z2−2,14142135571000000000..14142135671000000000⁢x<−2# Cells=⁢3Projection polynomials for level 1=⁢x−RootOf⁡_Z2−2,14142135571000000000..14142135671000000000
expr := [x^2+y^2-9 = 0, x^2+y^2-1 = 0]; # [9], "Concentric Circles", CADExamples
expr≔x2+y2−9=0,x2+y2−1=0
"Stock" CAD accepts sets or lists of polynomials, and will deduce equational constraints:
CylindricalAlgebraicDecompose( expr, 'variablestrategy = greedy' );
Warning, Groebner bases cannot be used to preprocess equational constraints using greedy variable ordering for CAD. Groebner bases will not be produced
Variables=⁢y,xInput Polynomials=⁢y−3y+3x2+y2−9x2+y2−1# Cells=⁢17Projection polynomials for level 1=⁢y−3y+3Projection polynomials for level 2=⁢x2+y2−1x2+y2−9
Under the various overloads offered by CylindricalAlgebraicDecompose, equational constraints can be specifically designated by the user via the second passed collection of polynomials:
A, E := [ randpoly( [ x, y ] ) ], { randpoly( [ x, y ] ) };
A,E≔−2⁢x4⁢y+86⁢x3⁢y2+57⁢y5+61⁢x⁢y3−95⁢x2−58⁢x,7⁢x2⁢y3−61⁢y5−60⁢x3⁢y+17⁢x+87⁢y−32
C := CylindricalAlgebraicDecompose( A, E, 'variablestrategy = sotd' ); NumberOfLeafCells( C );
C≔Variables=⁢y,xInput Polynomials=⁢y61⁢y5−87⁢y+322⁢x4⁢y−86⁢x3⁢y2−57⁢y5−61⁢x⁢y3+95⁢x2+58⁢x−7⁢x2⁢y3+61⁢y5+60⁢x3⁢y−17⁢x−87⁢y+3283692⁢y13−361681200⁢y11−119364⁢y9+7883624⁢y8+1031680800⁢y7−379468800⁢y6+14161⁢y5−11181240⁢y4−731594160⁢y3+541209600⁢y2−99532800⁢y+117912011729647131⁢y21−4364695360352⁢y20+7780186442623⁢y19−5321582098190⁢y18+1400137284730⁢y17+18798069577469⁢y16−20507141023314⁢y15+10169613884556⁢y14−2654653291081⁢y13−32011259084918⁢y12+13765300502282⁢y11−2946659701073⁢y10−5053617661375⁢y9+34823032979198⁢y8−9585365476713⁢y7+9081049848864⁢y6+2574396993070⁢y5−24272859613062⁢y4+16270734202624⁢y3−16590666946382⁢y2+10743760035212⁢y−2117917946496# Cells=⁢303Projection polynomials for level 1=⁢y61⁢y5−87⁢y+3283692⁢y13−361681200⁢y11−119364⁢y9+7883624⁢y8+1031680800⁢y7−379468800⁢y6+14161⁢y5−11181240⁢y4−731594160⁢y3+541209600⁢y2−99532800⁢y+117912011729647131⁢y21−4364695360352⁢y20+7780186442623⁢y19−5321582098190⁢y18+1400137284730⁢y17+18798069577469⁢y16−20507141023314⁢y15+10169613884556⁢y14−2654653291081⁢y13−32011259084918⁢y12+13765300502282⁢y11−2946659701073⁢y10−5053617661375⁢y9+34823032979198⁢y8−9585365476713⁢y7+9081049848864⁢y6+2574396993070⁢y5−24272859613062⁢y4+16270734202624⁢y3−16590666946382⁢y2+10743760035212⁢y−2117917946496Projection polynomials for level 2=⁢2⁢x4⁢y−86⁢x3⁢y2−57⁢y5−61⁢x⁢y3+95⁢x2+58⁢x−7⁢x2⁢y3+61⁢y5+60⁢x3⁢y−17⁢x−87⁢y+32
303
CylindricalAlgebraicDecompose allows for various keyword options at no constraint to produce a specific CAD requested by the user.
C := CylindricalAlgebraicDecompose( A, E, 'variablestrategy = sotd', 'liftingconstraints' = { x > -1, y > 0 } ); NumberOfLeafCells( C );
C≔Variables=⁢y,xInput Polynomials=⁢y61⁢y5−87⁢y+322⁢x4⁢y−86⁢x3⁢y2−57⁢y5−61⁢x⁢y3+95⁢x2+58⁢x−7⁢x2⁢y3+61⁢y5+60⁢x3⁢y−17⁢x−87⁢y+3283692⁢y13−361681200⁢y11−119364⁢y9+7883624⁢y8+1031680800⁢y7−379468800⁢y6+14161⁢y5−11181240⁢y4−731594160⁢y3+541209600⁢y2−99532800⁢y+117912011729647131⁢y21−4364695360352⁢y20+7780186442623⁢y19−5321582098190⁢y18+1400137284730⁢y17+18798069577469⁢y16−20507141023314⁢y15+10169613884556⁢y14−2654653291081⁢y13−32011259084918⁢y12+13765300502282⁢y11−2946659701073⁢y10−5053617661375⁢y9+34823032979198⁢y8−9585365476713⁢y7+9081049848864⁢y6+2574396993070⁢y5−24272859613062⁢y4+16270734202624⁢y3−16590666946382⁢y2+10743760035212⁢y−2117917946496# Cells=⁢227Projection polynomials for level 1=⁢y61⁢y5−87⁢y+3283692⁢y13−361681200⁢y11−119364⁢y9+7883624⁢y8+1031680800⁢y7−379468800⁢y6+14161⁢y5−11181240⁢y4−731594160⁢y3+541209600⁢y2−99532800⁢y+117912011729647131⁢y21−4364695360352⁢y20+7780186442623⁢y19−5321582098190⁢y18+1400137284730⁢y17+18798069577469⁢y16−20507141023314⁢y15+10169613884556⁢y14−2654653291081⁢y13−32011259084918⁢y12+13765300502282⁢y11−2946659701073⁢y10−5053617661375⁢y9+34823032979198⁢y8−9585365476713⁢y7+9081049848864⁢y6+2574396993070⁢y5−24272859613062⁢y4+16270734202624⁢y3−16590666946382⁢y2+10743760035212⁢y−2117917946496Projection polynomials for level 2=⁢2⁢x4⁢y−86⁢x3⁢y2−57⁢y5−61⁢x⁢y3+95⁢x2+58⁢x−7⁢x2⁢y3+61⁢y5+60⁢x3⁢y−17⁢x−87⁢y+32
227
C := CylindricalAlgebraicDecompose( A, E, 'variablestrategy = sotd', 'liftingconstraints = positive' ); NumberOfLeafCells( C );
C≔Variables=⁢y,xInput Polynomials=⁢y61⁢y5−87⁢y+322⁢x4⁢y−86⁢x3⁢y2−57⁢y5−61⁢x⁢y3+95⁢x2+58⁢x−7⁢x2⁢y3+61⁢y5+60⁢x3⁢y−17⁢x−87⁢y+3283692⁢y13−361681200⁢y11−119364⁢y9+7883624⁢y8+1031680800⁢y7−379468800⁢y6+14161⁢y5−11181240⁢y4−731594160⁢y3+541209600⁢y2−99532800⁢y+117912011729647131⁢y21−4364695360352⁢y20+7780186442623⁢y19−5321582098190⁢y18+1400137284730⁢y17+18798069577469⁢y16−20507141023314⁢y15+10169613884556⁢y14−2654653291081⁢y13−32011259084918⁢y12+13765300502282⁢y11−2946659701073⁢y10−5053617661375⁢y9+34823032979198⁢y8−9585365476713⁢y7+9081049848864⁢y6+2574396993070⁢y5−24272859613062⁢y4+16270734202624⁢y3−16590666946382⁢y2+10743760035212⁢y−2117917946496# Cells=⁢145Projection polynomials for level 1=⁢y61⁢y5−87⁢y+3283692⁢y13−361681200⁢y11−119364⁢y9+7883624⁢y8+1031680800⁢y7−379468800⁢y6+14161⁢y5−11181240⁢y4−731594160⁢y3+541209600⁢y2−99532800⁢y+117912011729647131⁢y21−4364695360352⁢y20+7780186442623⁢y19−5321582098190⁢y18+1400137284730⁢y17+18798069577469⁢y16−20507141023314⁢y15+10169613884556⁢y14−2654653291081⁢y13−32011259084918⁢y12+13765300502282⁢y11−2946659701073⁢y10−5053617661375⁢y9+34823032979198⁢y8−9585365476713⁢y7+9081049848864⁢y6+2574396993070⁢y5−24272859613062⁢y4+16270734202624⁢y3−16590666946382⁢y2+10743760035212⁢y−2117917946496Projection polynomials for level 2=⁢2⁢x4⁢y−86⁢x3⁢y2−57⁢y5−61⁢x⁢y3+95⁢x2+58⁢x−7⁢x2⁢y3+61⁢y5+60⁢x3⁢y−17⁢x−87⁢y+32
145
select( i -> length( i ) < 150, map( GetSamplePoints, GetCells( C ) ) ); # get some of the simpler CADCells to inspect
y=372,x=16071,y=372,x=RootOf⁡22320⁢_Z3−360351936⁢_Z2−17⁢_Z+434554782967220,172543906912651073741824..4313597672823268435456,y=372,x=16006,y=372,x=2997,y=372,x=143,y=104,x=4474,y=104,x=1588,y=104,x=466,y=104,x=46,y=10,x=432,y=10,x=54,y=135136,x=43,y=135136,x=6,y=3637,x=42,y=3637,x=6,y=3637,x=12,y=3637,x=137,y=RootOf⁡61⁢_Z5−87⁢_Z+32,6826045930291370368744177664..136520918605853140737488355328,x=42,y=RootOf⁡61⁢_Z5−87⁢_Z+32,6826045930291370368744177664..136520918605853140737488355328,x=6,y=RootOf⁡61⁢_Z5−87⁢_Z+32,6826045930291370368744177664..136520918605853140737488355328,x=12,y=2223,x=41,y=2223,x=6,y=2223,x=12,y=1112,x=40,y=1112,x=6,y=1112,x=12,y=12,x=16,y=12,x=9,y=12,x=2,y=12,x=RootOf⁡960⁢_Z3−28⁢_Z2−544⁢_Z−307,43358890023494614503599627370496..86717780046989499007199254740992,y=12,x=12,y=12,x=135,y=716,x=2,y=716,x=12,y=716,x=169,y=25,x=2,y=25,x=RootOf⁡75000⁢_Z3−1400⁢_Z2−53125⁢_Z−6798,1636314096847752718014398509481984..81815704842387779007199254740992,y=25,x=12,y=25,x=1108,y=RootOf⁡61⁢_Z5−87⁢_Z+32,52476735388739140737488355328..2623836769438370368744177664,x=2,y=RootOf⁡61⁢_Z5−87⁢_Z+32,52476735388739140737488355328..2623836769438370368744177664,x=12,y=RootOf⁡61⁢_Z5−87⁢_Z+32,52476735388739140737488355328..2623836769438370368744177664,x=1155,y=1643,x=2,y=1643,x=12,y=1643,x=1146,y=1643,x=1309,y=13,x=2,y=13,x=RootOf⁡4860⁢_Z3−63⁢_Z2−4131⁢_Z+790,18301030247799252251799813685248..73204120991197279007199254740992,y=13,x=12,y=13,x=16,y=13,x=1274,y=14,x=2,y=14,x=11174,y=190,x=5,y=190,x=3,y=190,x=1,y=190,x=16866841223
C := CylindricalAlgebraicDecompose( { randpoly([x]) }, 'opencad = true' )
C≔Variables=⁢xInput Polynomials=⁢88⁢x5+94⁢x4+6⁢x3+21⁢x2+18⁢x+75# Cells=⁢2Projection polynomials for level 1=⁢88⁢x5+94⁢x4+6⁢x3+21⁢x2+18⁢x+75
2
C := CylindricalAlgebraicDecompose( x^2 + y^2 - 2 )
C≔Variables=⁢y,xInput Polynomials=⁢y2−2x2+y2−2# Cells=⁢13Projection polynomials for level 1=⁢y2−2Projection polynomials for level 2=⁢x2+y2−2
map(print, GetCells( C, output=['descriptions'] )):
Equational Constraints with the Lazard Projection in CAD
Equational constraints are usually of high importance to implementations of CAD using the "projection and lifting" methodology for construction of CAD, as QuantifierElimination's is. CAD in QuantifierElimination is the first implementation of CAD for Maple using the Lazard projection. Furthermore, it is the first implementation using equational constraints in the Lazard projection. Usage of equational constraints is more performant for CAD, but can threaten the integrity of the output via various observable mathematical occurrences which may force construction of CAD to fail in usage of the equational constraints. The QuantifierElimination package offers support for usage of up to multiple equational constraints from input, and in implementation of various algorithms from recent research [6,7], can guarantee resolution of a correct CAD for usage of a single equational constraint ('useequations = single'). Usage of multiple equational constraints 'useequations = multiple' may produce an error in circumstances where the mathematical impediments from usage of multiple equational constraints cannot be resolved.
unassign( 'c' );
expr := exists([b,a], And(a+b+c = 0,a*b+a*c+b*c = 0,a*b*c-1 = 0)); # [9], "Cyclic-3", QEExamples
expr≔∃⁡b,a,a+b+c=0∧a⁢b+a⁢c+b⁢c=0∧a⁢b⁢c−1=0
The GetEquationalConstraints routine from QuantifierTools allows for examination of the equational constraints for a formula. These are the same equational constraints QuantifierElimination routines will use under the hood.
GetEquationalConstraints( expr );
a+b+c,a⁢b⁢c−1,a⁢b+a⁢c+b⁢c
Equational constraints can be implicit:
GetEquationalConstraints( And( x = 0, Or( y = a, b = c ) ) );
x,−y+a⁢b−c
Variables=⁢c,a,bInput Formula=⁢∃⁡a,b,a+b+c=0∧a⁢b+a⁢c+b⁢c=0∧a⁢b⁢c−1=0# Cells=⁢25Projection polynomials for level 1=⁢c−1+cc2+c+1Projection polynomials for level 2=⁢a+ca2+a⁢c+c2Projection polynomials for level 3=⁢a+b+c
We examine the properties of a CAD under varying usage of equational constraints. 'usegroebner' is a keyword option controlling preprocessing of equational constraints using Gröbner bases, while 'propagateecs' is relevant to usage of equational constraints in projection.
NumberOfLeafCells( data );
25
PrintProjection( data );
Polynomials at level 3 for variable b: [ a+b+c ]
Polynomials at level 2 for variable a: [ a+c, a^2+a*c+c^2 ]
Polynomials at level 1 for variable c: [ c, -1+c, c^2+c+1 ]
( q, data ) := PartialCylindricalAlgebraicDecompose( expr, 'output = [ qf, data ]', 'usegroebner' = false ):
Polynomials at level 3 for variable b: [ a*b*c-1, a*b+a*c+b*c, a+b+c ]
Polynomials at level 2 for variable a: [ a+c, a^2+a*c+c^2, a^2*c+a*c^2+1 ]
Polynomials at level 1 for variable c: [ c, -1+c, c^3-4, c^2+c+1 ]
133
( q, data ) := PartialCylindricalAlgebraicDecompose( expr, 'output = [ qf, data ]', 'usegroebner = false', 'propagateecs = false' ):
Polynomials at level 2 for variable a: [ a+c, a^2*c+a*c^2+1, a^2+a*c+c^2 ]
expr := exists([v__1, v__10, v__2, v__3, v__4, v__5, v__6, v__7, v__8, v__9],And(-v__3* v__5*v__8+v__1*v__4 = 0,v__3*v__8 <> 0,-v__3*v__6*v__8+v__2*v__7 = 0,v__3*v__8 <> 0,v__7*v__9 = v__3,v__10*v__8 = v__1,-v__10*v__4*v__8+v__7*v__8*v__9-v__2* v__7 = 0,v__7 <> 0,v__6 = 1-v__5)); # [3], Economics QE example 0063
expr≔∃⁡v__1,v__10,v__2,v__3,v__4,v__5,v__6,v__7,v__8,v__9,−v__3⁢v__5⁢v__8+v__1⁢v__4=0∧v__3⁢v__8≠0∧−v__3⁢v__6⁢v__8+v__2⁢v__7=0∧v__3⁢v__8≠0∧v__7⁢v__9=v__3∧v__10⁢v__8=v__1∧−v__10⁢v__4⁢v__8+v__7⁢v__8⁢v__9−v__2⁢v__7=0∧v__7≠0∧v__6=1−v__5
eqns := GetEquationalConstraints( expr ); nops( eqns ); nops( op( 2, expr ) );
eqns≔v__6−1+v__5,−v__10⁢v__8+v__1,−v__7⁢v__9+v__3,−v__3⁢v__5⁢v__8+v__1⁢v__4,−v__3⁢v__6⁢v__8+v__2⁢v__7,v__10⁢v__4⁢v__8−v__7⁢v__8⁢v__9+v__2⁢v__7
6
9
( q, data ) := PartialCylindricalAlgebraicDecompose( expr, 'output = [ qf, data ]', 'usegroebner' = true );
projectAllOrders: 6 elements in Groebner basis for equational constraints
PartialCylindricalAlgebraicDecompose: Prenex conversion of input formula: exists([v__8, v__7, v__3, v__9, v__6, v__5, v__4, v__2, v__10, v__1],And(-v__3*v__5*v__8+v__1*v__4 = 0,v__3*v__8 <> 0,-v__3*v__6*v__8+v__2*v__7 = 0,-v__7*v__9+v__3 = 0,-v__10*v__8+v__1 = 0,v__10*v__4*v__8-v__7*v__8*v__9+v__2*v__7 = 0,v__7 <> 0,v__6-1+v__5 = 0))
PartialCylindricalAlgebraicDecompose: 6 polynomials used in restricted projection operations due to equational constraints
PartialCylindricalAlgebraicDecompose: 1 polynomials in projection basis for v__8
PartialCylindricalAlgebraicDecompose: 1 polynomials in projection basis for v__7
PartialCylindricalAlgebraicDecompose: 1 polynomials in projection basis for v__3
PartialCylindricalAlgebraicDecompose: 1 polynomials in projection basis for v__9
PartialCylindricalAlgebraicDecompose: 2 polynomials in projection basis for v__6
PartialCylindricalAlgebraicDecompose: 1 polynomials in projection basis for v__5
PartialCylindricalAlgebraicDecompose: 1 polynomials in projection basis for v__4
PartialCylindricalAlgebraicDecompose: 2 polynomials in projection basis for v__2
PartialCylindricalAlgebraicDecompose: 2 polynomials in projection basis for v__10
PartialCylindricalAlgebraicDecompose: 1 polynomials in projection basis for v__1
PartialCylindricalAlgebraicDecompose: 13 total polynomials in projection
PartialCylindricalAlgebraicDecompose: 34 total cells created in CAD
PartialCylindricalAlgebraicDecompose: 16 leaf cells on termination
q,data≔true,Variables=⁢v__8,v__7,v__3,v__9,v__6,v__5,v__4,v__2,v__10,v__1Input Formula=⁢∃⁡v__8,v__7,v__3,v__9,v__6,v__5,v__4,v__2,v__10,v__1,−v__3⁢v__5⁢v__8+v__1⁢v__4=0∧v__3⁢v__8≠0∧−v__3⁢v__6⁢v__8+v__2⁢v__7=0∧−v__7⁢v__9+v__3=0∧−v__10⁢v__8+v__1=0∧v__10⁢v__4⁢v__8−v__7⁢v__8⁢v__9+v__2⁢v__7=0∧v__7≠0∧v__6−1+v__5=0# Cells=⁢16Projection polynomials for level 1=⁢v__8Projection polynomials for level 2=⁢v__7Projection polynomials for level 3=⁢v__3Projection polynomials for level 4=⁢−v__7⁢v__9+v__3Projection polynomials for level 5=⁢v__6−1v__6Projection polynomials for level 6=⁢v__6−1+v__5Projection polynomials for level 7=⁢v__4Projection polynomials for level 8=⁢−v__6⁢v__8⁢v__9+v__2−v__3⁢v__6⁢v__8+v__2⁢v__7Projection polynomials for level 9=⁢v__10v__10⁢v__4+v__3⁢v__6−v__3Projection polynomials for level 10=⁢−v__10⁢v__8+v__1
( q, data ) := PartialCylindricalAlgebraicDecompose( expr, 'output = [ qf, data ]', 'usegroebner = false' );
PartialCylindricalAlgebraicDecompose: 2 polynomials in projection basis for v__9
PartialCylindricalAlgebraicDecompose: 3 polynomials in projection basis for v__6
PartialCylindricalAlgebraicDecompose: 2 polynomials in projection basis for v__5
PartialCylindricalAlgebraicDecompose: 3 polynomials in projection basis for v__2
PartialCylindricalAlgebraicDecompose: 3 polynomials in projection basis for v__10
PartialCylindricalAlgebraicDecompose: 2 polynomials in projection basis for v__1
PartialCylindricalAlgebraicDecompose: 19 total polynomials in projection
PartialCylindricalAlgebraicDecompose: 38 total cells created in CAD
PartialCylindricalAlgebraicDecompose: 20 leaf cells on termination
q,data≔true,Variables=⁢v__8,v__7,v__3,v__9,v__6,v__5,v__4,v__2,v__10,v__1Input Formula=⁢∃⁡v__8,v__7,v__3,v__9,v__6,v__5,v__4,v__2,v__10,v__1,−v__3⁢v__5⁢v__8+v__1⁢v__4=0∧v__3⁢v__8≠0∧−v__3⁢v__6⁢v__8+v__2⁢v__7=0∧−v__7⁢v__9+v__3=0∧−v__10⁢v__8+v__1=0∧v__10⁢v__4⁢v__8−v__7⁢v__8⁢v__9+v__2⁢v__7=0∧v__7≠0∧v__6−1+v__5=0# Cells=⁢20Projection polynomials for level 1=⁢v__8Projection polynomials for level 2=⁢v__7Projection polynomials for level 3=⁢v__3Projection polynomials for level 4=⁢v__9−v__7⁢v__9+v__3Projection polynomials for level 5=⁢v__6v__6−1v__3⁢v__6−v__7⁢v__9Projection polynomials for level 6=⁢v__3⁢v__5+v__3⁢v__6−v__7⁢v__9v__6−1+v__5Projection polynomials for level 7=⁢v__4Projection polynomials for level 8=⁢−v__8⁢v__9+v__2v__3⁢v__5⁢v__8−v__7⁢v__8⁢v__9+v__2⁢v__7−v__3⁢v__6⁢v__8+v__2⁢v__7Projection polynomials for level 9=⁢v__10v__10⁢v__4−v__3⁢v__5v__10⁢v__4⁢v__8−v__7⁢v__8⁢v__9+v__2⁢v__7Projection polynomials for level 10=⁢−v__3⁢v__5⁢v__8+v__1⁢v__4−v__10⁢v__8+v__1
unassign( 'd' );
As stated before, usage of multiple equational constraints ('useequations = multiple') can fail with an expectable error.
CylindricalAlgebraicDecompose( expr, 'useequations = multiple' );
Error, (in QuantifierElimination:-CylindricalAlgebraicDecompose) Lazard curtain detected: a level 4 equational constraint a*b-a*d-b has non zero valuation on cell with index [4, 2, 3], and sample point [b = 0, a = 0, r = 1] and so a Lazard projection CAD using equational constraint optimizations cannot be produced for the input polynomials or formula with this variable ordering [b, a, r, d, c] and multiple equational constraints (useequations = multiple) |lib/QuantifierElimination/CAD/CADCell_Methods/src/CCHILD.mm:110|
infolevel[ CylindricalAlgebraicDecompose ] := 4;
infolevelCylindricalAlgebraicDecompose≔4
Usage of at most a single equational constraint is always a viable failover in such a case.
CylindricalAlgebraicDecompose( expr, 'useequations = single' );
CylindricalAlgebraicDecompose: 1 polynomials used in restricted projection operations due to equational constraints
CylindricalAlgebraicDecompose: 4 polynomials in projection basis for b
CylindricalAlgebraicDecompose: 4 polynomials in projection basis for a
CylindricalAlgebraicDecompose: 1 polynomials in projection basis for r
CylindricalAlgebraicDecompose: 2 polynomials in projection basis for d
CylindricalAlgebraicDecompose: 2 polynomials in projection basis for c
CylindricalAlgebraicDecompose: 13 total polynomials in projection
decomposeCurtainCellsCAD: Performing extra decomposition to fix 15 cells with non-point curtains from lifting, via 1 polynomials from original inequalities
CylindricalAlgebraicDecompose: 4039 total cells created in CAD
CylindricalAlgebraicDecompose: 3155 leaf cells on termination
Variables=⁢b,a,r,d,cInput Polynomials=⁢ab−1+c1+ba−1d+1b2+1a2+b2a⁢b−b⁢c+aa⁢b+a−bb2+2⁢b+2a2+b2−r2a⁢b−a⁢d−b# Cells=⁢3155Projection polynomials for level 1=⁢b1+bb2+1b2+2⁢b+2Projection polynomials for level 2=⁢aa−1a2+b2a⁢b+a−bProjection polynomials for level 3=⁢a2+b2−r2Projection polynomials for level 4=⁢d+1a⁢b−a⁢d−bProjection polynomials for level 5=⁢−1+ca⁢b−b⁢c+a
infolevel[ CylindricalAlgebraicDecompose ] := 0:
QuantifierTools
QuantifierTools is a subpackage of QuantifierElimination offering routines for manipulation of formulae in the same format as the input syntax for QuantifierElimination as a whole.
expr := Implies( x > 0, forall( x, Not( x^2 <= 0 ) ) );
expr≔0<x⇒∀⁡x,¬x2≤0
prenexExpr≔∀⁡x,0≤−x∨0<x2
NegateFormula( prenexExpr );
∃⁡x,−x<0∧x2≤0
expr := And( exists( x, x > 0 ), exists( x, x = 0 ) );
expr≔∃⁡x,0<x∧∃⁡x,x=0
AlphaConvert removes conflicts between variables using the same symbol for formulae which are principally non-prenex:
AlphaConvert( expr );
∃⁡x,0<x∧∃⁡x__1,x__1=0
∃⁡x,x__1,−x<0∧x__1=0
expr := And( x/y <> 0, z/d > 0 );
expr≔xy≠0∧0<zd
ConvertRationalConstraintsToTarski converts formulae using rational functions to an equivalent Tarski formula:
x≠0∧y≠0∧0<z⁢d
expr := exists([y, x],And(x^2+y^2-1 = 0,b^2*(x-c)^2+a^2*y^2-a^2*b^2 = 0,0 < a,a < 1,0 < b,b < 1,0 <= c,c < 1)); # [9], "Ellipse A", QEExamples
expr≔∃⁡y,x,x2+y2−1=0∧b2⁢x−c2+a2⁢y2−a2⁢b2=0∧0<a∧a<1∧0<b∧b<1∧0≤c∧c<1
SuggestCADOptions suggests a set of parameters including keyword options applicable to the CylindricalAlgebraicDecompose and PartialCylindricalAlgebraicDecompose routines of QuantifierElimination. These keyword options are suggested in terms of improvement of performance while preserving the integrity of the output.
The 'liftingconstraints' option allows for construction of a CAD in a hyperrectangle in real space for performance. In the above example, the formula principally includes the definition of such a hyperrectangle which can be extracted.
paramsSuggest := SuggestCADOptions( expr );
paramsSuggest≔∃⁡y,x,x2+y2−1=0∧a2⁢b2−a2⁢y2−b2⁢c2+2⁢b2⁢c⁢x−b2⁢x2=0,liftingconstraints=−c≤0,a<1,b<1,c<1,−a<0,−b<0,opencad=false
PartialCylindricalAlgebraicDecompose( paramsSuggest, 'useequations = single' );
0<c∧c<13∧0<b∧b<1−c∧a=1−c∨0<c∧c<13∧0<b∧b<1−c∧1−c<a∧a<1∨0<c∧c<13∧b=1−c∧a=1−c∨0<c∧c<13∧b=1−c∧1−c<a∧a<1∨0<c∧c<13∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧a=1−c∨0<c∧c<13∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧1−c<a∧a<b∨0<c∧c<13∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧a=b∨0<c∧c<13∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧b<a∧a<1∨0<c∧c<13∧b=RootOf⁡_Z2+c−1,index=real1∧a=RootOf⁡_Z2−c2+2⁢c−1,index=real1∨0<c∧c<13∧b=RootOf⁡_Z2+c−1,index=real1∧RootOf⁡_Z2−c2+2⁢c−1,index=real1<a∧a<RootOf⁡_Z2+c−1,index=real1∨0<c∧c<13∧b=RootOf⁡_Z2+c−1,index=real1∧a=RootOf⁡_Z2+c−1,index=real1∨0<c∧c<13∧b=RootOf⁡_Z2+c−1,index=real1∧RootOf⁡_Z2+c−1,index=real1<a∧a<1∨0<c∧c<13∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧a=RootOf⁡b2−1⁢_Z2−b4−b2⁢c2+b2,index=real1∨0<c∧c<13∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧RootOf⁡b2−1⁢_Z2−b4−b2⁢c2+b2,index=real1<a∧a<1−c∨0<c∧c<13∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧a=1−c∨0<c∧c<13∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧1−c<a∧a<b∨0<c∧c<13∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧a=b∨0<c∧c<13∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧b<a∧a<1∨0<c∧c<13∧b=RootOf⁡_Z2+c2−1,index=real1∧0<a∧a<1−c∨0<c∧c<13∧b=RootOf⁡_Z2+c2−1,index=real1∧a=1−c∨0<c∧c<13∧b=RootOf⁡_Z2+c2−1,index=real1∧1−c<a∧a<RootOf⁡_Z2+c2−1,index=real1∨0<c∧c<13∧b=RootOf⁡_Z2+c2−1,index=real1∧a=RootOf⁡_Z2+c2−1,index=real1∨0<c∧c<13∧b=RootOf⁡_Z2+c2−1,index=real1∧RootOf⁡_Z2+c2−1,index=real1<a∧a<1∨0<c∧c<13∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧0<a∧a<1−c∨0<c∧c<13∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧a=1−c∨0<c∧c<13∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧1−c<a∧a<b∨0<c∧c<13∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧a=b∨0<c∧c<13∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧b<a∧a<1∨c=13∧0<b∧b<23∧a=23∨c=13∧0<b∧b<23∧23<a∧a<1∨c=13∧b=23∧a=23∨c=13∧b=23∧23<a∧a<1∨c=13∧23<b∧b<RootOf⁡3⁢_Z2−2,index=real1∧a=23∨c=13∧23<b∧b<RootOf⁡3⁢_Z2−2,index=real1∧23<a∧a<b∨c=13∧23<b∧b<RootOf⁡3⁢_Z2−2,index=real1∧a=b∨c=13∧23<b∧b<RootOf⁡3⁢_Z2−2,index=real1∧b<a∧a<1∨c=13∧b=RootOf⁡3⁢_Z2−2,6169273739441209960090775557863725914323419136..123385474788824199201895151115727451828646838272∧a=23∨c=13∧b=RootOf⁡3⁢_Z2−2,6169273739441209960090775557863725914323419136..123385474788824199201895151115727451828646838272∧RootOf⁡9⁢_Z2−4,index=real1<a∧a<RootOf⁡3⁢_Z2−2,6169273739441209960090775557863725914323419136..123385474788824199201895151115727451828646838272∨c=13∧b=RootOf⁡3⁢_Z2−2,6169273739441209960090775557863725914323419136..123385474788824199201895151115727451828646838272∧a=RootOf⁡3⁢_Z2−2,6169273739441209960090775557863725914323419136..123385474788824199201895151115727451828646838272∨c=13∧b=RootOf⁡3⁢_Z2−2,6169273739441209960090775557863725914323419136..123385474788824199201895151115727451828646838272∧RootOf⁡3⁢_Z2−2,6169273739441209960090775557863725914323419136..123385474788824199201895151115727451828646838272<a∧a<1∨c=13∧RootOf⁡3⁢_Z2−2,index=real1<b∧b<RootOf⁡9⁢_Z2−8,index=real1∧a=RootOf⁡9⁢b2−9⁢_Z2−9⁢b4+8⁢b2,index=real1∨c=13∧RootOf⁡3⁢_Z2−2,index=real1<b∧b<RootOf⁡9⁢_Z2−8,index=real1∧RootOf⁡9⁢b2−9⁢_Z2−9⁢b4+8⁢b2,index=real1<a∧a<23∨c=13∧RootOf⁡3⁢_Z2−2,index=real1<b∧b<RootOf⁡9⁢_Z2−8,index=real1∧a=23∨c=13∧RootOf⁡3⁢_Z2−2,index=real1<b∧b<RootOf⁡9⁢_Z2−8,index=real1∧23<a∧a<b∨c=13∧RootOf⁡3⁢_Z2−2,index=real1<b∧b<RootOf⁡9⁢_Z2−8,index=real1∧a=b∨c=13∧RootOf⁡3⁢_Z2−2,index=real1<b∧b<RootOf⁡9⁢_Z2−8,index=real1∧b<a∧a<1∨c=13∧b=RootOf⁡9⁢_Z2−8,556536227214198707725590295810358705651712..11130724544283974154771180591620717411303424∧0<a∧a<23∨c=13∧b=RootOf⁡9⁢_Z2−8,556536227214198707725590295810358705651712..11130724544283974154771180591620717411303424∧a=23∨c=13∧b=RootOf⁡9⁢_Z2−8,556536227214198707725590295810358705651712..11130724544283974154771180591620717411303424∧23<a∧a<RootOf⁡9⁢_Z2−8,556536227214198707725590295810358705651712..11130724544283974154771180591620717411303424∨c=13∧b=RootOf⁡9⁢_Z2−8,556536227214198707725590295810358705651712..11130724544283974154771180591620717411303424∧a=RootOf⁡9⁢_Z2−8,556536227214198707725590295810358705651712..11130724544283974154771180591620717411303424∨c=13∧b=RootOf⁡9⁢_Z2−8,556536227214198707725590295810358705651712..11130724544283974154771180591620717411303424∧RootOf⁡9⁢_Z2−8,556536227214198707725590295810358705651712..11130724544283974154771180591620717411303424<a∧a<1∨c=13∧RootOf⁡9⁢_Z2−8,index=real1<b∧b<1∧0<a∧a<23∨c=13∧RootOf⁡9⁢_Z2−8,index=real1<b∧b<1∧a=23∨c=13∧RootOf⁡9⁢_Z2−8,index=real1<b∧b<1∧23<a∧a<b∨c=13∧RootOf⁡9⁢_Z2−8,index=real1<b∧b<1∧a=b∨c=13∧RootOf⁡9⁢_Z2−8,index=real1<b∧b<1∧b<a∧a<1∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧0<b∧b<1−c∧a=1−c∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧0<b∧b<1−c∧1−c<a∧a<1∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=1−c∧a=1−c∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=1−c∧1−c<a∧a<1∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧a=1−c∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧1−c<a∧a<b∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧a=b∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧b<a∧a<1∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2+c−1,index=real1∧a=RootOf⁡_Z2−c2+2⁢c−1,index=real1∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2+c−1,index=real1∧RootOf⁡_Z2−c2+2⁢c−1,index=real1<a∧a<RootOf⁡_Z2+c−1,index=real1∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2+c−1,index=real1∧a=RootOf⁡_Z2+c−1,index=real1∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2+c−1,index=real1∧RootOf⁡_Z2+c−1,index=real1<a∧a<1∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧a=RootOf⁡b2−1⁢_Z2−b4−b2⁢c2+b2,index=real1∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧RootOf⁡b2−1⁢_Z2−b4−b2⁢c2+b2,index=real1<a∧a<1−c∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧a=1−c∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧1−c<a∧a<b∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧a=b∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧b<a∧a<1∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2+c2−1,index=real1∧0<a∧a<1−c∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2+c2−1,index=real1∧a=1−c∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2+c2−1,index=real1∧1−c<a∧a<RootOf⁡_Z2+c2−1,index=real1∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2+c2−1,index=real1∧a=RootOf⁡_Z2+c2−1,index=real1∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2+c2−1,index=real1∧RootOf⁡_Z2+c2−1,index=real1<a∧a<1∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧0<a∧a<1−c∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧a=1−c∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧1−c<a∧a<b∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧a=b∨13<c∧c<RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧b<a∧a<1∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧0<b∧b<1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧a=1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧0<b∧b<1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<a∧a<1∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧a=1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<a∧a<1∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<b∧b<RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,index=real1∧a=1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<b∧b<RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,index=real1∧1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<a∧a<b∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<b∧b<RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,index=real1∧a=b∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<b∧b<RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,index=real1∧b<a∧a<1∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,2823705335235013540136893488147419103232..1411852667617511685318446744073709551616∧a=1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,2823705335235013540136893488147419103232..1411852667617511685318446744073709551616∧RootOf⁡_Z2+4⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−2,index=real1<a∧a<RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,2823705335235013540136893488147419103232..1411852667617511685318446744073709551616∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,2823705335235013540136893488147419103232..1411852667617511685318446744073709551616∧a=RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,2823705335235013540136893488147419103232..1411852667617511685318446744073709551616∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,2823705335235013540136893488147419103232..1411852667617511685318446744073709551616∧RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,2823705335235013540136893488147419103232..1411852667617511685318446744073709551616<a∧a<1∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,index=real1<b∧b<RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,index=real1∧a=RootOf⁡b2−1⁢_Z2−b4+2⁢b2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,index=real1∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,index=real1<b∧b<RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,index=real1∧RootOf⁡b2−1⁢_Z2−b4+2⁢b2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,index=real1<a∧a<1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,index=real1<b∧b<RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,index=real1∧a=1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,index=real1<b∧b<RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,index=real1∧1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<a∧a<b∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,index=real1<b∧b<RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,index=real1∧a=b∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2+RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712−1,index=real1<b∧b<RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,index=real1∧b<a∧a<1∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,3357970475332619714936893488147419103232..1678985237666314772718446744073709551616∧0<a∧a<1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,3357970475332619714936893488147419103232..1678985237666314772718446744073709551616∧a=1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,3357970475332619714936893488147419103232..1678985237666314772718446744073709551616∧1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<a∧a<RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,3357970475332619714936893488147419103232..1678985237666314772718446744073709551616∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,3357970475332619714936893488147419103232..1678985237666314772718446744073709551616∧a=RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,3357970475332619714936893488147419103232..1678985237666314772718446744073709551616∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧b=RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,3357970475332619714936893488147419103232..1678985237666314772718446744073709551616∧RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,3357970475332619714936893488147419103232..1678985237666314772718446744073709551616<a∧a<1∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,index=real1<b∧b<1∧0<a∧a<1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,index=real1<b∧b<1∧a=1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,index=real1<b∧b<1∧1−RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<a∧a<b∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,index=real1<b∧b<1∧a=b∨c=RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712∧RootOf⁡_Z2−2⁢RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712,index=real1<b∧b<1∧b<a∧a<1∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧0<b∧b<1−c∧a=1−c∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧0<b∧b<1−c∧1−c<a∧a<1∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧b=1−c∧a=1−c∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧b=1−c∧1−c<a∧a<1∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧a=1−c∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧1−c<a∧a<b∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧a=b∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧b<a∧a<1∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧b=RootOf⁡_Z2+c−1,index=real1∧a=RootOf⁡_Z2−c2+2⁢c−1,index=real1∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧b=RootOf⁡_Z2+c−1,index=real1∧RootOf⁡_Z2−c2+2⁢c−1,index=real1<a∧a<RootOf⁡_Z2+c−1,index=real1∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧b=RootOf⁡_Z2+c−1,index=real1∧a=RootOf⁡_Z2+c−1,index=real1∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧b=RootOf⁡_Z2+c−1,index=real1∧RootOf⁡_Z2+c−1,index=real1<a∧a<1∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧a=RootOf⁡b2−1⁢_Z2−b4−b2⁢c2+b2,index=real1∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧RootOf⁡b2−1⁢_Z2−b4−b2⁢c2+b2,index=real1<a∧a<1−c∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧a=1−c∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧1−c<a∧a<b∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧a=b∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧b<a∧a<1∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧b=RootOf⁡_Z2+c2−1,index=real1∧0<a∧a<1−c∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧b=RootOf⁡_Z2+c2−1,index=real1∧a=1−c∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧b=RootOf⁡_Z2+c2−1,index=real1∧1−c<a∧a<RootOf⁡_Z2+c2−1,index=real1∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧b=RootOf⁡_Z2+c2−1,index=real1∧a=RootOf⁡_Z2+c2−1,index=real1∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧b=RootOf⁡_Z2+c2−1,index=real1∧RootOf⁡_Z2+c2−1,index=real1<a∧a<1∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧0<a∧a<1−c∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧a=1−c∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧1−c<a∧a<b∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧a=b∨RootOf⁡_Z2+2⁢_Z−1,4890170609251848197471180591620717411303424..244508530462592409887590295810358705651712<c∧c<12∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧b<a∧a<1∨c=12∧0<b∧b<12∧a=12∨c=12∧0<b∧b<12∧12<a∧a<1∨c=12∧b=12∧a=12∨c=12∧b=12∧12<a∧a<1∨c=12∧12<b∧b<RootOf⁡2⁢_Z2−1,index=real1∧a=12∨c=12∧12<b∧b<RootOf⁡2⁢_Z2−1,index=real1∧12<a∧a<b∨c=12∧12<b∧b<RootOf⁡2⁢_Z2−1,index=real1∧a=b∨c=12∧12<b∧b<RootOf⁡2⁢_Z2−1,index=real1∧b<a∧a<1∨c=12∧b=RootOf⁡2⁢_Z2−1,8348043408212980615851180591620717411303424..208701085205324515403295147905179352825856∧a=12∨c=12∧b=RootOf⁡2⁢_Z2−1,8348043408212980615851180591620717411303424..208701085205324515403295147905179352825856∧RootOf⁡4⁢_Z2−1,index=real1<a∧a<RootOf⁡2⁢_Z2−1,8348043408212980615851180591620717411303424..208701085205324515403295147905179352825856∨c=12∧b=RootOf⁡2⁢_Z2−1,8348043408212980615851180591620717411303424..208701085205324515403295147905179352825856∧a=RootOf⁡2⁢_Z2−1,8348043408212980615851180591620717411303424..208701085205324515403295147905179352825856∨c=12∧b=RootOf⁡2⁢_Z2−1,8348043408212980615851180591620717411303424..208701085205324515403295147905179352825856∧RootOf⁡2⁢_Z2−1,8348043408212980615851180591620717411303424..208701085205324515403295147905179352825856<a∧a<1∨c=12∧RootOf⁡2⁢_Z2−1,index=real1<b∧b<RootOf⁡4⁢_Z2−3,index=real1∧a=RootOf⁡4⁢b2−4⁢_Z2−4⁢b4+3⁢b2,index=real1∨c=12∧RootOf⁡2⁢_Z2−1,index=real1<b∧b<RootOf⁡4⁢_Z2−3,index=real1∧RootOf⁡4⁢b2−4⁢_Z2−4⁢b4+3⁢b2,index=real1<a∧a<12∨c=12∧RootOf⁡2⁢_Z2−1,index=real1<b∧b<RootOf⁡4⁢_Z2−3,index=real1∧a=12∨c=12∧RootOf⁡2⁢_Z2−1,index=real1<b∧b<RootOf⁡4⁢_Z2−3,index=real1∧12<a∧a<b∨c=12∧RootOf⁡2⁢_Z2−1,index=real1<b∧b<RootOf⁡4⁢_Z2−3,index=real1∧a=b∨c=12∧RootOf⁡2⁢_Z2−1,index=real1<b∧b<RootOf⁡4⁢_Z2−3,index=real1∧b<a∧a<1∨c=12∧b=RootOf⁡4⁢_Z2−3,3271751472116227092801537778931862957161709568..130870058884649083712141151115727451828646838272∧0<a∧a<12∨c=12∧b=RootOf⁡4⁢_Z2−3,3271751472116227092801537778931862957161709568..130870058884649083712141151115727451828646838272∧a=12∨c=12∧b=RootOf⁡4⁢_Z2−3,3271751472116227092801537778931862957161709568..130870058884649083712141151115727451828646838272∧12<a∧a<RootOf⁡4⁢_Z2−3,3271751472116227092801537778931862957161709568..130870058884649083712141151115727451828646838272∨c=12∧b=RootOf⁡4⁢_Z2−3,3271751472116227092801537778931862957161709568..130870058884649083712141151115727451828646838272∧a=RootOf⁡4⁢_Z2−3,3271751472116227092801537778931862957161709568..130870058884649083712141151115727451828646838272∨c=12∧b=RootOf⁡4⁢_Z2−3,3271751472116227092801537778931862957161709568..130870058884649083712141151115727451828646838272∧RootOf⁡4⁢_Z2−3,3271751472116227092801537778931862957161709568..130870058884649083712141151115727451828646838272<a∧a<1∨c=12∧RootOf⁡4⁢_Z2−3,index=real1<b∧b<1∧0<a∧a<12∨c=12∧RootOf⁡4⁢_Z2−3,index=real1<b∧b<1∧a=12∨c=12∧RootOf⁡4⁢_Z2−3,index=real1<b∧b<1∧12<a∧a<b∨c=12∧RootOf⁡4⁢_Z2−3,index=real1<b∧b<1∧a=b∨c=12∧RootOf⁡4⁢_Z2−3,index=real1<b∧b<1∧b<a∧a<1∨12<c∧c<1∧0<b∧b<1−c∧a=1−c∨12<c∧c<1∧0<b∧b<1−c∧1−c<a∧a<1∨12<c∧c<1∧b=1−c∧a=1−c∨12<c∧c<1∧b=1−c∧1−c<a∧a<1∨12<c∧c<1∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧a=1−c∨12<c∧c<1∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧1−c<a∧a<b∨12<c∧c<1∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧a=b∨12<c∧c<1∧1−c<b∧b<RootOf⁡_Z2+c−1,index=real1∧b<a∧a<1∨12<c∧c<1∧b=RootOf⁡_Z2+c−1,index=real1∧a=RootOf⁡_Z2−c2+2⁢c−1,index=real1∨12<c∧c<1∧b=RootOf⁡_Z2+c−1,index=real1∧RootOf⁡_Z2−c2+2⁢c−1,index=real1<a∧a<RootOf⁡_Z2+c−1,index=real1∨12<c∧c<1∧b=RootOf⁡_Z2+c−1,index=real1∧a=RootOf⁡_Z2+c−1,index=real1∨12<c∧c<1∧b=RootOf⁡_Z2+c−1,index=real1∧RootOf⁡_Z2+c−1,index=real1<a∧a<1∨12<c∧c<1∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧a=RootOf⁡b2−1⁢_Z2−b4−b2⁢c2+b2,index=real1∨12<c∧c<1∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧RootOf⁡b2−1⁢_Z2−b4−b2⁢c2+b2,index=real1<a∧a<1−c∨12<c∧c<1∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧a=1−c∨12<c∧c<1∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧1−c<a∧a<b∨12<c∧c<1∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧a=b∨12<c∧c<1∧RootOf⁡_Z2+c−1,index=real1<b∧b<RootOf⁡_Z2+c2−1,index=real1∧b<a∧a<1∨12<c∧c<1∧b=RootOf⁡_Z2+c2−1,index=real1∧0<a∧a<1−c∨12<c∧c<1∧b=RootOf⁡_Z2+c2−1,index=real1∧a=1−c∨12<c∧c<1∧b=RootOf⁡_Z2+c2−1,index=real1∧1−c<a∧a<RootOf⁡_Z2+c2−1,index=real1∨12<c∧c<1∧b=RootOf⁡_Z2+c2−1,index=real1∧a=RootOf⁡_Z2+c2−1,index=real1∨12<c∧c<1∧b=RootOf⁡_Z2+c2−1,index=real1∧RootOf⁡_Z2+c2−1,index=real1<a∧a<1∨12<c∧c<1∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧0<a∧a<1−c∨12<c∧c<1∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧a=1−c∨12<c∧c<1∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧1−c<a∧a<b∨12<c∧c<1∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧a=b∨12<c∧c<1∧RootOf⁡_Z2+c2−1,index=real1<b∧b<1∧b<a∧a<1
The 'opencad' option allows for construction only of cells of full dimension. This is applicable when the input formula principally features no strong bounds:
expr := forall(x,0 < 4*x^8-4*(L-3)*x^6-2*(3*L-6)*x^4-2*(L-3)*x^2+1); # [9], "Piano Movers Problem (Yang, Zheng)", QEExamples
expr≔∀⁡x,0<4⁢x8−4⁢L−3⁢x6−2⁢3⁢L−6⁢x4−2⁢L−3⁢x2+1
paramsSuggest≔∀⁡x,−4⁢x8+4⁢x6⁢L−12⁢x6+6⁢x4⁢L−12⁢x4+2⁢x2⁢L−6⁢x2<1,liftingconstraints=∅,opencad=true
PartialCylindricalAlgebraicDecompose( paramsSuggest );
L<RootOf⁡_Z2−8,−796131459065725281474976710656..−1592262918131423562949953421312∨RootOf⁡_Z2−8,−796131459065725281474976710656..−1592262918131423562949953421312<L∧L<RootOf⁡_Z2−8,20870108520532451539373786976294838206464..417402170410649030813147573952589676412928
References
[1] G.E. Collins. "Quantifier Elimination for Real Closed Fields by Cylindrical Algebraic Decomposition". In Proceedings 2nd. GI Conference Automata Theory & Formal Languages, pages 134–183, 1975.
[2] V. Weispfenning. "The complexity of linear problems in fields". Journal of Symbolic Computation, 5(1):3–27, 1988.
[3] C.B. Mulligan, R. Bradford, J.H. Davenport, M. England, and Z. Tonks. "Non-linear Real Arithmetic Benchmarks derived from Automated Reasoning in Economics". In Proceedings SC2 Workshop FLoC 2018. CEUR Workshop Proceedings, 2018.
[4] Z. Tonks. "Evolutionary Virtual Term Substitution in a Quantifier Elimination System". In Proceedings SC2 Workshop 2019. CEUR Workshop Proceedings, 10 2019.
[5] Z. Tonks. "A Poly-algorithmic Quantifier Elimination Package in Maple". In Jürgen Gerhard and Ilias Kotsireas, editors, Maple in Mathematics Education and Research, pages 171–186, Cham, 2020. Springer International Publishing. https://www.youtube.com/watch?v=DzrBaUkXLAo
[6] A. Nair, J.H. Davenport, and G. Sankaran, "Curtains in CAD: Why Are They a Problem and How Do We Fix Them?". In Mathematical Software - ICMS 2020, volume 12097 of Lecture Notes in Computer Science, pages 17-26, Cham, 2020. Springer. [7] A. Nair, "Curtains in Cylindrical Algebraic Decomposition". PhD thesis, University of Bath, 2021.
[8] Z. Tonks. "Poly-algorithmic Techniques in Real Quantifier Elimination". PhD thesis, University of Bath, 2021.
[9] Z. Tonks. "Repository of data supporting the thesis "Poly-algorithmic Techniques in Real Quantifier Elimination"". https://zenodo.org/record/4382083, 2021.
Return to Index for Example Worksheets
Download Help Document