FLINT3.7.0-dev
Algorithm

GCDs over small finite fields

Cost
Over a large field, the cost of the underlying algorithm (Brown, Zippel or Hensel lifting). Over a small field, the same algorithm over Fpd\mathbb{F}_{p^d} for d=O(log⁡pD)d = O(\log_p D), where DD bounds the degrees, plus Chinese remaindering in Fp[x]\mathbb{F}_p[x].

The multivariate GCD algorithms of FLINT reduce the problem to fewer variables by evaluation: a variable xjx_j is replaced by a value α∈K\alpha \in K, the GCD of the images is computed recursively, and the GCD is recovered from enough images by interpolation (Brown's dense algorithm [Bro1971]), by sparse interpolation of the unknown coefficients of a known support (Zippel's algorithm [Zip1979]), or by Hensel lifting of a factorisation A=GAˉA = G\bar{A}, B=GBˉB = G\bar{B} of an image. These algorithms, common to all coefficient rings, are described in Greatest common divisors, Sparse interpolation and Multivariate Hensel lifting. What is specific to finite fields K=FqK = \mathbb{F}_q, q=pdq = p^d, with a word-size characteristic is that the field may be too small to provide the evaluation points these algorithms need. FLINT then computes the images over larger fields, in two ways:

  • medium extensions: the inputs are mapped into an extension Fqk\mathbb{F}_{q^k} and the algorithm runs there with evaluation points in the extension;
  • reduction modulo irreducible polynomials: the variable xjx_j is not evaluated at a point but reduced modulo an irreducible polynomial m(xj)m(x_j), so that the image lies over the field K[xj]/(m)≅Fqdeg⁡mK[x_j]/(m) \cong \mathbb{F}_{q^{\deg m}}, and images are combined by the Chinese remainder theorem in K[xj]K[x_j].

In the sources, versions over KK itself are named smprime, those over extensions represented with Zech logarithms medprime, and those over K[x]/(m)K[x]/(m) with arbitrary deg⁡m\deg m lgprime ("small", "medium" and "large primes", the irreducible polynomials playing the role of primes). The approach of working modulo prime ideals of higher degree when the field is too small goes back to the analysis of the modular GCD algorithm over small fields by Kaltofen and Monagan [KM1999]. The implementation is due to Daniel Schultz, whose notes [Sch-mpoly] describe the algorithms of the mpoly modules.

Why small fields are a problem#

Every evaluation algorithm needs points at which the inputs keep their shape. For Brown's algorithm in the variable xnx_n with the other variables x1,…,xn−1x_1, \ldots, x_{n-1}, a point α\alpha is bad if it is a root of γ=gcd⁡(lc(A),lc(B))\gamma = \gcd(\mathrm{lc}(A), \mathrm{lc}(B)) (the leading coefficients with respect to x1,…,xn−1x_1, \ldots, x_{n-1}, polynomials in xnx_n), and unlucky if the GCD of the images A(α)A(\alpha), B(α)B(\alpha) has a larger degree than the image of the GCD. Both sets are contained in the root set of a nonzero polynomial Δ∈K[xn]\Delta \in K[x_n]: the leading coefficient for bad points, and a subresultant of the cofactors for unlucky ones ([GG2003, §6.7]). Sparse interpolation and Hensel lifting choose a random point (α2,…,αn)(\alpha_2, \ldots, \alpha_n) for several variables at once, and have similar conditions expressed by nonzero polynomials in several variables.

Lemma 1 (Schwartz–Zippel). Let Δ∈K[x1,…,xn]\Delta \in K[x_1, \ldots, x_n] be nonzero of total degree DD and let S⊆KS \subseteq K be finite. For α\alpha chosen uniformly at random from SnS^n, the probability that Δ(α)=0\Delta(\alpha) = 0 is at most D/∣S∣D/|S| [Sch1980] [Zip1979].

Over a large field the probability of failure is negligible. Over Fp\mathbb{F}_p with pp small compared with the degrees it is not, and there may be no good point at all: Δ=xp−x\Delta = x^p - x vanishes on all of Fp\mathbb{F}_p. Taking points from an extension field restores the bound of Lemma 1 with ∣S∣=qk|S| = q^k.

Extensions do not change the GCD#

Lemma 2. Let L/KL/K be an extension of finite fields and A,B∈K[x1,…,xn]A, B \in K[x_1, \ldots, x_n], not both zero. The monic GCD of AA and BB in L[x1,…,xn]L[x_1, \ldots, x_n] (with respect to any monomial ordering) has coefficients in KK and is the monic GCD in K[x1,…,xn]K[x_1, \ldots, x_n].

Proof. Let GG be the monic GCD over KK and write A=GAˉA = G\bar{A}, B=GBˉB = G\bar{B} with Aˉ,Bˉ\bar{A}, \bar{B} coprime over KK. Let HH be the monic GCD of Aˉ\bar{A} and Bˉ\bar{B} over LL. The extension L/KL/K is Galois; an automorphism σ\sigma of LL over KK, applied to the coefficients, is a ring automorphism of L[x1,…,xn]L[x_1, \ldots, x_n] fixing Aˉ\bar{A} and Bˉ\bar{B}, so σ(H)\sigma(H) is again a monic GCD of Aˉ\bar{A} and Bˉ\bar{B}, hence σ(H)=H\sigma(H) = H. Thus H∈K[x1,…,xn]H \in K[x_1, \ldots, x_n]. Division by the monic HH with respect to the monomial ordering gives the same quotient over KK and over LL, so HH divides Aˉ\bar{A} and Bˉ\bar{B} over KK and H=1H = 1. Hence Aˉ\bar{A} and Bˉ\bar{B} are coprime over LL and GG is the monic GCD over LL.

So a GCD computed over Fqk\mathbb{F}_{q^k} with any algorithm, once made monic, is the GCD over Fq\mathbb{F}_q; the cofactors A/GA/G and B/GB/G also have coefficients in Fq\mathbb{F}_q. This justifies the medprime Hensel-lifting GCD (nmod_mpolyl_gcd_hensel_medprime), which maps the inputs to Fpk\mathbb{F}_{p^k} represented by fq_zech and lifts there.

Brown's algorithm over Fp\mathbb{F}_p#

Over a field with enough points, Brown's algorithm evaluates the last variable x=xnx = x_n at points α∈Fp\alpha \in \mathbb{F}_p, computes the GCDs of the images in Fp[x1,…,xn−1]\mathbb{F}_p[x_1, \ldots, x_{n-1}] recursively, and interpolates the GCD GG and the cofactors Aˉ\bar A, Bˉ\bar B together [Bro1971]. The version in FLINT, nmod_mpolyn_gcd_brown_smprime (inputs in the nmod_mpolyn_t representation, with coefficients dense in xx), follows the notes [Sch-mpoly] and adds two things to the textbook algorithm:

  • pairs of points: for odd pp the points are taken in pairs ±α\pm\alpha, for α=(p−1)/2−1,(p−1)/2−2,…,2\alpha = (p-1)/2 - 1, (p-1)/2 - 2, \ldots, 2. Writing a coefficient as c(x)=c0(x2)+x c1(x2)c(x) = c_0(x^2) + x\, c_1(x^2), both values c(±α)=c0(α2)±αc1(α2)c(\pm \alpha) = c_0(\alpha^2) \pm \alpha c_1(\alpha^2) come from one pass over the coefficients, and the interpolants are updated modulo x2−α2x^2 - \alpha^2 in one step. For p=2p = 2 the function fails, and the caller uses extensions;
  • early termination: an interpolant that does not change when two new images are added has probably reached its final value, and the algorithm tests it by division before the degree bound is reached.

As in Reduction modulo irreducible polynomials, let γ=gcd⁡(lc(A),lc(B))∈Fp[x]\gamma = \gcd(\mathrm{lc}(A), \mathrm{lc}(B)) \in \mathbb{F}_p[x] for the leading coefficients with respect to x1,…,xn−1x_1, \ldots, x_{n-1} in lex order, let leading monomials be taken with respect to these variables, and let pp⁡\operatorname{pp} denote the primitive part over Fp[x]\mathbb{F}_p[x].

Algorithm 1: Brown's GCD over Fp\mathbb{F}_p with early termination

Input: nonzero A,B∈Fp[x1,…,xn−1][x]A, B \in \mathbb{F}_p[x_1, \ldots, x_{n-1}][x], pp odd; a limit λ\lambda for early termination. Output: G=gcd⁡(A,B)G = \gcd(A, B), Aˉ=A/G\bar A = A/G, Bˉ=B/G\bar B = B/G, or failure.

  1. Remove the contents of AA and BB in Fp[x]\mathbb{F}_p[x] (their GCD and cofactors are multiplied back at the end). Set β=1+deg⁡γ+max⁡(deg⁡xA,deg⁡xB)\beta = 1 + \deg \gamma + \max(\deg_x A, \deg_x B) and M=1M = 1.
  2. Take the next point α\alpha; fail if there is none. If γ(α)γ(−α)=0\gamma(\alpha)\gamma(-\alpha) = 0, repeat this step.
  3. Compute g±=gcd⁡(A(±α),B(±α))g_\pm = \gcd(A(\pm\alpha), B(\pm\alpha)) and the cofactors recursively (with the Euclidean algorithm in Fp[x1]\mathbb{F}_p[x_1] at the bottom); on failure go to step 2. If g+g_+ or g−g_- is constant, return G=1G = 1. If their leading monomials differ, go to step 2. Scale them to have leading coefficients γ(±α)\gamma(\pm\alpha).
  4. If M≠1M \ne 1: if the leading monomial of g±g_\pm is larger than that of GG, go to step 2; if smaller, set M=1M = 1.
  5. Combine GG with g±g_\pm modulo M(x2−α2)M (x^2 - \alpha^2). If M≠1M \ne 1, GG did not change and deg⁡M<λ\deg M < \lambda: let T=pp⁡(G)T = \operatorname{pp}(G); if T∣AT \mid A and T∣BT \mid B, return TT (made monic) and the quotients. Do the same for Aˉ\bar A (if T=pp⁡(Aˉ)T = \operatorname{pp}(\bar A) divides AA and A/TA/T divides BB, return G=A/TG = A/T) and for Bˉ\bar B. Set M←M(x2−α2)M \gets M (x^2 - \alpha^2).
  6. If deg⁡M<β\deg M < \beta, go to step 2.
  7. If deg⁡γ+deg⁡xA=deg⁡xG+deg⁡xAˉ\deg \gamma + \deg_x A = \deg_x G + \deg_x \bar A and deg⁡γ+deg⁡xB=deg⁡xG+deg⁡xBˉ\deg \gamma + \deg_x B = \deg_x G + \deg_x \bar B, return pp⁡(G)\operatorname{pp}(G) and the cofactors divided by its leading coefficient. Otherwise set M=1M = 1 and go to step 2.

Theorem 3. A result returned by Algorithm 1 is correct.

Proof. For step 7 the proof of Theorem 5 applies with m=(x−α)(x+α)m = (x - \alpha)(x + \alpha). For step 5, let H=gcd⁡(A,B)H = \gcd(A, B), primitive over Fp[x]\mathbb{F}_p[x] because the contents were removed. Every image has leading monomial at least that of HH, as in the proof of Theorem 5, so the same holds for GG and TT, and the leading monomial of an image of Aˉ\bar A is at most lm(A)−lm(H)\mathrm{lm}(A) - \mathrm{lm}(H), the leading monomial of A/HA/H. If TT divides AA and BB, then T∣HT \mid H, so lm(T)≤lm(H)\mathrm{lm}(T) \le \mathrm{lm}(H); hence the leading monomials are equal, H/TH/T lies in Fp[x]\mathbb{F}_p[x], and it is a unit because HH is primitive. If T=pp⁡(Aˉ)T = \operatorname{pp}(\bar A) divides AA and G′=A/TG' = A/T divides BB, then G′G' is a common divisor with lm(G′)=lm(A)−lm(T)≥lm(H)\mathrm{lm}(G') = \mathrm{lm}(A) - \mathrm{lm}(T) \ge \mathrm{lm}(H), and G′∣HG' \mid H; as before G′G' and HH differ by a unit, using that G′G', a divisor of the primitive AA, is primitive.

The early tests cost a division each and are only made while deg⁡M<λ\deg M < \lambda; mpoly_gcd_info_get_brown_upper_limit sets λ\lambda to at most half of β\beta, smaller for dense inputs, and to 0 (no early termination) when no reliable degree bounds are known. In the bivariate case, nmod_mpolyn_gcd_brown_smprime_bivar does the same with univariate images, and nmod_mpolyn_gcd_brown_smprime_threaded_pool distributes the points over threads. The version over Z\mathbb{Z}, Algorithm 1 of Greatest common divisors, combines images modulo word-size primes computed by this algorithm and replaces the divisibility tests by a bound on the coefficients.

Reduction modulo irreducible polynomials#

Instead of mapping all coefficients into an extension, Brown's and Zippel's algorithms can treat one variable x=xnx = x_n specially. For an irreducible m∈K[x]m \in K[x] of degree ee, the reduction

πm:K[x1,…,xn−1][x]→Fm[x1,…,xn−1],Fm=K[x]/(m)≅Fqe,\pi_m : K[x_1, \ldots, x_{n-1}][x] \to \mathbb{F}_m[x_1, \ldots, x_{n-1}], \qquad \mathbb{F}_m = K[x]/(m) \cong \mathbb{F}_{q^e},

replaces the evaluation x=αx = \alpha, which is the case m=x−αm = x - \alpha. All the properties of evaluation used by Brown's algorithm hold for πm\pi_m with "Δ(α)≠0\Delta(\alpha) \ne 0" replaced by "m∤Δm \nmid \Delta", and the Chinese remainder theorem in the principal ideal domain K[x]K[x] replaces Lagrange interpolation: from images modulo pairwise coprime m1,…,mrm_1, \ldots, m_r it recovers a polynomial with coefficients in K[x]K[x] of degree less than ∑ideg⁡mi\sum_i \deg m_i.

Lemma 4 (Few unlucky moduli). Let Δ∈K[x]\Delta \in K[x] be nonzero of degree DD. Distinct monic irreducible polynomials m1,m2,…m_1, m_2, \ldots that divide Δ\Delta satisfy ∑ideg⁡mi≤D\sum_i \deg m_i \le D. In particular at most D/eD/e of them have degree ee, while the number IeI_e of monic irreducible polynomials of degree ee over Fq\mathbb{F}_q satisfies eIe≥qe−2qe/2e I_e \ge q^e - 2q^{e/2}.

Proof. The mim_i are pairwise coprime divisors of Δ\Delta, so their product divides Δ\Delta. For the count, Gauss's formula eIe=∑c∣eμ(c)qe/ce I_e = \sum_{c \mid e} \mu(c) q^{e/c} gives eIe≥qe−∑j=1⌊e/2⌋qj≥qe−qe/2+1/(q−1)≥qe−2qe/2e I_e \ge q^e - \sum_{j=1}^{\lfloor e/2 \rfloor} q^j \ge q^e - q^{e/2+1}/(q-1) \ge q^e - 2q^{e/2}.

So whatever the size of qq, moduli of degree e≈log⁡qDe \approx \log_q D suffice: a random irreducible polynomial of degree ee divides Δ\Delta with probability at most D/(qe−2qe/2)D/(q^e - 2q^{e/2}). FLINT does not pick the moduli at random: it uses the irreducible polynomial chosen by fq_nmod_ctx_init_ui for Fpe\mathbb{F}_{p^e} (a Conway polynomial or a fixed polynomial of minimal weight) for e=e0,e0+1,e0+2,…e = e_0, e_0 + 1, e_0 + 2, \ldots, starting from e0≈max⁡(2,⌊20/β⌋)e_0 \approx \max(2, \lfloor 20/\beta \rfloor) where β\beta is the bit length of pp, so that pe0p^{e_0} has about 20 bits or more. Moduli of distinct degrees are automatically pairwise coprime, and by Lemma 4 the moduli that are bad or unlucky have total degree at most deg⁡Δ\deg \Delta, so the process terminates. Since the degrees grow, after rr images the modulus has degree about re0+r2/2r e_0 + r^2/2, and O(D)O(\sqrt{D}) images suffice to reach a degree bound DD.

The resulting algorithm for a GCD in K[x1,…,xn−1][x]K[x_1, \ldots, x_{n-1}][x] is Brown's algorithm [Bro1971] with these "primes". Let γ=gcd⁡(lc(A),lc(B))∈K[x]\gamma = \gcd( \mathrm{lc}(A), \mathrm{lc}(B)) \in K[x], where the leading coefficients are taken with respect to x1,…,xn−1x_1, \ldots, x_{n-1} in lexicographic order, and assume that the contents of AA and BB with respect to x1,…,xn−1x_1, \ldots, x_{n-1} have been removed.

Algorithm 2: Brown's GCD modulo irreducible polynomials

Input: A,B∈K[x1,…,xn−1][x]A, B \in K[x_1, \ldots, x_{n-1}][x], primitive over K[x]K[x]. Output: G=gcd⁡(A,B)G = \gcd(A, B) and the cofactors Aˉ,Bˉ\bar{A}, \bar{B}.

  1. Set β=1+deg⁡γ+max⁡(deg⁡xA,deg⁡xB)\beta = 1 + \deg \gamma + \max(\deg_x A, \deg_x B), M=1M = 1 and e=e0e = e_0.
  2. Let mm be the irreducible polynomial of degree ee, and e←e+1e \gets e + 1. If m∣γm \mid \gamma, repeat this step.
  3. Compute gm=gcd⁡(πm(A),πm(B))g_m = \gcd(\pi_m(A), \pi_m(B)) over Fm\mathbb{F}_m (by evaluation of the next variable at points of Fm\mathbb{F}_m, which is now large), scaled to have leading coefficient πm(γ)\pi_m(\gamma), and the cofactors aˉm\bar{a}_m, bˉm\bar{b}_m.
  4. If gm=1g_m = 1, return G=1G = 1. If M≠1M \ne 1 and the leading monomial of gmg_m is larger than that of the current GG, the modulus is unlucky: go to step 2. If it is smaller, all previous moduli were unlucky: set M=1M = 1.
  5. Combine: G≡gmG \equiv g_m, Aˉ≡aˉm\bar{A} \equiv \bar{a}_m, Bˉ≡bˉm(modm)\bar{B} \equiv \bar{b}_m \pmod m and ≡\equiv the previous values modulo MM (Chinese remainder theorem in K[x]K[x]); M←MmM \gets M m.
  6. If deg⁡M<β\deg M < \beta, go to step 2.
  7. If deg⁡γ+deg⁡xA=deg⁡xG+deg⁡xAˉ\deg \gamma + \deg_x A = \deg_x G + \deg_x \bar{A} and deg⁡γ+deg⁡xB=deg⁡xG+deg⁡xBˉ\deg \gamma + \deg_x B = \deg_x G + \deg_x \bar{B}, return the primitive part of GG and the corresponding cofactors. Otherwise go to step 2.

Theorem 5. When Algorithm 2 returns in step 7, its output is correct.

Proof. Every image satisfies gmaˉm=πm(γA)g_m \bar{a}_m = \pi_m(\gamma A) and gmbˉm=πm(γB)g_m \bar{b}_m = \pi_m(\gamma B), so GAˉ≡γAG\bar{A} \equiv \gamma A and GBˉ≡γB(modM)G \bar{B} \equiv \gamma B \pmod M, the congruences holding coefficientwise in K[x]K[x]. By the test of step 7, deg⁡x(GAˉ)≤deg⁡xG+deg⁡xAˉ=deg⁡γ+deg⁡xA<β≤deg⁡M\deg_x(G \bar{A}) \le \deg_x G + \deg_x \bar{A} = \deg \gamma + \deg_x A < \beta \le \deg M, and likewise for γA\gamma A, so the congruence is an equality: GAˉ=γAG \bar{A} = \gamma A, and similarly GBˉ=γBG\bar{B} = \gamma B. Thus GG is a common divisor of γA\gamma A and γB\gamma B, and its primitive part G′G' divides AA and BB by Gauss's lemma, so G′G' divides the true GCD HH. Leading monomials are taken with respect to x1,…,xn−1x_1, \ldots, x_{n-1}. Since lc(H)\mathrm{lc}(H) divides γ\gamma and m∤γm \nmid \gamma, πm(H)\pi_m(H) has the leading monomial of HH, and it divides gmg_m; hence the leading monomial of every image, and so of GG and G′G', is at least that of HH. As G′G' divides HH, the quotient H/G′H/G' has leading monomial 1, that is, lies in K[x]K[x], and is a unit because HH is primitive.

Termination follows from Lemma 4: only finitely many moduli are bad or unlucky, and after them every image has the correct leading monomial, so GG converges.

Zippel's algorithm is adapted in the same way. nmod_mpolyu_gcdm_zippel first tries the algorithm over Fp\mathbb{F}_p (nmod_mpolyu_gcdp_zippel), and if that fails, reduces the last variable modulo irreducible polynomials of increasing degree, computes each image over Fpe\mathbb{F}_{p^e} with Zippel's algorithm (the first image fixes the monomial structure, the later ones are found by solving for the coefficients), and combines the images by Chinese remaindering in Fp[x]\mathbb{F}_p[x]. The two-main-variable variant nmod_mpolyl_gcd_zippel_lgprime (sparse interpolation with two main variables and a known leading coefficient, as in [HuMon2016]) reduces the last variable modulo mm and evaluates the others at random points of Fm\mathbb{F}_m.

For fq_nmod_mpoly the base field is already an extension Fq=Fp[θ]/(f)\mathbb{F}_q = \mathbb{F}_p[\theta]/(f), and the reduction is modulo an irreducible h∈Fq[x]h \in \mathbb{F}_q[x] of degree nn. FLINT presents Fq[x]/(h)\mathbb{F}_q[x]/(h) as Fp[φ]/(g)\mathbb{F}_p[\varphi]/(g) with deg⁡g=ndeg⁡f\deg g = n \deg f, and an embedding records the images of θ\theta and xx; since ff has deg⁡f\deg f roots in the large field, there are deg⁡f\deg f embeddings for each gg, which are tried in turn before nn is increased (bad_fq_nmod_mpoly_embed_chooser_init and bad_fq_nmod_mpoly_embed_chooser_next).

Choosing an algorithm#

nmod_mpoly_gcd and nmod_mpoly_gcd_cofactors (and, for a word-size modulus, fmpz_mod_mpoly_gcd after converting to nmod_mpoly) proceed as follows; fq_nmod_mpoly_gcd is analogous.

  1. If an input is zero or a monomial, or if the inputs have the same shape after removing the term contents (the cofactors may be monomials), the GCD is found directly. Inputs whose exponents need more than one word are repacked, after deflation if necessary.
  2. The exponents are deflated: the common powers of each variable are removed and the exponents divided by the GCD of their differences (nmod_mpoly_deflation). If the essential parts of AA and BB share no variable, the GCD is a monomial; if they share exactly one variable and depend on no other, the computation is univariate (nmod_poly_gcd); if a variable appears in only one of them, the GCD is the GCD of the other polynomial with the coefficients of that one with respect to the variable.
  3. Degree bounds for the GCD are estimated by evaluating all variables but one at random points, first over Fp\mathbb{F}_p, then (if the bounds are not reliable, or p<8−mp < 8 - m for mm variables) over Fpk\mathbb{F}_{p^k} with Zech logarithms, then over larger extensions. If the bounds show that the GCD is 1, or that it equals AA or BB (a divisibility test), the computation stops.
  4. With two variables, Brown's algorithm is tried first if the inputs are dense (density above 0.05, or above 0.2 when the degree in the second variable exceeds p/2p/2), otherwise Hensel lifting first.
  5. With more variables: for dense inputs (density above 0.08) Hensel lifting is tried first when some degree exceeds p/2p/2, then Brown's algorithm; then Hensel lifting if the density (relative to the total degree) exceeds 0.05 (0.001 when a degree exceeds p/2p/2); then the two sparse interpolation algorithms, Zippel's first if the inputs are short compared with the degree in the second main variable; finally Hensel lifting and Brown's algorithm.

A degree above p/2p/2 in an evaluated variable means that Fp\mathbb{F}_p does not have enough points for dense interpolation; Brown's algorithm would then work modulo irreducible polynomials, while Hensel lifting needs only one good evaluation point, possibly in an extension. Each algorithm returns failure rather than an incorrect result, and the next one is tried. The returned GCD is monic, and the cofactors are scaled accordingly.

Use in FLINT#

Referenced from#

References#

  • [Bro1971] W. S. Brown. On Euclid's algorithm and the computation of polynomial greatest common divisors. Journal of the ACM 18:4 (1971), 478–504. https://doi.org/10.1145/321662.321664
  • [Zip1979] R. Zippel. Probabilistic algorithms for sparse polynomials. Symbolic and Algebraic Computation (EUROSAM 1979), Lecture Notes in Computer Science 72, Springer, 1979, 216–226. https://doi.org/10.1007/3-540-09519-5_73
  • [KM1999] E. Kaltofen and M. Monagan. On the genericity of the modular polynomial GCD algorithm. Proceedings of ISSAC 1999, ACM, 59–66.
  • [Sch-mpoly] D. Schultz. Algorithms for multivariate polynomials. Notes in the FLINT source tree, src/mpoly/doc/MPolyAlgorithms.tex.
  • [GG2003] J. von zur Gathen and J. Gerhard, Modern Computer Algebra, second edition, Cambridge University Press (2003)
  • [Sch1980] J. T. Schwartz. Fast probabilistic algorithms for verification of polynomial identities. Journal of the ACM 27:4 (1980), 701–717. https://doi.org/10.1145/322217.322225
  • [HuMon2016] J. Hu and M. Monagan. A fast parallel sparse polynomial GCD algorithm. Proceedings of ISSAC 2016, ACM, 271–278; full version in Journal of Symbolic Computation 105 (2021), 28–63. https://doi.org/10.1016/j.jsc.2020.06.001
Cite this page

The FLINT team, “GCDs over small finite fields,” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/algorithms/multivariate/modp-gcd.html (generated 2026-11-02).