NLAlib.ShiftedQR.regularizeDraw_writes
Library · theorem
One random perturbation on any scalar machine with an exact polar sampler on the stream s: from the radius word R at Rd and the pair r at S, NLAlib.ShiftedQR.regularizeDraw stores at S the rounded \mathrm{fl}(r + w) (NLAlib.ShiftedQR.excCentreWord) of the polar sample w of radius R read at the start position, writes only S and the scratch pair Z, and advances the position by two. Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine, on their scratch.
NLAlib.ShiftedQR.regularizeDraw_writes {O Q : Type} [Ops.Has Ops.ScalarOp O]
[Ops.Has ShiftedQR.DiskSampleOp O] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ}
(hS : Ops.IsScalar M I) {s : ℕ} (hD : ShiftedQR.IsPolarDiskSampler s I) {τ : Ops.Tape ℝ}
{m : Ops.Mem ℝ} {rd sp z : ℕ × ℕ} {r : ℂ} {R : ℝ} (hrd : m.store.get rd.1 rd.2 = some R)
(hs : m.store.readBlock sp.1 sp.2 2 = some [r.re, r.im]) (hz : z.2 + 2 ≤ m.store.len z.1)
(hzs : Ops.Fp.Disj (Ops.Store.inBlock z.1 z.2 2) (Ops.Store.inBlock sp.1 sp.2 2)) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.regularizeDraw (Ops.Env.frame [] [rd, sp, z, sp])
(Ops.Store.inBlock sp.1 sp.2 2 ⊔ Ops.Store.inBlock z.1 z.2 2)
(fun m' ↦
m'.pos = m.pos + 2 ∧
m'.store.readBlock sp.1 sp.2 2 =
some
[(ShiftedQR.excCentreWord M r (ShiftedQR.excSample τ s m.pos R)).1,
(ShiftedQR.excCentreWord M r (ShiftedQR.excSample τ s m.pos R)).2])
mImport NLAlib.Eigensolvers.ShiftedQR.RoundedRegularizeDraws.