NLAlib.Ops.Examples.runs_scale_link
Library · theorem
The success companion for the linked program: over total contracts of the reciprocal and the multiplication, with a reciprocal defined away from zero, on a readable block and a nonzero divisor the linked program runs with n reciprocals and n multiplications in one scratch cell, and the conclusion holds with ε = 2 u + u ^ 2. One application of ConditionalRuns.link.
NLAlib.Ops.Examples.runs_scale_link {K : Type} [Inhabited K] {recipF : K → Option K}
{mulF : K → K → K} {I : Ops.Interp Ops.Examples.ROp Empty K}
(hI : Ops.Examples.IsRecipMul Ops.Mode.total recipF mulF I) {u : ℝ} {dec : K → ℝ}
(hM : Ops.Examples.RecipModel u dec recipF mulF)
(hdef : ∀ (b : K), dec b ≠ 0 → (recipF b).isSome = true) (hu : 0 ≤ u) {τ : 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 I (fun x x_1 ↦ 0) τ (Ops.Stmt.link Ops.Examples.divTable Ops.Examples.scale)
{ idx := [n, v.2, s.2], buf := [v.1, s.1] } m
(n • (Ops.Count.one Ops.Examples.ROp.recip [] + Ops.Count.one Ops.Examples.ROp.mul [])) 1
(Ops.Examples.ScalePost dec (2 * u + u ^ 2) n v s m)Import NLAlib.Ops.Examples.Liberal.