NLA-lib Explorer

NLAlib.ShiftedQR.rangePush_writes_of_isExactNatLit

Library · theorem

Push executes the bounded query and three dimension-literal calls on the actual stack. The persistent capacity and strict count bound guarantee room before any write. Only the three literals written need to be exact: the machine is otherwise arbitrary (e.g. rounded). Shared by the trees of NLAlib.ShiftedQR.deflationRoutine, NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.ShiftedQR.rangePush_writes_of_isExactNatLit {Op Tst : Type} [Ops.Has Ops.IndexOp Op]
  [Ops.Has Ops.IdxTst Tst] {M : Ops.Machine ℝ} {I : Ops.Interp Op Tst ℝ} (hL : Ops.IsIndexLit M I)
  (hQ : Ops.IsToNat id I) {B : ℕ} (hN : Ops.IsExactNatLit id M B) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ}
  {capacity lo size : ℕ} {b : ℕ × ℕ} (hlo : lo ≤ B) (hsize : size ≤ B) (hcB : capacity ≤ B)
  {rs : List (ℕ × ℕ)} (hSt : ShiftedQR.StackHolds b rs m.store) (hcap : rs.length < capacity)
  (hroom : b.2 + 1 + 2 * capacity ≤ m.store.len b.1) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.rangePush (Ops.Env.frame [capacity, lo, size] [b])
    (ShiftedQR.pushFp b rs.length)
    (fun m' ↦ m'.pos = m.pos ∧ ShiftedQR.StackHolds b (rs ++ [(lo, size)]) m'.store) m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.Worklist.