Documentation

HexRowReduce.Api

def Hex.Matrix.spanCoeffs {R : Type u} {n m : Nat} [Lean.Grind.Field R] [DecidableEq R] (M : Matrix R n m) (v : Vector R m) :

Compute row-span coefficients using Hex.Matrix.rowReduce internally.

Equations
Instances For
    theorem Hex.Matrix.spanCoeffs_sound {R : Type u} {n m : Nat} [Lean.Grind.Field R] [DecidableEq R] (M : Matrix R n m) (v : Vector R m) (c : Vector R n) :
    M.spanCoeffs v = some cvecMul c M = v

    Soundness of Hex.Matrix.spanCoeffs: returned coefficients reconstruct the requested vector.

    def Hex.Matrix.spanContains {R : Type u} {n m : Nat} [Lean.Grind.Field R] [DecidableEq R] (M : Matrix R n m) (v : Vector R m) :

    Decide row-span membership using Hex.Matrix.rowReduce internally.

    Equations
    Instances For
      @[simp]
      theorem Hex.Matrix.spanContains_eq_isSome {R : Type u} {n m : Nat} [Lean.Grind.Field R] [DecidableEq R] (M : Matrix R n m) (v : Vector R m) :

      Hex.Matrix.spanContains is the Boolean isSome view of Hex.Matrix.spanCoeffs.

      theorem Hex.Matrix.spanContains_iff {R : Type u} {n m : Nat} [Lean.Grind.Field R] [DecidableEq R] (M : Matrix R n m) (v : Vector R m) :

      Hex.Matrix.spanContains is exactly row-span membership.

      theorem Hex.Matrix.spanCoeffs_eq_none_iff {R : Type u} {n m : Nat} [Lean.Grind.Field R] [DecidableEq R] (M : Matrix R n m) (v : Vector R m) :

      Hex.Matrix.spanCoeffs returns none exactly when v is in no row combination of M, so a none result certifies that v is not in the row span.

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

      The rank returned by Hex.Matrix.rowReduce.

      Equations
      Instances For

        The public nullspace basis assembled as a matrix of basis columns.

        Equations
        Instances For
          def Hex.Matrix.nullspace {R : Type u} {n m : Nat} [Lean.Grind.Field R] [DecidableEq R] (M : Matrix R n m) :

          Compute the nullspace basis using Hex.Matrix.rowReduce internally.

          Equations
          Instances For
            theorem Hex.Matrix.nullspace_sound {R : Type u} {n m : Nat} [Lean.Grind.Field R] [DecidableEq R] (M : Matrix R n m) (k : Fin (m - M.rowReduce_rank)) :
            M * M.nullspace.get k = 0

            Every vector returned by Hex.Matrix.nullspace is annihilated by M.

            theorem Hex.Matrix.nullspace_complete {R : Type u} {n m : Nat} [Lean.Grind.Field R] [DecidableEq R] (M : Matrix R n m) (v : Vector R m) :
            M * v = 0 (c : Vector R (m - M.rowReduce_rank)), M.nullspaceBasisMatrix * c = v

            Every vector annihilated by M is generated by the public nullspace basis matrix.