This function converts a rational system to a Laurent polynomial system.
i1 : QQ[x,y,z]; |
i2 : sys = {y-x^2, z-x^3, (x+y+z-1)/x}; |
i3 : describe ring ideal sys o3 = frac/QQ[x..z, Degrees => {3:1}, Heft => {1}, MonomialOrder => {MonomialSize => 32}, DegreeRank => 1]\ | {GRevLex => {3:1} } | \ {Position => Up } / |
There are denominators, so the method will convert these:
i4 : convertedSys = toLaurentPolynomial(sys,w); |
The system convertedSys is an equivalent system living in a Laurent polynomial ring. For each denominator, a new variable was created starting with w.
i5 : printWidth = 300; |
i6 : toString convertedSys o6 = {y-x^2, z-x^3, -w_0^(-1)+z*w_0^(-1)+y*w_0^(-1)+x*w_0^(-1), w_0-x} |
i7 : ring ideal convertedSys o7 = QQ {x..z, w } 0 o7 : PolynomialRing |
Next, notice that the option "Inverses=>true" shows that this is a ring with negative exponents allowed:
i8 : describe oo o8 = QQ {x..z, w , Degrees => {4:1}, MonomialOrder => {Weights => {4:-1} }, DegreeRank => 1, Inverses => true, Global => false} 0 {MonomialSize => 32} {GroupRevLex => 4 } {Position => Up } |
Note that if the system is already polynomial, or in Laurent polynomial form, then toLaurentPolynomial doesn't change it. Of course, sometimes it is possible that the system is polynomial "in disguise" as in line o10 in the following example:
i9 : P = QQ[x,y,z]; |
i10 : f = (x*y + z^2*y) / y 2 o10 = z + x o10 : frac P |
i11 : liftable(f,P) o11 = true |
But toLaurentPolynomial detects this and simplifies the system. Instead of creating Laurent polynomials, it updates the system using the following:
i12 : lift(f,P) 2 o12 = z + x o12 : P |
The object toLaurentPolynomial is a method function.