NLAlib.ShiftedQR.shTestStep_terminates
Library · theorem
This statement changed in the recorded rename: 2026-11-schur.
The comptau test of Sh terminates on any matrix: with the views and the room of Sh, from any matrix at A, any pair at Z = L, a stored word at Cg and a log with no pending entries and room for a slot, apart from the views and the scratch, k \le n, on a scalar machine with exact comparisons, index literals, exact natural literals up to n + 1 and the literal 0 exact, NLAlib.ShiftedQR.shTestStep leaves the step at T = L + 5 and the words at P0 = L + 3, P1 = L + 4 stored and its entries (planes below n) pending in the log.
NLAlib.ShiftedQR.shTestStep_terminates {O Q : Type} [Ops.Has Ops.ScalarOp O] [Ops.Has Ops.IndexOp O]
[Ops.Has Ops.CmpTst Q] {n : ℕ} {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} (hS : Ops.IsScalar M I)
(hzero : M.lit 0 = 0) (hC : Ops.IsCmp id I) (hL : Ops.IsIndexLit M I)
(hNat : Ops.IsExactNatLit id M (n + 1)) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {L k : ℕ} (hkn : k ≤ n)
{ε : ℝ} {a s wg wr ww wp g thr f : ℕ × ℕ} (hv : ShiftedQR.ShViews L n k ε a s wg wr ww wp g thr f)
(hr : ShiftedQR.ShRoom L n k ε f m) {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {z : ℂ} {cg : ℝ}
(hA : HoldsMatrix a H m.store) (hZ : m.store.readBlock L 0 2 = some [z.re, z.im])
(hcg : m.store.get wg.1 wg.2 = some cg) {ns w : ℕ} {lg : ℕ × ℕ}
{LL : List (Option (List GivensEntry))} (hlog : HoldsSlottedLog lg ns w LL [] m.store)
(hj : LL.length + 1 ≤ ns) (hw : k * n ≤ w) (hlgL : lg.1 < L)
(hlgv : ∀ b ∈ [a, s, wg, wr, ww, wp, g, thr, f], b.1 ≠ lg.1) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.shTestStep
(Ops.Env.frame [n + 1, k, w, LL.length]
[a, (L, 0), wg, (L + 5, 0), (L + 6, 0), (L + 3, 0), (L + 4, 0), lg])
(Ops.Store.inBlock (L + 5) 0 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock (L + 6) 0 (2 * k) ⊔
Ops.Store.inBlock (L + 3) 0 1 ⊔
Ops.Store.inBlock (L + 4) 0 1 ⊔
Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))
(fun m' ↦
(∃ H', HoldsMatrix (L + 5, 0) H' m'.store) ∧
(∃ x, m'.store.get (L + 3) 0 = some x) ∧
∃ x,
m'.store.get (L + 4) 0 = some x ∧
∃ P, (∀ x ∈ P, x.1 + 1 < n + 1) ∧ HoldsSlottedLog lg ns w LL P m'.store)
mImport NLAlib.Eigensolvers.ShiftedQR.RoundedShTermination.