fmpz_mat_rref_upper_certify_lu_mod_p
#include <flint/fmpz_mat.h>int fmpz_mat_rref_upper_certify_lu_mod_p(fmpz_mat_t E, fmpz_t den, const fmpz_mat_t A, slong rank, const slong * P, const slong * pivs)sourceGiven the echelon structure of the m \times n matrix A modulo a prime, as computed by nmod_mat_lu_with_pivots (the rank r modulo p, the row permutation P and the array pivs of the r pivot columns followed by the other columns), tries to compute and certify the first r rows of the reduced row echelon form of A over \mathbb{Q}. Returns 1 on success, with (E, den) holding these rows, and 0 if the prime was unlucky.
E must be an r \times n zero matrix not aliased with A. The function solves B E_2 = \mathit{den} \cdot C exactly, where B and C are the pivot rows of A restricted to the pivot and the other columns, checks that (E, \mathit{den}) is in reduced row echelon form, and checks that the other rows of A are annihilated by the nullspace basis that E defines. Both checks are exact, so a result of 1 is a proof. With probability close to 1 for a random prime, the rank modulo p equals the rank of A and the function succeeds; otherwise it returns 0 and E and den are unspecified.
The FLINT team, “fmpz_mat_rref_upper_certify_lu_mod_p (fmpz_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mat/fmpz_mat_rref_upper_certify_lu_mod_p.html (generated 2026-10-20).
@misc{flint-doc-fmpz-mat-fmpz-mat-rref-upper-certify-lu-mod-p,
author = {{The FLINT team}},
title = {{fmpz\_mat\_rref\_upper\_certify\_lu\_mod\_p (fmpz\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_mat/fmpz_mat_rref_upper_certify_lu_mod_p.html},
note = {Generated 2026-10-20}
}