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 = AB by Kronecker substitution. C must not be aliased with A or B.

Every entry, a polynomial of degree less than d with coefficients in [0, p), is packed into an integer with fq_bit_pack, using fields of b = \operatorname{bits}((p - 1)^2 k d) + 1 bits for an inner dimension k, enough to hold every coefficient of a sum of k 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 p and the defining polynomial. One reduction per entry is needed, and the product of the packed matrices has entries of about 2db 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-10-20).