Canonical form uniqueness: the elimination output of a row space is a canonical invariant #
An earlier module supplies the trusted row reduction rowReduce (the row space is preserved and
the output is mutually reduced) and proves that its length is the rank. This module adds the last
piece: the elimination output is the canonical form of the row space, that is, two row lists
spanning the same row space have the same set of rows after elimination. Whether two codes
agree can then be decided by the kernel by comparing elimination outputs directly, instead of
expanding to $2^n$ vectors and comparing them one by one.
Why IsEchelon is needed #
IsReduced alone does not determine the canonical form: for [(r, p)], every non-zero
component column p of r satisfies the mutual-reduction invariant ((R2) imposes no constraint
when there is a single row). What the row space really determines is
pivot column = the first non-zero column of the row (leadIdx), and an elimination output
satisfies exactly that. It is recorded as a separate structural invariant:
IsEchelon D := IsReduced D ∧ every row is zero before its pivot column.
Skeleton of the proof #
- Read-off (
readOff):readOff D w = Σ_{ri ∈ D} (w ri.2) • ri.1. WhenDis mutually reduced this is the identity map on the row space (readOff_eq_of_mem_spanL, proved bySubmodule.span_induction: it is the identity on the generators and linear under addition and scalar multiplication). This lemma translates "an element of the row space" into "its values on the pivot columns", and it is the entry point for every structural assertion. - The row-space characterisation of the pivot set (
exists_piv_eq_leadIdx_of_mem_spanL): the first non-zero column of any non-zero element of the row space is a pivot column ofD. The proof is the read-off computed term by term: take the pivot row whose coefficient is non-zero and whose pivot is smallest; pivot rows above it vanish in that column (IsEchelon) and the coefficients below it are zero. - Putting the two together: when two echelon row lists span the same row space, the
characterisation above pins the two pivot sets to the same set (
hPiv12/hPiv21), and read-off together with (R1)/(R2) then pins each row as well.
Main results #
readOff_eq_of_mem_spanL: the read-off is the identity on the row space.pivRow_mem_iff_of_spanL_eq: canonical form uniqueness.isEchelon_rowReduce,rowReduce_mem_iff_of_spanL_eq: the output set ofrowReducedepends only on the row space (it is a canonical invariant).
Read-off #
Main lemma (read-off = identity): when D is mutually reduced, the read-off is the identity
map on the row space of D.
The proof follows Submodule.span_induction: on a generator, the pivot column of ri collapses the
sum to a single term (the remaining terms are killed by (R2)); the zero, addition and scalar cases
are given by readOff_add/readOff_smul.
The vanishing lemma: an element of the row space that takes the value zero on every pivot column is the zero vector. (A corollary of the read-off, and the direct form of "the values on the pivot columns determine everything".)
The echelon structure: the pivot column is the first non-zero column #
Echelon and mutually reduced: IsReduced together with "everything before the pivot column
is zero".
The second condition pins the pivot column to leadIdx (the first non-zero column of the row).
Without it, [(r, p)] (with p any non-zero component column of r) is mutually reduced, and the
canonical form is not unique.
Equations
- QECCertificates.IsEchelon D = (QECCertificates.IsReduced D ∧ ∀ ri ∈ D, ∀ i < ri.2, ri.1 i = 0)
Instances For
The row-space characterisation of the pivot set #
Main lemma (pivot characterisation): in the row space spanned by an echelon row list, the first non-zero column of any non-zero element is one of the pivot columns of that list.
The characterisation uses only the row space itself, so it turns the "pivot set" into an invariant of the row space, and canonical form uniqueness follows.
Canonical form uniqueness #
Canonical form uniqueness: two echelon mutually reduced row lists that span the same row space have the same set of rows.
Hence the output of rowReduce is a canonical invariant of the row space: two codes agree
exactly when the row sets of their elimination outputs agree (rowReduce_mem_iff_of_spanL_eq).
Canonical invariance of the elimination output #
Canonical invariance (main theorem): two row lists with the same row space have the same set of rows after elimination.
This is the decidable criterion, inside the kernel, for whether two codes are the same: compare the row sets of their elimination outputs.