NLA-lib Explorer

NLAlib.ShiftedQR.gridPoint_writes

Library · theorem

Exact arithmetic

The scoped grid-point program computes the same exact point and releases all nine scratch words. Its only surviving writes are the two output components. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.

NLAlib.ShiftedQR.gridPoint_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.IndexOp Op]
  {M : Ops.Machine ℝ} {I : Ops.Interp Op Tst ℝ} (hS : Ops.IsScalar M I) (hE : Ops.ExactModel id M)
  (hL : Ops.IsIndexLit M I) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {c r s : ℕ × ℕ} {center : ℂ}
  {radius : ℝ} {D i j : ℕ} (hD : 1 ≤ D)
  (hcs : Ops.Fp.Disj (Ops.Store.inBlock c.1 c.2 2) (Ops.Store.inBlock s.1 s.2 2))
  (hc0 : m.store.get c.1 c.2 = some center.re) (hc1 : m.store.get c.1 (c.2 + 1) = some center.im)
  (hr : m.store.get r.1 r.2 = some radius) (hs : s.2 + 2 ≤ m.store.len s.1) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.gridPoint (Ops.Env.frame [D, i, j] [c, r, s])
    (Ops.Store.inBlock s.1 s.2 2)
    (fun μ ↦
      μ.pos = m.pos ∧
        μ.store.readBlock s.1 s.2 2 =
          some
            [(ShiftedQR.gridPointValue center radius D i j).re,
              (ShiftedQR.gridPointValue center radius D i j).im])
    m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.Grid.