Plucker minor helpers #
Encoding for the universal 3-term Plucker identity substrate.
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
Row-move infrastructure for ordered four-row transports #
These helpers transport the determinant of a matrix whose rows are an
ordered nMatrix row sequence with one row displaced downward. Each
"row-move" is realised as a chain of adjacent rowSwaps; the determinant
picks up (-1) ^ k for a k-step move. The four row-content lemmas
identify the rows of the moved matrix so consumers can pair them with
getElem_nMatrix / skipIndex2 value lemmas.
One-row setRow transports to ordered nDet minors #
For a < b < t in Fin (n + 2), the private helpers
rowMoveUp_setRow_nMatrix_replace_first and
_replace_second_eq_nMatrix identify the result of replacing the
(t.val - 2)-th row of nMatrix B a b hab with B[a] (respectively
B[b]) as a rowMoveUp of the ordered minor nMatrix B b t (resp.
nMatrix B a t). The four ordered four-row transports
det_setRow_nMatrix_r{2,3}_r{0,1}_eq_pow_mul_nDet_* combine these row
equalities with det_rowMoveUp to give the signed nDet lemmas
required by the ordered four-row Plucker assembly.
Double-row setRow transport to ordered nDet minors #
For ordered rows r0 < r1 < r2 < r3, the double replacement
setRow (setRow (nMatrix B r0 r1 h01) s2 B[r0]) s3 B[r1] (with
s2 = ⟨r2.val - 2, _⟩ and s3 = ⟨r3.val - 2, _⟩) realises the row
content of nMatrix B r2 r3 h23 with the inserted rows B[r0] and
B[r1] displaced downward. Two rowMoveUp operations (first sliding
B[r0] up to position r0.val, then B[r1] up to position r1.val - 1
of the intermediate matrix) reorder the rows back, contributing the
combined sign (-1)^((r2 - r0 - 2) + (r3 - r1 - 2)). The intermediate
identification uses rowMoveUp_setRow_of_gt to slide the outer
setRow s3 B[r1] past the inner rowMoveUp, since s3.val > r2.val - 2
places it strictly above the inner move interval.
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.