NLA-lib Explorer

NLAlib.ShiftedQR.iterationWith_writes

Library · theorem

Exact arithmetic

The actual scalar iteration computes the mathematical three-phase shifted step of its local Ritz routine, including fallback. All workspace is scoped; the raw matrix, parameter and constant words are the only supplied data. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.

NLAlib.ShiftedQR.iterationWith_writes {O Q : Type} [Ops.Has Ops.ScalarOp O] [Ops.Has Ops.IndexOp O]
  [Ops.Has ShiftedQR.EigenvalueKernelOp O] [Ops.Has Ops.CmpTst Q] {M : Ops.Machine ℝ}
  {I : Ops.Interp O Q ℝ} {eta : ℝ} {K : ShiftedQR.KernelRoutines eta} (hS : Ops.IsScalar M I)
  (hE : Ops.ExactModel id M) (hL : Ops.IsIndexLit M I) (hC : Ops.IsCmp id I)
  (hK : ShiftedQR.IsEigenvalueKernels K I) {F : Ops.Stmt O Q}
  (hF : ShiftedQR.RitzSearchContract F I) {tape : Ops.Tape ℝ} {μ : Ops.Mem ℝ} {n m D : ℕ}
  {w p c : ℕ × ℕ} {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {τ B θ α γ : ℝ}
  (hHess : IsUpperHessenberg H) (hk : 2 ^ m ≤ n) (hτ : 0 ≤ τ) (hB : 0 ≤ B) (hDp : 0 < D)
  (hD : D = ⌈√2 / exceptionalSpacing (2 ^ m) B θ α ((1 - γ) ^ 2)⌉₊) (hH : HoldsMatrix w H μ.store)
  (hP : μ.store.readBlock p.1 p.2 5 = some [τ, B, θ, α, γ])
  (hCst : μ.store.readBlock c.1 c.2 2 = some [τ ^ 2, (1 - γ) ^ (2 * 2 ^ m)])
  (hl : μ.Live [w, p, c, w]) :
  Ops.Writes Ops.Mode.total I tape (ShiftedQR.iterationWith F)
    (Ops.Env.frame [n + 1, m, 2 ^ m, D] [w, p, c, w])
    (Ops.Store.inBlock w.1 w.2 (2 * ((n + 1) * (n + 1))))
    (fun μ' ↦
      μ'.pos = μ.pos ∧
        HoldsMatrix w (shqrAcceptStep τ B θ α γ m H (K.ritz (n + 1) (2 ^ m) H)) μ'.store)
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.IterationWords.