NLA-lib Explorer

NLAlib.Ops.PairMatrix.holdsVec_of_identitySpec

Library · theorem

A block read as the words of NLAlib.Ops.PairMatrix.identitySpec holds them as a vector.

NLAlib.Ops.PairMatrix.holdsVec_of_identitySpec {K : Type} {M : Ops.Machine K} {s : Ops.Store K}
  {n b off : ℕ} {ys : List K} (h : s.readBlock b off (2 * (n * n)) = some ys)
  (hys :
    ys =
      List.map (fun q ↦ if ∃ j < n, q = 2 * (j * n + j) then M.lit 1 else M.lit 0)
        (List.range (2 * (n * n)))) :
  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

Full source on GitHub

Import NLAlib.Ops.Blas.Matrix.