NLA-lib Explorer

NLAlib.SmallEig.oneEig_pwrites

Library · theorem

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

Standard rounding

OneEig finds a point near the spectrum ([BanksGarzaVargasSrivastava2025, Proposition 3.5], corrected: \eta_2 = \min(\beta'/40, g/3) (P5), the round cap (P6), \log_2 (P7), a perturbed start (B3)): on a scalar machine with the standard model at the unit roundoff \boldsymbol{u}, index literals, exact natural literals up to 1, exact comparisons, a measurable interpretation reading the tape only in its windows and an exact polar sampler on a stream sU uniform on [0, 1]: let \mathbf{H} of order n + 1 \ge 2 be upper Hessenberg, \mathbf{H}\mathbf{V} = \mathbf{V}\operatorname{diag}(\mathbf{d}) with \|\mathbf{V}\|_2\|\mathbf{V}^{-1}\|_2 \le \kappa, every last-row weight at least p > 0, eigenvalues separated by g > 0, \|\mathbf{H}\|_2 \le \Sigma', 0 < \beta' \le 0.8\,\Sigma', 0 < \varphi \le 1, m = 2^q at least NLAlib.SmallEig.distSpecDegree \kappa p, t = NLAlib.SmallEig.oneEigRounds \Sigma' \beta', \eta_2, \eta_1 = NLAlib.SmallEig.oneEigOuterRadius \beta' g, NLAlib.SmallEig.oneEigInnerRadius \Sigma' \beta' g \varphi, the words qs with \eta_2 at 4 and 0.9\beta' at 5, and the precision conditions of DistSpec at the distance \eta_1 and the shift reach 10\Sigma': (n + 1)\boldsymbol{u} \le 1/2500, 30000(m + 1)\boldsymbol{u} \le 1 and 300(n + 1)^2\boldsymbol{u} \le (8004\kappa)^{-1}(\eta_1/(2\|\mathbf{H}\|_2 + 20\Sigma'))^m. Then from NLAlib.SmallEig.OneEigInput, except with probability at most \varphi, the run writes only the pair and the flag, sets the flag to 0 and stores a point z with \eta_1 \le \min_i\lvert z - d_i\rvert \le \beta'. Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.SmallEig.oneEig_pwrites {O Q : Type} [Ops.Has Ops.ScalarOp O] [Ops.Has Ops.IndexOp O]
  [Ops.Has ShiftedQR.DiskSampleOp O] [Ops.Has Ops.CmpTst Q] {M : Ops.Machine ℝ}
  {I : Ops.Interp O Q ℝ} {u : ℝ} (hS : Ops.IsScalar M I) (hM : Ops.StdModel u id M)
  (hL : Ops.IsIndexLit M I) {n : ℕ} (hNat : Ops.IsExactNatLit id M n) (hCmp : 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)) {m q t : ℕ} (hn : 1 ≤ n)
  {H V : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {d : Fin (n + 1) → ℂ} {κ p g S' β' φ η₁ η₂ : ℝ}
  (hH : IsUpperHessenberg H) (hV : IsUnit V) (hHV : H * V = V * diagonal d)
  (hκ : pseudoConditionNumber V ≤ κ) (hp : 0 < p) (hw : ∀ (i : Fin (n + 1)), p ≤ lastRowWeights V i)
  (hg : 0 < g) (hgap : ∀ (i j : Fin (n + 1)), i ≠ j → g ≤ ‖d i - d j‖) (hHS : specNorm H ≤ S')
  (hβ' : 0 < β') (hβ'S : β' ≤ 0.8 * S') (hφ : 0 < φ) (hφ1 : φ ≤ 1) (hmq : m = 2 ^ q)
  (hm : SmallEig.distSpecDegree κ p ≤ m) (ht : t = SmallEig.oneEigRounds S' β')
  (hη₂ : η₂ = SmallEig.oneEigOuterRadius β' g) (hη₁ : η₁ = SmallEig.oneEigInnerRadius S' β' g φ)
  (hnu : (↑n + 1) * u ≤ 1 / 2500) (hum : 30000 * (↑m + 1) * u ≤ 1)
  (hxu : 300 * (↑n + 1) ^ 2 * u ≤ (8004 * κ)⁻¹ * (η₁ / (2 * specNorm H + 20 * S')) ^ m)
  {qs : List ℝ} (hq4 : qs.getD 4 0 = η₂) (hq5 : qs.getD 5 0 = 0.9 * β') (hqs : 6 ≤ qs.length)
  {h qw lam f : ℕ × ℕ} :
  Ops.PWrites law I SmallEig.oneEig (Ops.Env.frame [n + 1, m, q, t] [h, qw, lam, f])
    (Ops.Store.inBlock lam.1 lam.2 2 ⊔ Ops.Store.inBlock f.1 f.2 1)
    (SmallEig.OneEigInput H qs h qw lam f)
    (fun μ' ↦
      μ'.store.get f.1 f.2 = some 0 ∧
        ∃ z,
          μ'.store.readBlock lam.1 lam.2 2 = some [z.re, z.im] ∧
            η₁ ≤ ⨅ i, ‖z - d i‖ ∧ ⨅ i, ‖z - d i‖ ≤ β')
    φ

Full source on GitHub

Import NLAlib.Eigensolvers.SmallEig.OneEig.