NLAlib.ShiftedQR.shStep_pwrites
Library · theorem
This statement changed in the recorded rename: 2026-11-schur.
Standard rounding
The rounded shifting strategy Sh as a probabilistic block ([BanksGarzaVargasSrivastava2022, Lemma 5.4], corrected: the requirements add \|\mathbf{H}\|_2 \le \Sigma and k \ge 2, which the decrease factor 1.002 needs, and a failure flag is set when no shift is accepted; the accepted step is the rounded one, where line 4 of the printed Sh outputs the exact step; the exceptional radius carries the factor 2^{1/k} of line 1 of Exc, so that it lies in [1.998^{1/k}, 2.002^{1/k}]\,\theta\alpha B^{1/k}\psi where the paper has 1.001\,\theta\alpha B^{1/k}\psi; and the net of Exc covers \mathbb{D}(r, (1 + \varepsilon)R) with rounding at most 0.005\varepsilon R and the packing count 11, where the paper intersects with \mathbb{D}(r, R), budgets 0.1\varepsilon R and counts 3): on a scalar machine with the standard model, exact comparisons, index literals, index conversion and exact natural literals up to n + 1, a measurable tape-local interpretation with an exact polar disk sampler on a stream s₀ uniform on [0, 1]: let \mathbf{H} be upper Hessenberg of order n + 1, \mathbf{H}\mathbf{V} = \mathbf{V}\operatorname{diag}(\mathbf{e}) with \kappa(\mathbf{V}) \le B, \|\mathbf{H}\|_2 \le \Sigma, 2 \le k = 2^m \le n, 0 < \omega \le \psi_k(\mathbf{H}), the k stored shifts \theta-optimal (\theta \ge 1), in \mathbb{D}(0, 1.1\|\mathbf{H}\|_2) and at distance at least d > 0 from every e_i; \alpha = (1.01B)^{4m/2^m}, 0 < \gamma < 1, \varepsilon = (0.998(1 - \gamma)^2/((13B^4)^{1/k}\alpha^2\theta^2))^{k/(k-1)} \le 1/2, 0 < \varphi \le 1/5, d \le \varepsilon R_{\mathrm{lo}}\sqrt{\varphi/(11(n + 1))}/4 for [R_{\mathrm{lo}}, R_{\mathrm{hi}}] = [1.998^{1/k}, 2.002^{1/k}]\,\theta\alpha B^{1/k} \psi_k(\mathbf{H}), 1.1 + 2.1 \cdot 2.002^{1/k}\theta\alpha B^{1/k} \le C, the stored words (1 - \gamma)^k, 2^{1/k}\theta\alpha B^{1/k}, \varepsilon/2, 1.0015(1 - \gamma), the net NLAlib.ShiftedQR.excNet ε, a scan threshold t \ge (1 + \boldsymbol{u})^2\omega^2, and the precision conditions (n + 1)\boldsymbol{u} \le 1/2500, 10^5k\boldsymbol{u} \le 1, \mathbf{x} = 300(n+1)^2\boldsymbol{u} \le (8004B)^{-1}(d/((2 + 2C)\Sigma))^k, (66 + 2C)B\Sigma((2 + 2C)\Sigma/d)^k\sqrt{n + 1}\,\mathbf{x} \le 0.001\,\omega and 6\boldsymbol{u}(1.1\Sigma + 3R_{\mathrm{hi}}) \le \min(0.005, \sqrt{\varphi/(11(n + 1))}/8) \,\varepsilon R_{\mathrm{lo}}. Then NLAlib.ShiftedQR.shStep writes only the matrix and the flag and, except with probability at most \varphi, ends in NLAlib.ShiftedQR.ShOutcome: the flag is 1 and the matrix is an upper Hessenberg perturbed unitary similarity of \mathbf{H} with error (1 + C)\|\mathbf{H}\|_2((1 + \mathbf{x})^k - 1), decoupled at the bottom (a bottom subdiagonal entry passes the scan) or with \psi_k \le 1.002(1 - \gamma)\psi_k(\mathbf{H}). Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine, on their scratch.
NLAlib.ShiftedQR.shStep_pwrites {n : ℕ} {O Q : Type} [Ops.Has Ops.ScalarOp O]
[Ops.Has Ops.IndexOp O] [Ops.Has ShiftedQR.DiskSampleOp O] [Ops.Has Ops.CmpTst Q]
[Ops.Has Ops.IdxTst Q] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} {u : ℝ} (hI : I.IsMeasurable)
{win : O → List ℕ → ℕ} (hloc : ∀ (o : O), I.TapeLocal o (win o)) (hS : Ops.IsScalar M I)
(hM : Ops.StdModel u id M) (hu1 : u ≤ 1) (hL : Ops.IsIndexLit M I)
(hNat : Ops.IsExactNatLit id M (n + 1)) (hC : Ops.IsCmp id I) (hQ : Ops.IsToNat id I)
{law : ℕ → Measure ℝ} {s₀ : ℕ} (hD : ShiftedQR.IsPolarDiskSampler s₀ I)
(hU : law s₀ = ℙ.restrict (Set.Icc 0 1)) {k q : ℕ} (hkq : k = 2 ^ q) (hk : 2 ≤ k) (hkn : k ≤ n)
{ε : ℝ} {a s wg wr ww wp g thr f : ℕ × ℕ}
(haf :
Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1)))) (Ops.Store.inBlock f.1 f.2 1))
(hio :
(Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock f.1 f.2 1).Disj
(Ops.Store.inBlock s.1 s.2 (2 * k) ⊔ Ops.Store.inBlock wg.1 wg.2 1 ⊔
Ops.Store.inBlock wr.1 wr.2 1 ⊔
Ops.Store.inBlock ww.1 ww.2 1 ⊔
Ops.Store.inBlock wp.1 wp.2 1 ⊔
Ops.Store.inBlock g.1 g.2 (2 * (ShiftedQR.excNet ε).length) ⊔
Ops.Store.inBlock thr.1 thr.2 1))
{H V : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {e : Fin (n + 1) → ℂ} {ss : List ℂ}
{B S ω θ α γ φ C d tv : ℝ} (hH : IsUpperHessenberg H) (hV : IsUnit V)
(hHV : H * V = V * diagonal e) (hκ : pseudoConditionNumber V ≤ B) (hSH : specNorm H ≤ S)
(hω : 0 < ω) (hψ : ω ≤ hessenbergPotential k H) (hlen : ss.length = k)
(hopt : IsOptimalRitzValues θ H ss) (hθ : 1 ≤ θ) (hd' : 0 < d)
(hdist : ∀ s ∈ ss, ∀ (i : Fin (n + 1)), d ≤ ‖e i - s‖) (hsH : ∀ s ∈ ss, ‖s‖ ≤ 1.1 * specNorm H)
(hα : α = (1.01 * B) ^ (4 * ↑q / 2 ^ q)) (hγ : 0 < γ) (hγ1 : γ < 1)
(hε : ε = (0.998 * (1 - γ) * (1 - γ) / ((13 * B ^ 4) ^ (↑k)⁻¹ * α ^ 2 * θ ^ 2)) ^ (↑k / (↑k - 1)))
(hε2 : ε ≤ 1 / 2) (hφ : 0 < φ) (hφ1 : φ ≤ 1 / 5)
(hd :
d ≤
ε * (1.998 ^ (↑k)⁻¹ * θ * α * B ^ (↑k)⁻¹ * hessenbergPotential k H) * √(φ / (11 * ↑(n + 1))) /
4)
(hC1 : 1.1 + 2.1 * (2.002 ^ (↑k)⁻¹ * θ * α * B ^ (↑k)⁻¹) ≤ C) (hnu : (↑n + 1) * u ≤ 1 / 2500)
(hku : 100000 * ↑k * u ≤ 1)
(hxu : 300 * (↑n + 1) ^ 2 * u ≤ (8004 * 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 * ω)
(hexc1 :
6 * u * (1.1 * S + 3 * (2.002 ^ (↑k)⁻¹ * θ * α * B ^ (↑k)⁻¹ * hessenbergPotential k H)) ≤
5e-3 * ε * (1.998 ^ (↑k)⁻¹ * θ * α * B ^ (↑k)⁻¹ * hessenbergPotential k H))
(hexc2 :
6 * u * (1.1 * S + 3 * (2.002 ^ (↑k)⁻¹ * θ * α * B ^ (↑k)⁻¹ * hessenbergPotential k H)) ≤
ε * (1.998 ^ (↑k)⁻¹ * θ * α * B ^ (↑k)⁻¹ * hessenbergPotential k H) * √(φ / (11 * ↑(n + 1))) /
8)
(hthrω : (1 + u) ^ 2 * ω ^ 2 ≤ tv) {ns w : ℕ} {lg : ℕ × ℕ} {LL : List (Option (List GivensEntry))}
(hj : LL.length + (ShiftedQR.excNet ε).length < ns) (hw : k * n ≤ w)
(hlgv : ∀ b ∈ [a, s, wg, wr, ww, wp, g, thr, f], b.1 ≠ lg.1) :
Ops.PWrites law I ShiftedQR.shStep
(Ops.Env.frame [n + 1, q, k, (ShiftedQR.excNet ε).length, w, LL.length]
[a, s, wg, wr, ww, wp, g, thr, a, f, lg])
(Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock f.1 f.2 1 ⊔
Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))
(fun m ↦
m.Live [a, s, wg, wr, ww, wp, g, thr, f] ∧
HoldsMatrix a H m.store ∧
m.store.readBlock s.1 s.2 (2 * k) = some (List.flatMap (fun z ↦ [z.re, z.im]) ss) ∧
m.store.get wg.1 wg.2 = some ((1 - γ) ^ k) ∧
m.store.get wr.1 wr.2 = some (2 ^ (↑k)⁻¹ * (θ * α * B ^ (↑k)⁻¹)) ∧
m.store.get ww.1 ww.2 = some (ε / 2) ∧
m.store.get wp.1 wp.2 = some (1.0015 * (1 - γ)) ∧
m.store.readBlock g.1 g.2 (2 * (ShiftedQR.excNet ε).length) =
some (List.flatMap (fun z ↦ [z.re, z.im]) (ShiftedQR.excNet ε)) ∧
m.store.get thr.1 thr.2 = some tv ∧
f.2 < m.store.len f.1 ∧ HoldsSlottedLog lg ns w LL [] m.store ∧ m.Live [lg])
(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 + (ShiftedQR.excNet ε).length))
φImport NLAlib.Eigensolvers.ShiftedQR.RoundedShStep.