NLAlib.ShiftedQR.prepareIteration_writes
Library · theorem
Exact arithmetic
Concrete preparation returns the local routine's actual Ritz column and four scalar registers: subdiagonal product, contraction target, exceptional radius and zero flag. All inputs are protected from the disjoint output views. The degree is the positive power of two within the trailing block, and the conditioning bound is nonnegative. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.
NLAlib.ShiftedQR.prepareIteration_writes {O Q : Type} [Ops.Has Ops.ScalarOp O]
[Ops.Has Ops.IndexOp O] [Ops.Has ShiftedQR.EigenvalueKernelOp O] {M : Ops.Machine ℝ}
{I : Ops.Interp O Q ℝ} {eta : ℝ} {K : ShiftedQR.KernelRoutines eta} (hS : Ops.IsScalar M I)
(hE : Ops.ExactModel id M) (hL : Ops.IsIndexLit M I) (hK : ShiftedQR.IsEigenvalueKernels K I)
{tape : Ops.Tape ℝ} {μ : Ops.Mem ℝ} {n m k : ℕ} {w p c ss r : ℕ × ℕ}
{H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {tol B theta alpha gamma : ℝ} (hkm : k = 2 ^ m)
(hkn : k ≤ n) (hB : 0 ≤ B) (hl : μ.Live [w, p, c, ss, r]) (hH : HoldsMatrix w H μ.store)
(hP : μ.store.readBlock p.1 p.2 5 = some [tol, B, theta, alpha, gamma])
(hC : μ.store.readBlock c.1 c.2 2 = some [tol ^ 2, (1 - gamma) ^ (2 * k)])
(hSS : ss.2 + 2 * k ≤ μ.store.len ss.1) (hR : r.2 + 4 ≤ μ.store.len r.1)
(hApart : Ops.Fp.Apart [ss, r] [2 * k, 4])
(hsep :
(Ops.Store.inBlock ss.1 ss.2 (2 * k) ⊔ Ops.Store.inBlock r.1 r.2 4).Disj
(Ops.Fp.blocks [w, p, c] [2 * ((n + 1) * (n + 1)), 5, 2])) :
Ops.Writes Ops.Mode.total I tape ShiftedQR.prepareIteration
(Ops.Env.frame [n + 1, m, k] [w, p, c, ss, r])
(Ops.Store.inBlock ss.1 ss.2 (2 * k) ⊔ Ops.Store.inBlock r.1 r.2 4)
(fun μ' ↦
μ'.pos = μ.pos ∧
HoldsMatrix ss (shiftColumn (K.ritz (n + 1) k H)) μ'.store ∧
μ'.store.readBlock r.1 r.2 4 =
some
[subdiagNormSqProd k H, (1 - gamma) ^ (2 * k) * subdiagNormSqProd k H,
exceptionalRadius k B theta alpha (hessenbergPotential k H), 0])
μImport NLAlib.Eigensolvers.ShiftedQR.PrepareIteration.