NLAlib.ShiftedQR.solveRoundedWith_completes
Library · theorem
The rounded worklist in Schur mode runs to completion on any machine: on a scalar machine with natural literals up to n + 1 exact, exact toNat and comparisons (no rounding model), let the decoupling routine terminate with a closed log (NLAlib.ShiftedQR.TerminatingDecouplerRoutine) and the leaf routine complete on orders at most \min(k, n + 1) (NLAlib.ShiftedQR.CompletingLeafRoutine, no accumulator bound). Then for any matrix and accumulator, any threshold word and on every tape, solveRoundedWith D L runs to completion, writes only the matrix, the accumulator and the failure word, and leaves a matrix and an accumulator stored. The accumulator bound under the standard model is NLAlib.ShiftedQR.solveRoundedWith_terminates.
NLAlib.ShiftedQR.solveRoundedWith_completes {O Q : Type} [Ops.Has Ops.ScalarOp O]
[Ops.Has Ops.IndexOp O] [Ops.Has Ops.CmpTst Q] [Ops.Has Ops.IdxTst Q] {Mch : Ops.Machine ℝ}
{I : Ops.Interp O Q ℝ} {n : ℕ} (hS : Ops.IsScalar Mch I) (hL : Ops.IsIndexLit Mch I)
(hNat : Ops.IsExactNatLit id Mch (n + 1)) (hQ : Ops.IsToNat id I) (hC : Ops.IsCmp id I)
{k F T ns w : ℕ} {ps : List ℝ} (D : Ops.Stmt O Q)
(hD : ShiftedQR.TerminatingDecouplerRoutine n k F T ps ns w D I) (L : Ops.Stmt O Q)
(hLeaf : ShiftedQR.CompletingLeafRoutine (min k (n + 1)) ps T L I) {tape : Ops.Tape ℝ}
{μ : Ops.Mem ℝ} {a t p uo f : ℕ × ℕ} {H U : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {thr : ℝ}
(hl : μ.Live [a, t, p, uo, f])
(hr : μ.Room [a, t, p, uo, f] [2 * ((n + 1) * (n + 1)), 1, ps.length, 2 * ((n + 1) * (n + 1)), 1])
(ha : ShiftedQR.ShQRViewsApart (n + 1) ps.length a t p uo f) (hA : HoldsMatrix a H μ.store)
(hU : HoldsMatrix uo U μ.store) (ht : μ.store.get t.1 t.2 = some thr)
(hp : μ.store.readBlock p.1 p.2 ps.length = some ps) :
Ops.Writes Ops.Mode.total I tape (ShiftedQR.solveRoundedWith D L)
(Ops.Env.frame [n + 1, k, ps.length, F, T, ns, w] [a, t, p, uo, a, uo, f])
(Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock uo.1 uo.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock f.1 f.2 1)
(fun μ' ↦ ∃ Tm U', HoldsMatrix a Tm μ'.store ∧ HoldsMatrix uo U' μ'.store) μImport NLAlib.Eigensolvers.ShiftedQR.RoundedSolveCompletion.