Embeddings of finite fields
- Cost
- One root finding of a degree- polynomial over , plus operations in for the matrices.
Let and be fields of degrees . Then has a unique subfield of order , isomorphic to , but an isomorphism has to be computed: it is determined by the image of the generator , which must be a root of in , and there are such roots, giving the embeddings , which differ by powers of the Frobenius map. Lenstra showed that isomorphisms of finite fields can be found in deterministic polynomial time [Len1991]; practical algorithms either find a root of in , as FLINT does, or use Kummer theory and Gauss periods to construct compatible generators without factoring [All2002] [DFRR2019]. Systems such as Magma maintain a lattice of compatible embeddings between all fields created [BCS1997b]; FLINT computes embeddings on demand and leaves compatibility to the user (Conway polynomials, Defining polynomials, provide compatible generators by construction, but fq_embed does not use this).
Finding the embedding#
fq_embed_gens returns the generator of , its minimal polynomial , and a root of in . The root is found by fq_poly_factor_split_single, that is, by the root finding of gr_poly_roots_finite_field applied to viewed as a polynomial over (Roots of polynomials over finite fields), which splits (a product of distinct linear factors over ) by random equal-degree splitting; its cost is dominated by modular exponentiations of polynomials of degree less than over to exponents of size about . The embedding is .
The embedding matrix#
With respect to the bases of and of , is the matrix whose columns are the coordinates of , the first columns of the composition matrix of (fq_embed_composition_matrix_sub). More generally, fq_embed_matrices accepts any generator of with minimal polynomial and a root of in ; it then composes the matrix of , , with the inverse of the matrix of , .
Projecting back with the trace#
A map in the other direction, with , is needed to test whether an element of lies in the image and to compute its preimage. FLINT obtains it from the relative trace , where , which is -linear and surjective.
Lemma 1. Let with , and let be the matrix with entries . Then is invertible, and for with coordinate vector , . Moreover, if in , then the basis dual to for the trace form is .
Proof. The trace form is nondegenerate because is separable, so its Gram matrix in the monomial basis is invertible, and . The second statement is Euler's formula for the dual basis [LN1997] (a consequence of Lagrange interpolation at the conjugates of ).
The matrix is fq_embed_mono_to_dual_matrix, computed from the power sums of Frobenius map, norm, trace and roots; its inverse, fq_embed_dual_to_mono_matrix, is the product of the multiplication matrix of (fq_embed_mul_matrix) and the Hankel matrix of the coefficients of , by the second part of the lemma.
Proposition 2. Let be the matrix of an embedding , the matrix of the trace form of and the inverse of that of . Then is the matrix of .
Proof. For , , so , because column of is the coordinate vector of . By transitivity of the trace and -linearity of , with . These are the dual coordinates of in , and converts them to monomial coordinates by Lemma 1.
This is fq_embed_trace_matrix. Since is the multiplication by on , the projection is for any with : if , and otherwise for a power of the generator with nonzero relative trace, which fq_embed_matrices finds by looking for a nonzero entry in the first row of the trace matrix. Then . Using duality in this way, rather than solving a linear system for each element, follows Shoup's approach to computations with linear forms in extensions of finite fields [Sho1994] [Sho1999].
Use in FLINT#
fq_embed_gens,_fq_embed_gens_naive: the generators.fq_embed_matrices: the embedding and projection matrices, fromfq_embed_composition_matrix_sub,fq_embed_trace_matrix,fq_embed_mono_to_dual_matrix,fq_embed_dual_to_mono_matrix,fq_embed_mul_matrix,fq_modulus_pow_series_invandfq_modulus_derivative_inv.- The same functions exist for
fq_nmodandfq_zech(withnmod_matmatrices); thefq_zechversions convert elements to thefq_nmodrepresentation.
Referenced from#
- fq_embed.h (module)
- fq_nmod_embed.h (module)
- fq_zech_embed.h (module)
References#
- [Len1991] H. W. Lenstra, Jr. Finding isomorphisms between finite fields. Mathematics of Computation 56 (1991), 329–347.
- [All2002] B. Allombert. Explicit computation of isomorphisms between finite fields. Finite Fields and Their Applications 8:3 (2002), 332–342.
- [DFRR2019] L. De Feo, H. Randriam and É. Rousseau. Standard lattices of compatibly embedded finite fields. Proceedings of ISSAC 2019, ACM, 122–130.
- [BCS1997b] W. Bosma, J. Cannon and A. Steel. Lattices of compatibly embedded finite fields. Journal of Symbolic Computation 24:3–4 (1997), 351–369.
- [LN1997] R. Lidl and H. Niederreiter. Finite Fields. Second edition, Encyclopedia of Mathematics and its Applications 20, Cambridge University Press, 1997.
- [Sho1994] V. Shoup. Fast construction of irreducible polynomials over finite fields. Journal of Symbolic Computation 17:5 (1994), 371–391.
- [Sho1999] V. Shoup. Efficient computation of minimal polynomials in algebraic extensions of finite fields. Proceedings of ISSAC 1999, ACM, 53–58.
The FLINT team, “Embeddings of finite fields,” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/algorithms/finite-fields/embeddings.html (generated 2026-11-02).
@misc{flint-doc-algorithms-finite-fields-embeddings,
author = {{The FLINT team}},
title = {{Embeddings of finite fields}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/algorithms/finite-fields/embeddings.html},
note = {Generated 2026-11-02}
}