Nemocas / AbstractAlgebra.jl

Generic abstract algebra functionality in pure Julia (no C dependencies)
https://nemocas.github.io/AbstractAlgebra.jl/dev/index.html
Other
171 stars 63 forks source link

isunit for univariate and multivariate polynomials is incorrect over Z/nZ #11

Open wbhart opened 6 years ago

wbhart commented 6 years ago

It's not true that a polynomial is a unit in its polynomial ring iff its constant coefficient is a unit. This has been assumed in the current implementation. For example, it isn't true over Z/nZ.

As it is actually quite expensive in general to compute this, we should look carefully where isunit has been used in generic code and remove references to it where this is not precisely what is required.

thofma commented 6 years ago

This is just https://github.com/Nemocas/Nemo.jl/issues/323, right?

wbhart commented 6 years ago

Yes. We'll need to copy all the relevant ones over to here eventually. This one just stands out as being a major error that should be corrected sooner rather than later. So I'm listing it here so that it doesn't get forgotten.

fieker commented 6 years ago

Specifically for Z/nZ we have much more in Hecke.jl - it might have to move across the divide...

On Fri, Feb 02, 2018 at 03:39:32PM +0000, wbhart wrote:

Yes. We'll need to copy all the relevant ones over to here eventually. This one just stands out as being a major error that should be corrected sooner rather than later. So I'm listing it here so that it doesn't get forgotten.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/Nemocas/AbstractAlgebra.jl/issues/11#issuecomment-362614334

wbhart commented 5 years ago

We should implement an isunit_constant function to replace the existing isunit function that is used often in library code (where we only care if we have a constant polynomial that is a unit for example, instead of actually needing a unit).