NLA-lib Explorer

NLAlib.Krylov.Lanczos.Rounded.update_writes

Library · theorem

Standard rounding Relative-error BLAS Oracle: matrix–vector product

Readable input vectors and operation models guarantee successful raw update execution. Every error bound refers to the actual computed alpha and raw output, with no success premise.

A fragment of NLAlib.Krylov.Lanczos.solveRoutine: the raw three-term update of one round, on the previous and work vectors the solver allocates and a column of V at the round index.

NLAlib.Krylov.Lanczos.Rounded.update_writes {K Op Tst : Type} [Inhabited K]
  [Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.Blas1Op Op] [Ops.Has Ops.OperatorOp Op] {M : Ops.Machine K}
  {dec : K → ℝ} {n L : ℕ} {em u : ℝ} {ε : Ops.Blas1Err} {I : Ops.Interp Op Tst K}
  {A : Matrix (Fin n) (Fin n) ℝ} {ok : ℕ → Prop} (hS : Ops.IsScalar M I) (hM : Ops.StdModel u dec M)
  (hB : Ops.IsBlas1 dec ε ok I) (hok : ok n) (hA : Ops.IsMatvec dec A (em * specNorm A) I)
  {τ : Ops.Tape K} {μ : Ops.Mem K} {q b a : ℕ × ℕ} {ps qs : List K} {β : K} (hqa : q.1 ≠ a.1)
  (hqL : q.1 < L) (hbL : b.1 < L) (haL : a.1 < L) (hlen : List.length μ.store = L + 3)
  (hw : μ.store.len (L + 1) = n) (ht : μ.store.len (L + 2) = 2) (ha : a.2 < μ.store.len a.1)
  (hps : μ.store.readBlock L 0 n = some ps) (hqs : μ.store.readBlock q.1 q.2 n = some qs)
  (hβ : μ.store.get b.1 b.2 = some β) :
  Ops.Writes Ops.Mode.total I τ Krylov.Lanczos.update
    (Ops.Env.frame [n] [(L, 0), q, b, (L + 1, 0), a, (L + 2, 0), (L + 1, 0), a])
    (Ops.Fp.blocks [(L + 1, 0), a, (L + 2, 1)] [n, 1, 1])
    (fun μ' ↦
      μ'.pos = μ.pos ∧
        ∃ first raw α,
          μ'.store.readBlock (L + 1) 0 n = some raw ∧
            μ'.store.get a.1 a.2 = some α ∧
              Krylov.Lanczos.Rounded.UpdateBounds em (ε.dot n) ε.axpy A (Ops.decv dec n ps)
                (Ops.decv dec n qs) (Ops.decv dec n first) (Ops.decv dec n raw) (dec β) (dec α))
    μ

Full source on GitHub

Import NLAlib.Krylov.Lanczos.Rounded.Update.