Quantifier Elimination - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Information : Updates : Maple 2023 : Quantifier Elimination

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

(1)

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 ) ) ) );

exprx,y,z,4x2+xy2z+14=02x+y2z+12=0x2z12xy2=0

(2)

QuantifierEliminate(expr);

false

(3)
• 

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));

exprv__1&comma;v__2&comma;v__3&comma;v__4&comma;v__5&comma;v__6&comma;v__7&comma;v__8&comma;v__7<00<v__80<v__4v__2v__6+v__3v__8=v__4v__1v__5+v__3v__7=v__4v__6=1v__5=10<v__1

(4)

(qf, witnesses) := QuantifierEliminate( expr, 'output = [ qf, witnesses]' );

qf,witnessestrue,true&comma;v__8=92&comma;v__7=12&comma;v__6=1&comma;v__5=1&comma;v__4=14&comma;v__3=12&comma;v__2=−2&comma;v__1=12

(5)

map(evalb,eval(op(2,expr),witnesses[1][2..-1]));

truetruetruetruetruetruetruetrue

(6)
• 

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)));

exprc&comma;b&comma;a&comma;ad=0bc=0ac=0b1=0a2b=0

(7)

PartialCylindricalAlgebraicDecompose(expr);

d=−1d=1

(8)
• 

QuantifierTools is a subpackage of QuantifierElimination that offers tools for working with and manipulating Tarski formulae:

with(QuantifierTools);

AlphaConvert&comma;ConvertRationalConstraintsToTarski&comma;ConvertToPrenexForm&comma;GetAllPolynomials&comma;GetEquationalConstraints&comma;GetUnquantifiedFormula&comma;NegateFormula&comma;SuggestCADOptions

(9)

uqf := GetUnquantifiedFormula( expr );

uqfad=0bc=0ac=0b1=0a2b=0

(10)
• 

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 ] );

CVariables&equals;d&comma;c&comma;b&comma;aInput Polynomials&equals;bcdacadb1bcc1c+1c+dd+cd1d+1c2+bd2+bd2+cd2+1a2b# Cells&equals;4949Projection polynomials for level 1&equals;dd1d+1d2+1Projection polynomials for level 2&equals;cc1c+1c+dd+cd2+cProjection polynomials for level 3&equals;bb1bcc2+bd2+bProjection polynomials for level 4&equals;acada2b

(11)

leaves := GetLeafCells( C )[ 1 .. 5 ];

leavesDescription&equals;1<dd2<cc2<bRootOf_Z2b&comma;index=real2<aSample Point&equals;d=2&comma;c=5&comma;b=26&comma;a=7Index&equals;7&comma;13&comma;11&comma;9&comma;Description&equals;1<dd2<cc2<ba=RootOf_Z2b&comma;index=real2Sample Point&equals;d=2&comma;c=5&comma;b=26&comma;a=RootOf_Z226&comma;481588776929776967857859444732965739290427392..240794388464888483929334722366482869645213696Index&equals;7&comma;13&comma;11&comma;8&comma;Description&equals;1<dd2<cc2<bc<aa<RootOf_Z2b&comma;index=real2Sample Point&equals;d=2&comma;c=5&comma;b=26&comma;a=6112Index&equals;7&comma;13&comma;11&comma;7&comma;Description&equals;1<dd2<cc2<ba=cSample Point&equals;d=2&comma;c=5&comma;b=26&comma;a=5Index&equals;7&comma;13&comma;11&comma;6&comma;Description&equals;1<dd2<cc2<bd<aa<cSample Point&equals;d=2&comma;c=5&comma;b=26&comma;a=3Index&equals;7&comma;13&comma;11&comma;5

(12)

cell := leaves[1];

cellDescription&equals;1<dd2<cc2<bRootOf_Z2b&comma;index=real2<aSample Point&equals;d=2&comma;c=5&comma;b=26&comma;a=7Index&equals;7&comma;13&comma;11&comma;9

(13)

GetFullDescription(cell);

1<dd2<cc2<bRootOf_Z2b&comma;index=real2<a

(14)

GetSamplePoint(cell);

d=2&comma;c=5&comma;b=26&comma;a=7

(15)

SignOfPolynomialOnCell( C, c-a, cell );

−1

(16)

SignOfPolynomialOnCell( C, d-1, cell );

1

(17)