5
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ have you tried to ask this in Macaulay2 Google Discussion Group? The link to it is on Macaulay2 front page. $\endgroup$ Aug 30, 2014 at 22:23
  • $\begingroup$ Yes Alexander, I posted it there first, have received no answer :) This is a silly question... but anyway the answer was useful, didn't know about the 'value' function. $\endgroup$ Sep 9, 2014 at 22:23
  • $\begingroup$ Do you know a command eg to get (1,2) out of (x^2+2*y) and ideal(x^2,y) in M2? $\endgroup$
    – hhh
    Feb 20, 2016 at 22:28

1 Answer 1

3
$\begingroup$

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
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .