NLA-lib Explorer

NLAlib.Ops.PairMatrix.holdsEntries_of_holdsVec

Library · theorem

The complete initialized word vector is the column-major matrix with literal one on the real diagonal and literal zero in every other real or imaginary component.

NLAlib.Ops.PairMatrix.holdsEntries_of_holdsVec {K : Type} {M : Ops.Machine K} {s : Ops.Store K}
  {n b off : ℕ}
  (h :
    s.HoldsVec b off (2 * (n * n)) fun q ↦
      if ∃ j < n, q = 2 * (j * n + j) then M.lit 1 else M.lit 0) :
  s.HoldsEntries (Ops.EntryCodec.pair K) { buf := b, off := off, rows := n, cols := n, ld := n }
    fun i j ↦ (if i = j then M.lit 1 else M.lit 0, M.lit 0)

Full source on GitHub

Import NLAlib.Ops.Blas.Matrix.