NLA-lib Explorer

NLAlib.ShiftedQR.findRitzCopy_writes

Library · theorem

The actual bounded index query followed by two scalar copies returns the selected stored candidate. Its whole source shift block is spatially disjoint from the output pair. Shared by the trees of NLAlib.ShiftedQR.findRitzSearchWithScratch and NLAlib.ShiftedQR.findRoundedWithScratch.

NLAlib.ShiftedQR.findRitzCopy_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  [Ops.Has Ops.IdxTst Tst] {M : Ops.Machine ℝ} {I : Ops.Interp Op Tst ℝ} (hS : Ops.IsScalar M I)
  (hQ : Ops.IsToNat id I) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {k a : ℕ} {ss r center : ℕ × ℕ}
  {shifts : List ℂ} (hSS : ShiftedQR.HoldsShifts ss shifts m.store)
  (hA : m.store.get r.1 r.2 = some ↑a) (ha : a < k)
  (hsep : Ops.Fp.Disj (Ops.Store.inBlock ss.1 ss.2 (2 * k)) (Ops.Store.inBlock center.1 center.2 2))
  (hCenter : center.2 + 2 ≤ m.store.len center.1) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.findRitzCopy (Ops.Env.frame [k] [ss, r, center])
    (Ops.Store.inBlock center.1 center.2 2)
    (fun μ ↦
      μ.pos = m.pos ∧
        μ.store.readBlock center.1 center.2 2 = some [(shifts.getD a 0).re, (shifts.getD a 0).im])
    m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.FindRitzCopy.