compute the difference of two regular systems
RegularSystemDifference(rs1, rs2, R)
regular systems of R
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](..).
Define a polynomial ring.
R ≔ PolynomialRing⁡x,y,z
Define a set of polynomials of R.
sys ≔ z⁢x2+y+z,y2+z
The command Triangularize (with lazard option) decomposes the common solutions of the polynomial system sys by means of regular chains.
dec ≔ Triangularize⁡sys,R,output=lazard
There are two groups of solutions, each of which is given by a regular chain. To view their equations, use the Equations command.
Let rc1 be the first regular chain, and rc2 be the second one.
rc1,rc2 ≔ dec1,dec2
Consider two polynomials h1 and h2; regard them as inequations.
h1,h2 ≔ x,x+z
To obtain a regular system, first check whether h1 is regular with respect to rc1, and h2 is regular with respect to rc2.
Both of them are regular, thus you can build the following regular systems.
rs1 ≔ RegularSystem⁡rc1,h1,R;rs2 ≔ RegularSystem⁡rc2,h2,R
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.
cs ≔ RegularSystemDifference⁡rs1,rs2,R
To view the output, use the following sequence of commands.
lrs ≔ RepresentingRegularSystems⁡cs,R
lrc ≔ map⁡RepresentingChain,lrs,R
eqs ≔ map⁡Equations,lrc,R
ineqs ≔ map⁡RepresentingInequations,lrs,R
Alternatively, you could use the Info command.
Download Help Document