fq_nmod_embed.h – Computing isomorphisms and embeddings of finite fields¶
-
void fq_nmod_embed_gens(fq_nmod_t gen_sub, fq_nmod_t gen_sup, nmod_poly_t minpoly, const fq_nmod_ctx_t sub_ctx, const fq_nmod_ctx_t sup_ctx)¶
Given two contexts
sub_ctxandsup_ctx, such thatdegree(sub_ctx)dividesdegree(sup_ctx), compute:an element
gen_subinsub_ctxsuch thatgen_subgenerates the finite field defined bysub_ctx,its minimal polynomial
minpoly,a root
gen_supofminpolyinside the field defined bysup_ctx.
These data uniquely define an embedding of
sub_ctxintosup_ctx.
-
void _fq_nmod_embed_gens_naive(fq_nmod_t gen_sub, fq_nmod_t gen_sup, nmod_poly_t minpoly, const fq_nmod_ctx_t sub_ctx, const fq_nmod_ctx_t sup_ctx)¶
Given two contexts
sub_ctxandsup_ctx, such thatdegree(sub_ctx)dividesdegree(sup_ctx), compute an embedding ofsub_ctxintosup_ctxdefined as follows:gen_subis the canonical generator ofsup_ctx(i.e., the class of \(X\)),minpolyis the defining polynomial ofsub_ctx,gen_supis a root ofminpolyinside the field defined bysup_ctx.
-
void fq_nmod_embed_matrices(nmod_mat_t embed, nmod_mat_t project, const fq_nmod_t gen_sub, const fq_nmod_ctx_t sub_ctx, const fq_nmod_t gen_sup, const fq_nmod_ctx_t sup_ctx, const nmod_poly_t gen_minpoly)¶
Given:
two contexts
sub_ctxandsup_ctx, of respective degrees \(m\) and \(n\), such that \(m\) divides \(n\);a generator
gen_subofsub_ctx, its minimal polynomialgen_minpoly, and a rootgen_supofgen_minpolyinsup_ctx, as returned byfq_nmod_embed_gens;
Compute:
the \(n\times m\) matrix
embedmappinggen_subtogen_sup, and all their powers accordingly;an \(m\times n\) matrix
projectsuch thatproject\(\times\)embedis the \(m\times m\) identity matrix.
-
void fq_nmod_embed_trace_matrix(nmod_mat_t res, const nmod_mat_t basis, const fq_nmod_ctx_t sub_ctx, const fq_nmod_ctx_t sup_ctx)¶
Given:
two contexts
sub_ctxandsup_ctx, of degrees \(m\) and \(n\), such that \(m\) divides \(n\);an \(n\times m\) matrix
basisthat mapssub_ctxto an isomorphic subfield insup_ctx;
Compute the \(m\times n\) matrix of the trace from
sup_ctxtosub_ctx.This matrix is computed as
embed_dual_to_mono_matrix(_, sub_ctx)\(\times\)basist \(\times\)embed_mono_to_dual_matrix(_, sup_ctx)}.Note: if \(m=n\),
basisrepresents a Frobenius, and the result is its inverse matrix.
-
void fq_nmod_embed_composition_matrix(nmod_mat_t matrix, const fq_nmod_t gen, const fq_nmod_ctx_t ctx)¶
Compute the composition matrix of
gen.For an element \(a\in\mathbf{F}_{p^n}\), its composition matrix is the matrix whose columns are \(a^0, a^1, \ldots, a^{n-1}\).
-
void fq_nmod_embed_composition_matrix_sub(nmod_mat_t matrix, const fq_nmod_t gen, const fq_nmod_ctx_t ctx, slong trunc)¶
Compute the composition matrix of
gen, truncated totrunccolumns.
-
void fq_nmod_embed_mul_matrix(nmod_mat_t matrix, const fq_nmod_t gen, const fq_nmod_ctx_t ctx)¶
Compute the multiplication matrix of
gen.For an element \(a\) in \(\mathbf{F}_{p^n}=\mathbf{F}_p[x]\), its multiplication matrix is the matrix whose columns are \(a, ax, \dots, ax^{n-1}\).
-
void fq_nmod_embed_mono_to_dual_matrix(nmod_mat_t res, const fq_nmod_ctx_t ctx)¶
Compute the change of basis matrix from the monomial basis of
ctxto its dual basis.
-
void fq_nmod_embed_dual_to_mono_matrix(nmod_mat_t res, const fq_nmod_ctx_t ctx)¶
Compute the change of basis matrix from the dual basis of
ctxto its monomial basis.
-
void fq_nmod_modulus_pow_series_inv(nmod_poly_t res, const fq_nmod_ctx_t ctx, slong trunc)¶
Compute the power series inverse of the reverse of the modulus of
ctxup to \(O(x^\texttt{trunc})\).
-
void fq_nmod_modulus_derivative_inv(fq_nmod_t m_prime, fq_nmod_t m_prime_inv, const fq_nmod_ctx_t ctx)¶
Compute the derivative
m_primeof the modulus ofctxas an element ofctx, and its inversem_prime_inv.