NLAlib.Ops.Examples.runs_bilinear_link_seq
Library · theorem
Standard rounding Oracle: matrix–vector product
Sequential summation gives error (1 + u) ^ m - 1, one matrix-vector call, m multiplications, m - 1 additions, a literal and at most one copy, using 2 m scratch cells.
NLAlib.Ops.Examples.runs_bilinear_link_seq {K Op Tst : Type} [Ops.Has Ops.OperatorOp Op]
[Ops.Has Ops.Blas1Op Op] [Inhabited K] [Ops.Has Ops.ScalarOp Op]
[Ops.Apart Ops.Blas1Op Ops.ScalarOp Op] [Ops.Apart Ops.Blas1Op Ops.OperatorOp Op]
{M : Ops.Machine K} {u : ℝ} {dec : K → ℝ} (hM : Ops.StdModel u dec M) (hu : 0 ≤ u)
{I : Ops.Interp Op Tst K} (hI : Ops.IsScalar M I) {m n : ℕ} {A : Matrix (Fin m) (Fin n) ℝ}
(hA : Ops.IsExactMatvec dec A I) {τ : Ops.Tape K} {x y z : ℕ × ℕ} {μ : Ops.Mem K} {xs ys : List K}
(hxz : x.1 ≠ z.1) (hyz : y.1 ≠ z.1) (hl : μ.Live [x, y, z])
(hx : μ.store.readBlock x.1 x.2 m = some xs) (hy : μ.store.readBlock y.1 y.2 n = some ys)
(hz : z.2 < μ.store.len z.1) :
Ops.ConditionalRuns I (Ops.Blas.ws 0) τ (Ops.Stmt.link Ops.Blas.seq.table Ops.Examples.bilinear)
(Ops.Env.frame [m, n] [x, y, z]) μ
(Ops.Count.one (Ops.Has.inj Ops.OperatorOp.matvec) [m, n] +
(m • Ops.Blas.sc Ops.ScalarOp.mul +
(Ops.Blas.sc (Ops.ScalarOp.lit 0) +
((1 - (1 - m)) • Ops.Blas.sc Ops.ScalarOp.copy +
(m - 1) • Ops.Blas.sc Ops.ScalarOp.add))))
(2 * m) (Ops.Examples.BilinearRounded dec A ((1 + u) ^ m - 1) z xs ys μ)Import NLAlib.Ops.Examples.Bilinear.