Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug (?) in MPolyFactor when coefficients are are not in a field #1960

Open
fingolfin opened this issue Jan 16, 2025 · 0 comments
Open

Bug (?) in MPolyFactor when coefficients are are not in a field #1960

fingolfin opened this issue Jan 16, 2025 · 0 comments

Comments

@fingolfin
Copy link
Member

julia> R,(x,y) = ZZ[:x,:y]
(Multivariate polynomial ring in 2 variables over integers, AbstractAlgebra.Generic.MPoly{BigInt}[x, y])

julia> f = AbstractAlgebra.MPolyFactor.mfactor_char_zero((2*x+x)^2)
9 * x^2

Looking at the code, I think what effectively happens is that f.unit is set to the content of the polynomial. But really that should also be factorized.

So in this case I'd expect an error to be thrown because we don't implement factor for BigInt.

One can now quibble whether this is a bug, after all AbstractAlgebra.MPolyFactor.mfactor_char_zero is not factor and could just declare that it doesn't handle factorization in the coefficient ring. In that interpretation, it simply alllows itself to abuse the unit field of type Fac to store a non-unit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant