M2
M2 copied to clipboard
`factor` should be made to work in more cases
... 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.
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.
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
that's the undesired behavior I'm assuming
Oh, right. The desired behavior is to give the right answer.
This was fixed in #1996