The bijection between a Hex.Matrix and the Mathlib
Matrix with the same entries.
Equations
- One or more equations did not get rendered due to their size.
Instances For
matrixEquiv M has entry M[i][j] at (i, j), so a caller can rewrite
matrixEquiv M i j to M[i][j] without unfolding the equivalence.
The inverse direction of matrixEquiv materialises a Mathlib matrix as an
executable one entrywise: (matrixEquiv.symm M)[i][j] is just M i j.
matrixEquiv is a left inverse of Hex.Matrix.ofFn: building an executable
matrix from f and transporting it to Mathlib recovers f itself.
The executable elementary row swap corresponds to left multiplication by
Mathlib's permutation matrix Matrix.swap, so downstream determinant and rank
lemmas can reason about rowSwap through Mathlib's swap algebra.
The executable elementary row scaling corresponds to left multiplication by
the diagonal matrix that carries c in row i and 1 elsewhere, exposing
rowScale to Mathlib's diagonal-matrix algebra.
The executable elementary row addition (add c times row src to row
dst) corresponds to left multiplication by Mathlib's transvection matrix,
completing the row-operation dictionary used by the determinant correspondence.