Division by factorized polynomials in Macaulay2

802 Views Asked by At

I have this problem dividing by factorized polynomials, for example

(x_1^4-x_2^4)//(factor(x_1^2-x_2^2))

does not work because the numerator is of "class R" (R is the ring kk[x_1..x_n]) and the denominator is of "class Product".

How to convert elements of class Product to class R?

I'd appreciate your help.

1

There are 1 best solutions below

0
On BEST ANSWER

You could use value, as follows.

$ M2
Macaulay2, version 1.6
with packages: ConwayPolynomials, Elimination, IntegralClosure, LLLBases, PrimaryDecomposition, ReesAlgebra, TangentCone

i1 : kk = QQ

o1 = QQ

o1 : Ring

i2 : R = kk[x_1..x_5]

o2 = R

o2 : PolynomialRing

i3 : p = (x_1^4-x_2^4)

      4    4
o3 = x  - x
      1    2

o3 : R

i4 : q = factor(x_1^2-x_2^2)

o4 = (- x  + x )(x  + x )(-1)
         1    2   1    2

o4 : Expression of class Product

i5 : value(q)

       2    2
o5 = x  - x
       1    2

o5 : R

i6 : p // value(q)

       2    2
o6 = x  + x
       1    2

o6 : R