NLAlib.ShiftedQR.shTrials_terminates
Library · theorem
This statement changed in the recorded rename: 2026-11-schur.
The trials of Sh terminate on any matrix: with the views and the room of Sh, from any matrix at A, any 2n_0 words in the scratch buffer L + 10 (n_0 the size of the net), stored threshold words at Thr and Pt, stored words at Gw and Fl and a log with no pending entries and room for n_0 slots, apart from the views and the scratch, 1 \le n, k \le n, on a scalar machine with exact comparisons, index literals and exact natural literals up to n + 1, NLAlib.ShiftedQR.shTrials leaves the matrix, Gw and Fl stored and closes n_0 slots.
NLAlib.ShiftedQR.shTrials_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)
(hL : Ops.IsIndexLit M I) (hNat : Ops.IsExactNatLit id M (n + 1)) (hC : Ops.IsCmp id I)
{τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {L k q : ℕ} (hn : 0 < n) (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)) ℂ} {xs : List ℝ}
{tv pv gv fv : ℝ} (hA : HoldsMatrix a H m.store)
(hs : m.store.readBlock (L + 10) 0 (2 * (ShiftedQR.excNet ε).length) = some xs)
(hthr : m.store.get thr.1 thr.2 = some tv) (hpt : m.store.get (L + 2) 0 = some pv)
(hg : m.store.get (L + 11) 0 = some gv) (hf : m.store.get f.1 f.2 = some fv) {ns w : ℕ}
{lg : ℕ × ℕ} {LL : List (Option (List GivensEntry))}
(hlog : HoldsSlottedLog lg ns w LL [] m.store) (hj : LL.length + (ShiftedQR.excNet ε).length ≤ 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.shTrials
(Ops.Env.frame [n + 1, k, q, (ShiftedQR.excNet ε).length, w, LL.length]
[a, (L + 10, 0), thr, (L + 2, 0), (L + 5, 0), (L + 6, 0), (L + 7, 0), (L + 8, 0), (L + 9, 0),
a, (L + 11, 0), f, lg])
(Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock (L + 11) 0 1 ⊔
Ops.Store.inBlock f.1 f.2 1 ⊔
(Ops.Store.inBlock (L + 5) 0 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock (L + 6) 0 (2 * k) ⊔
Ops.Store.inBlock (L + 7) 0 (2 * k) ⊔
Ops.Store.inBlock (L + 8) 0 5 ⊔
Ops.Store.inBlock (L + 9) 0 1) ⊔
Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))
(fun m' ↦
(∃ H', HoldsMatrix a H' m'.store) ∧
(∃ x, m'.store.get (L + 11) 0 = some x) ∧
∃ x,
m'.store.get f.1 f.2 = some x ∧
∃ Ls,
Ls.length = (ShiftedQR.excNet ε).length ∧
(∀ x ∈ slotEntries w Ls, x.1 + 1 < n + 1) ∧
HoldsSlottedLog lg ns w (LL ++ Ls) [] m'.store)
mImport NLAlib.Eigensolvers.ShiftedQR.RoundedShTermination.