fq_embed_gens
#include <flint/fq_embed.h>void fq_embed_gens(fq_t gen_sub, fq_t gen_sup, fmpz_mod_poly_t minpoly, const fq_ctx_t sub_ctx, const fq_ctx_t sup_ctx)sourceGiven contexts for fields k = sub_ctx of degree m and K = sup_ctx of degree n with m \mid n, computes a generator gen_sub of k over \mathbb{F}_p, its minimal polynomial minpoly, and a root gen_sup of minpoly in K. These data define the embedding k \to K that maps gen_sub to gen_sup.
For m = 1 both generators are set to the generator of the prime field context (-c_0/c_1 for the defining polynomial c_1 x + c_0) and minpoly is not modified (it should be x - \mathit{gen\_sub}, which the caller must set before calling fq_embed_matrices); otherwise _fq_embed_gens_naive is called. Different roots give different embeddings, which differ by a power of the Frobenius map; the one returned is not in general compatible with the Conway polynomials of the two fields.
The FLINT team, “fq_embed_gens (fq_embed.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fq_embed/fq_embed_gens.html (generated 2026-10-20).
@misc{flint-doc-fq-embed-fq-embed-gens,
author = {{The FLINT team}},
title = {{fq\_embed\_gens (fq\_embed.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fq_embed/fq_embed_gens.html},
note = {Generated 2026-10-20}
}