RegularChains[SemiAlgebraicSetTools]
QuantifierElimination
returns an equivalent formula free of quantifiers
Calling Sequence
Parameters
Description
Examples
References
Compatibility
QuantifierElimination(f, R, opts)
f
-
a quantified logic formula
R
(optional) polynomial ring
opts
(optional) one or more options of the form output = rootof (literally) or simplification = simpval (where simpval is one of: false, L1, L2, L3, L4)
The command QuantifierElimination(f) returns a quantifier-free logic formula qff logically equivalent to f.
The user interface of Quantifier Elimination relies on the features of the Logic package. In addition to those features, we denote by &E the existential quantifier ∃ and by &A the universal quantifier ∀.
Extended Tarski formulas are supported with the option output=rootof.
The output formulas can be simplified using different levels of heuristical optimizations, from the lower-level simplification = L1 to the higher-level simplification = L4.
with⁡RegularChains:
with⁡SemiAlgebraicSetTools:
Suppose that we would like to solve the following Quantifier Elimination (QE) problem (due to Davenport and Heintz): find a logic formula involving d only and which is logically equivalent to the following formula
∃c∀⁡b,aa=d∧b=c∨a=c∧b=1⇒a2=b
We first define a logic formula:
f≔&E⁡c,&A⁡b,a,a=d&andb=c&ora=c&andb=1&impliesa2=b
Then we invoke the QuantifierElimination command on the above formula
out≔QuantifierElimination⁡f
out≔d−1=0&ord+1=0
Note that in the previous example, no variable order is specified. In such case, the QuantifierElimination command will try to find the best elimination order according to some heuristical strategy. Alternatively, one can specify a variable order by using the PolynomialRing command as follows.
R≔PolynomialRing⁡x,a,b,c
R≔polynomial_ring
On this second example below, the command QuantifierElimination(f, R) computes necessary and sufficient conditions on a, b, c for the equation to have solutions in x.
f≔&E⁡x,a⁢x2+b⁢x+c=0
out≔QuantifierElimination⁡f,R
out≔&or⁡c=0,&and⁡c<0,b<0,a=0,&and⁡c<0,b<0,0<a,&and⁡c<0,b<0,4⁢a⁢c−b2=0,&and⁡c<0,b<0,a<0,4⁢a⁢c−b2<0,&and⁡c<0,b=0,0<a,&and⁡c<0,0<b,a=0,&and⁡c<0,0<b,0<a,&and⁡c<0,0<b,4⁢a⁢c−b2=0,&and⁡c<0,0<b,a<0,4⁢a⁢c−b2<0,&and⁡0<c,b<0,a<0,&and⁡0<c,b<0,a=0,&and⁡0<c,b<0,4⁢a⁢c−b2=0,&and⁡0<c,b<0,0<a,4⁢a⁢c−b2<0,&and⁡0<c,b=0,a<0,&and⁡0<c,0<b,a<0,&and⁡0<c,0<b,a=0,&and⁡0<c,0<b,4⁢a⁢c−b2=0,&and⁡0<c,0<b,0<a,4⁢a⁢c−b2<0
By default, QuantifierElimination returns the standard quantifier-free formula, namely the Tarski formula. Extended Tarski formulas are supported by the option output=rootof.
f≔&E⁡x,x2⁢a+x⁢b+c=0
out≔QuantifierElimination⁡f,output=rootof
out≔&or⁡a<0&andb24⁢a≤c,a=0&andb≠0,&and⁡a=0,b=0,c=0,0<a&andc≤b24⁢a
f≔&E⁡y,y2+x2=2
f≔&E⁡y,x2+y2=2
out≔−2≤x&andx≤2
f≔&E⁡y,y4+x4=2
f≔&E⁡y,x4+y4=2
out≔RootOf⁡_Z4−2,index=real1≤x&andx≤RootOf⁡_Z4−2,index=real2
The output formula can be simplified optionally as follows
ff≔&E⁡i,j,0≤i&andi≤n&and0≤j&andj≤n&andt=n−j&andp=i+j
R≔PolynomialRing⁡i,j,p,t,n
sols≔QuantifierElimination⁡ff,R,output=rootof,simplification=false
sols≔&or⁡&and⁡n=0,t=n,p=0,&and⁡0<n,t=0,p=n,&and⁡0<n,t=0,n<p,p<2⁢n,&and⁡0<n,t=0,p=2⁢n,&and⁡0<n,0<t,t<n,p=−t+n,&and⁡0<n,0<t,t<n,−t+n<p,p<−t+2⁢n,&and⁡0<n,0<t,t<n,p=−t+2⁢n,&and⁡0<n,t=n,p=0,&and⁡0<n,t=n,0<p,p<n,&and⁡0<n,t=n,p=n
sols≔QuantifierElimination⁡ff,R,output=rootof,simplification=L4
sols≔&and⁡0≤n,0≤t,t≤n,n−t≤p,p≤−t+2⁢n
Changbo Chen, Marc Moreno Maza "An Incremental Algorithm for Computing Cylindrical Algebraic Decomposition." Proceedings of ASCM 2012, Computer Mathematics, Springer, (2014): 199-221.
Changbo Chen, Marc Moreno Maza "Quantifier elimination by cylindrical algebraic decomposition based on regular chain." J. Symb. Comput. 75: 74-93 (2016)
Changbo Chen, Marc Moreno Maza "Simplification of Cylindrical Algebraic Formula." Computer Algebra in Scientific Computing (CASC), Lecture Notes in Computer Science - 9301, (2015): 119-134.
The RegularChains[SemiAlgebraicSetTools][QuantifierElimination] command was introduced in Maple 2020.
For more information on Maple 2020 changes, see Updates in Maple 2020.
See Also
ComprehensiveTriangularize
CylindricalDecompose
PartialCylindricalAlgebraicDecomposition
RealComprehensiveTriangularize
RealRootClassification
RealTriangularize
RegularChains
SamplePoints
Triangularize
Download Help Document