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

Fix docstring for fmpz_poly_is_squarefree #2093

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions doc/source/fmpz_poly.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1485,14 +1485,13 @@ Square-free


.. function:: int _fmpz_poly_is_squarefree(const fmpz * poly, slong len)

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 it has no non-unit square
factors. We also define the zero polynomial to be 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.
Comment on lines +1491 to +1494
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.


Returns `1` if the length of ``poly`` is at most `2`. Returns whether
the discriminant is zero for quadratic polynomials. Otherwise, returns
Expand Down
Loading