-
Notifications
You must be signed in to change notification settings - Fork 245
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
Fix docstring for fmpz_poly_is_squarefree #2093
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Max Horn <[email protected]>
@edgarcosta please make a suggestion here if you want one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me, thanks
Returns whether the polynomial ``(poly, len)`` is square-free. | ||
|
||
.. function:: int fmpz_poly_is_squarefree(const fmpz_poly_t poly) | ||
int fmpz_poly_is_squarefree(const fmpz_poly_t poly) | ||
|
||
Returns whether the polynomial ``poly`` is square-free. A non-zero |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns whether the polynomial ``poly`` is square-free. A non-zero | |
Returns whether the polynomial ``poly`` is square-free. |
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. This differs somewhat from the usual definition, e.g. we | ||
consider the polynomial `4 x` in `\mathbb{Z}[x]` as square-free. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. This differs somewhat from the usual definition, e.g. we | |
consider the polynomial `4 x` in `\mathbb{Z}[x]` as square-free. | |
A polynomial is square-free if it is the zero polynomial or it is not | |
divisible by a non-constant square polynomial. | |
Equivalently, if the polynomial has nontrivial double roots over the complex numbers. | |
This differs somewhat from the usual square-free definition, e.g. | |
we consider the polynomial `4 x \in \mathbb{Z}[x]` to be square-free. |
I honestly find it confusing that the polynomial zero is square-free, but perhaps a change in the code now is too late. |
I don't know. If people have a problem with it, I'm down for changing it. |
@fredrik-johansson would it be okay to change the definition of square free? |
I'd be happy with 0 being considered not squarefree. |
FWIW we came to the same conclusion for Nemo, see Nemocas/Nemo.jl#1510 |
Seems like a reasonable fix before releasing 3.2.0. However, we would have to make sure that this is consistent throughout FLINT. Moreover, it seems like some docstring do not provide the definition of square-free (see docstring for |
Solves #2084
@fingolfin