Echelon-form data and contracts.
RowEchelonData is the pure result of an echelon-form algorithm (rank, echelon
matrix, accumulated transform, pivot columns). IsEchelonForm is the shared
contract for any echelon form; IsRowReduced extends it with the
reduced-row-echelon conditions (pivots are one, entries above pivots vanish).
The IsEchelonForm namespace lemmas develop the pivot/free-column partition
used by the span and nullspace APIs.
Pure data produced by an echelon-form algorithm.
- rank : Nat
Number of pivots, i.e. the rank of the original matrix.
- echelon : Matrix R n m
The matrix reduced to row-echelon form.
- transform : Matrix R n n
The accumulated row-operation transform
TwithT * original = echelon. Column index of each pivot, in increasing order.
Instances For
Shared conditions for any echelon form.
Instances For
RREF-specific conditions on top of IsEchelonForm.
Instances For
View a pivot-row index as a row index of the ambient matrix.
Instances For
The pivot entries named by pivotCols are nonzero. This is the extra
proof-facing contract needed by span solving: without it, the pivot-column
division in spanCoeffs can divide by zero.
Instances For
The square row-transform has a right inverse.
The pivot columns are injective because they are strictly increasing.
The non-pivot columns, enumerated in increasing order.
The echelon-form witness _E is a phantom argument: it carries no runtime
data but enables dot-notation (E.freeColsList) and fixes the implicit
matrix/data parameters. This intentionally triggers the unusedArguments
linter; the binder is kept deliberately (no @[nolint] exists in the
Mathlib-free layer).
Equations
- _E.freeColsList = List.filter (fun (j : Fin m) => decide ¬j ∈ D.pivotCols.toList) (List.finRange m)
Instances For
The number of free columns is the ambient column count minus the rank.
Sorted complement of the pivot columns.
Equations
- E.freeCols = Vector.mk E.freeColsList.toArray ⋯
Instances For
The free-column complement is strictly increasing.
The free columns are injective because they are strictly increasing.
Every column is either a pivot column or a free column.
No column can simultaneously occur in the pivot list and the free-column complement.
No column can be both pivot and free.