flint icon indicating copy to clipboard operation
flint copied to clipboard

`fmpz_poly_is_squarefree` wrong results?

Open fingolfin opened this issue 1 year ago • 4 comments

It indicates that 4x is square-free, but that doesn't agree with its documentation, which states

Returns whether the polynomial poly is square-free. A non-zero polynomial is defined to be square-free if it has no non-unit square factors. We also define the zero polynomial to be square-free.

See also https://github.com/Nemocas/Nemo.jl/pull/1742 and https://github.com/Nemocas/Nemo.jl/issues/1311

fingolfin avatar Oct 08 '24 20:10 fingolfin

A change to something like

Returns whether the polynomial poly is square-free. A non-zero polynomial is defined to be square-free if its factorisation contains no non-constant square factors. We also define the zero polynomial to be square-free.

would work, right?

albinahlback avatar Oct 08 '24 20:10 albinahlback

Thank you. That would at least clarify that it deviates from the usual mathematical definition. Perhaps it could be made even more explicitly by in addition inserting something like this:

This differs somewhat from the usual definition, e.g. we consider the polynomial 4x in Z[x] as square-free.

fingolfin avatar Oct 15 '24 10:10 fingolfin

Or just write, that it returns whether poly is squarefree as a polynomial over the rationals.

thofma avatar Oct 15 '24 11:10 thofma

That or just say it doesn't double roots over the complex numbers

edgarcosta avatar Oct 15 '24 13:10 edgarcosta