FLINT3.7.0-dev

fq_mat_mul_KS

Synopsis#include <flint/fq_mat.h>
void fq_mat_mul_KS(fq_mat_t C, const fq_mat_t A, const fq_mat_t B, const fq_ctx_t ctx)

Sets C=ABC = AB by Kronecker substitution. CC must not be aliased with AA or BB.

Every entry, a polynomial of degree less than dd with coefficients in [0,p)[0, p), is packed into an integer with fq_bit_pack, using fields of b=bits⁡((p−1)2kd)+1b = \operatorname{bits}((p - 1)^2 k d) + 1 bits for an inner dimension kk, enough to hold every coefficient of a sum of kk products of two such polynomials. The integer matrices are multiplied with fmpz_mat_mul, which uses multimodular and BLAS-like methods (see Multiplying matrices over Z/nZ), and the entries of the product are unpacked with fq_bit_unpack, which reduces modulo pp and the defining polynomial. One reduction per entry is needed, and the product of the packed matrices has entries of about 2db2db bits.

Cite this page

The FLINT team, “fq_mat_mul_KS (fq_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fq_mat/fq_mat_mul_KS.html (generated 2026-11-02).