NLA-lib Explorer

NLAlib.Ops.binaryMap_writes

Library · theorem

A binary scalar map writes its pointwise mathematical result. Exact aliases and spatially separate input/output views are admitted independently for both inputs. A fragment of the tree NLAlib.ShiftedQR.shiftDiagonal.

NLAlib.Ops.binaryMap_writes {K Op Tst : Type} {o : Op} {f : K → K → K} {I : Ops.Interp Op Tst K}
  (hI : I.IsFn Ops.Mode.total o (Ops.BlockFn.bin fun x y ↦ some (f x y)) Ops.AnyOperands)
  {τ : Ops.Tape K} {m : Ops.Mem K} {n : ℕ} {x y z : ℕ × ℕ} {vx vy : ℕ → K}
  (hx : m.store.HoldsVec x.1 x.2 n vx) (hy : m.store.HoldsVec y.1 y.2 n vy)
  (hz : z.2 + n ≤ m.store.len z.1)
  (hxz : Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 n) (Ops.Store.inBlock z.1 z.2 n) ∨ x = z)
  (hyz : Ops.Fp.Disj (Ops.Store.inBlock y.1 y.2 n) (Ops.Store.inBlock z.1 z.2 n) ∨ y = z) :
  Ops.Writes Ops.Mode.total I τ (Ops.binaryMap o) (Ops.Env.frame [n] [x, y, z])
    (Ops.Store.inBlock z.1 z.2 n)
    (fun m' ↦ (m'.store.HoldsVec z.1 z.2 n fun i ↦ f (vx i) (vy i)) ∧ m'.pos = m.pos) m

Full source on GitHub

Import NLAlib.Ops.Blas.Map.