Multivariate polynomials
The sections below describe the algorithms behind the sparse multivariate polynomial modules fmpz_mpoly, fmpq_mpoly, nmod_mpoly, fmpz_mod_mpoly, fq_nmod_mpoly, fq_zech_mpoly and gr_mpoly, their factorisation modules and the rational function modules. The overview compares the methods and says which functions use them; the others give the algorithms with proofs, starting from the representation of polynomials, through arithmetic, to GCDs and factorisation. Those on GCDs over small finite fields, factoring over finite fields and bivariate resultants treat what is specific to finite fields.
In this section#
nmod_mpoly_gcd chooses among Brown's, Zippel's and Hensel-lifting algorithms.AlgorithmSparse interpolationRecovering a sparse polynomial from its values at a few points: Zippel's method for a known support (transposed Vandermonde systems solved in quadratic time, with extra unknowns for scaled images), and the method of Ben-Or and Tiwari for an unknown support (Berlekamp–Massey, roots of the recurrence polynomial, discrete logarithms modulo a smooth prime after Kronecker substitution) with the Berlekamp–Massey algorithm computed incrementally by half-gcd steps, as used by FLINT's sparse GCD and factoring algorithms.AlgorithmMultivariate Hensel liftingLifting a factorisation of A(x_0, \alpha_1, \ldots, \alpha_m) to a factorisation of A one variable at a time: uniqueness given the leading coefficients, the multivariate partial fraction (diophantine) equations solved by Taylor expansion, the quartic and quintic error updates of FLINT's fmpz_mpoly_hlift, bivariate lifting modulo prime powers, sparse lifting, and the leading coefficient methods of Wang and Kaltofen.AlgorithmFactorisationHow FLINT factors multivariate polynomials over the integers: removal of contents and powers of variables, squarefree decomposition by Yun's algorithm, compression of the exponents by unimodular changes of variables, irreducibility certificates from Newton polytopes, direct formulas for low degree, dense bivariate factorisation with Hensel lifting and recombination, degree pruning with univariate images, and the three lifting strategies of Wang, Zippel and Zassenhaus.AlgorithmFactoring over finite fieldsThe multivariate factorisation pipeline of nmod_mpoly_factor and fq_nmod_mpoly_factor, with what is specific to characteristic p: separable factorisation with p-th roots, deflation by powers of p, factoring over extension fields with recombination of Frobenius orbits when the field is too small for good evaluation points, quadratic equations in characteristic 2, bivariate factorisation with recombination by linear algebra, and Wang's leading coefficients along random curves.AlgorithmBivariate resultants by evaluation and interpolationThe resultant \mathrm{Res}_y(A, B) \in \mathbb{F}_p[x] of two bivariate polynomials, computed from univariate resultants at many values of x (a geometric progression or roots of unity) and interpolation, with the degree bound, the correction for specialisations that lower the degree, and FLINT's cutoffs.The FLINT team, “Multivariate polynomials,” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/algorithms/multivariate/index.html (generated 2026-10-20).
@misc{flint-doc-algorithms-multivariate-index,
author = {{The FLINT team}},
title = {{Multivariate polynomials}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/algorithms/multivariate/index.html},
note = {Generated 2026-10-20}
}