Fix docstring for fmpz_poly_is_squarefree#2093
Fix docstring for fmpz_poly_is_squarefree#2093albinahlback wants to merge 1 commit intoflintlib:mainfrom
Conversation
Co-authored-by: Max Horn <max@quendi.de>
|
@edgarcosta please make a suggestion here if you want one |
| .. 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.
| 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.
| 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