NLAlib.ShiftedQR.roundedShQRWith_terminates
Library · theorem
This statement changed in the recorded rename: 2026-11-schur.
The rounded shifted QR algorithm with a completing small-block Schur solver terminates on every tape: on a scalar machine (no rounding model) with index literals, exact natural literals up to n + 1, exact toNat and comparisons and an exact polar disk sampler, and a leaf L that completes on orders at most \min(k, n + 1) with the cap T and 12 words qs (NLAlib.ShiftedQR.CompletingLeafRoutine, no accumulator bound), for any (n + 1) \times (n + 1) matrix \mathbf{H}, accumulator \mathbf{U}_0, any B, \Gamma, \Sigma, \delta, \varphi and k the degree of (eqn:setk) at 4B, the run of NLAlib.ShiftedQR.roundedShQRWith L from a memory holding the input with the words NLAlib.ShiftedQR.shqrParams followed by qs succeeds on every tape and writes only the matrix, the accumulator and the failure word.
NLAlib.ShiftedQR.roundedShQRWith_terminates {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 ℝ} {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) {sU : ℕ} (hDisk : ShiftedQR.IsPolarDiskSampler sU I)
{H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {k : ℕ} {B Γ S δ φ : ℝ}
(hk : k = ShiftedQR.shqrDegree (4 * B)) {T : ℕ} {qs : List ℝ} {L : Ops.Stmt O Q}
(hLeaf : ShiftedQR.CompletingLeafRoutine (min k (n + 1)) qs T L I) (hqs : qs.length = 12)
{a t p out f : ℕ × ℕ} {μ : Ops.Mem ℝ} {U₀ : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ}
(hl : μ.Live [a, t, p, out, f])
(hr :
μ.Room [a, t, p, out, f]
[2 * ((n + 1) * (n + 1)), 1, (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length,
2 * ((n + 1) * (n + 1)), 1])
(ha :
ShiftedQR.ShQRViewsApart (n + 1) (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length a t p out f)
(hA : HoldsMatrix a H μ.store) (hU₀ : HoldsMatrix out U₀ μ.store) {thr : ℝ}
(ht : μ.store.get t.1 t.2 = some thr)
(hp :
μ.store.readBlock p.1 p.2 (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs).length =
some (ShiftedQR.shqrParams n k B Γ S δ φ ++ qs))
(τ : Ops.Tape ℝ) :
Ops.Writes Ops.Mode.total 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, out, a, out, f])
(ShiftedQR.shqrFp n a out f) (fun x ↦ True) μImport NLAlib.Eigensolvers.ShiftedQR.RoundedSchurLeaf.