NLAlib.ShiftedQR.solveAllocated_writes
Library · theorem
Exact arithmetic
The actual allocating exact algorithm returns a packed listing of a perturbation of the raw input, with error at most n\tau for order n+1. Scratch and output need no initialized contents; the raw spectral and numerical parameter hypotheses guarantee total execution. A fragment of NLAlib.ShiftedQR.deflationRoutine.
NLAlib.ShiftedQR.solveAllocated_writes {O Q : Type} [Ops.Has Ops.ScalarOp O] [Ops.Has Ops.IndexOp O]
[Ops.Has ShiftedQR.EigenvalueKernelOp O] [Ops.Has Ops.CmpTst Q] [Ops.Has Ops.IdxTst Q]
{Mch : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} (hS : Ops.IsScalar Mch I)
(hE : Ops.ExactModel id Mch) (hL : Ops.IsIndexLit Mch I) (hQ : Ops.IsToNat id I)
(hC : Ops.IsCmp id I) {θ : ℝ} {K : ShiftedQR.KernelRoutines θ}
(hK : ShiftedQR.IsEigenvalueKernels K I) (D : Ops.Stmt O Q)
(hD : ShiftedQR.DecouplingContract θ D I) {tape : Ops.Tape ℝ} {μ : Ops.Mem ℝ} {n m F M : ℕ}
{a p out : ℕ × ℕ} {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {τ B α γ δ g : ℝ}
(hl : μ.Live [a, p, out]) (hr : μ.Room [a, p, out] [2 * ((n + 1) * (n + 1)), 5, 2 * (n + 1)])
(ha : Ops.Fp.Apart [a, p, out] [2 * ((n + 1) * (n + 1)), 5, 2 * (n + 1)])
(hHess : IsUpperHessenberg H) (hA : HoldsMatrix a H μ.store)
(hGlobal : ShiftedQRHyps H B θ α γ δ g m F) (hτ : τ = δ * frobNorm H)
(hM : M = ⌈√2 / exceptionalSpacing (2 ^ m) B θ α ((1 - γ) ^ 2)⌉₊)
(hParams : μ.store.readBlock p.1 p.2 5 = some [τ, B, θ, α, γ]) :
Ops.Writes Ops.Mode.total I tape (ShiftedQR.solveAllocated D)
(Ops.Env.frame [n + 1, m, 2 ^ m, F, M] [a, p, out])
(Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock out.1 out.2 (2 * (n + 1)))
(fun μ' ↦
μ'.pos = μ.pos ∧
∃ roots E,
HoldsMatrix out (of fun i x ↦ roots i) μ'.store ∧
specNorm E ≤ ↑n * τ ∧ (H + E).charpoly.roots = ↑(List.ofFn roots))
μImport NLAlib.Eigensolvers.ShiftedQR.WorklistAllocation.