Embed Fin n into Fin (n + 2) while skipping two deleted indices
p < q. This indexes minors with two removed rows.
The ordering proof _hpq is a phantom argument: it documents and pins the
p < q precondition at call sites but is not consumed by the definition.
This intentionally triggers the unusedArguments linter; the binder is kept
deliberately (no @[nolint] exists in the Mathlib-free layer).
Equations
Instances For
Below the first deleted index p, skipIndex2 is the identity: its value
at i is i.
skipIndex2 p q hpq never lands on the first skipped index p.
skipIndex2 p q hpq never lands on the second skipped index q.
The (n + 1) × (n + 1) matrix obtained from [B | v] by deleting
row p. Columns 0..n-1 carry the corresponding columns of B
(restricted to rows other than p); the last column carries v
(restricted to rows other than p).
Equations
Instances For
The n × n matrix obtained from B by deleting rows p and q
(in increasing-row order, with p.val < q.val).
Equations
- B.nMatrix p q hpq = Hex.Matrix.ofFn fun (i j : Fin n) => B[(Hex.Matrix.skipIndex2 p q hpq i, j)]
Instances For
The square matrix [B | u | v] formed by appending two vector columns to
B : Matrix R (n + 2) n. The original B columns occupy positions
0..n-1; u occupies column n; v occupies the last column.
Equations
Instances For
The determinant of [B | u | v].
Equations
- B.twoColDet u v = (B.twoColMatrix u v).det
Instances For
Laplace expansion of the two-column determinant along the final column,
with the remaining minor identified as mDet B u p.
mMatrix B v p exposed as a setCol on its last column: the
other columns come from B and are independent of v, while the last
column carries fun i => v[skipIndex p i].
For p < q, the chained skip skipIndex p ∘ skipIndex r_q
(where r_q = q.val - 1) equals skipIndex2 p q hpq. This is the
row-reindexing identity used to recover the n × n minor of B from
the deleted-row-and-last-column minor of mMatrix B (Vector.unit q) p.
Laplace expansion specialized to a column equal to a standard basis
vector: if column c of M holds 1 at row q and 0 elsewhere, then
det M equals the signed minor cofactorSign q c * det (deleteRowCol M q c).
For p < q, deleting row r_q = q.val - 1 and the last column of
mMatrix B v p recovers nMatrix B p q hpq, independent of v.
For q < p, the chained skip skipIndex p ∘ skipIndex r_q
(where r_q = ⟨q.val, _⟩) equals skipIndex2 q p hqp.
Basis-vector evaluation of mDet when q < p: the basis vector
e_q becomes the standard basis vector e_{q.val} in the last
column of mMatrix B (Vector.unit q) p, so Laplace along that column
recovers a signed n × n minor of B.
Basis-vector evaluation of mDet when q > p: the basis vector
e_q becomes the standard basis vector e_{q.val - 1} in the last
column of mMatrix B (Vector.unit q) p, so Laplace along that column
recovers a signed n × n minor of B.
mDet B (Vector.unit p) p = 0: the basis vector e_p becomes the zero
column inside mMatrix B (Vector.unit p) p after row p is deleted, so
the determinant vanishes.
Ordered basis-pair evaluation for twoColDet: if a < b, the only
surviving ordered pair is the deleted-row pair (a, b).
Reverse ordered basis-pair evaluation for twoColDet: if b < a,
the determinant recovers the same deleted-row pair with the reversed
coefficient order.
A repeated basis vector in the two appended columns makes
twoColDet vanish.
Evaluation of twoColDet when the final appended column is a basis
vector. This is the one-column Laplace expansion with the remaining
mDet minor exposed directly.
Bilinear basis expansion of twoColDet over the two appended columns.
The basis-pair terms are reduced by
twoColDet_unit_unit_of_lt,
twoColDet_unit_unit_of_gt, and
twoColDet_unit_unit_of_eq.
Consecutive-top vector-column Plücker identity.
This is the Mathlib-free specialization used by the Gram/Bareiss trajectory:
the three distinguished rows are alpha, k, and k+1 inside
Fin (k + 2), so the top row is the last possible row and there is no
q > p3 basis-vector case.