NLA-lib Explorer

NLAlib.Krylov.Lanczos.Rounded.rounds_writes

Library · theorem

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

The whole capped loop succeeds from its derived initial state, including zero cap, zero input and a terminal last coefficient. No future nonbreakdown premise is used.

A fragment of NLAlib.Krylov.Lanczos.solveRoutine: its loop, on the solver's own variables.

NLAlib.Krylov.Lanczos.Rounded.rounds_writes {K Op Tst : Type} [Inhabited K]
  [Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.Blas1Op Op] [Ops.Has Ops.OperatorOp Op]
  [Ops.Has Ops.CmpTst Tst] {M : Ops.Machine K} {dec : K → ℝ} {n cap L B V C bo vo co : ℕ}
  {em u E : ℝ} {e : Ops.Blas1Err} {A : Matrix (Fin n) (Fin n) ℝ} {rhs : Fin n → ℝ}
  {I : Ops.Interp Op Tst K} {ok : ℕ → Prop} {z : Krylov.Lanczos.Rounded.Values n}
  (hS : Ops.IsScalar M I) (hM : Ops.StdModel u dec M) (hB : Ops.IsBlas1 dec e ok I) (hok : ok n)
  (hA : Ops.IsMatvec dec A (em * specNorm A) I) (hCmp : Ops.IsCmp dec I) (hAT : Aᵀ = A)
  (hprec : Krylov.Lanczos.Rounded.Precision em u E e n) {τ : Ops.Tape K} {μ : Ops.Mem K}
  (hVL : V < L) (hCL : C < L) (hVC : V ≠ C) (hlen : List.length μ.store = L + 3)
  (hp : μ.store.len L = n) (hw : μ.store.len (L + 1) = n) (ht : μ.store.len (L + 2) = 2)
  (hv : vo + (cap + 1) * n ≤ μ.store.len V) (hc : co + 2 * cap + 2 ≤ μ.store.len C)
  (hs : Krylov.Lanczos.Rounded.State dec A rhs E cap 0 (V, vo) (C, co) L z μ.store) :
  Ops.Writes Ops.Mode.total I τ Krylov.Lanczos.rounds
    { idx := [n, cap, bo, vo, co], buf := [B, V, C, L, L + 1, L + 2] }
    (Ops.Fp.blocks [(V, vo), (C, co)] [(cap + 1) * n, 2 * cap + 2] ⊔ Ops.Fp.above L)
    (fun μ' ↦
      μ'.pos = μ.pos ∧
        ∃ done ≤ cap,
          ∃ z',
            Krylov.Lanczos.Rounded.Prefix dec A rhs E cap done (V, vo) (C, co) z' μ'.store ∧
              (done < cap → (if done = 0 then z'.initialNorm else z'.beta done) = 0))
    μ

Full source on GitHub

Import NLAlib.Krylov.Lanczos.Rounded.Rounds.