NLAlib.Krylov.Lanczos.Reorth.runs_solve_ritz
Library · theorem
Exact arithmetic Oracle: matrix–vector product
Exact scalar, BLAS, matvec and comparison contracts imply total successful execution of fully reorthogonalized Lanczos and the Kaniel–Paige–Saad convergence bound for the largest eigenvalue of an actual stored tridiagonal prefix. The Hermitian input has its other spectral values in [a,c] below the largest eigenvalue, the start has positive mass in its top eigenspace, and the prefix of q+1 columns fits the cap and Krylov grade. The program returns basis and coefficients; this conclusion concerns the mathematical eigenvalue of those coefficients, not an executed eigensolver. The original operation and scratch budgets are retained. [Saad2011, Theorem 6.4].
NLAlib.Krylov.Lanczos.Reorth.runs_solve_ritz {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 q : ℕ}
{A : Matrix (Fin n) (Fin n) ℝ} {I : Ops.Interp Op Tst K} {ok : ℕ → Prop} (hS : Ops.IsScalar M I)
(hM : Ops.ExactModel dec M) (hB : Ops.IsExactBlas1 dec ok I) (hok : ok n)
(hA : Ops.IsExactMatvec dec A I) (hCmp : Ops.IsCmp dec I) (hHerm : A.IsHermitian)
(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, 3 * cap + 2])
(hq : q + 1 ≤ cap) (hgrade : q + 1 ≤ krylovGrade A (Ops.decv dec n bs)) {a c : ℝ} (hac : a < c)
(hc : c < eigenvalue A 0) (hs : spectrum ℝ A ⊆ Set.Icc a c ∪ {eigenvalue A 0})
(hstart : 0 < (spectralMeasure A (Ops.decv dec n bs)).real {eigenvalue A 0}) :
Ops.ConditionalRuns I W τ Krylov.Lanczos.Reorth.solve (Ops.Env.frame [n, cap] [B, V, C]) μ
(Krylov.Lanczos.Reorth.solveCount n cap) (Krylov.Lanczos.Reorth.solvePeak W n cap) fun μ' ↦
μ'.pos = μ.pos ∧
∃ vs cs,
μ'.store.readBlock V.1 V.2 ((cap + 1) * n) = some vs ∧
μ'.store.readBlock C.1 C.2 (3 * cap + 2) = some cs ∧
Krylov.Lanczos.Reorth.Output dec A (Ops.decv dec n bs) cap vs cs ∧
eigenvalue A 0 - eigenvalue (Krylov.Lanczos.tridiagonalMatrix dec cap cs (q + 1)) 0 ≤
4 * (eigenvalue A 0 - a) *
spectralTangentSq A (Ops.decv dec n bs) (eigenvalue A 0) *
((√(eigenvalue A 0 - a) - √(eigenvalue A 0 - c)) /
(√(eigenvalue A 0 - a) + √(eigenvalue A 0 - c))) ^
(2 * q)Import NLAlib.Krylov.Lanczos.Reorth.Basis.