hex

2.3. Gauss-Jordan reduction🔗

The driver is Gauss-Jordan elimination. It returns a Hex.Matrix.RowEchelonData satisfying Hex.Matrix.IsRowReduced, with the transform equation and the rank read off the result.

🔗def
Hex.Matrix.rowReduce.{u} {R : Type u} {n m : } [Lean.Grind.Field R] [DecidableEq R] (M : Hex.Matrix R n m) : Hex.Matrix.RowEchelonData R n m
Hex.Matrix.rowReduce.{u} {R : Type u} {n m : } [Lean.Grind.Field R] [DecidableEq R] (M : Hex.Matrix R n m) : Hex.Matrix.RowEchelonData R n m

Reduced row echelon form data computed by Gauss-Jordan elimination.

🔗theorem
Hex.Matrix.rowReduce_transform_mul.{u} {R : Type u} {n m : } [Lean.Grind.Field R] [DecidableEq R] (M : Hex.Matrix R n m) : M.rowReduce.transform * M = M.rowReduce.echelon
Hex.Matrix.rowReduce_transform_mul.{u} {R : Type u} {n m : } [Lean.Grind.Field R] [DecidableEq R] (M : Hex.Matrix R n m) : M.rowReduce.transform * M = M.rowReduce.echelon

Wrapper-level projection of the transform equation from rowReduce_isRowReduced M.

🔗theorem
Hex.Matrix.rowReduce_isRowReduced.{u} {R : Type u} {n m : } [Lean.Grind.Field R] [DecidableEq R] (M : Hex.Matrix R n m) : M.IsRowReduced M.rowReduce
Hex.Matrix.rowReduce_isRowReduced.{u} {R : Type u} {n m : } [Lean.Grind.Field R] [DecidableEq R] (M : Hex.Matrix R n m) : M.IsRowReduced M.rowReduce

The computed rowReduce data satisfies the IsRowReduced contract.

🔗def
Hex.Matrix.rowReduce_rank.{u} {R : Type u} {n m : } [Lean.Grind.Field R] [DecidableEq R] (M : Hex.Matrix R n m) :
Hex.Matrix.rowReduce_rank.{u} {R : Type u} {n m : } [Lean.Grind.Field R] [DecidableEq R] (M : Hex.Matrix R n m) :

The rank returned by rowReduce.