NLA-lib Explorer

NLAlib.Ops.Examples.runs_scale

Library · theorem

The success companion: for every interpretation satisfying the total contract of div, on a readable block and a divisor that is not zero, scale runs with n calls of div within the workspace of one, and its conclusion holds.

NLAlib.Ops.Examples.runs_scale {K : Type} [Inhabited K] {dec : K → ℝ} {ε : ℝ}
  {J : Ops.Interp Ops.Examples.DOp Empty K}
  (hJ : J.Satisfies Ops.Mode.total Ops.Examples.DOp.div (Ops.Examples.divSpec dec ε))
  (W : Ops.Examples.DOp → List ℕ → ℕ) {τ : Ops.Tape K} {n : ℕ} {v s : ℕ × ℕ} {m : Ops.Mem K}
  {xs : List K} {b : K} (hvs : v.1 ≠ s.1) (hv : m.store.readBlock v.1 v.2 n = some xs)
  (hs : m.store.get s.1 s.2 = some b) (hb : dec b ≠ 0) :
  Ops.ConditionalRuns J W τ Ops.Examples.scale { idx := [n, v.2, s.2], buf := [v.1, s.1] } m
    (n • Ops.Count.one Ops.Examples.DOp.div []) (W Ops.Examples.DOp.div [])
    (Ops.Examples.ScalePost dec ε n v s m)

Full source on GitHub

Import NLAlib.Ops.Examples.Liberal.