NLAlib.ShiftedQR.findRounded_writes
Library · theorem
Find in floating point is promising ([BanksGarzaVargasSrivastava2022, Lemma 5.1], corrected: \kappa(\mathbf{V}) \le B is added to its requirements, and its \log is \log_2): let \mathbf{H}\mathbf{V} = \mathbf{V}\mathbf{D} with \kappa(\mathbf{V}) \le B, the k = 2^m shifts stored as pairs at SS, none an eigenvalue, and the comparison routine Tau compute \|\mathbf{e}_n^{\mathsf{T}}p_h(\mathbf{H})^{-e}\|^{-1} within the relative error 0.0011 for every half visited (NLAlib.ShiftedQR.IsHalfTau, for instance e rounded steps and the rounded product of the moduli of their last diagonal entries), on a scalar machine whose natural literals up to k are exact, with exact comparisons and index conversion. Then NLAlib.ShiftedQR.findRounded writes only the pair Center, keeps the tape position, and stores there a (1.01B)^{4m/2^m}-promising shift. The shifts and Center are disjoint views. Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine, on their scratch.
NLAlib.ShiftedQR.findRounded_writes {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 : ℕ} {B : ℝ} {H V : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ}
{e : Fin (n + 1) → ℂ} {shifts : List ℂ} (hV : IsUnit V) (hHV : H * V = V * diagonal e)
(hκ : pseudoConditionNumber V ≤ B) (hne : ∀ r ∈ shifts, ∀ (i : Fin (n + 1)), e i ≠ r)
(hTau : ShiftedQR.IsHalfTau H shifts Tau I) (hNat : Ops.IsExactNatLit id M k) {τ : Ops.Tape ℝ}
{μ : Ops.Mem ℝ} {b ss z : ℕ × ℕ} (hkm : k = 2 ^ m) (hk : shifts.length = k)
(hB : HoldsMatrix b H μ.store)
(hSS :
μ.store.readBlock ss.1 ss.2 (2 * shifts.length) =
some (List.flatMap (fun z ↦ [z.re, z.im]) shifts))
(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 μ' ↦
μ'.pos = μ.pos ∧
∃ c,
μ'.store.readBlock z.1 z.2 2 = some [c.re, c.im] ∧
IsPromisingRitzValue ((1.01 * B) ^ (4 * ↑m / 2 ^ m)) V e shifts c)
μImport NLAlib.Eigensolvers.ShiftedQR.RoundedFind.