NLAlib.ShiftedQR.regularizeDraws_terminates
Library · theorem
The k random perturbations terminate on any words: on a scalar machine with an exact polar sampler, from any radius word at Rd and any 2k words at S, with the scratch pair Z apart from S, NLAlib.ShiftedQR.regularizeDraws writes only S and Z and leaves S stored.
NLAlib.ShiftedQR.regularizeDraws_terminates {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 ℝ} {k : ℕ} {rd z s : ℕ × ℕ} {R : ℝ} {xs : List ℝ} (hl : m.Live [rd, z, s])
(hrd : m.store.get rd.1 rd.2 = some R) (hs : m.store.readBlock s.1 s.2 (2 * k) = some xs)
(hz : z.2 + 2 ≤ m.store.len z.1)
(hzs : Ops.Fp.Disj (Ops.Store.inBlock z.1 z.2 2) (Ops.Store.inBlock s.1 s.2 (2 * k)))
(hzr : Ops.Fp.Disj (Ops.Store.inBlock z.1 z.2 2) (Ops.Store.inBlock rd.1 rd.2 1))
(hsr : Ops.Fp.Disj (Ops.Store.inBlock s.1 s.2 (2 * k)) (Ops.Store.inBlock rd.1 rd.2 1)) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.regularizeDraws (Ops.Env.frame [k] [rd, z, s])
(Ops.Store.inBlock s.1 s.2 (2 * k) ⊔ Ops.Store.inBlock z.1 z.2 2)
(fun m' ↦ ∃ ys, m'.store.readBlock s.1 s.2 (2 * k) = some ys) mImport NLAlib.Eigensolvers.ShiftedQR.RoundedRegularizeTermination.