NLA-lib Explorer

NLAlib.Ops.writes_machineScalarBlock

Library · theorem

A scalar machine block is proved by evaluating its written cells as pure mathematics. The scalar operation names may belong to any containing signature. All intermediate writes, including aliases and repeated updates of one cell, remain in the actual execution.

NLAlib.Ops.writes_machineScalarBlock {K Op Tst : Type} [Ops.Has Ops.ScalarOp Op] {M : Ops.Machine K}
  {I : Ops.Interp Op Tst K} (hI : Ops.IsScalar M I) {τ : Ops.Tape K} {ρ : Ops.Env} {m : Ops.Mem K}
  {xs : List (Ops.ScalarIns Ops.ScalarOp)} {ws : List ((ℕ × ℕ) × K)}
  (hev : Ops.ScalarIns.evalBlock M.eval ρ xs m.store.cellFn = some ws)
  (hroom : ∀ w ∈ ws, w.1.2 < m.store.len w.1.1) :
  Ops.Writes Ops.Mode.total I τ (Ops.Stmt.scalarBlock (List.map Ops.ScalarIns.lift xs)) ρ
    (Ops.Fp.cells (List.map Prod.fst ws)) (fun m' ↦ m' = m.updCells ws) m

Full source on GitHub

Import NLAlib.Ops.Logic.Scalar.