NLAlib.Ops.Examples.runs_bilinear_link_seq_exact
Library · theorem
Exact arithmetic Oracle: matrix–vector product
The sequential implementation over exact scalar arithmetic computes the exact bilinear form with the same evaluated scalar counts and scratch bound.
NLAlib.Ops.Examples.runs_bilinear_link_seq_exact {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} {dec : K → ℝ} (hM : Ops.ExactModel dec M) {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.BilinearExact dec A z xs ys μ)Import NLAlib.Ops.Examples.Bilinear.