NLAlib.ShiftedQR.regularizeDecide_terminates
Library · theorem
This statement changed in the recorded rename: 2026-11-schur.
The decision of Regularize terminates on any matrix: with the scratch of NLAlib.ShiftedQR.regularize at L + 2, …, L + 6, the views NLAlib.ShiftedQR.RegularizeViews, the context NLAlib.ShiftedQR.RegularizeCtx (any matrix and any words) and any 2k shift words at S, k \le n, NLAlib.ShiftedQR.regularizeDecide leaves the matrix and the flag stored.
NLAlib.ShiftedQR.regularizeDecide_terminates {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) (hL : Ops.IsIndexLit M I) {n : ℕ} (hNat : Ops.IsExactNatLit id M (n + 1))
(hC : Ops.IsCmp id I) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {k L : ℕ} (hk : k ≤ n)
{a rd c thr s f : ℕ × ℕ} (hv : ShiftedQR.RegularizeViews L n k a rd c thr s f)
{H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {R cw tv : ℝ}
(hctx : ShiftedQR.RegularizeCtx L k H R cw tv a rd c thr s f m) {xs : List ℝ}
(hs : m.store.readBlock s.1 s.2 (2 * k) = some xs) {ns w : ℕ} {lg : ℕ × ℕ}
{LL : List (Option (List GivensEntry))} (hlog : HoldsSlottedLog lg ns w LL [] m.store)
(hj : LL.length + k ≤ ns) (hw : k * n ≤ w) (hlgl : m.Live [lg]) (hlgL : lg.1 < L)
(hlgv : ∀ b ∈ [a, rd, c, thr, s, f], b.1 ≠ lg.1) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.regularizeDecide
(Ops.Env.frame [n + 1, k, w, LL.length]
[a, s, c, thr, (L + 3, 0), (L + 4, 0), (L + 5, 0), (L + 6, 0), a, (L + 2, 0), f, lg])
(Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock (L + 2) 0 1 ⊔
Ops.Store.inBlock f.1 f.2 1 ⊔
(Ops.Store.inBlock (L + 3) 0 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock (L + 4) 0 (2 * k) ⊔
Ops.Store.inBlock (L + 5) 0 (2 * k) ⊔
Ops.Store.inBlock (L + 6) 0 5) ⊔
Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))
(fun m' ↦
(∃ H', HoldsMatrix a H' m'.store) ∧
∃ x,
m'.store.get f.1 f.2 = some x ∧
∃ Ls,
Ls.length = k ∧
(∀ x ∈ slotEntries w Ls, x.1 + 1 < n + 1) ∧
HoldsSlottedLog lg ns w (LL ++ Ls) [] m'.store)
mImport NLAlib.Eigensolvers.ShiftedQR.RoundedRegularizeTermination.