NLA-lib Explorer

NLAlib.Krylov.CG.HSCG.Carried.Rounded.step_writes

Library · theorem

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

A certified active rounded step produces both new stored values and the actual local recurrence bounds, using explicit computed-denominator margins.

The judgment NLAlib.Krylov.CG.HSCG.Carried.Rounded.stepRoutine_meets read on the state predicate StoresValues that the loop invariant of roundsRoutine_meets carries; the loop rule applies it to each active round.

NLAlib.Krylov.CG.HSCG.Carried.Rounded.step_writes {K Op Tst : Type} [Inhabited K]
  [Ops.Has Ops.Blas1Op Op] [Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.OperatorOp Op] {M : Ops.Machine K}
  {dec : K → ℝ} {em u : ℝ} {ε : Ops.Blas1Err} {ok : ℕ → Prop} {n : ℕ} {A : Matrix (Fin n) (Fin n) ℝ}
  {I : Ops.Interp Op Tst K} (hS : Ops.IsScalar M I) (hM : Ops.StdModel u dec M)
  (hB : Ops.IsBlas1 dec ε ok I) (hok : ok n) (hA : Ops.IsMatvec dec A (em * specNorm A) I)
  {τ : Ops.Tape K} {μ : Ops.Mem K} {x r p v : ℕ × ℕ} {s : CGState ℝ (Fin n)} {rho : ℝ}
  (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 [x, r, p, v])
  (hs : Krylov.CG.HSCG.Carried.Rounded.StoresValues dec n x r p v s rho μ) (hed : ε.dot n < 1)
  (hrne : s.r ≠ 0) (hcache : |rho - s.r ⬝ᵥ s.r| ≤ ε.dot n * ∑ i, |s.r i * s.r i|)
  (hmargin :
    ∀ (q : Fin n → ℝ),
      ‖WithLp.toLp 2 (A *ᵥ s.p - q)‖ ≤ em * specNorm A * ‖WithLp.toLp 2 s.p‖ →
        ε.dot n * ∑ i, |s.p i * q i| < s.p ⬝ᵥ q)
  (hz : μ.Room [x, r, p, v] [n, n, n, 1]) :
  Ops.Writes Ops.Mode.total I τ Krylov.CG.HSCG.Carried.step
    (Ops.Env.frame [n] [x, r, p, v, x, r, p, v]) (Ops.Fp.blocks [x, r, p, v] [n, n, n, 1])
    (fun μ' ↦
      μ'.pos = μ.pos ∧
        ∃ s' rho',
          Krylov.CG.HSCG.Carried.Rounded.StoresValues dec n x r p v s' rho' μ' ∧
            Krylov.CG.HSCG.Carried.Rounded.RoundBounds em u (ε.dot n) ε.axpy A s s' rho rho')
    μ

Full source on GitHub

Import NLAlib.Krylov.CG.HSCG.Carried.Rounded.State.