M2 icon indicating copy to clipboard operation
M2 copied to clipboard

`factor` should be made to work in more cases

Open DanGrayson opened this issue 8 years ago • 4 comments

... such as for elements of (frac (QQ[a])) [x,y,z] or (toField (QQ[a]/f))[x,y,z]. For the former case, clear denominators of the coefficients. For the latter, "factory" provides the functionality. In the former case, the factors should have coefficients without denominators.

DanGrayson avatar Jul 30 '17 13:07 DanGrayson

Is it possible to have an example of the desired behavior in each case? I'm curious to see if my package Factor already resolves this.

pzinn avatar Dec 08 '20 13:12 pzinn

Macaulay2, version 1.16.0.2
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, MinimalPrimes, PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone, Truncations

i1 : (frac (QQ[a])) [x,y,z]

o1 = frac(QQ[a])[x, y, z]

o1 : PolynomialRing

i2 : factor x
stdio:2:1:(3): error: expected coefficient ring of the form ZZ/n, ZZ, QQ, or GF

i3 : (toField (QQ[a]/(a^2+1)))[x,y,z]

      QQ[a]
o3 = ------[][x, y, z]
      2
     a  + 1

o3 : PolynomialRing

i4 : factor x
stdio:4:1:(3): error: expected coefficient ring of the form ZZ/n, ZZ, QQ, or GF

DanGrayson avatar Dec 08 '20 14:12 DanGrayson

that's the undesired behavior I'm assuming

pzinn avatar Dec 08 '20 15:12 pzinn

Oh, right. The desired behavior is to give the right answer.

DanGrayson avatar Dec 08 '20 16:12 DanGrayson

This was fixed in #1996

d-torrance avatar Jun 04 '24 02:06 d-torrance