Minors, deleted row/column submatrices, and signed cofactors.
This module defines skipIndex, the embedding of Fin n into Fin (n + 1)
that skips a deleted index, and uses it to build deleteRowCol, the
(n + 1) × (n + 1) minor obtained by removing one row and one column. It then
introduces the alternating cofactorSign and the signed cofactor, with the
simp/grind characterizations of their values by parity. Key normalizations
include deleteRowCol_last_last and cofactor_last_last (bottom-right minor is
the leading prefix) and deleteRowCol_transpose, the transpose-compatibility
used by row/column cofactor expansion.
Delete one row and one column from an (n + 1) × (n + 1) matrix.
Equations
- M.deleteRowCol row col = Hex.Matrix.ofFn fun (i j : Fin n) => M[(Hex.Matrix.skipIndex row i, Hex.Matrix.skipIndex col j)]
Instances For
The signed cofactor for the local Leibniz determinant.
Equations
- M.cofactor row col = Hex.Matrix.cofactorSign row col * (M.deleteRowCol row col).det
Instances For
At even parity, a signed cofactor is just the determinant of its minor. This removes the sign in cofactor-expansion normalization.
At odd parity, a signed cofactor is the negated determinant of its minor. This supplies the alternating sign in cofactor-expansion normalization.
The bottom-right cofactor reduces to the determinant of the leading prefix. This combines the final-index minor with its even sign.