FLINT3.7.0-dev

gr_poly_factor_equal_deg, _gr_poly_factor_equal_deg_with_frob

Synopsis#include <flint/gr_poly.h>
int gr_poly_factor_equal_deg(gr_poly_vec_t fac, const gr_poly_t pol, slong d, gr_ctx_t ctx)source
int _gr_poly_factor_equal_deg_with_frob(gr_poly_vec_t fac, const gr_poly_t f, slong d, const gr_poly_t frob, flint_rand_t state, gr_ctx_t ctx)source

Equal-degree factorisation: for a squarefree f whose irreducible factors all have degree d, set fac to the monic irreducible factors. The result is undefined for other inputs.

This is the Cantor-Zassenhaus algorithm [CanZas1981] in the trace form of von zur Gathen and Shoup [GatSho1992]: for random a \in \mathbb{F}_q[x]/(f), the trace b = a + a^q + \cdots + a^{q^{d-1}} (computed by modular composition with the Frobenius x^q, by exponentiation, or by a doubling scheme, depending on q and d) lies in the Berlekamp subalgebra, and \gcd(f, b^{(q-1)/2} - 1) for odd q, or \gcd(f, b + b^2 + \cdots + b^{2^{k-1}}) for q = 2^k, splits f with probability about 1/2. The splitting is repeated on the factors. For d = 1 (root finding) a is a random linear polynomial, which makes the exponentiation cheaper. When several pieces remain and threads are available over a thread-safe ring, the pieces are split in parallel, each with its own random state. The underscore version assumes f monic, takes x^q \bmod f as frob (unused for d = 1) and a random state, and appends to fac.

References#

Cite this page

The FLINT team, “gr_poly_factor_equal_deg, _gr_poly_factor_equal_deg_with_frob (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/gr_poly_factor_equal_deg.html (generated 2026-10-20).