NLAlib.ShiftedQR.stepWithDiagInPlace_terminates
Library · theorem
This statement changed in the recorded rename: 2026-11-schur.
One rounded step in place terminates on any matrix: on a scalar machine with exact comparisons and the literal 0 exact, from any matrix of order n + 1 at a and any shift pair at s, stepWithDiagInPlace writes only the matrix, the scratch matrix t, the diagonal pair dg and the log, leaves the matrix and the pair stored, and appends n entries with planes below n to the pending slot of the log. The scratch matrix is disjoint from the matrix, the shift and the pair; the matrix is disjoint from the pair; the log from all of them.
NLAlib.ShiftedQR.stepWithDiagInPlace_terminates {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
[Ops.Has Ops.CmpTst Tst] [Ops.Has Ops.IndexOp Op] {M : Ops.Machine ℝ} {I : Ops.Interp Op Tst ℝ}
(hS : Ops.IsScalar M I) (hzero : M.lit 0 = 0) (hCmp : Ops.IsCmp id I) (hL : Ops.IsIndexLit M I)
{nmax : ℕ} (hNat : Ops.IsExactNatLit id M nmax) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {n : ℕ}
{a s t dg lg : ℕ × ℕ} {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {shift : ℂ} (hn : n ≤ nmax)
{ns w : ℕ} {L : List (Option (List GivensEntry))} {P : List GivensEntry}
(hlog : HoldsSlottedLog lg ns w L P m.store) (hj : L.length < ns) (hw : P.length + n ≤ w)
(hl : m.Live [a, s, t, dg, lg]) (hA : HoldsMatrix a H m.store)
(hs : m.store.readBlock s.1 s.2 2 = some [shift.re, shift.im])
(ht : t.2 + 2 * ((n + 1) * (n + 1)) ≤ m.store.len t.1) (hd : dg.2 + 2 ≤ m.store.len dg.1)
(hat :
Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))))
(Ops.Store.inBlock t.1 t.2 (2 * ((n + 1) * (n + 1)))))
(hst :
Ops.Fp.Disj (Ops.Store.inBlock s.1 s.2 2) (Ops.Store.inBlock t.1 t.2 (2 * ((n + 1) * (n + 1)))))
(htd :
Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 (2 * ((n + 1) * (n + 1))))
(Ops.Store.inBlock dg.1 dg.2 2))
(had :
Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))))
(Ops.Store.inBlock dg.1 dg.2 2))
(hlgd :
Ops.Fp.Disj (Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))
(Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock s.1 s.2 2 ⊔
Ops.Store.inBlock t.1 t.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock dg.1 dg.2 2)) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.stepWithDiagInPlace
(Ops.Env.frame [n + 1, w, L.length, P.length] [a, s, t, a, dg, lg])
(Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock t.1 t.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock dg.1 dg.2 2 ⊔
Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))
(fun m' ↦
m'.pos = m.pos ∧
(∃ H', HoldsMatrix a H' m'.store) ∧
(∃ z, m'.store.readBlock dg.1 dg.2 2 = some [z.re, z.im]) ∧
∃ es,
es.length = n ∧
(∀ e ∈ es, e.1 + 1 < n + 1) ∧ HoldsSlottedLog lg ns w L (P ++ es) m'.store)
mImport NLAlib.Eigensolvers.ShiftedQR.StableStepTermination.