NLA-lib Explorer

NLAlib.Ops.Impl.satisfies_rel

Library · theorem

Satisfaction in operand form, total correctness: on admitted, live operands, with the input blocks xs read and in the domain and room for the outputs, the implementation fits and its run writes output blocks related to xs and to the window, advances the position by the window, and changes nothing else. Whatever it draws into its scratch is gone at the end.

NLAlib.Ops.Impl.satisfies_rel {Op Tst K : Type} {E : Ops.Impl Op Tst} {I : Ops.Interp Op Tst K}
  {B : Ops.BlockRel K} {adm : List ℕ → List (ℕ × ℕ) → List (ℕ × ℕ) → Prop}
  (h :
    ∀ (d : List ℕ) (ins outs : List (ℕ × ℕ)) (τ : Ops.Tape K) (m : Ops.Mem K) (xs : List (List K)),
      d.length = B.nd →
        adm d ins outs →
          m.Live (ins ++ outs) →
            m.readBlocks ins (B.inLens d) = some xs →
              B.dom d xs (τ.window B.stream m.pos (B.win d)) →
                m.Room outs (B.outLens d) →
                  E.Fits d.length ins.length outs.length ∧
                    Ops.Wp Ops.Mode.total I τ E.body (Ops.Env.frame d (ins ++ outs))
                      (B.Post d xs outs (τ.window B.stream m.pos (B.win d)) m) m) :
  E.Satisfies I Ops.Mode.total (B.spec adm)

Full source on GitHub

Import NLAlib.Ops.Cert.