NLA-lib Explorer

NLAlib.ShiftedQR.roundedShQRWith_measureReal_not_spectrum_le

Library · theorem

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

Standard rounding Random tape

The rounded shifted QR algorithm with a small-block Schur solver ([BanksGarzaVargasSrivastava2022, Theorem 6.3] with the quantifiers of Theorem 1.4, corrected, with any small-block Schur solver in the place of SmallEig). Let the machine have the standard model at \boldsymbol{u}, index literals, exact natural literals up to n + 1, exact toNat and comparisons, a measurable interpretation reading the tape only in its windows, and a stream s_U uniform on [0, 1] with an exact polar disk sampler on it. Let \mathbf{H} be upper Hessenberg of order n + 1, \mathbf{H}\mathbf{V} = \mathbf{V}\operatorname{diag}(\mathbf{d}) with \|\mathbf{V}\|_2\|\mathbf{V}^{-1}\|_2 \le B and eigenvalues separated by \Gamma > 0, \|\mathbf{H}\|_2 \le \Sigma, 0 < \delta \le \Sigma, 0 < \varphi \le 1 and k the degree of (eqn:setk) at 4B. Let the leaf L be a randomized small-block Schur solver on the orders at most \min(k, n + 1) and norms at most 4\Sigma with the cap T and 12 words qs: except with probability \varphi_L it stores an upper triangular \mathbf{T}_\mathbf{b} and an accumulator \mathbf{U}_\mathbf{b} with \|\mathbf{U}_\mathbf{b} - \mathbf{V}_\mathbf{b}\|_2 \le \varepsilon_L and \mathbf{T}_b = \mathbf{V}_b^{\mathsf H}(\mathbf{B} + \mathbf{F})\mathbf{V}_b for an exact unitary \mathbf{V}_\mathbf{b} and \|\mathbf{F}\|_2 \le \beta_L, with \beta_L, \varphi_L \ge 0, 0 \le \varepsilon_L \le (1 + 24\boldsymbol{u})^{R_L} - 1 (a leaf of R_L rotation-equivalents), \beta_L at most the backward accuracy \Sigma'(\beta/(4(2k + 1)\Sigma'))^k of the forward accuracy \beta = shqrSmallEigAccuracy at \Sigma' = 4\Sigma and \varphi_L \le shqrSmallEigFailure. Let \boldsymbol{u} \le \boldsymbol{u}_{\mathrm{ShQR}} and \boldsymbol{u} \le the replay term NLAlib.ShiftedQR.uShQRSchurReplay at R_L. Then from a memory holding \mathbf{H}, an accumulator \mathbf{U}_0, the deflation threshold word and the words of shqrParams followed by qs, under a random tape with the stream laws, \mathbb{P}\bigl[\mathsf{roundedShQRWith}_L(\mathbf{H}) \text{ fails, or writes outside the matrix, the accumulator and the failure word, or lists no } \operatorname{spec}(\mathbf{H} + \mathbf{E}),\ \|\mathbf{E}\|_2 \le \delta\bigr] \le \varphi\,. [BanksGarzaVargasSrivastava2022, Theorem 6.3]; there SmallEig is an oracle returning eigenvalues.

Notes

The leaf is a hypothesis, NLAlib.Schur.RandomSchurLeafContract: this is the algorithm with a small-block Schur oracle. The diagonal of the leaf's triangular block serves as its Ritz values (NLAlib.ShiftedQR.schurDiag), turned into forward accuracy by the matching (NLAlib.SmallEig.forwardBackwardError). Instance: SmallEig (NLAlib.ShiftedQR.roundedShQRSmallEig_measureReal_not_spectrum_le). The Schur form itself: NLAlib.ShiftedQR.roundedShQRSchurWith_randomSchurCoreContract.

NLAlib.ShiftedQR.roundedShQRWith_measureReal_not_spectrum_le {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] {Mch : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} {u : ℝ} {n : ℕ}
  (hS : Ops.IsScalar Mch I) (hM : Ops.StdModel u id Mch) (hL : Ops.IsIndexLit Mch I)
  (hNat : Ops.IsExactNatLit id Mch (n + 1)) (hQ : Ops.IsToNat id I) (hC : Ops.IsCmp id I)
  (hI : I.IsMeasurable) {win : O → List ℕ → ℕ} (hloc : ∀ (o : O), I.TapeLocal o (win o))
  {law : ℕ → Measure ℝ} {sU : ℕ} (hDisk : ShiftedQR.IsPolarDiskSampler sU I)
  (hU : law sU = ℙ.restrict (Set.Icc 0 1)) {H V : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ}
  {d : Fin (n + 1) → ℂ} {k : ℕ} {B Γ S δ φ : ℝ} (hHess : IsUpperHessenberg H) (hV : IsUnit V)
  (hHV : H * V = V * diagonal d) (hκ : pseudoConditionNumber V ≤ B) (hΓ : 0 < Γ)
  (hgap : ∀ (i j : Fin (n + 1)), i ≠ j → Γ ≤ ‖d i - d j‖) (hHS : specNorm H ≤ S) (hδ : 0 < δ)
  (hδS : δ ≤ S) (hφ : 0 < φ) (hφ1 : φ ≤ 1) (hk : k = ShiftedQR.shqrDegree (4 * B)) {εL βL φL : ℝ}
  {T : ℕ} {qs : List ℝ} {L : Ops.Stmt O Q} {RL : ℕ}
  (hLeaf : Schur.RandomSchurLeafContract law εL βL φL (min k (n + 1)) (4 * S) qs T L I)
  (hqs : qs.length = 12) (hεL : 0 ≤ εL) (hεLR : εL ≤ (1 + 24 * u) ^ RL - 1) (hβL0 : 0 ≤ βL)
  (hβL : βL ≤ SmallEig.forwardBackwardError k (4 * S) (ShiftedQR.shqrSmallEigAccuracy n B Γ S δ))
  (hφL0 : 0 ≤ φL) (hφL : φL ≤ ShiftedQR.shqrSmallEigFailure n B Γ S δ φ)
  (hu : u ≤ ShiftedQR.uShQR n k B Γ S δ φ)
  (hur :
    u ≤
      ShiftedQR.uShQRSchurReplay n k (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length
        (ShiftedQR.shqrCap n B Γ S δ) RL B Γ S δ)
  {a t p out f : ℕ × ℕ} {μ : Ops.Mem ℝ} {U₀ : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ}
  (hl : μ.Live [a, t, p, out, f])
  (hr :
    μ.Room [a, t, p, out, f]
      [2 * ((n + 1) * (n + 1)), 1, (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length,
        2 * ((n + 1) * (n + 1)), 1])
  (ha :
    ShiftedQR.ShQRViewsApart (n + 1) (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length a t p out f)
  (hA : HoldsMatrix a H μ.store) (hU₀ : HoldsMatrix out U₀ μ.store)
  (ht : μ.store.get t.1 t.2 = some (ShiftedQR.shqrDeflationThreshold n k B Γ S δ φ))
  (hp :
    μ.store.readBlock p.1 p.2 (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length =
      some (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs))
  {Ω : Type} [MeasurableSpace Ω] {P : Measure Ω} {ξ : Ω → Ops.Tape ℝ} (hξ : Ops.IsTapeLaw law P ξ) :
  P.real
      {ω' |
        ¬Ops.Writes Ops.Mode.total I (ξ ω') (ShiftedQR.roundedShQRWith L)
            (Ops.Env.frame
              [n + 1, k, (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length,
                ShiftedQR.shqrCap n B Γ S δ, T,
                ShiftedQR.shqrCap n B Γ S δ *
                  (k + 1 + (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length),
                k * (n + 1)]
              [a, t, p, out, a, out, f])
            (ShiftedQR.shqrFp n a out f) (ShiftedQR.ShQRSpectrum a out f H δ) μ} ≤
    φ

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.RoundedSchurLeaf.