NLA-lib Explorer

NLAlib.Ops.Interp.satisfies_total_iff

Library · theorem

In total mode: under the precondition the operands are buffers of the store, the call succeeds, the shape of the store is unchanged and the postcondition holds. These are the premises of the rule of a call (NLAlib.Ops.Reference.Derives.call) and the postcondition.

NLAlib.Ops.Interp.satisfies_total_iff {Op Tst K : Type} {I : Ops.Interp Op Tst K} {o : Op}
  {C : Ops.Contract K} :
  I.Satisfies Ops.Mode.total o C ↔
    ∀ (d : List ℕ) (ins outs : List (ℕ × ℕ)) (τ : Ops.Tape K) (m : Ops.Mem K),
      (C.on Ops.Mode.total d ins outs τ m).pre m →
        m.Live (ins ++ outs) ∧
          ∃ m',
            I.call o d ins outs τ m = some m' ∧
              m'.store.shape = m.store.shape ∧ (C.on Ops.Mode.total d ins outs τ m).post m m'

Full source on GitHub

Import NLAlib.Ops.Contract.