NLAlib.Krylov.CG.HSCG.Carried.runs_solve_chebyshev
Library · theorem
Exact arithmetic Oracle: matrix–vector product
Under exact scalar, BLAS, matvec and comparison contracts, SPD CG successfully returns a stored iterate for every cap. If the spectrum lies in a positive interval [a, a'] and solution solves the input system, its squared energy error is at most 4 * rho ^ (2 * q) times the initial squared energy error, where rho = (sqrt (a' / a) - 1) / (sqrt (a' / a) + 1) and q is the smaller of cap and initial residual Krylov grade. The original operation and scratch bounds are retained. [Saad2003, Theorem 6.29].
NLAlib.Krylov.CG.HSCG.Carried.runs_solve_chebyshev {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 : ℕ} {A : Matrix (Fin n) (Fin n) ℝ}
{I : Ops.Interp Op Tst K} (hS : Ops.IsScalar M I) (hM : Ops.ExactModel dec M)
(hB : Ops.IsExactBlas1 dec (fun x ↦ True) I) (hA : Ops.IsExactMatvec dec A I)
(hCmp : Ops.IsCmp dec I) (hPos : A.PosDef) (W : Op → List ℕ → ℕ) {τ : Ops.Tape K} {μ : Ops.Mem K}
{cap : ℕ} {b x r p v : ℕ × ℕ} {bs xs : List K} (hbx : b.1 ≠ x.1) (hbr : b.1 ≠ r.1)
(hbp : b.1 ≠ p.1) (hbv : b.1 ≠ v.1) (hxr : x.1 ≠ r.1) (hxp : x.1 ≠ p.1) (hxv : x.1 ≠ v.1)
(hrp : r.1 ≠ p.1) (hrv : r.1 ≠ v.1) (hpv : p.1 ≠ v.1) (hl : μ.Live [b, x, r, p, v])
(hbs : μ.store.readBlock b.1 b.2 n = some bs) (hxs : μ.store.readBlock x.1 x.2 n = some xs)
(hz : μ.Room [x, r, p, v] [n, n, n, 1]) {a a' : ℝ} (ha : 0 < a)
(hspectrum : spectrum ℝ A ⊆ Set.Icc a a') {solution : Fin n → ℝ}
(hsolution : A *ᵥ solution = Ops.decv dec n bs) :
Ops.ConditionalRuns I W τ Krylov.CG.HSCG.Carried.solve (Ops.Env.frame [n, cap] [b, x, x, r, p, v])
μ (Krylov.CG.HSCG.Carried.solveCount n cap) (Krylov.CG.HSCG.Carried.solvePeak W n) fun μ' ↦
μ'.pos = μ.pos ∧
∃ ys,
μ'.store.readBlock x.1 x.2 n = some ys ∧
RCLike.re (quadForm A (solution - Ops.decv dec n ys)) ≤
4 *
((√(a' / a) - 1) / (√(a' / a) + 1)) ^
(2 * min cap (krylovGrade A (Ops.decv dec n bs - A *ᵥ Ops.decv dec n xs))) *
RCLike.re (quadForm A (solution - Ops.decv dec n xs))Import NLAlib.Krylov.CG.HSCG.Carried.Bounds.