def
Hex.Matrix.deleteRowCol
{R : Type u}
{n : Nat}
(M : Matrix R (n + 1) (n + 1))
(row col : Fin (n + 1))
:
Matrix R n n
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
def
Hex.Matrix.cofactor
{R : Type u}
[Lean.Grind.Ring R]
{n : Nat}
(M : Matrix R (n + 1) (n + 1))
(row col : Fin (n + 1))
:
R
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
@[simp]
theorem
Hex.Matrix.cofactor_of_even
{R : Type u}
[Lean.Grind.Ring R]
{n : Nat}
(M : Matrix R (n + 1) (n + 1))
(row col : Fin (n + 1))
(h : (↑row + ↑col) % 2 = 0)
:
At even parity, a signed cofactor is just the determinant of its minor. This removes the sign in cofactor-expansion normalization.
@[simp]
theorem
Hex.Matrix.cofactor_of_odd
{R : Type u}
[Lean.Grind.Ring R]
{n : Nat}
(M : Matrix R (n + 1) (n + 1))
(row col : Fin (n + 1))
(h : (↑row + ↑col) % 2 ≠ 0)
:
At odd parity, a signed cofactor is the negated determinant of its minor. This supplies the alternating sign in cofactor-expansion normalization.
@[simp]
theorem
Hex.Matrix.cofactor_last_last
{R : Type u}
[Lean.Grind.Ring R]
{n : Nat}
(M : Matrix R (n + 1) (n + 1))
:
The bottom-right cofactor reduces to the determinant of the leading prefix. This combines the final-index minor with its even sign.