NLAlib.ShiftedQR.trialAccept_terminates
Library · theorem
This statement changed in the recorded rename: 2026-11-schur.
The acceptance of a trial terminates on any matrix: on a scalar machine, NLAlib.ShiftedQR.trialAccept copies any matrix at T to A and stores words in G and Fl, writing only these.
NLAlib.ShiftedQR.trialAccept_terminates {O Q : Type} [Ops.Has Ops.ScalarOp O]
[Ops.Has Ops.IndexOp O] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} (hS : Ops.IsScalar M I)
(hNat : Ops.IsExactNatLit id M 1) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {n : ℕ} {t a g f : ℕ × ℕ}
{H' : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} (hl : m.Live [t, a, g, f])
(hT : HoldsMatrix t H' m.store) (hra : a.2 + 2 * ((n + 1) * (n + 1)) ≤ m.store.len a.1)
(hrg : g.2 < m.store.len g.1) (hrf : f.2 < m.store.len f.1)
(hta :
Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 (2 * ((n + 1) * (n + 1))))
(Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1)))))
(hga :
(Ops.Store.inBlock g.1 g.2 1 ⊔ Ops.Store.inBlock f.1 f.2 1).Disj
(Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1)))))
(hgf : Ops.Fp.Disj (Ops.Store.inBlock g.1 g.2 1) (Ops.Store.inBlock f.1 f.2 1))
(hL : Ops.IsIndexLit M I) {ns w : ℕ} {lg : ℕ × ℕ} {LL : List (Option (List GivensEntry))}
{P : List GivensEntry} (hlog : HoldsSlottedLog lg ns w LL P m.store) (hj : LL.length < ns)
(hlgl : m.Live [lg]) (hlgb : ∀ b ∈ [t, a, g, f], b.1 ≠ lg.1) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.trialAccept
(Ops.Env.frame [n + 1, w, LL.length] [t, a, g, f, lg])
(Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock g.1 g.2 1 ⊔
Ops.Store.inBlock f.1 f.2 1 ⊔
Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))
(fun m' ↦
HoldsMatrix a H' m'.store ∧
(∃ x, m'.store.get g.1 g.2 = some x) ∧
∃ x, m'.store.get f.1 f.2 = some x ∧ HoldsSlottedLog lg ns w (LL ++ [some P]) [] m'.store)
mImport NLAlib.Eigensolvers.ShiftedQR.RoundedRegularizeTermination.