gr_poly_is_irreducible, gr_poly_is_irreducible_ben_or, gr_poly_is_irreducible_ddf, gr_poly_is_irreducible_rabin
#include <flint/gr_poly.h>Return whether is irreducible over . Constants are not irreducible.
The ben_or version uses Ben-Or's test [BenOr1981], computing for with the Frobenius iterates obtained by modular composition or exponentiation. The ddf version runs the coarse phase of the baby-step giant-step distinct-degree factorisation (gr_poly_factor_distinct_deg) and stops at the first factor found, which is fast on inputs with small factors. The rabin version uses Rabin's test [Rab1980b]: of degree is irreducible if and only if and for every prime ; the Frobenius powers are computed by modular composition from the ladder , so that the test costs compositions after the initial , against about for the distinct-degree test, but it does not stop early on inputs with small factors.
The default version first looks for roots by evaluation when the field is a small prime field; for degree below 600 it then calls the ddf version, and from 600 on it checks squarefreeness, removes inputs with factors of degree at most 4 with a few gcds, and calls the rabin version.
References#
- [BenOr1981] M. Ben-Or. Probabilistic algorithms in finite fields. 22nd Annual Symposium on Foundations of Computer Science (FOCS 1981), IEEE, 394–398.
- [Rab1980b] M. O. Rabin. Probabilistic algorithms in finite fields. SIAM Journal on Computing 9 (1980), 273–280.
The FLINT team, “gr_poly_is_irreducible, gr_poly_is_irreducible_ben_or, gr_poly_is_irreducible_ddf, gr_poly_is_irreducible_rabin (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/gr_poly_is_irreducible.html (generated 2026-11-02).
@misc{flint-doc-gr-poly-gr-poly-is-irreducible,
author = {{The FLINT team}},
title = {{gr\_poly\_is\_irreducible, gr\_poly\_is\_irreducible\_ben\_or, gr\_poly\_is\_irreducible\_ddf, gr\_poly\_is\_irreducible\_rabin (gr\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_poly/gr_poly_is_irreducible.html},
note = {Generated 2026-11-02}
}