Skip to content

Document modular polynomial roots over prime fields - #453

Draft
tgolob wants to merge 1 commit into
flintlib:mainfrom
tgolob:codex/python-flint-modular-polynomial-roots-docs
Draft

tgolob wants to merge 1 commit into
flintlib:mainfrom
tgolob:codex/python-flint-modular-polynomial-roots-docs

Conversation

@tgolob

@tgolob tgolob commented Nov 23, 2026

Copy link
Copy Markdown

Summary

Document that fmpz_mod_poly.roots() returns roots in the full prime field and requires a nonzero polynomial. Add an example showing that x**2 has root zero with multiplicity two. This matches the FLINT C API contract.

Verification

  • Built the branch from source with Python 3.13 and FLINT 3.6.0. The project runner passed 235 tests and 3,187 doctests, including all six examples in the revised docstring. Both reStructuredText doctests passed.
  • The edited Cython file passed cython-lint. Independent synthetic division agreed on 3,119 nonzero polynomials over four prime fields.
  • spin docs generated the HTML, including the revised example. Strict Sphinx builds of the base and patched commits each reported the same definition-list warning in gr_ctx.factor. Hosted CI is unverified.

AI disclosure

OpenAI Codex generated the docstring change, checked the examples, and drafted this description.

FLINT C API contract

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant