FLINT3.7.0-dev

fq_embed_gens

Synopsis#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)source

Given 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.

Cite this page

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).