NLA-lib Explorer

NLAlib.Ops.ContextDense.source_wp_of_ne

Library · theorem

A isolated data capability implements the original exact operator contract. Its matrix is decoded from the words actually read, while the ordinary output stays outside the buffer of the data. The premise is a local primitive precondition, never a successful run. A step in the proof of NLAlib.Ops.ContextDense.callS_source_of_ne, NLAlib.Ops.ContextDenseRounded.callS_source_of_ne.

NLAlib.Ops.ContextDense.source_wp_of_ne {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  {I : Ops.Interp Op Tst ℝ} {tape : Ops.Tape ℝ} {mem : Ops.Mem ℝ}
  (hS : Ops.IsScalar Ops.RCLikeBlas.machine I) (context : List (ℕ × ℕ)) (index : Fin context.length)
  {n : ℕ} (raw : List ℝ) (hLive : mem.Live context)
  (hData : mem.store.readBlock context[index].1 context[index].2 (n * n) = some raw) {d : List ℕ}
  {ins outs : List (ℕ × ℕ)} (hOut : ∀ z ∈ outs, z.1 ≠ context[index].1)
  (hp :
    (((Ops.matvecRel id (Ops.StoredOperator.denseMatrix n n raw)).spec (Ops.MatvecOperands n n)).on
          Ops.Mode.total d ins outs tape mem).pre
      mem) :
  Ops.Wp Ops.Mode.total I tape (Ops.ContextDense.impl context.length ↑index).body
    (Ops.Env.frame d (context ++ ins ++ outs))
    ((((Ops.matvecRel id (Ops.StoredOperator.denseMatrix n n raw)).spec (Ops.MatvecOperands n n)).on
          Ops.Mode.total d ins outs tape mem).post
      mem)
    mem

Full source on GitHub

Import NLAlib.Ops.Profiles.ContextLinearGuarded.