NLA-lib Explorer

NLAlib.Ops.PairMatrix.copy_writes

Library · theorem

The judgment of NLAlib.Ops.PairMatrix.copyRoutine read at operands: the copy writes the block read. A corollary of NLAlib.Ops.PairMatrix.copyRoutine_meets, kept because the block-sequence rule NLAlib.Ops.Writes.seq_readBlock takes its statement in this form.

NLAlib.Ops.PairMatrix.copy_writes {K Op Tst : Type} [Ops.Has Ops.ScalarOp Op] [Inhabited K]
  {M : Ops.Machine K} {I : Ops.Interp Op Tst K} (hI : Ops.IsScalar M I) {τ : Ops.Tape K}
  {m : Ops.Mem K} {rows cols : ℕ} {x y : ℕ × ℕ} {xs : List K} (hl : m.Live [x, y])
  (hxy :
    Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 (2 * (rows * cols)))
      (Ops.Store.inBlock y.1 y.2 (2 * (rows * cols))))
  (hx : m.store.readBlock x.1 x.2 (2 * (rows * cols)) = some xs)
  (hy : y.2 + 2 * (rows * cols) ≤ m.store.len y.1) :
  Ops.Writes Ops.Mode.total I τ Ops.PairMatrix.copy (Ops.Env.frame [rows, cols] [x, y])
    (Ops.Store.inBlock y.1 y.2 (2 * (rows * cols)))
    (fun m' ↦ m'.pos = m.pos ∧ m'.store.readBlock y.1 y.2 (2 * (rows * cols)) = some xs) m

Full source on GitHub

Import NLAlib.Ops.Blas.MatrixCorrect.