RegularChains[SemiAlgebraicSetTools]
CylindricalAlgebraicDecompose
compute an F-invariant cylindrical algebraic decomposition
Calling Sequence
Parameters
Description
Examples
Compatibility
CylindricalAlgebraicDecompose(F, R, outopt, methopt)
CylindricalAlgebraicDecompose(lsas, R, outopt, methopt, optopt)
F
-
list of polynomials of R
R
polynomial ring
lsas
list of semi-algebraic systems of R
outopt
(optional) keyword option of the form output = value
methopt
(optional) keyword option of the form method = value
optopt
(optional) keyword option of the form optimization = value
CylindricalAlgebraicDecompose(F, R) returns an F-invariant cylindrical algebraic decomposition of the n-dimensional real space, where n is the number of variables in R. This assumes that R has characteristic zero and no parameters, such that the base field of R is the field of rational numbers.
A cylindrical algebraic decomposition (CAD) of the n-dimensional real space is a partition of the whole space into connected semi-algebraic subsets such that the cells in the partition are cylindrically arranged, that is, the projection of any two cells onto any lower dimensional real space is either equal or disjoint. This decomposition is called F-invariant if for any given cell, the sign of each polynomial in F does not change over the cell.
The output of CylindricalAlgebraicDecompose(F, R) has several possible formats controlled by the option outopt. Its possible values are 'output'='piecewise', 'output'='tree', 'output'='list' , 'output'='cadcell' and 'output'='rootof'.
In all formats, each cell provides at least two pieces of information, the index of the cell and a sample point of the cell.
In the 'output'='cadcell' and 'output'='rootof' formats, a defining semi-algebraic system (called a Tarski Formula) is also provided.
Due to the cylindricity property, cells can be organized in a hierarchical manner. This is the purpose of 'output'='piecewise' and 'output'='tree', whereas the other three formats are flat representations.
Due to the potentially large number of cells, the 'output'='cadcell' format only shows the name cadcell for each cell in the decomposition. However, cadcell is a type and an object of that type can be passed to Display. It can also be passed to SamplePoints in order to access the sample point of the cell.
The 'output'='rootof' format is meant to be compatible with the output format of the solve command.
For the commands CylindricalAlgebraicDecompose(lsas, R, output=cadcell) and CylindricalAlgebraicDecompose(lsas, R, output=rootof), the input parameter lsas is a list of semi-algebraic systems. Each of these is a list of polynomial equations, inequations or inequalities given by polynomials of R. If R has n variables, a point in the n-dimensional real space satisfies such a semi-algebraic system if and only this point satisfies all the equations, inequations or inequalities of that system simultaneously.
The commands CylindricalAlgebraicDecompose(lsas, R, output=cadcell) and CylindricalAlgebraicDecompose(lsas, R, output=rootof) compute a cylindrical algebraic decomposition of all the input polynomials occurring in lsas and return only the cells satisfying at least one of the input semi-algebraic systems.
For these two commands, the specification of 'output'='cadcell' and 'output'='rootof' is as above.
The default algorithm of CylindricalAlgebraicDecompose is an incremental algorithm (CM) based on triangular decompositions, and proposed by Changbo Chen and Marc Moreno Maza in ASCM 2012. This default algorithm is also available through the option method=incremental. An alternative algorithm (CMXY) proposed by Changbo Chen, Marc Moreno Maza, Bican Xia and Lu Yang at ISSAC 2009, which is also the first generation of algorithm for computing CAD based on triangular decompositions, is available through the option method=recursive.
The CM algorithm can take advantage of equational constraints given in a single semi-algebraic system. That is, if the input is a list of polynomial constraints involving equations, by default, the option optimization=EC is enabled. To disable such optimization, one sets optimization=false.
If the input is a list of polynomial constraints, by default, an algorithm (RC-TTICAD) for computing truth-table invariant CAD is used to compute a smaller CAD. One can use the option optimization=TTICAD or optimization=EC to enable or disable it, respectively.
For mathematical definitions of the types squarefree_semi_algebraic_system, semi_algebraic_set and cad_cell, see the SemiAlgebraicSetTools help page.
Variable orders play a crucial role in the efficiency of CAD computation. The command SuggestVariableOrder computes such orders heuristically.
with⁡RegularChains:
with⁡ChainTools:
with⁡SemiAlgebraicSetTools:
Define a ring of polynomials.
R≔PolynomialRing⁡y,x
R≔polynomial_ring
Define a set of equations.
F≔x⁢y−1
Compute an F-invariant cylindrical algebraic decomposition of the plane.
cad≔CylindricalAlgebraicDecompose⁡F,R
cad≔c_a_d
The output CAD is described by a nested piecewise function. The outmost piecewise function is a function with three conditions x<0, x=0, and 0<x. Each of the conditions has a corresponding expression, which is again a piecewise function. The output could be read from top to bottom and from right to left. The other two formats are shown below.
cad≔CylindricalAlgebraicDecompose⁡F,R,output=tree
cad≔1,−1,x,1,regular_chain,−12,−12,−1,y⁢x−1,1,regular_chain,−12,−12,−52,−52,y⁢x−1,1,regular_chain,−12,−12,−2,−2,1,y⁢x−1,1,regular_chain,−12,−12,−32,−32,x,1,regular_chain,0,0,1,regular_chain,0,0,0,0,1,x,1,regular_chain,12,12,−1,y⁢x−1,1,regular_chain,12,12,32,32,y⁢x−1,1,regular_chain,12,12,2,2,1,y⁢x−1,1,regular_chain,12,12,52,52
cad≔CylindricalAlgebraicDecompose⁡F,R,output=list
cad≔1,1,regular_chain,−12,−12,−52,−52,1,2,regular_chain,−12,−12,−2,−2,1,3,regular_chain,−12,−12,−32,−32,2,1,regular_chain,0,0,0,0,3,1,regular_chain,12,12,32,32,3,2,regular_chain,12,12,2,2,3,3,regular_chain,12,12,52,52
For a more complicated example, compute the cylindrical algebraic decomposition of the parametric parabola. The output is a CAD of four-dimensional real space with 27 cells.
R≔PolynomialRing⁡x,c,b,a
F≔a⁢x2+b⁢x+c
The default is the piecewise format. When many cells are present the 'output'='cadcell' and 'output'='rootof' formats are useful.
cad≔CylindricalAlgebraicDecompose⁡F,R,output=cadcell
cad≔cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell
cad≔CylindricalAlgebraicDecompose⁡F,R,output=rootof
cad≔a<0,b=b,c<b24⁢a,x=x,a<0,b=b,c=b24⁢a,x<−b2⁢a,a<0,b=b,c=b24⁢a,x=−b2⁢a,a<0,b=b,c=b24⁢a,−b2⁢a<x,a<0,b=b,b24⁢a<c,x<−b+−4⁢c⁢a+b22⁢a,a<0,b=b,b24⁢a<c,x=−b+−4⁢c⁢a+b22⁢a,a<0,b=b,b24⁢a<c,−b+−4⁢c⁢a+b22⁢a<x∧x<−b+−4⁢c⁢a+b22⁢a,a<0,b=b,b24⁢a<c,x=−b+−4⁢c⁢a+b22⁢a,a<0,b=b,b24⁢a<c,−b+−4⁢c⁢a+b22⁢a<x,a=0,b<0,c=c,x<−cb,a=0,b<0,c=c,x=−cb,a=0,b<0,c=c,−cb<x,a=0,b=0,c<0,x=x,a=0,b=0,c=0,x=x,a=0,b=0,0<c,x=x,a=0,0<b,c=c,x<−cb,a=0,0<b,c=c,x=−cb,a=0,0<b,c=c,−cb<x,0<a,b=b,c<b24⁢a,x<−b+−4⁢c⁢a+b22⁢a,0<a,b=b,c<b24⁢a,x=−b+−4⁢c⁢a+b22⁢a,0<a,b=b,c<b24⁢a,−b+−4⁢c⁢a+b22⁢a<x∧x<−b+−4⁢c⁢a+b22⁢a,0<a,b=b,c<b24⁢a,x=−b+−4⁢c⁢a+b22⁢a,0<a,b=b,c<b24⁢a,−b+−4⁢c⁢a+b22⁢a<x,0<a,b=b,c=b24⁢a,x<−b2⁢a,0<a,b=b,c=b24⁢a,x=−b2⁢a,0<a,b=b,c=b24⁢a,−b2⁢a<x,0<a,b=b,b24⁢a<c,x=x
The usage of input lists of semi-algebraic systems is illustrated below.
R≔PolynomialRing⁡x,a,b
cad≔CylindricalAlgebraicDecompose⁡x2−a,x+b,R,output=cadcell
cad≔cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell,cad_cell
cad≔CylindricalAlgebraicDecompose⁡x2−a=0,x+b=0,R,output=cadcell
cad≔cad_cell
cad≔CylindricalAlgebraicDecompose⁡x2−a=0,x+b=0,R,output=rootof
cad≔b=b,a=b2,x=−b
To understand the effect of a list of two semi-algebraic systems, consider the following very simple example.
cad≔CylindricalAlgebraicDecompose⁡x−a,R,output=rootof
cad≔b=b,a=a,x<a,b=b,a=a,x=a,b=b,a=a,a<x
cad≔CylindricalAlgebraicDecompose⁡0<x−a,R,output=rootof
cad≔b=b,a=a,a<x
cad≔CylindricalAlgebraicDecompose⁡x+b,R,output=rootof
cad≔b=b,a=a,x<−b,b=b,a=a,x=−b,b=b,a=a,−b<x
cad≔CylindricalAlgebraicDecompose⁡x+b=0,R,output=rootof
cad≔b=b,a=a,x=−b
cad≔CylindricalAlgebraicDecompose⁡x+b=0,0<x−a,R,output=rootof
cad≔b=b,a<−b,a<x,b=b,a=−b,−b≤x,b=b,−b<a,x=−b,b=b,−b<a,a<x
The usage of the different methods and optimizations is illustrated below.
F≔y2−x
cad≔CylindricalAlgebraicDecompose⁡F,R,method=recursive,output=piecewise
cad≔1x<01y<01y=010<yx=01y<−x1y=−x1−x<y∧y<x1y=x1x<y0<x
F≔x2+y2−1=0,y2−x=0
cad≔CylindricalAlgebraicDecompose⁡F,R,optimization=EC,output=allcell:
nops⁡cad
9
cad2≔CylindricalAlgebraicDecompose⁡F,R,optimization=false,output=allcell:
nops⁡cad2
53
The lsas parameter was introduced in Maple 16.
The output option was introduced in Maple 16.
For more information on Maple 16 changes, see Updates in Maple 16.
The RegularChains[SemiAlgebraicSetTools][CylindricalAlgebraicDecompose] command was updated in Maple 2020.
The method and optimization options were introduced in Maple 2020.
For more information on Maple 2020 changes, see Updates in Maple 2020.
See Also
ComprehensiveTriangularize
CylindricalDecompose
Display
PartialCylindricalAlgebraicDecomposition
RealComprehensiveTriangularize
RealRootClassification
RealTriangularize
RegularChains
SamplePoints
SemiAlgebraicSetTools
SeparateZeros
SuggestVariableOrder
Triangularize
Download Help Document