 LazyRealTriangularize - Maple Help

RegularChains

 RealTriangularize
 compute all the solutions of a semi-algebraic system
 LazyRealTriangularize
 compute the solutions of a semi-algebraic system interactively
 SamplePoints
 compute sample points for a semi-algebraic system Calling Sequence RealTriangularize(sys, R, options) RealTriangularize(F, N, P, H, R, options) LazyRealTriangularize(sys, R, options) LazyRealTriangularize(F, N, P, H, R, options) SamplePoints(sys, R, options) SamplePoints(F, N, P, H, R, options) SamplePoints(C, R) Parameters

 sys - list of polynomial equations, inequations, and inequalities over R F - list of polynomials over R representing equations N - list of polynomials over R representing non-negativity conditions P - list of polynomials over R representing positivity conditions H - list of polynomials over R representing inequations C - object of type cadcell R - polynomial ring options - (optional) equation of the form 'output'=format, where format is either 'piecewise', 'record', 'list' , 'zerodimensional', or equation of the form 'isolation'='algorithm', where 'algorithm'='Discoverer' or 'algorithm'='VincentCollinsAkritas' , or equation of the form 'method'='algorithm', where 'algorithm'='recursive' or 'algorithm'='incremental' , or equation of the form 'relaxation'=algorithm, where 'algorithm'='explicit' or 'algorithm'='implicit' . Options

The output option controls the form of the output.

 – If 'output'='list' is specified, the output is a list of objects of type regular_semi_algebraic_system, for RealTriangularize and LazyRealTriangularize, and a list of objects of type box, for SamplePoints. This is the default for RealTriangularize and for SamplePoints.
 – If 'output'='piecewise' is specified, then the output format is a case discussion tree encoded by a piecewise object. This is not a valid option for SamplePoints, and it is the default for LazyRealTriangularize.
 – If 'output'='record' is specified, then the output is a sequence of Maple records.
 – If 'output'='zerodimensional' is specified, then the output is a list of regular semi-algebraic sets. (See SemiAlgebraicSetTools for the definition of a regular semi-algebraic system.) The usage of this format is restricted to the case where the constructible set associated to $S$ has finitely many solutions. This condition holds in particular when the semi-algebraic system $S$ itself has finitely many solutions.

The isolation option controls the method used for isolating the real roots of a zero-dimensional regular chain. (See RealRootIsolate for the subject of real root isolation of a regular chain.)

 – If 'isolation'='VincentCollinsAkritas' is specified, then the method is a generalization of the Vincent-Collins-Akritas algorithm which isolates real roots for univariate polynomials. The techniques are very close to the ones used by Renaud Rioboo in his ISSAC 1992 paper (see reference below).
 – If 'isolation'='Discoverer' is specified, then the method implements the algorithm of the paper "An Algorithm for Isolating the Real Solutions of Semi-algebraic Systems." by Bican Xia and Lu Yang. The default method is Discoverer.

The method option controls the decomposition algorithm.

 – If 'method'='recursive' is specified, then the algorithm presented in the ISSAC 2010 paper by Changbo Chen et al. (see reference below) is used.
 – If 'method'='incremental' is specified, then the algorithm presented in the ISSAC 2011 paper by Changbo Chen et al. (see reference below) is used. This option is the default.

The relaxation option controls the use of a relaxation technique aiming at reducing the number of components in the output. This strategy is described in the ISSAC 2011 paper by Changbo Chen et al. (see reference below).

 – If 'relaxation'='explicit' is specified, then criteria are used to check whether relaxation techniques apply. These criteria have some computational cost. However, relaxation techniques might speed up the decomposition process dramatically in some cases.
 – If 'relaxation'='implicit' is specified, then relaxation techniques are applied in a light way, at essentially no cost. However, some opportunities for relaxation can only discovered in the 'explicit' mode. The option 'relaxation'='implicit' is used by default. Description

 • Consider the semi-algebraic system $S$ whose unknowns are the variables of R and whose equations, non-negative inequalities, strictly positive inequalities, and inequations are given either by sys or by F, N, P, and H, respectively. The solutions of $S$ are the real numbers which satisfy simultaneously the equations, inequalities, and inequations of $S$.
 • The commands RealTriangularize(F, N, P, H, R) or RealTriangularize(sys, R) return a triangular decomposition of the solutions of $S$ in the following sense. They compute a list of regular semi-algebraic systems such that the union of their solution sets is exactly the solution set of $S$. (See SemiAlgebraicSetTools for the definition of a regular semi-algebraic system.)
 • The commands LazyRealTriangularize(F, N, P, H, R) or LazyRealTriangularize(sys, R) return regular semi-algebraic systems and unevaluated recursive calls in a piecewise format, unless a different output format is requested. The zero sets of those regular semi-algebraic systems form a "lazy" real triangular decomposition of $S$ in the following sense.
 – The zero sets of those regular semi-algebraic systems form a subset $U$ of the solution set of $S$;
 – The dimension of the solution set of $S\setminus U$ is strictly less than the dimension of the constructible set associated with $S$.
 – By evaluating the recursive calls in finitely many steps, one can eventually obtain a triangular decomposition of $S$.
 When the option 'output'='list' is specified, the recursive calls will be discarded and only the regular semi-algebraic systems are returned as a list.
 • The commands SamplePoints(F, N, P, H, R) and SamplePoints(sys, R) return at least one sample point per real connected component of $S$.
 – The output format is the same as for the command RealRootIsolate. That is, a list of so-called boxes, each box containing one and only one sample point. (See SemiAlgebraicSetTools or RealRootIsolate for the definition of a box.)
 – The BoxValues command retrieves a detailed description of a box.
 – In addition, each box can be refined with an arbitrary small precision. See the commands RefineBox and RefineListBox.
 • The command SamplePoints(C,R) returns a sample point of the CAD cell given by C. The type cadcell encodes any CAD cell and is used for one of the output formats of the command CylindricalAlgebraicDecompose. See SemiAlgebraicSetTools for the definition of a CAD cell. Examples

 > $\mathrm{with}\left(\mathrm{RegularChains}\right):$

Define a ring of polynomials.

 > $R≔\mathrm{PolynomialRing}\left(\left[x,y,z\right]\right):$

Define a set of equations.

 > $F≔\left[{x}^{3}+y+z-1,x+{y}^{3}+z-1,x+y+{z}^{3}-1\right]$
 ${F}{≔}\left[{{x}}^{{3}}{+}{y}{+}{z}{-}{1}{,}{{y}}^{{3}}{+}{x}{+}{z}{-}{1}{,}{{z}}^{{3}}{+}{x}{+}{y}{-}{1}\right]$ (1)

Define a set of non-negative polynomials.

 > $N≔\left[\right]$
 ${N}{≔}\left[\right]$ (2)

Define a set of positive polynomials.

 > $P≔\left[\right]$
 ${P}{≔}\left[\right]$ (3)

Define a set of inequations.

 > $H≔\left[x\right]$
 ${H}{≔}\left[{x}\right]$ (4)

Compute the solutions of F for which $x$ is nonzero.

 > $\mathrm{dec}≔\mathrm{RealTriangularize}\left(F,N,P,H,R\right)$
 ${\mathrm{dec}}{≔}\left[{\mathrm{regular_semi_algebraic_system}}{,}{\mathrm{regular_semi_algebraic_system}}{,}{\mathrm{regular_semi_algebraic_system}}{,}{\mathrm{regular_semi_algebraic_system}}{,}{\mathrm{regular_semi_algebraic_system}}\right]$ (5)
 > $\mathrm{Display}\left(\mathrm{dec},R\right)$
 $\left[\left\{\begin{array}{cc}{x}{-}{z}{=}{0}& {}\\ {y}{-}{z}{=}{0}& {}\\ {{z}}^{{3}}{+}{2}{}{z}{-}{1}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{-}{1}{=}{0}& {}\\ {y}{+}{1}{=}{0}& {}\\ {z}{-}{1}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{+}{1}{=}{0}& {}\\ {y}{-}{1}{=}{0}& {}\\ {z}{-}{1}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{-}{1}{=}{0}& {}\\ {y}{=}{0}& {}\\ {z}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{-}{1}{=}{0}& {}\\ {y}{-}{1}{=}{0}& {}\\ {z}{+}{1}{=}{0}& {}\end{array}\right\\right]$ (6)

Compute the solutions of F for which $x\ne 1$.

 > $\mathrm{dec}≔\mathrm{RealTriangularize}\left(F,N,P,\left[x-1\right],R\right)$
 ${\mathrm{dec}}{≔}\left[{\mathrm{regular_semi_algebraic_system}}{,}{\mathrm{regular_semi_algebraic_system}}{,}{\mathrm{regular_semi_algebraic_system}}{,}{\mathrm{regular_semi_algebraic_system}}\right]$ (7)
 > $\mathrm{Display}\left(\mathrm{dec},R\right)$
 $\left[\left\{\begin{array}{cc}{x}{-}{z}{=}{0}& {}\\ {y}{-}{z}{=}{0}& {}\\ {{z}}^{{3}}{+}{2}{}{z}{-}{1}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {y}{=}{0}& {}\\ {z}{-}{1}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{+}{1}{=}{0}& {}\\ {y}{-}{1}{=}{0}& {}\\ {z}{-}{1}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {y}{-}{1}{=}{0}& {}\\ {z}{=}{0}& {}\end{array}\right\\right]$ (8)

Compute the solutions of F for which $x$ is negative.

 > $\mathrm{dec}≔\mathrm{RealTriangularize}\left(F,N,\left[-x\right],\left[\right],R\right)$
 ${\mathrm{dec}}{≔}\left[{\mathrm{regular_semi_algebraic_system}}\right]$ (9)
 > $\mathrm{Display}\left(\mathrm{dec},R\right)$
 $\left[\left\{\begin{array}{cc}{x}{+}{1}{=}{0}& {}\\ {y}{-}{1}{=}{0}& {}\\ {z}{-}{1}{=}{0}& {}\end{array}\right\\right]$ (10)

For input systems which are known to have finitely many solutions like F, the option 'output'='zerodimensional' provides an alternative output format based on isolation boxes, as for RealRootIsolate.

 > $\mathrm{dec}≔\mathrm{RealTriangularize}\left(F,R,\mathrm{output}=\mathrm{zerodimensional}\right)$
 ${\mathrm{dec}}{≔}\left[{\mathrm{regular_semi_algebraic_set}}{,}{\mathrm{regular_semi_algebraic_set}}{,}{\mathrm{regular_semi_algebraic_set}}{,}{\mathrm{regular_semi_algebraic_set}}{,}{\mathrm{regular_semi_algebraic_set}}{,}{\mathrm{regular_semi_algebraic_set}}{,}{\mathrm{regular_semi_algebraic_set}}\right]$ (11)
 > $\mathrm{map}\left(\mathrm{Display},\mathrm{dec},R\right)$
 $\left[\left\{\begin{array}{cc}{x}{=}\left[\frac{{3}}{{8}}{,}\frac{{1}}{{2}}\right]& {}\\ {y}{=}\left[\frac{{3}}{{8}}{,}\frac{{1}}{{2}}\right]& {}\\ {z}{=}\left[\frac{{29}}{{64}}{,}\frac{{117}}{{256}}\right]& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{1}& {}\\ {y}{=}{1}& {}\\ {z}{=}{-1}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {y}{=}{1}& {}\\ {z}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {y}{=}{0}& {}\\ {z}{=}{1}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{1}& {}\\ {y}{=}{-1}& {}\\ {z}{=}{1}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{-1}& {}\\ {y}{=}{1}& {}\\ {z}{=}{1}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{1}& {}\\ {y}{=}{0}& {}\\ {z}{=}{0}& {}\end{array}\right\\right]$ (12)

Consider the unit circle in the Euclidean plane.

 > $R≔\mathrm{PolynomialRing}\left(\left[y,x\right]\right);$$\mathrm{sys}≔\left[{x}^{2}+{y}^{2}=1\right]$
 ${R}{≔}{\mathrm{polynomial_ring}}$
 ${\mathrm{sys}}{≔}\left[{{x}}^{{2}}{+}{{y}}^{{2}}{=}{1}\right]$ (13)

Compute its real points.

 > $\mathrm{RealTriangularize}\left(\mathrm{sys},R,\mathrm{output}=\mathrm{record}\right)$
 $\left\{\begin{array}{cc}{{y}}^{{2}}{+}{{x}}^{{2}}{-}{1}{=}{0}& {}\\ {x}{<}{1}& {}\\ {x}{+}{1}{>}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{y}{=}{0}& {}\\ {x}{-}{1}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{y}{=}{0}& {}\\ {x}{+}{1}{=}{0}& {}\end{array}\right\$ (14)

Consider the generic equation of degree two.

 > $R≔\mathrm{PolynomialRing}\left(\left[x,c,b,a\right]\right);$$\mathrm{sys}≔\left[a{x}^{2}+bx+c=0\right]$
 ${R}{≔}{\mathrm{polynomial_ring}}$
 ${\mathrm{sys}}{≔}\left[{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}\right]$ (15)

Compute a triangular decomposition of the 4-variable hypersurface it defines.

 > $\mathrm{dec}≔\mathrm{RealTriangularize}\left(\mathrm{sys},R\right)$
 ${\mathrm{dec}}{≔}\left[{\mathrm{regular_semi_algebraic_system}}{,}{\mathrm{regular_semi_algebraic_system}}{,}{\mathrm{regular_semi_algebraic_system}}{,}{\mathrm{regular_semi_algebraic_system}}\right]$ (16)
 > $\mathrm{Display}\left(\mathrm{dec},R\right)$
 $\left[\left\{\begin{array}{cc}{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}& {}\\ {-}{4}{}{c}{}{a}{+}{{b}}^{{2}}{>}{0}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{a}{\ne }{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{2}{}{a}{}{x}{+}{b}{=}{0}& {}\\ {4}{}{a}{}{c}{-}{{b}}^{{2}}{=}{0}& {}\\ {a}{\ne }{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{b}{}{x}{+}{c}{=}{0}& {}\\ {a}{=}{0}& {}\\ {b}{\ne }{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{c}{=}{0}& {}\\ {b}{=}{0}& {}\\ {a}{=}{0}& {}\end{array}\right\\right]$ (17)

Consider the piecewise output format.

 > $\mathrm{RealTriangularize}\left(\mathrm{sys},R,\mathrm{output}=\mathrm{piecewise}\right)$
 $\left\{\begin{array}{cc}\left[\left[{{x}}^{{2}}{}{a}{+}{x}{}{b}{+}{c}{=}{0}\right]\right]& {0}{<}{-}{4}{}{a}{}{c}{+}{{b}}^{{2}}{\wedge }{a}{\ne }{0}\\ \left\{\begin{array}{cc}\left[\left[{x}{}{b}{+}{c}{=}{0}{,}{a}{=}{0}\right]\right]& {b}{\ne }{0}\\ \left[\left[{c}{=}{0}{,}{b}{=}{0}{,}{a}{=}{0}\right]\right]& {b}{=}{0}\end{array}\right\& {a}{=}{0}\\ \left\{\begin{array}{cc}\left[\left[{2}{}{a}{}{x}{+}{b}{=}{0}{,}{4}{}{a}{}{c}{-}{{b}}^{{2}}{=}{0}\right]\right]& {a}{\ne }{0}\\ \left[\left[{c}{=}{0}{,}{b}{=}{0}{,}{a}{=}{0}\right]\right]& {a}{=}{0}\end{array}\right\& {-}{4}{}{a}{}{c}{+}{{b}}^{{2}}{=}{0}\\ \left[\right]& {\mathrm{otherwise}}\end{array}\right\$ (18)

Consider the record output format.

 > $\mathrm{RealTriangularize}\left(\mathrm{sys},R,\mathrm{output}=\mathrm{record}\right)$
 $\left\{\begin{array}{cc}{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}& {}\\ {-}{4}{}{c}{}{a}{+}{{b}}^{{2}}{>}{0}& {}\\ {a}{\ne }{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{2}{}{a}{}{x}{+}{b}{=}{0}& {}\\ {4}{}{a}{}{c}{-}{{b}}^{{2}}{=}{0}& {}\\ {a}{\ne }{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{b}{}{x}{+}{c}{=}{0}& {}\\ {b}{\ne }{0}& {}\\ {a}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{c}{=}{0}& {}\\ {b}{=}{0}& {}\\ {a}{=}{0}& {}\end{array}\right\$ (19)

Use LazyRealTriangularize to start the decomposition.

 > $\mathrm{dec}≔\mathrm{LazyRealTriangularize}\left(\mathrm{sys},R\right)$
 ${\mathrm{dec}}{≔}\left\{\begin{array}{cc}\left[\left[{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}\right]\right]& {0}{<}{-}{4}{}{c}{}{a}{+}{{b}}^{{2}}{\wedge }{a}{\ne }{0}\\ {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{%LazyRealTriangularize}}{}\left(\left[{a}{=}{0}{,}{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}\right]{,}{\mathrm{polynomial_ring}}\right)\right]\right)& {a}{=}{0}\\ {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{%LazyRealTriangularize}}{}\left(\left[{-}{4}{}{a}{}{c}{+}{{b}}^{{2}}{=}{0}{,}{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}\right]{,}{\mathrm{polynomial_ring}}\right)\right]\right)& {-}{4}{}{c}{}{a}{+}{{b}}^{{2}}{=}{0}\\ \left[\right]& {\mathrm{otherwise}}\end{array}\right\$ (20)

Go one step further, computing components in lower dimension.

 > $\mathrm{dec2}≔\mathrm{value}\left(\mathrm{dec}\right)$
 ${\mathrm{dec2}}{≔}\left\{\begin{array}{cc}\left[\left[{{x}}^{{2}}{}{a}{+}{x}{}{b}{+}{c}{=}{0}\right]\right]& {0}{<}{-}{4}{}{a}{}{c}{+}{{b}}^{{2}}{\wedge }{a}{\ne }{0}\\ \left\{\begin{array}{cc}\left[\left[{x}{}{b}{+}{c}{=}{0}{,}{a}{=}{0}\right]\right]& {b}{\ne }{0}\\ {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{%LazyRealTriangularize}}{}\left(\left[{a}{=}{0}{,}{b}{=}{0}{,}{x}{}{b}{+}{c}{=}{0}{,}{{x}}^{{2}}{}{a}{+}{x}{}{b}{+}{c}{=}{0}\right]{,}{\mathrm{polynomial_ring}}\right)\right]\right)& {b}{=}{0}\end{array}\right\& {a}{=}{0}\\ \left\{\begin{array}{cc}\left[\left[{2}{}{a}{}{x}{+}{b}{=}{0}{,}{4}{}{a}{}{c}{-}{{b}}^{{2}}{=}{0}\right]\right]& {a}{\ne }{0}\\ {\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{%LazyRealTriangularize}}{}\left(\left[{a}{=}{0}{,}{-}{4}{}{a}{}{c}{+}{{b}}^{{2}}{=}{0}{,}{4}{}{a}{}{c}{-}{{b}}^{{2}}{=}{0}{,}{2}{}{a}{}{x}{+}{b}{=}{0}{,}{{x}}^{{2}}{}{a}{+}{x}{}{b}{+}{c}{=}{0}\right]{,}{\mathrm{polynomial_ring}}\right)\right]\right)& {a}{=}{0}\end{array}\right\& {-}{4}{}{a}{}{c}{+}{{b}}^{{2}}{=}{0}\\ \left[\right]& {\mathrm{otherwise}}\end{array}\right\$ (21)

Go the last step, computing components in dimension zero.

 > $\mathrm{value}\left(\mathrm{dec2}\right)$
 $\left\{\begin{array}{cc}\left[\left[{{x}}^{{2}}{}{a}{+}{x}{}{b}{+}{c}{=}{0}\right]\right]& {0}{<}{-}{4}{}{a}{}{c}{+}{{b}}^{{2}}{\wedge }{a}{\ne }{0}\\ \left\{\begin{array}{cc}\left[\left[{x}{}{b}{+}{c}{=}{0}{,}{a}{=}{0}\right]\right]& {b}{\ne }{0}\\ \left[\left[{c}{=}{0}{,}{b}{=}{0}{,}{a}{=}{0}\right]\right]& {b}{=}{0}\end{array}\right\& {a}{=}{0}\\ \left\{\begin{array}{cc}\left[\left[{2}{}{a}{}{x}{+}{b}{=}{0}{,}{4}{}{a}{}{c}{-}{{b}}^{{2}}{=}{0}\right]\right]& {a}{\ne }{0}\\ \left[\left[{c}{=}{0}{,}{b}{=}{0}{,}{a}{=}{0}\right]\right]& {a}{=}{0}\end{array}\right\& {-}{4}{}{a}{}{c}{+}{{b}}^{{2}}{=}{0}\\ \left[\right]& {\mathrm{otherwise}}\end{array}\right\$ (22)

Use the list output format.

 > $\mathrm{dec}≔\mathrm{LazyRealTriangularize}\left(\mathrm{sys},R,\mathrm{output}=\mathrm{list}\right)$
 ${\mathrm{dec}}{≔}\left[{\mathrm{regular_semi_algebraic_system}}\right]$ (23)
 > $\mathrm{Display}\left(\mathrm{dec},R\right)$
 $\left[\left\{\begin{array}{cc}{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}& {}\\ {-}{4}{}{c}{}{a}{+}{{b}}^{{2}}{>}{0}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{a}{\ne }{0}& {}\end{array}\right\\right]$ (24)

Use the record output format.

 > $\mathrm{dec}≔\left[\mathrm{LazyRealTriangularize}\left(\mathrm{sys},R,\mathrm{output}=\mathrm{record}\right)\right]$
 ${\mathrm{dec}}{≔}\left[\left\{\begin{array}{cc}{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}& {}\\ {-}{4}{}{c}{}{a}{+}{{b}}^{{2}}{>}{0}& {}\\ {a}{\ne }{0}& {}\end{array}\right\{,}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{%LazyRealTriangularize}}{}\left(\left[{a}{=}{0}{,}{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}\right]{,}{\mathrm{polynomial_ring}}{,}{\mathrm{output}}{=}{\mathrm{record}}\right)\right]\right){,}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{%LazyRealTriangularize}}{}\left(\left[{-}{4}{}{a}{}{c}{+}{{b}}^{{2}}{=}{0}{,}{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}\right]{,}{\mathrm{polynomial_ring}}{,}{\mathrm{output}}{=}{\mathrm{record}}\right)\right]\right)\right]$ (25)

Go one step further.

 > $\mathrm{dec2}≔\mathrm{value}\left(\mathrm{dec}\right)$
 ${\mathrm{dec2}}{≔}\left[\left\{\begin{array}{cc}{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}& {}\\ {-}{4}{}{c}{}{a}{+}{{b}}^{{2}}{>}{0}& {}\\ {a}{\ne }{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{b}{}{x}{+}{c}{=}{0}& {}\\ {b}{\ne }{0}& {}\\ {a}{=}{0}& {}\end{array}\right\{,}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{%LazyRealTriangularize}}{}\left(\left[{a}{=}{0}{,}{b}{=}{0}{,}{b}{}{x}{+}{c}{=}{0}{,}{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}\right]{,}{\mathrm{polynomial_ring}}{,}{\mathrm{output}}{=}{\mathrm{record}}\right)\right]\right){,}\left\{\begin{array}{cc}{2}{}{a}{}{x}{+}{b}{=}{0}& {}\\ {4}{}{a}{}{c}{-}{{b}}^{{2}}{=}{0}& {}\\ {a}{\ne }{0}& {}\end{array}\right\{,}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{%LazyRealTriangularize}}{}\left(\left[{a}{=}{0}{,}{-}{4}{}{a}{}{c}{+}{{b}}^{{2}}{=}{0}{,}{4}{}{a}{}{c}{-}{{b}}^{{2}}{=}{0}{,}{2}{}{a}{}{x}{+}{b}{=}{0}{,}{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}\right]{,}{\mathrm{polynomial_ring}}{,}{\mathrm{output}}{=}{\mathrm{record}}\right)\right]\right)\right]$ (26)

Go the last step.

 > $\mathrm{value}\left(\mathrm{dec2}\right)$
 $\left[\left\{\begin{array}{cc}{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}& {}\\ {-}{4}{}{a}{}{c}{+}{{b}}^{{2}}{>}{0}& {}\\ {a}{\ne }{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{b}{}{x}{+}{c}{=}{0}& {}\\ {b}{\ne }{0}& {}\\ {a}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{c}{=}{0}& {}\\ {b}{=}{0}& {}\\ {a}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{2}{}{a}{}{x}{+}{b}{=}{0}& {}\\ {4}{}{a}{}{c}{-}{{b}}^{{2}}{=}{0}& {}\\ {a}{\ne }{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{c}{=}{0}& {}\\ {b}{=}{0}& {}\\ {a}{=}{0}& {}\end{array}\right\\right]$ (27)

Consider again the unit circle in the Euclidean plane.

 > $R≔\mathrm{PolynomialRing}\left(\left[y,x\right]\right);$$\mathrm{sys}≔\left[{x}^{2}+{y}^{2}=1\right]$
 ${R}{≔}{\mathrm{polynomial_ring}}$
 ${\mathrm{sys}}{≔}\left[{{x}}^{{2}}{+}{{y}}^{{2}}{=}{1}\right]$ (28)

Compute sample points of it.

 > $P≔\mathrm{SamplePoints}\left(\mathrm{sys},R\right)$
 ${P}{≔}\left[{\mathrm{box}}{,}{\mathrm{box}}{,}{\mathrm{box}}{,}{\mathrm{box}}\right]$ (29)
 > $\mathrm{Display}\left(P,R\right)$
 $\left[\left\{\begin{array}{cc}{y}{=}{-1}& {}\\ {x}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{y}{=}{1}& {}\\ {x}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{y}{=}{0}& {}\\ {x}{=}{1}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{y}{=}{0}& {}\\ {x}{=}{-1}& {}\end{array}\right\\right]$ (30)

Request points with positive abscissa.

 > $\mathrm{sys}≔\left[{x}^{2}+{y}^{2}=1,0
 ${\mathrm{sys}}{≔}\left[{{x}}^{{2}}{+}{{y}}^{{2}}{=}{1}{,}{0}{<}{x}\right]$ (31)
 > $P≔\mathrm{SamplePoints}\left(\mathrm{sys},R\right)$
 ${P}{≔}\left[{\mathrm{box}}{,}{\mathrm{box}}{,}{\mathrm{box}}\right]$ (32)
 > $\mathrm{Display}\left(P,R\right)$
 $\left[\left\{\begin{array}{cc}{y}{=}\left[{-}\frac{{111}}{{128}}{,}{-}\frac{{55}}{{64}}\right]& {}\\ {x}{=}\frac{{1}}{{2}}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{y}{=}\left[\frac{{55}}{{64}}{,}\frac{{111}}{{128}}\right]& {}\\ {x}{=}\frac{{1}}{{2}}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{y}{=}{0}& {}\\ {x}{=}{1}& {}\end{array}\right\\right]$ (33)

 > $R≔\mathrm{PolynomialRing}\left(\left[x,c,b,a\right]\right);$$\mathrm{sys}≔\left[a{x}^{2}+bx+c=0\right]$
 ${R}{≔}{\mathrm{polynomial_ring}}$
 ${\mathrm{sys}}{≔}\left[{a}{}{{x}}^{{2}}{+}{b}{}{x}{+}{c}{=}{0}\right]$ (34)

Compute sample points of the 4-variable hypersurface it defines.

 > $P≔\mathrm{SamplePoints}\left(\mathrm{sys},R\right)$
 ${P}{≔}\left[{\mathrm{box}}{,}{\mathrm{box}}{,}{\mathrm{box}}{,}{\mathrm{box}}{,}{\mathrm{box}}{,}{\mathrm{box}}{,}{\mathrm{box}}{,}{\mathrm{box}}{,}{\mathrm{box}}\right]$ (35)
 > $\mathrm{Display}\left(P,R\right)$
 $\left[\left\{\begin{array}{cc}{x}{=}{-1}& {}\\ {c}{=}\frac{{1}}{{2}}& {}\\ {b}{=}{0}& {}\\ {a}{=}{-}\frac{{1}}{{2}}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{1}& {}\\ {c}{=}\frac{{1}}{{2}}& {}\\ {b}{=}{0}& {}\\ {a}{=}{-}\frac{{1}}{{2}}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{-1}& {}\\ {c}{=}{-}\frac{{1}}{{2}}& {}\\ {b}{=}{0}& {}\\ {a}{=}\frac{{1}}{{2}}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{1}& {}\\ {c}{=}{-}\frac{{1}}{{2}}& {}\\ {b}{=}{0}& {}\\ {a}{=}\frac{{1}}{{2}}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {c}{=}{0}& {}\\ {b}{=}{-}\frac{{1}}{{2}}& {}\\ {a}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {c}{=}{0}& {}\\ {b}{=}\frac{{1}}{{2}}& {}\\ {a}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {c}{=}{0}& {}\\ {b}{=}{0}& {}\\ {a}{=}{0}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {c}{=}{0}& {}\\ {b}{=}{0}& {}\\ {a}{=}{-}\frac{{1}}{{2}}& {}\end{array}\right\{,}\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {c}{=}{0}& {}\\ {b}{=}{0}& {}\\ {a}{=}\frac{{1}}{{2}}& {}\end{array}\right\\right]$ (36)

The relaxation option.

 > $\mathrm{with}\left(\mathrm{RegularChains}\right):$$\mathrm{with}\left(\mathrm{SemiAlgebraicSetTools}\right):$
 > $R≔\mathrm{PolynomialRing}\left(\left[x,a,b\right]\right)$
 ${R}{≔}{\mathrm{polynomial_ring}}$ (37)
 > $\mathrm{sys}≔\left[{x}^{2}+\left(a+b\right)x+a=0,0
 ${\mathrm{sys}}{≔}\left[{{x}}^{{2}}{+}\left({a}{+}{b}\right){}{x}{+}{a}{=}{0}{,}{0}{<}{x}{-}{a}\right]$ (38)
 > $\mathrm{st}≔\mathrm{time}\left(\right):$$\mathrm{rtd0}≔\mathrm{RealTriangularize}\left(\mathrm{sys},R\right):$$\mathrm{time}\left(\right)-\mathrm{st}$
 ${0.351}$ (39)
 > $\mathrm{st}≔\mathrm{time}\left(\right):$$\mathrm{rtd1}≔\mathrm{RealTriangularize}\left(\mathrm{sys},R,\mathrm{relaxation}=\mathrm{explicit}\right):$$\mathrm{time}\left(\right)-\mathrm{st}$
 ${0.997}$ (40)
 > $\mathrm{evalb}\left(\mathrm{nops}\left(\mathrm{rtd1}\right)<\mathrm{nops}\left(\mathrm{rtd0}\right)\right)$
 ${\mathrm{true}}$ (41)

Accessing a sample point from a CAD cell.

 > $\mathrm{cad}≔\mathrm{CylindricalAlgebraicDecompose}\left(\left[\left[{x}^{2}-a=0\right]\right],R,\mathrm{output}='\mathrm{cadcell}'\right)$
 ${\mathrm{cad}}{≔}\left[{\mathrm{cad_cell}}{,}{\mathrm{cad_cell}}{,}{\mathrm{cad_cell}}\right]$ (42)
 > $\mathrm{cc}≔{\mathrm{cad}}_{1};$$\mathrm{Display}\left(\mathrm{cc},R\right)$
 ${\mathrm{cc}}{≔}{\mathrm{cad_cell}}$
 $\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {a}{=}{0}& {}\\ {b}{=}{b}& {}\end{array}\right\$ (43)
 > $\mathrm{SamplePoints}\left(\mathrm{cc},R,\mathrm{output}=\mathrm{record}\right)$
 $\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {a}{=}{0}& {}\\ {b}{=}{0}& {}\end{array}\right\$ (44) References

 F. Boulier, C. Chen, F. Lemaire, M. Moreno Maza, "Real root isolation of regular chains." ASCM'2009, Math-for-Industry, Lecture Note Series Vol. 22.
 C. Chen, J. H. Davenport, J. P. May, M. Moreno Maza, B. Xia, R. Xiao, "Triangular Decomposition of Semi-algebraic Systems." Proceedings of ISSAC 2010, ACM Press, 2010.
 C. Chen, J. H. Davenport, M. Moreno Maza, B. Xia, R. Xiao, "Computing with semi-algebraic sets represented by triangular decomposition". Proceedings of the 2011 International Symposium on Symbolic and Algebraic Computation (ISSAC 2011), ACM Press, pp. 75--82, 2011.
 R. Rioboo, Computation of the real closure of an ordered field. Proceedings of ISSAC'92, Academic Press, San Francisco.
 L. Yang, X. Hou, B. Xia, A complete algorithm for automated discovering of a class of inequality-type theorems. Sci. China Ser. F, Vol. 44 (2001): 33-49.
 B. Xia, L. Yang, An Algorithm for Isolating the Real Solutions of Semi-algebraic Systems. J. Symb. Comp., Vol. 34 No. 5 (2001): 461-477.
 B. Xia, T. Zhang, Real Solution Isolation Using Interval Arithmetic. Computers and Mathematics with Applications, Vol. 52 (2006): 853-860. Compatibility

 • The RegularChains[LazyRealTriangularize] and RegularChains[SamplePoints] commands were introduced in Maple 15.