NLA-lib Explorer

Rounded shifted QR with any small-block Schur solver: Schur pair

Library · Result group

Theorem (ShiftedQR.roundedShQRSchurWith_randomSchurCoreContract). The rounded shifted QR algorithm with any small-block Schur solver is a Schur core ([BanksGarzaVargasSrivastava2022, Theorem 6.3] in Schur form, with a small-block Schur oracle). 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 B \ge 1, \Gamma > 0, 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, with accumulator error 0 \le \varepsilon_L \le (1 + 24\boldsymbol{u})^{R_L} - 1, backward error 0 \le \beta_L \le \Sigma'(\beta/(4(2k + 1)\Sigma'))^k (\beta = shqrSmallEigAccuracy, \Sigma' = 4\Sigma) and failure 0 \le \varphi_L \le shqrSmallEigFailure; let \boldsymbol{u} \le \boldsymbol{u}_{\mathrm{ShQR}} and \boldsymbol{u} at most the replay term at R_L. Then roundedShQRSchurWith L meets the Schur core contract on the orders at most n + 1, the class (B, \Gamma) and norms at most \Sigma, with the words: the deflation threshold, shqrParams, qs. Except with probability \varphi its flag is 0, its matrix upper triangular, and the pair is tracked from (\mathbf{U}, \mathbf{H}) with the backward error \delta and the relative accumulator error (1 + 24\boldsymbol{u})^{R} - 1, R = NLAlib.ShiftedQR.shqrSchurRotations (2(n + 1)(n_s w + 2k(k + 2)) + (n + 1)R_L). [BanksGarzaVargasSrivastava2022, Theorem 6.3]; there only the eigenvalues are computed, with an eigenvalue oracle.

Headline Standard rounding

Notes

The leaf is a hypothesis (NLAlib.Schur.RandomSchurLeafContract): this is the core with a small-block Schur oracle, the general form of NLAlib.ShiftedQR.roundedShQRSchur_randomSchurCoreContract (the SmallEig leaf). The proof is NLAlib.ShiftedQR.solveRoundedWith_pwrites with the decoupler of NLAlib.ShiftedQR.roundedDecoupleWith_randomDecouplingRoutineContract_at (NLAlib.ShiftedQR.schurDiag of the leaf as its eigenvalue routine); the replay term keeps the replays, the products and the leaf accumulators within a quarter of the merged budget (NLAlib.ShiftedQR.shqrSchurError_le).

Lean statement and details
NLAlib.ShiftedQR.roundedShQRSchurWith_randomSchurCoreContract {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)) {k : ℕ} {B Γ S δ φ : ℝ} (hB : 1 ≤ B) (hΓ : 0 < Γ)
  (hδ : 0 < δ) (hδS : δ ≤ S) (hφ : 0 < φ) (hφ1 : φ ≤ 1) (hk : k = ShiftedQR.shqrDegree (4 * B))
  {εL βL φL : ℝ} {T RL : ℕ} {qs : List ℝ} {L : Ops.Stmt O Q}
  (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 δ) :
  Schur.RandomSchurCoreContract law
    ((1 + 24 * u) ^
        ShiftedQR.shqrSchurRotations n k (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length
          (ShiftedQR.shqrCap n B Γ S δ) RL -
      1)
    δ φ (fun {n} H ↦ IsConditionedDiagonalizable B Γ H) k (ShiftedQR.shqrCap n B Γ S δ) T (n + 1) S
    (ShiftedQR.shqrDeflationThreshold n k B Γ S δ φ :: (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs))
    (ShiftedQR.roundedShQRSchurWith L) I

Full source on GitHub

Copy link