NLA-lib Explorer

NLAlib.ShiftedQR.findRitzCopy_writes_of_readBlock

Library · theorem

The final copy of the selected shift, from a block of pairs. Shared by the trees of NLAlib.ShiftedQR.scalarDecouple and NLAlib.ShiftedQR.shqrSmallEigRoutine, on their scratch.

NLAlib.ShiftedQR.findRitzCopy_writes_of_readBlock {O Q : Type} [Ops.Has Ops.ScalarOp O]
  [Ops.Has Ops.IdxTst Q] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} (hS : Ops.IsScalar M I)
  (hQ : Ops.IsToNat id I) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {k a : ℕ} {ss r center : ℕ × ℕ}
  {shifts : List ℂ}
  (hSS :
    m.store.readBlock ss.1 ss.2 (2 * shifts.length) =
      some (List.flatMap (fun z ↦ [z.re, z.im]) shifts))
  (hk : shifts.length = k) (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.RoundedFind.