RegularSystemDifference - Maple Help

RegularChains[ConstructibleSetTools]

 RegularSystemDifference
 compute the difference of two regular systems

 Calling Sequence RegularSystemDifference(rs1, rs2, R)

Parameters

 rs1, rs2 - regular systems of R R - polynomial ring

Description

 • The command RegularSystemDifference(rs1, rs2, R) returns a constructible set which is the difference of rs1 and rs2.
 • This command is part of the RegularChains[ConstructibleSetTools] package, so it can be used in the form RegularSystemDifference(..) only after executing the command with(RegularChains[ConstructibleSetTools]). However, it can always be accessed through the long form of the command by using RegularChains[ConstructibleSetTools][RegularSystemDifference](..).

Examples

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

Define a polynomial ring.

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

Define a set of polynomials of R.

 > $\mathrm{sys}≔\left[z{x}^{2}+y+z,{y}^{2}+z\right]$
 ${\mathrm{sys}}{≔}\left[{z}{}{{x}}^{{2}}{+}{y}{+}{z}{,}{{y}}^{{2}}{+}{z}\right]$ (2)

The command Triangularize (with lazard option) decomposes the common solutions of the polynomial system $\mathrm{sys}$ by means of regular chains.

 > $\mathrm{dec}≔\mathrm{Triangularize}\left(\mathrm{sys},R,\mathrm{output}=\mathrm{lazard}\right)$
 ${\mathrm{dec}}{≔}\left[{\mathrm{regular_chain}}{,}{\mathrm{regular_chain}}\right]$ (3)

There are two groups of solutions, each of which is given by a regular chain. To view their equations, use the Equations command.

 > $\mathrm{map}\left(\mathrm{Equations},\mathrm{dec},R\right)$
 $\left[\left[{z}{}{{x}}^{{2}}{+}{y}{+}{z}{,}{{y}}^{{2}}{+}{z}\right]{,}\left[{y}{,}{z}\right]\right]$ (4)

Let $\mathrm{rc1}$ be the first regular chain, and $\mathrm{rc2}$ be the second one.

 > $\mathrm{rc1},\mathrm{rc2}≔\mathrm{dec}\left[1\right],\mathrm{dec}\left[2\right]$
 ${\mathrm{rc1}}{,}{\mathrm{rc2}}{≔}{\mathrm{regular_chain}}{,}{\mathrm{regular_chain}}$ (5)

Consider two polynomials $\mathrm{h1}$ and $\mathrm{h2}$; regard them as inequations.

 > $\mathrm{h1},\mathrm{h2}≔x,x+z$
 ${\mathrm{h1}}{,}{\mathrm{h2}}{≔}{x}{,}{x}{+}{z}$ (6)

To obtain a regular system, first check whether $\mathrm{h1}$ is regular with respect to $\mathrm{rc1}$, and $\mathrm{h2}$ is regular with respect to $\mathrm{rc2}$.

 > $\mathrm{IsRegular}\left(\mathrm{h1},\mathrm{rc1},R\right);$$\mathrm{IsRegular}\left(\mathrm{h2},\mathrm{rc2},R\right)$
 ${\mathrm{true}}$
 ${\mathrm{true}}$ (7)

Both of them are regular, thus you can build the following regular systems.

 > $\mathrm{rs1}≔\mathrm{RegularSystem}\left(\mathrm{rc1},\left[\mathrm{h1}\right],R\right);$$\mathrm{rs2}≔\mathrm{RegularSystem}\left(\mathrm{rc2},\left[\mathrm{h2}\right],R\right)$
 ${\mathrm{rs1}}{≔}{\mathrm{regular_system}}$
 ${\mathrm{rs2}}{≔}{\mathrm{regular_system}}$ (8)

The command RegularSystemDifference computes the set theoretical difference of two sets defined by regular systems. The output is a list of regular systems which forms a constructible set.

 > $\mathrm{cs}≔\mathrm{RegularSystemDifference}\left(\mathrm{rs1},\mathrm{rs2},R\right)$
 ${\mathrm{cs}}{≔}{\mathrm{constructible_set}}$ (9)

To view the output, use the following sequence of commands.

 > $\mathrm{lrs}≔\mathrm{RepresentingRegularSystems}\left(\mathrm{cs},R\right)$
 ${\mathrm{lrs}}{≔}\left[{\mathrm{regular_system}}\right]$ (10)
 > $\mathrm{lrc}≔\mathrm{map}\left(\mathrm{RepresentingChain},\mathrm{lrs},R\right)$
 ${\mathrm{lrc}}{≔}\left[{\mathrm{regular_chain}}\right]$ (11)
 > $\mathrm{eqs}≔\mathrm{map}\left(\mathrm{Equations},\mathrm{lrc},R\right)$
 ${\mathrm{eqs}}{≔}\left[\left[{z}{}{{x}}^{{2}}{+}{y}{+}{z}{,}{{y}}^{{2}}{+}{z}\right]\right]$ (12)
 > $\mathrm{ineqs}≔\mathrm{map}\left(\mathrm{RepresentingInequations},\mathrm{lrs},R\right)$
 ${\mathrm{ineqs}}{≔}\left[\left[{x}{,}{z}\right]\right]$ (13)

Alternatively, you could use the Info command.

 > $\mathrm{Info}\left(\mathrm{cs},R\right)$
 $\left[\left[{z}{}{{x}}^{{2}}{+}{y}{+}{z}{,}{{y}}^{{2}}{+}{z}\right]{,}\left[{x}{,}{z}\right]\right]$ (14)