NLA-lib Explorer

NLAlib.Ops.unaryMap_wp

Library · theorem

A unary map between distinct buffers, or exactly in place, is a specialization of the block-disjoint rule. The complete output memory and tape position are unchanged by this specialization; no new execution proof is needed. The same step for operands in distinct buffers or equal, used by NLAlib.Ops.Hermitian.negate.

NLAlib.Ops.unaryMap_wp {K Op Tst : Type} [Inhabited K] {o : Op} {f : K → K}
  {I : Ops.Interp Op Tst K}
  (hI : I.IsFn Ops.Mode.total o (Ops.BlockFn.un fun x ↦ some (f x)) Ops.AnyOperands) {md : Ops.Mode}
  {τ : Ops.Tape K} {n : ℕ} {x y : ℕ × ℕ} {m : Ops.Mem K} {xs : List K} (hxy : x.1 ≠ y.1 ∨ x = y)
  (hx : m.store.readBlock x.1 x.2 n = some xs) (hy : y.2 + n ≤ m.store.len y.1)
  {Q : Ops.Mem K → Prop} (hQ : Q (m.updBlock y (List.map f xs))) :
  Ops.Wp md I τ (Ops.unaryMap o) (Ops.Env.frame [n] [x, y]) Q m

Full source on GitHub

Import NLAlib.Ops.Blas.Map.