Small modular determinants at the entry evaluator's level #
The matrix dimension is unary and entries are addressed by binary row-major indices.
modularMatrixDeterminant collects the polynomially many entries after modular reduction,
forms a short table of binary integers, and invokes Rational.detRows_polytime.
It never enumerates determinant permutations or forms unreduced exponential products.
modularMatrixDeterminant_mem preserves the entry evaluator's counting-function level.
modularMatrixDeterminant_cast computes the determinant of the actual prime-field matrix,
including singular matrices and dimension zero. Only the residues at genuine matrix indices
are required from the entry evaluator; all numeric inputs have total defaults.
Ported from LeanCanny.CountingHierarchy.ModularMatrixDeterminant at lean-canny commit
970f28a5ecefc1327402ade16c068aa4b1b2c183, as an ingredient of critical Jacobian evaluation.
Each entry is reduced before collection. The resulting short integer table is passed to Frontier's certified polynomial-time determinant program.
Only the residues of the entries are required, including for singular matrices. The determinant program itself runs on ordinary short integers.