NLA-lib Explorer

NLAlib.ShiftedQR.roundedShQRWith_pwrites_of_le

Library · theorem

Standard rounding

The rounded shifted QR algorithm with a Schur leaf, at an order up to n + 1: with the machine, the streams, the leaf and the parameters of NLAlib.ShiftedQR.roundedShQRWith_measureReal_not_spectrum_le at the order n + 1, for an upper Hessenberg \mathbf{H} of order n' + 1 \le n + 1 in the class (B, \Gamma) with \|\mathbf{H}\|_2 \le \Sigma, except with probability \varphi the run of NLAlib.ShiftedQR.roundedShQRWith L at the order n' + 1 sets its flag to 0 and stores an upper triangular matrix and an accumulator tracked from (\mathbf{U}, \mathbf{H}) with the backward error \delta (NLAlib.ShiftedQR.solveRoundedWith_pwrites with the decoupler of NLAlib.ShiftedQR.roundedDecoupleWith_randomDecouplingRoutineContract_of_le_uShQR_at and the budget NLAlib.ShiftedQR.shqrSchurError_le). Shared by the trees of NLAlib.ShiftedQR.roundedShQRSmallEig, NLAlib.ShiftedQR.roundedShQRSchurWith.

NLAlib.ShiftedQR.roundedShQRWith_pwrites_of_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)) {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 δ)
  {n' : ℕ} (hn' : n' ≤ n) {H V U : Matrix (Fin (n' + 1)) (Fin (n' + 1)) ℂ} {d : Fin (n' + 1) → ℂ}
  (hHess : IsUpperHessenberg H) (hV : IsUnit V) (hHV : H * V = V * diagonal d)
  (hκ : pseudoConditionNumber V ≤ B) (hgap : ∀ (i j : Fin (n' + 1)), i ≠ j → Γ ≤ ‖d i - d j‖)
  (hHS : specNorm H ≤ S) {a t p uo f : ℕ × ℕ} :
  Ops.PWrites law 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, uo, a, uo, f])
    (ShiftedQR.shqrFp n' a uo f)
    (fun μ ↦
      μ.Live [a, t, p, uo, f] ∧
        μ.Room [a, t, p, uo, f]
            [2 * ((n' + 1) * (n' + 1)), 1, (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length,
              2 * ((n' + 1) * (n' + 1)), 1] ∧
          ShiftedQR.ShQRViewsApart (n' + 1) (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length a t p
              uo f ∧
            HoldsMatrix a H μ.store ∧
              HoldsMatrix uo U μ.store ∧
                μ.store.get t.1 t.2 = some (ShiftedQR.shqrDeflationThreshold n k B Γ S δ φ) ∧
                  μ.store.readBlock p.1 p.2 (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length =
                    some (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs))
    (fun μ' ↦
      μ'.store.get f.1 f.2 = some 0 ∧
        ∃ U' Tm,
          HoldsMatrix a Tm μ'.store ∧
            HoldsMatrix uo U' μ'.store ∧
              Tm.IsUpperTriangular ∧
                IsTrackedUnitarySimilar
                  ((1 + 24 * u) ^
                        (2 * (n' + 1) *
                          (ShiftedQR.shqrCap n B Γ S δ *
                                (k + 1 + (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length) *
                              (k * (n' + 1)) +
                            2 * k * (k + 2))) *
                      (1 + εL) ^ (n' + 1) -
                    1)
                  δ U H U' Tm)
    φ

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.RoundedSchurLeaf.