NLA-lib Explorer

NLAlib.ShiftedQR.squareRoots_writes_word

Library · theorem

The in-place square-root loop on any scalar machine stores m machine square roots (NLAlib.sqrtIter) of its word. Shared by the trees of NLAlib.ShiftedQR.scalarDecouple, NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.ShiftedQR.squareRoots_writes_word {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  {M : Ops.Machine ℝ} {I : Ops.Interp Op Tst ℝ} (hS : Ops.IsScalar M I) {τ : Ops.Tape ℝ}
  {m : Ops.Mem ℝ} {k : ℕ} {x : ℕ × ℕ} {v : ℝ} (hx : m.store.get x.1 x.2 = some v) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.squareRoots (Ops.Env.frame [k] [x, x])
    (Ops.Store.inBlock x.1 x.2 1)
    (fun m' ↦ m'.pos = m.pos ∧ m'.store.get x.1 x.2 = some (sqrtIter M k v)) m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.RoundedRitz.