NLAlib.Ops.unaryMap_writes_of_disj_or_eq
Library · theorem
A unary map stores the mapped word vector and preserves the tape position, with its output apart from its input or on it. One tree, two routines: the common proof of NLAlib.Ops.unaryMapRoutine_meets (output apart) and NLAlib.Ops.unaryMapInPlaceRoutine_meets (output on the input), stated for either layout; it is also the two judgments read at operands, for callers inside a loop or block-sequence rule.
NLAlib.Ops.unaryMap_writes_of_disj_or_eq {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 : Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 n) (Ops.Store.inBlock y.1 y.2 n) ∨ x = y)
(hx : m.store.readBlock x.1 x.2 n = some xs) (hy : y.2 + n ≤ m.store.len y.1) :
Ops.Writes md I τ (Ops.unaryMap o) (Ops.Env.frame [n] [x, y]) (Ops.Store.inBlock y.1 y.2 n)
(fun m' ↦ m'.pos = m.pos ∧ m'.store.readBlock y.1 y.2 n = some (List.map f xs)) mImport NLAlib.Ops.Blas.MapCorrect.