NLAlib.Krylov.Lanczos.Rounded.runs_solve_ritz
Library · theorem
Standard rounding Relative-error BLAS Oracle: matrix–vector product
Rounded matvec, scalar, BLAS and comparison contracts, a symmetric input, normalization precision imply successful Lanczos execution. Under the linear accumulated precision bound, the same packed output satisfies the physical Ritz residual estimate, including early termination. No prior successful run is assumed.
NLAlib.Krylov.Lanczos.Rounded.runs_solve_ritz {K : Type} [Inhabited K] {Op Tst : Type}
[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 : ℕ} {em u E : ℝ}
{e : Ops.Blas1Err} {A : Matrix (Fin n) (Fin n) ℝ} {I : Ops.Interp Op Tst K} {ok : ℕ → Prop}
(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) (W : Op → List ℕ → ℕ) {τ : Ops.Tape K}
{μ : Ops.Mem K} {B V C : ℕ × ℕ} {bs : List K} (hBV : B.1 ≠ V.1) (hBC : B.1 ≠ C.1)
(hVC : V.1 ≠ C.1) (hl : μ.Live [B, V, C]) (hb : μ.store.readBlock B.1 B.2 n = some bs)
(hz : μ.Room [V, C] [(cap + 1) * n, 2 * cap + 2]) (hsmall : ↑cap * E ≤ 1 / 100) :
Ops.ConditionalRuns I W τ Krylov.Lanczos.solve (Ops.Env.frame [n, cap] [B, V, C]) μ
(Krylov.Lanczos.solveCount n cap) (Krylov.Lanczos.solvePeak W n) fun μ' ↦
μ'.pos = μ.pos ∧
∃ vs cs,
μ'.store.readBlock V.1 V.2 ((cap + 1) * n) = some vs ∧
μ'.store.readBlock C.1 C.2 (2 * cap + 2) = some cs ∧
Krylov.Lanczos.Rounded.RitzOutput dec A (Ops.decv dec n bs) E cap vs csImport NLAlib.Krylov.Lanczos.Rounded.Ritz.