NLAlib.ShiftedQR.findRounded_terminates
Library · theorem
Find with a terminating routine terminates on any matrix and any shifts: on a scalar machine whose natural literals up to k = 2^m are exact, with exact comparisons and index conversion, a comparison routine Tau meeting NLAlib.ShiftedQR.TerminatingHalfTau, any matrix at A and any 2k shift words at SS, NLAlib.ShiftedQR.findRounded writes only the pair Center and leaves it stored. The shifts and Center are disjoint views.
NLAlib.ShiftedQR.findRounded_terminates {O Q : Type} [Ops.Has Ops.ScalarOp O]
[Ops.Has Ops.IndexOp O] [Ops.Has Ops.CmpTst Q] [Ops.Has Ops.IdxTst Q] {M : Ops.Machine ℝ}
{I : Ops.Interp O Q ℝ} {Tau : Ops.Stmt O Q} (hS : Ops.IsScalar M I) (hL : Ops.IsIndexLit M I)
(hCmp : Ops.IsCmp id I) (hQ : Ops.IsToNat id I) {n m k : ℕ}
(hTau : ShiftedQR.TerminatingHalfTau n k Tau I) (hNat : Ops.IsExactNatLit id M k) {τ : Ops.Tape ℝ}
{μ : Ops.Mem ℝ} {b ss z : ℕ × ℕ} {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {xs : List ℝ}
(hkm : k = 2 ^ m) (hB : HoldsMatrix b H μ.store)
(hSS : μ.store.readBlock ss.1 ss.2 (2 * k) = some xs) (hl : μ.Live [b, ss, z])
(hsep : Ops.Fp.Disj (Ops.Store.inBlock ss.1 ss.2 (2 * k)) (Ops.Store.inBlock z.1 z.2 2))
(hz : z.2 + 2 ≤ μ.store.len z.1) :
Ops.Writes Ops.Mode.total I τ (ShiftedQR.findRounded Tau) (Ops.Env.frame [n + 1, m, k] [b, ss, z])
(Ops.Store.inBlock z.1 z.2 2) (fun μ' ↦ ∃ c, μ'.store.readBlock z.1 z.2 2 = some [c.re, c.im]) μImport NLAlib.Eigensolvers.ShiftedQR.RoundedFindTermination.