NLA-lib Explorer

NLAlib.ShiftedQR.roundedPotential_writes

Library · theorem

Standard rounding

The rounded potential ([BanksGarzaVargasSrivastava2022, (eq:boundonpottilde)]): on a scalar machine with the standard model at 20000\,k\boldsymbol{u} \le 1, for k = 2^q \le n and an order-(n + 1) matrix \mathbf{H} stored at A, the program roundedPotential writes only its output word, and stores there a \tilde\psi with \lvert\tilde\psi - \psi_k(\mathbf{H})\rvert \le 20\boldsymbol{u}\,\psi_k(\mathbf{H}). The relative error 20\boldsymbol{u} is exposed, not the paper's 0.001/k (which it implies here): the radius word \mathrm{fl}(2^{1/k}\theta\alpha B^{1/k}\tilde\psi) meets the exceptional radius window [1.998^{1/k}, 2.002^{1/k}]\,\theta\alpha B^{1/k}\psi_k for every k \ge 1 under, for instance, 10^5 k\boldsymbol{u} \le 1, which 0.001/k does not give for k \ge 2. Matrix and output are disjoint views. Shared by the trees of NLAlib.ShiftedQR.shPrefix, NLAlib.ShiftedQR.shPotentialAccept.

NLAlib.ShiftedQR.roundedPotential_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  {M : Ops.Machine ℝ} {I : Ops.Interp Op Tst ℝ} {u : ℝ} (hS : Ops.IsScalar M I)
  (hM : Ops.StdModel u id M) {τ : Ops.Tape ℝ} {μ : Ops.Mem ℝ} {n k q : ℕ} {a p : ℕ × ℕ}
  {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} (hkq : k = 2 ^ q) (hkn : k ≤ n)
  (hu : 20000 * ↑k * u ≤ 1) (hH : HoldsMatrix a H μ.store) (hp : p.2 < μ.store.len p.1)
  (hap :
    Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))))
      (Ops.Store.inBlock p.1 p.2 1)) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.roundedPotential (Ops.Env.frame [n + 1, k, q] [a, p])
    (Ops.Store.inBlock p.1 p.2 1)
    (fun μ' ↦
      μ'.pos = μ.pos ∧
        ∃ ψ,
          μ'.store.get p.1 p.2 = some ψ ∧
            |ψ - hessenbergPotential k H| ≤ 20 * u * hessenbergPotential k H)
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.RoundedRitz.