NLA-lib Explorer

NLAlib.Krylov.CG.Reorth.runs_solve_of_grade_le

Library · theorem

Exact arithmetic Oracle: matrix–vector product

Once the cap covers the initial residual's grade, the computed output solves the system. Earlier convergence is successful, and no scalar division is attempted afterward.

NLAlib.Krylov.CG.Reorth.runs_solve_of_grade_le {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 : ℕ}
  {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} {b x r p : ℕ × ℕ} {bs xs : List K} (hbx : b.1 ≠ x.1)
  (hbr : b.1 ≠ r.1) (hbp : b.1 ≠ p.1) (hxr : x.1 ≠ r.1) (hxp : x.1 ≠ p.1) (hrp : r.1 ≠ p.1)
  (hl : μ.Live [b, x, r, p]) (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] [n, n, n])
  (hcap : krylovGrade A (Ops.decv dec n bs - A *ᵥ Ops.decv dec n xs) ≤ cap) :
  Ops.ConditionalRuns I W τ Krylov.CG.Reorth.solve (Ops.Env.frame [n, cap] [b, x, x, r, p]) μ
    (Krylov.CG.Reorth.solveCount n cap) (Krylov.CG.Reorth.solvePeak W n cap) fun μ' ↦
    μ'.pos = μ.pos ∧
      ∃ ys, μ'.store.readBlock x.1 x.2 n = some ys ∧ A *ᵥ Ops.decv dec n ys = Ops.decv dec n bs

Full source on GitHub

Import NLAlib.Krylov.CG.Reorth.Solve.