FLINT3.7.0-dev

fmpz_mat_solve_dixon

Synopsis#include <flint/fmpz_mat.h>
int fmpz_mat_solve_dixon(fmpz_mat_t X, fmpz_t mod, const fmpz_mat_t A, const fmpz_mat_t B)source

Solves AX=BAX = B for a nonsingular square AA by pp-adic lifting and returns 1, or returns 0 if AA is singular. The solution is not reconstructed: XX is set to A−1BA^{-1} B modulo mod, a power of a prime pp exceeding 2max⁡(N,D)22 \max(N, D)^2 with NN and DD from fmpz_mat_solve_bound, with entries in [0,mod)[0, \mathit{mod}), from which the rational entries can be reconstructed.

If AA or BB is empty, the function returns 1 without setting mod. Most applications should call fmpz_mat_solve_dixon_den, which reconstructs the solution (Several entries with a common denominator) and stops early when it is small.

Cite this page

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