Quantifier Elimination in Maple 2023
Description
The QuantifierElimination package has been added in Maple 2023. This package offers a new set of routines for quantifier elimination over the reals (QE). This package is the first package included with Maple to offer Virtual Term Substitution (VTS) as an algorithm for QE. Furthermore it offers a new implementation of Cylindrical Algebraic Decomposition (CAD) being the first implementation using the Lazard projection with equational constraints as part of CAD both for QE and standalone CADs to explore real algebraic geometry. Lastly, a new poly-algorithm offers a new way to use VTS in conjunction with CAD for QE including in incremental contexts.
QuantifierEliminate is the standard routine for elimination:
with(QuantifierElimination);
CylindricalAlgebraicDecompose,DeleteFormula,InsertFormula,PartialCylindricalAlgebraicDecompose,QuantifierEliminate,QuantifierTools
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
QuantifierEliminate(expr);
false
You can opt to include with the result witnesses that prove equivalence of quantifier-free formulae to a quantified expression:
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));
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
(qf, witnesses) := QuantifierEliminate( expr, 'output = [ qf, witnesses]' );
qf,witnesses≔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
map(evalb,eval(op(2,expr),witnesses[1][2..-1]));
true∧true∧true∧true∧true∧true∧true∧true
PartialCylindricalAlgebraicDecompose offers QE purely via partial 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)));
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
QuantifierTools is a subpackage of QuantifierElimination that offers tools for working with and manipulating Tarski formulae:
with(QuantifierTools);
AlphaConvert,ConvertRationalConstraintsToTarski,ConvertToPrenexForm,GetAllPolynomials,GetEquationalConstraints,GetUnquantifiedFormula,NegateFormula,SuggestCADOptions
uqf := GetUnquantifiedFormula( expr );
uqf≔a−d=0∧b−c=0∨a−c=0∧b−1=0⇒a2−b=0
CylindricalAlgebraicDecompose offers production of CADData objects that can be inspected to explore a cylindrical algebraic decomposition:
C := CylindricalAlgebraicDecompose( GetUnquantifiedFormula( expr ), 'variablestrategy' = [ d, c, b, a ] );
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
leaves := GetLeafCells( C )[ 1 .. 5 ];
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
cell := leaves[1];
cell≔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
GetFullDescription(cell);
1<d∧d2<c∧c2<b∧RootOf⁡_Z2−b,index=real2<a
GetSamplePoint(cell);
d=2,c=5,b=26,a=7
SignOfPolynomialOnCell( C, c-a, cell );
−1
SignOfPolynomialOnCell( C, d-1, cell );
1
Download Help Document