FLINT3.7.0-dev

gr_poly_factor_squarefree

Synopsis#include <flint/gr_poly.h>
int gr_poly_factor_squarefree(gr_ptr c, gr_poly_vec_t fac, fmpz_vec_t exp, const gr_poly_t poly, gr_ctx_t ctx)source

Computes a squarefree factorisation f = c \prod_i g_i^{e_i} with pairwise coprime squarefree g_i and distinct multiplicities e_i \ge 1, using Yun's algorithm in characteristic zero and its extension with p-th roots over finite fields (Squarefree factorisation). The factors are written to fac, a vector of polynomials over ctx, and the multiplicities to exp, in no particular order.

The constant c is an element of R. Over a field all factors are monic and c is the leading coefficient of f. Over other rings the factors are primitive with canonical leading coefficients, and c is a unit multiple of the content of f (which is not factored further). The ring must be a unique factorisation domain, and in positive characteristic a finite field (for the p-th roots); GR_UNABLE is returned if this cannot be verified.

Cite this page

The FLINT team, “gr_poly_factor_squarefree (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_squarefree.html (generated 2026-10-20).