NLA-lib Explorer

NLAlib.ShiftedQR.comptau_writes

Library · theorem

Standard rounding

comptau is within 0.001 ([BanksGarzaVargasSrivastava2022, Lemma 3.9], corrected: the precision condition has 8004\kappa from a direct bound on the last diagonal entries, where the paper's route through Lemma 3.7 needs \kappa^2 and 24000): let \mathbf{H}\mathbf{V} = \mathbf{V}\mathbf{D} with \kappa(\mathbf{V}) \le \kappa, \mathbf{H} \ne 0, the shifts s_1, \dots, s_k in \mathbb{D}(0, C\|\mathbf{H}\|_2) and at distance at least d > 0 from every eigenvalue, the triangular factors \widehat{\mathbf{R}}_1, \dots, \widehat{\mathbf{R}}_k those of a backward-stable chain of relative error \mathbf{x} \le (8004\kappa)^{-1}(d/((2 + 2C)\|\mathbf{H}\|_2))^k, their last diagonal entries stored as pairs in D, and the machine the standard model with 30000(k + 1)\boldsymbol{u} \le 1. Then comptau writes only its output word and stores there a t with \lvert t - \tau\rvert \le 0.001\,\tau, \qquad \tau = \|\mathbf{e}_n^{\mathsf{T}}p(\mathbf{H})^{-1}\|_2^{-1}, p(z) = \prod_\ell (z - s_\ell): the 0.0006 of the exact factors plus the rounded product and root. The pairs and the output are disjoint views. Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.ShiftedQR.comptau_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 : ℕ} {x C κ d : ℝ}
  {H H' V : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {e : Fin (n + 1) → ℂ} {ss : List ℂ}
  {Rs : List (Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ)} {ds p : ℕ × ℕ}
  (h : IsStableQRChain x H ss H' Rs) (hx : 0 ≤ x) (hC : 0 ≤ C) (hd : 0 < d) (hH0 : H ≠ 0)
  (hV : IsUnit V) (hHV : H * V = V * diagonal e) (hκ : pseudoConditionNumber V ≤ κ)
  (hs : ∀ s ∈ ss, ‖s‖ ≤ C * specNorm H) (hdist : ∀ s ∈ ss, ∀ (i : Fin (n + 1)), d ≤ ‖e i - s‖)
  (hxu : x ≤ (8004 * κ)⁻¹ * (d / ((2 + 2 * C) * specNorm H)) ^ ss.length)
  (hu : 30000 * (↑ss.length + 1) * u ≤ 1) (hlen : Rs.length = ss.length)
  (hD :
    μ.store.readBlock ds.1 ds.2 (2 * ss.length) =
      some
        (List.flatMap (fun R ↦ [(R (Fin.last n) (Fin.last n)).re, (R (Fin.last n) (Fin.last n)).im])
          Rs))
  (hl : μ.Live [ds, p]) (hp : p.2 < μ.store.len p.1)
  (hdp : Ops.Fp.Disj (Ops.Store.inBlock ds.1 ds.2 (2 * ss.length)) (Ops.Store.inBlock p.1 p.2 1)) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.comptau (Ops.Env.frame [ss.length] [ds, p])
    (Ops.Store.inBlock p.1 p.2 1)
    (fun μ' ↦
      μ'.pos = μ.pos ∧
        ∃ t,
          μ'.store.get p.1 p.2 = some t ∧
            |t - ‖WithLp.toLp 2 (((Polynomial.aeval H) (shiftPoly ss))⁻¹ (Fin.last n))‖⁻¹| ≤
              1e-3 * ‖WithLp.toLp 2 (((Polynomial.aeval H) (shiftPoly ss))⁻¹ (Fin.last n))‖⁻¹)
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.RoundedRitz.