NLAlib.Ops.Examples.scale_wp
Library · theorem
The run of scale, in both modes, for every interpretation satisfying the contract of div in the mode: its conclusion holds. Readability of the block and a nonzero divisor are needed only for success.
NLAlib.Ops.Examples.scale_wp {K : Type} [Inhabited K] {md : Ops.Mode} {dec : K → ℝ} {ε : ℝ}
{J : Ops.Interp Ops.Examples.DOp Empty K}
(hJ : J.Satisfies md Ops.Examples.DOp.div (Ops.Examples.divSpec dec ε)) {τ : Ops.Tape K} {n : ℕ}
{v s : ℕ × ℕ} {m : Ops.Mem K} (hvs : v.1 ≠ s.1)
(hpre :
md.Needs
(∃ xs b, m.store.readBlock v.1 v.2 n = some xs ∧ m.store.get s.1 s.2 = some b ∧ dec b ≠ 0)) :
Ops.Wp md J τ Ops.Examples.scale { idx := [n, v.2, s.2], buf := [v.1, s.1] }
(Ops.Examples.ScalePost dec ε n v s m) mImport NLAlib.Ops.Examples.Liberal.