NLAlib.ShiftedQR.finishRitzSearchWith_writes
Library · theorem
Exact arithmetic
Complete the actual three-phase search in the enclosing iteration's fresh register and trial buffers. Singular candidate shifts are safe: a rejected shift is mathematically nonsingular before the promising search uses its inverse. A wholly rejected list returns the actual promising-shift fallback matrix, rather than an uninitialized or stale output. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.
NLAlib.ShiftedQR.finishRitzSearchWith_writes {O Q : Type} [Ops.Has Ops.ScalarOp O]
[Ops.Has Ops.IndexOp O] [Ops.Has Ops.CmpTst Q] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ}
(hS : Ops.IsScalar M I) (hE : Ops.ExactModel id M) (hL : Ops.IsIndexLit M I) (hC : Ops.IsCmp id I)
{F : Ops.Stmt O Q} (hF : ShiftedQR.RitzSearchContract F I) {tape : Ops.Tape ℝ} {μ : Ops.Mem ℝ}
{n m D : ℕ} {w ss c r z : ℕ × ℕ} {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {τ B θ α γ : ℝ}
{shifts : List ℂ} (hHess : IsUpperHessenberg H) (hlen : shifts.length = 2 ^ m) (hk : 2 ^ m ≤ n)
(hτ : 0 ≤ τ) (hDp : 0 < D) (hD : D = ⌈√2 / exceptionalSpacing (2 ^ m) B θ α ((1 - γ) ^ 2)⌉₊)
(hH : HoldsMatrix w H μ.store) (hSS : HoldsMatrix ss (shiftColumn shifts) μ.store)
(hThreshold : μ.store.get c.1 c.2 = some (τ ^ 2))
(hTarget : μ.store.get r.1 (r.2 + 1) = some ((1 - γ) ^ (2 * 2 ^ m) * subdiagNormSqProd (2 ^ m) H))
(hRadius :
μ.store.get r.1 (r.2 + 2) =
some (exceptionalRadius (2 ^ m) B θ α (hessenbergPotential (2 ^ m) H)))
(hState : ShiftedQR.CandidateHolds τ γ (2 ^ m) H shifts z (r.1, r.2 + 3) μ.store)
(hl : μ.Live [w, ss, c, r, z]) (hr : r.2 + 8 ≤ μ.store.len r.1)
(hz : z.2 + 2 * ((n + 1) * (n + 1)) ≤ μ.store.len z.1)
(hFreshR : r.1 ≠ w.1 ∧ r.1 ≠ ss.1 ∧ r.1 ≠ c.1 ∧ r.1 ≠ z.1)
(hFreshZ : z.1 ≠ w.1 ∧ z.1 ≠ ss.1 ∧ z.1 ≠ c.1) :
Ops.Writes Ops.Mode.total I tape (ShiftedQR.finishRitzSearchWith F)
(Ops.Env.frame [n + 1, m, 2 ^ m, D] [w, ss, c, r, z, z, r])
(Ops.Store.inBlock z.1 z.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock r.1 r.2 8)
(fun μ' ↦ μ'.pos = μ.pos ∧ HoldsMatrix z (shqrAcceptStep τ B θ α γ m H shifts) μ'.store) μImport NLAlib.Eigensolvers.ShiftedQR.FinishSearch.