NLAlib.ShiftedQR.searchStoredWithScratch_writes
Library · theorem
Exact arithmetic
A stored finite candidate list extends the exact ordered search state. The source matrix, all candidate words and scalar test inputs are retained. Every trial uses actual scalar QR. An already accepted earlier prefix is supported without recomputing its matrix. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.
NLAlib.ShiftedQR.searchStoredWithScratch_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
[Ops.Has Ops.IndexOp Op] [Ops.Has Ops.CmpTst Tst] {M : Ops.Machine ℝ} {I : Ops.Interp Op Tst ℝ}
(hS : Ops.IsScalar M I) (hE : Ops.ExactModel id M) (hL : Ops.IsIndexLit M I) (hC : Ops.IsCmp id I)
{τp : Ops.Tape ℝ} {m : Ops.Mem ℝ} {n k : ℕ} {a ss t target s z f : ℕ × ℕ}
{H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {τ γ : ℝ} {before candidates : List ℂ} (hk : k ≤ n)
(hτ : 0 ≤ τ) (hH : HoldsMatrix a H m.store)
(hSS : HoldsMatrix ss (shiftColumn candidates) m.store) (ht : m.store.get t.1 t.2 = some (τ ^ 2))
(hTarget : m.store.get target.1 target.2 = some ((1 - γ) ^ (2 * k) * subdiagNormSqProd k H))
(hstate : ShiftedQR.CandidateHolds τ γ k H before z f m.store)
(hl : m.Live [a, ss, t, target, s, z, f]) (hs : s.2 + 2 ≤ m.store.len s.1)
(hz : z.2 + 2 * ((n + 1) * (n + 1)) ≤ m.store.len z.1) (hf : f.2 < m.store.len f.1)
(hapart : Ops.Fp.Apart [s, z, f] [2, 2 * ((n + 1) * (n + 1)), 1])
(hsep :
(Ops.Fp.blocks [s, z, f] [2, 2 * ((n + 1) * (n + 1)), 1]).Disj
(Ops.Fp.blocks [a, ss, t, target] [2 * ((n + 1) * (n + 1)), 2 * candidates.length, 1, 1])) :
Ops.Writes Ops.Mode.total I τp ShiftedQR.searchStoredWithScratch
(Ops.Env.frame [n + 1, k, candidates.length] [a, ss, t, target, s, f, z, f])
(Ops.Fp.blocks [s, z, f] [2, 2 * ((n + 1) * (n + 1)), 1])
(fun m' ↦ m'.pos = m.pos ∧ ShiftedQR.CandidateHolds τ γ k H (before ++ candidates) z f m'.store)
mImport NLAlib.Eigensolvers.ShiftedQR.Search.