Another new feature of the $\mathrm{RegularChains}$ library is its ability to determine the geometry of curves specified as the solution set of some equations. In particular, the library can find where the leading coefficients of these equations vanish, and whether the curve is locally real at those points or not. An example follows.

Consider the equations $-{y}^{3}\+{y}^{2}\+{z}^{5}equals;0$ and $x{z}^{4}plus;{y}^{3}-{y}^{2}equals;0$. The surfaces defined by them look as follows; this is purely for illustration and the method of drawing it won't be explained here. The first equation's surface is rendered in red, the second in blue, and the curve that is their intersection in green. You can also see a transparent black plane at $z\=0$, and the two intersection points of the curve with this plane in black; these are explained below.

${}$

If we view the variables as having the order $x\>y\>z$, then the leading coefficients of these equations are 1 and ${z}^{4}$, respectively. The first coefficient doesn't vanish; the second vanishes at $z\=0$. The __LimitPoints__ command can find the intersections of the curve, that is, the intersection of the red and blue surfaces. By default, this computation is done over the complex numbers.

$\mathrm{p1}\u2254-{y}^{3}plus;{y}^{2}plus;{z}^{5}colon;$

$\mathrm{p2}\u2254x{z}^{4}plus;{y}^{3}-{y}^{2}colon;$

$R\u2254\mathrm{PolynomialRing}\left(\left[xcomma;ycomma;z\right]\right)colon;$

$\mathrm{rc}\u2254\mathrm{Chain}\left(\left[\mathrm{p1}comma;\mathrm{p2}\right]comma;\mathrm{Empty}\left(R\right)comma;R\right)colon;$

$\mathrm{Display}\left(\mathrm{LimitPoints}\left(\mathrm{rc}\,R\right)comma;R\right)$

$\left[\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {y}{=}{0}& {}\\ {z}{=}{0}& {}\end{array}\right.{\,}\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {y}{-}{1}{=}{0}& {}\\ {z}{=}{0}& {}\end{array}\right.\right]$
| (5.1) |

We see that there are two such limit points. Indeed, if we evaluate the polynomials defining the equations at these points, they vanish. These are the two points shown in the graph above.

$\genfrac{}{}{0ex}{}{\left[\mathrm{p1}\,\mathrm{p2}\right]}{\phantom{y}}|\genfrac{}{}{0ex}{}{\phantom{x}}{\left\{xequals;0comma;yequals;0comma;zequals;0\right\}}$

$\left[{0}{\,}{0}\right]$
| (5.2) |

$\genfrac{}{}{0ex}{}{\left[\mathrm{p1}\,\mathrm{p2}\right]}{\phantom{y}}|\genfrac{}{}{0ex}{}{\phantom{x}}{\left\{xequals;0comma;yequals;1comma;zequals;0\right\}}$

$\left[{0}{\,}{0}\right]$
| (5.3) |

It looks like there is a cusp at the origin: the curve is not smooth there. We can confirm that this is indeed the case:

$\mathrm{Display}\left(\mathrm{LimitPoints}\left(\mathrm{rc}\,Rcomma;\mathrm{coefficient}equals;\mathrm{real}\right)comma;R\right)$

$\left[\left\{\begin{array}{cc}{x}{=}{0}& {}\\ {y}{-}{1}{=}{0}& {}\\ {z}{=}{0}& {}\end{array}\right.\right]$
| (5.4) |

By using the $\mathrm{coefficient}\=\mathrm{real}$option, we include only points where the curve is locally smooth in real space: where it locally has a Puiseux series with real coefficients. This computation uses the underlying command __RegularChainBranches__, which returns a truncated Puiseux series at each of these points for all branches.

$\mathrm{rbs}\u2254\mathrm{RegularChainBranches}\left(\mathrm{rc}comma;Rcomma;\left[z\right]\right)colon;$

$\mathrm{map}\left(\mathrm{print}\,\mathrm{rbs}\right)colon;$

$\left[{z}{=}{\mathrm{\_T}}{\,}{y}{=}{{\mathrm{\_T}}}^{{5}}{+}{1}{\,}{x}{=}{-}{{\mathrm{\_T}}}^{{11}}{-}{2}{}{{\mathrm{\_T}}}^{{6}}{-}{\mathrm{\_T}}\right]$
| (5.5) |

The first two results each contain a $\mathrm{RootOf}$ function which represents $I$ (or $-I$). We see that they have nonreal coefficients.

The last result is a truncated Puiseux series with only real coefficients. One might wonder if there are later terms of this series that have nonreal coefficients; but the algorithm used guarantees that this is not the case. The $\mathrm{RegularChainBranches}$ command can be instructed to return only truncated Puiseux series for real branches, as follows:

$\mathrm{real\_branch}\u2254\mathrm{RegularChainBranches}\left(\mathrm{rc}comma;Rcomma;\left[z\right]comma;\mathrm{coefficient}equals;\mathrm{real}\right)$

${\mathrm{real\_branch}}{\u2254}\left[\left[{z}{=}{\mathrm{\_T0}}{\,}{y}{=}{{\mathrm{\_T0}}}^{{5}}{+}{1}{\,}{x}{=}{-}{{\mathrm{\_T0}}}^{{11}}{-}{2}{}{{\mathrm{\_T0}}}^{{6}}{-}{\mathrm{\_T0}}\right]\right]$
| (5.6) |

When we examine it in the plot, we can see that this is locally a good approximation to the intersection curve for real values of the parameter, but the other two branches are not. Indeed, the $z$-component of the curve is nonnegative, whereas the curve is present only for $z\le 0$. When we re-parametrize these nonreal branches by the change of variables $\mathrm{\_T}equals;IT$, we get the following. (The call to $\mathrm{convert}\/\mathrm{radical}$ converts the $\mathrm{RootOf}$ function into $I$.)

$\mathrm{complex\_branches}\u2254\mathrm{convert}\left(\mathrm{eval}\left(\mathrm{rbs}\left[1..2\right]comma;\mathrm{\_T}equals;IT\right)comma;\mathrm{radical}\right)colon;$

$\mathrm{map}\left(\mathrm{print}\,\mathrm{complex\_branches}\right)colon;$

$\left[{z}{=}{-}{{T}}^{{2}}{\,}{y}{=}{-}\frac{{\mathrm{I}}}{{2}}{}{{T}}^{{5}}{}\left({\mathrm{I}}{}{{T}}^{{5}}{-}{2}{}{\mathrm{I}}\right){\,}{x}{=}{-}\frac{{{T}}^{{2}}{}\left({{T}}^{{20}}{-}{6}{}{{T}}^{{15}}{+}{10}{}{{T}}^{{10}}{-}{8}\right)}{{8}}\right]$
| (5.7) |

Now the leading coefficient for each of the coordinates is real. Of course the (truncated) series itself can still not be embedded in real space, but we will be able to examine its real part, which should approximate the series well for small values of $T$. Below, this real part of the truncated Puiseux series is shown in purple and the real truncated Puiseux series in pink.