NLA-lib Explorer

NLAlib.ShiftedQR.shAccept_writes

Library · theorem

This statement changed in the recorded rename: 2026-11-schur.

Standard rounding

The accepted branch of Sh: from NLAlib.ShiftedQR.ShState3 with the word c_g = (1 - \gamma)^k and the computed t_c below the threshold, the acceptance (NLAlib.ShiftedQR.trialAccept) ends in NLAlib.ShiftedQR.ShOutcome. Here \mathbf{H} \ne 0 of order n + 1 is upper Hessenberg, \mathbf{H}\mathbf{V} = \mathbf{V}\operatorname{diag}(\mathbf{e}) with \kappa(\mathbf{V}) \le B, \|\mathbf{H}\|_2 \le S, the shifts lie in \mathbb{D}(0, C\|\mathbf{H}\|_2) (C \ge 0) at distance at least d > 0 from every e_i, \omega > 0, \mathbf{x} = 300(n+1)^2\boldsymbol{u} \le (16B)^{-1}(d/((2 + 2C)S))^k, (66 + 2C)BS((2 + 2C)S/d)^k\sqrt{n + 1}\,\mathbf{x} \le 0.001\,\omega, 2 \le k \le n, 10^5k\boldsymbol{u} \le 1, \gamma \le 1 and the scan threshold is at least (1 + \boldsymbol{u})^2\omega^2. Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine, on their scratch.

NLAlib.ShiftedQR.shAccept_writes {n : ℕ} {O Q : Type} [Ops.Has Ops.ScalarOp O]
  [Ops.Has Ops.IndexOp O] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} {u : ℝ} (hS : Ops.IsScalar M I)
  (hM : Ops.StdModel u id M) (hNat : Ops.IsExactNatLit id M 1) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ}
  {L k : ℕ} (hk : 2 ≤ k) (hkn : k ≤ n) (hku : 100000 * ↑k * u ≤ 1) {ε : ℝ}
  {a s wg wr ww wp g thr f : ℕ × ℕ} (hv : ShiftedQR.ShViews L n k ε a s wg wr ww wp g thr f)
  {H V : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {e : Fin (n + 1) → ℂ} {ss : List ℂ}
  {B S C d ω γ α cr cw cp tv : ℝ} (hH : IsUpperHessenberg H) (hH0 : H ≠ 0) (hV : IsUnit V)
  (hHV : H * V = V * diagonal e) (hκ : pseudoConditionNumber V ≤ B) (hSH : specNorm H ≤ S)
  (hC0 : 0 ≤ C) (hd : 0 < d) (hω : 0 < ω) (hs : ∀ s ∈ ss, ‖s‖ ≤ C * specNorm H)
  (hdist : ∀ s ∈ ss, ∀ (i : Fin (n + 1)), d ≤ ‖e i - s‖)
  (hxu : 300 * (↑n + 1) ^ 2 * u ≤ (16 * B)⁻¹ * (d / ((2 + 2 * C) * S)) ^ k)
  (hbound :
    (66 + 2 * C) * B * S * ((2 + 2 * C) * S / d) ^ k * √(↑n + 1) * (300 * (↑n + 1) ^ 2 * u) ≤
      1e-3 * ω)
  (hγ1 : γ ≤ 1) (hthrω : (1 + u) ^ 2 * ω ^ 2 ≤ tv) (hL : Ops.IsIndexLit M I) {ns w : ℕ} {lg : ℕ × ℕ}
  {LL : List (Option (List GivensEntry))} (hj : LL.length < ns) (hlgL : lg.1 < L)
  (hlgv : ∀ b ∈ [a, s, wg, wr, ww, wp, g, thr, f], b.1 ≠ lg.1)
  (hm :
    ShiftedQR.ShState3 M u L k ε H V e ss α ((1 - γ) ^ k) cr cw cp tv a s wg wr ww wp g thr f lg ns
      w LL m)
  (hlt :
    ∀ (tc : ℝ),
      m.store.get (L + 3) 0 = some tc → tc < ShiftedQR.optimalThresholdWord M H k ((1 - γ) ^ k)) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.trialAccept
    (Ops.Env.frame [n + 1, w, LL.length] [(L + 5, 0), a, (L + 11, 0), f, lg])
    (Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock (L + 11) 0 1 ⊔
        Ops.Store.inBlock f.1 f.2 1 ⊔
      Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))
    (ShiftedQR.ShOutcome u k H γ tv ((1 + C) * specNorm H * ((1 + 300 * (↑n + 1) ^ 2 * u) ^ k - 1))
      a f lg ns w LL 1)
    m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.RoundedSh.