NLA-lib Explorer

NLAlib.ShiftedQR.shiftDiagonal_writes

Library · theorem

Exact arithmetic

The scalar diagonal traversal subtracts the shift from the actual stored matrix and preserves every word outside that matrix. The supplied shift occupies a disjoint word block. Shared by the trees of NLAlib.ShiftedQR.scalarDecouple, NLAlib.ShiftedQR.shiftedStepRoutine, NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.ShiftedQR.shiftDiagonal_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] {M : Ops.Machine ℝ}
  {I : Ops.Interp Op Tst ℝ} (hS : Ops.IsScalar M I) (hE : Ops.ExactModel id M) {τ : Ops.Tape ℝ}
  {m : Ops.Mem ℝ} {n : ℕ} {b a : ℕ × ℕ} {H : Matrix (Fin n) (Fin n) ℂ} {s : ℂ}
  (hl : m.Live [b, a, b]) (hH : HoldsMatrix b H m.store)
  (hs : m.store.readBlock a.1 a.2 2 = some [s.re, s.im])
  (hd : Ops.Fp.Disj (Ops.Store.inBlock b.1 b.2 (2 * (n * n))) (Ops.Store.inBlock a.1 a.2 2)) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.shiftDiagonal (Ops.Env.frame [n] [b, a, b])
    (Ops.Store.inBlock b.1 b.2 (2 * (n * n)))
    (fun m' ↦ m'.pos = m.pos ∧ HoldsMatrix b (H - s • 1) m'.store) m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.Shift.