NLAlib.ShiftedQR.gridPointWithScratch_writes
Library · theorem
Exact arithmetic
Five actual dimension literals and ten scalar operations compute the requested grid point. The denominator is positive; both coordinate numerators and the radius are arbitrary. The output is disjoint from the center, and the scratch buffer is fresh. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.
NLAlib.ShiftedQR.gridPointWithScratch_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 t s : ℕ × ℕ} {center : ℂ} {radius : ℝ} {D i j : ℕ} (hD : 1 ≤ D) (htc : t.1 ≠ c.1)
(htr : t.1 ≠ r.1) (hts : t.1 ≠ s.1)
(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) (ht : t.2 + 9 ≤ m.store.len t.1)
(hs : s.2 + 2 ≤ m.store.len s.1) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.gridPointWithScratch
(Ops.Env.frame [D, i, j] [c, r, t, s])
(Ops.Store.inBlock t.1 t.2 9 ⊔ 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])
mImport NLAlib.Eigensolvers.ShiftedQR.Grid.