NLA-lib Explorer

NLAlib.ShiftedQR.repeatBlock_writes

Library · theorem

repeatBlock on any scalar machine stores the n words \mathbf{x}s of S repeated e times, \mathbf{x}s^e, and writes only that block. Source and target are in different buffers. Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.ShiftedQR.repeatBlock_writes {O Q : Type} [Ops.Has Ops.ScalarOp O] {M : Ops.Machine ℝ}
  {I : Ops.Interp O Q ℝ} (hS : Ops.IsScalar M I) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {n e : ℕ}
  {s t : ℕ × ℕ} {xs : List ℝ} (hl : m.Live [s, t]) (hst : s.1 ≠ t.1)
  (hs : m.store.readBlock s.1 s.2 n = some xs) (ht : t.2 + n * e ≤ m.store.len t.1) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.repeatBlock (Ops.Env.frame [n, e] [s, t])
    (Ops.Store.inBlock t.1 t.2 (n * e))
    (fun m' ↦
      m'.pos = m.pos ∧ m'.store.readBlock t.1 t.2 (n * e) = some (List.replicate e xs).flatten)
    m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.RoundedFind.