fq_zech_embed.h
#include <flint/fq_zech_embed.h>This module computes embeddings , , between fields in the representation of fq_zech.h (elements stored as discrete logarithms with respect to a primitive element, ), as matrices over (nmod_mat_t), and the change-of-basis matrices they rest on. It is generated from the same template as fq_embed.h and has the same functions, with fq_zech in place of fq and nmod_poly and nmod_mat in place of fmpz_mod_poly and fmpz_mod_mat; each function links to the fq_embed version, which has the details.
The matrix functions of this module convert the elements to the fq_nmod representation of the underlying context and call the fq_nmod_embed functions.
Embeddings#
void fq_zech_embed_gens(fq_zech_t gen_sub, fq_zech_t gen_sup, nmod_poly_t minpoly, const fq_zech_ctx_t sub_ctx, const fq_zech_ctx_t sup_ctx)Given contexts for fields = sub_ctx of degree and = sup_ctx of degree with , computes a generator gen_sub of over , its minimal polynomial minpoly, and a root gen_sup of minpoly in . These data define the embedding that maps gen_sub to gen_sup.
void _fq_zech_embed_gens_naive(fq_zech_t gen_sub, fq_zech_t gen_sup, nmod_poly_t minpoly, const fq_zech_ctx_t sub_ctx, const fq_zech_ctx_t sup_ctx)Computes the data of fq_zech_embed_gens as follows: gen_sub is the generator of sub_ctx, minpoly is the defining polynomial of sub_ctx, and gen_sup is a root of it in sup_ctx, found with fq_zech_poly_factor_split_single, that is, by root finding for a polynomial of degree over . Requires to divide .
void fq_zech_embed_matrices(nmod_mat_t embed, nmod_mat_t project, const fq_zech_t gen_sub, const fq_zech_ctx_t sub_ctx, const fq_zech_t gen_sup, const fq_zech_ctx_t sup_ctx, const nmod_poly_t gen_minpoly)Given the output of fq_zech_embed_gens for fields = sub_ctx and = sup_ctx of degrees , computes the matrix embed of the embedding that maps gen_sub to gen_sup, and an matrix project of a -linear projection with , so that is the identity. The matrices act on column vectors of coordinates in the monomial bases.
void fq_zech_embed_trace_matrix(nmod_mat_t res, const nmod_mat_t basis, const fq_zech_ctx_t sub_ctx, const fq_zech_ctx_t sup_ctx)Given contexts for = sub_ctx and = sup_ctx of degrees and the matrix basis of an embedding , sets res to the matrix of the map . It is computed as , with = fq_zech_embed_dual_to_mono_matrix for and = fq_zech_embed_mono_to_dual_matrix for . For the result is the inverse of basis.
Matrices of elements#
void fq_zech_embed_composition_matrix(nmod_mat_t matrix, const fq_zech_t gen, const fq_zech_ctx_t ctx)void fq_zech_embed_composition_matrix_sub(nmod_mat_t matrix, const fq_zech_t gen, const fq_zech_ctx_t ctx, slong trunc)Set matrix to the composition matrix of the element = gen of a field of degree : the matrix whose columns are the coordinates of , which maps the coordinates of a polynomial of degree less than to those of . The _sub version computes only the first trunc columns, into a matrix.
void fq_zech_embed_mul_matrix(nmod_mat_t matrix, const fq_zech_t gen, const fq_zech_ctx_t ctx)Sets the matrix matrix to the matrix of multiplication by = gen, whose columns are the coordinates of . The defining polynomial need not be monic.
void fq_zech_embed_mono_to_dual_matrix(nmod_mat_t res, const fq_zech_ctx_t ctx)Sets the matrix res to the change of basis from the monomial basis to its dual basis with respect to the trace form : the Hankel matrix with entries , computed from the power series expansion of (Newton's identities). Mapping a coordinate vector of by this matrix gives the traces .
void fq_zech_embed_dual_to_mono_matrix(nmod_mat_t res, const fq_zech_ctx_t ctx)Sets the matrix res to the inverse of fq_zech_embed_mono_to_dual_matrix. By Euler's formula the dual basis of is , where , so the matrix is the product of the multiplication matrix of and the Hankel matrix of the coefficients of .
void fq_zech_modulus_pow_series_inv(nmod_poly_t res, const fq_zech_ctx_t ctx, slong trunc)Sets res to the inverse of the reversal of the defining polynomial, as a power series modulo .
void fq_zech_modulus_derivative_inv(fq_zech_t m_prime, fq_zech_t m_prime_inv, const fq_zech_ctx_t ctx)Sets m_prime to , the derivative of the defining polynomial evaluated at the generator, and m_prime_inv to its inverse. because is irreducible, hence separable.
Example#
The FLINT team, “fq_zech_embed.h (module overview),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fq_zech_embed/index.html (generated 2026-11-02).
@misc{flint-doc-fq-zech-embed-index,
author = {{The FLINT team}},
title = {{fq\_zech\_embed.h (module overview)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fq_zech_embed/index.html},
note = {Generated 2026-11-02}
}