NLAlib.ShiftedQR.subtractProductWithScratch_writes
Library · theorem
Exact arithmetic
The actual scalar program subtracts a complex product from the accumulator. Inputs and accumulator may overlap because both product components are captured before the output writes. The scratch buffer is separate. [GolubVanLoan2013, §3.1.2]. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.
NLAlib.ShiftedQR.subtractProductWithScratch_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 ℝ} {x y t z : ℕ × ℕ} {xv yv zv : ℂ} (htx : t.1 ≠ x.1)
(hty : t.1 ≠ y.1) (htz : t.1 ≠ z.1) (hx0 : m.store.get x.1 x.2 = some xv.re)
(hx1 : m.store.get x.1 (x.2 + 1) = some xv.im) (hy0 : m.store.get y.1 y.2 = some yv.re)
(hy1 : m.store.get y.1 (y.2 + 1) = some yv.im) (hz0 : m.store.get z.1 z.2 = some zv.re)
(hz1 : m.store.get z.1 (z.2 + 1) = some zv.im) (ht : t.2 + 3 ≤ m.store.len t.1)
(hz : z.2 + 2 ≤ m.store.len z.1) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.subtractProductWithScratch
(Ops.Env.frame [] [x, y, t, z, z]) (Ops.Fp.blocks [t, z] [3, 2])
(fun m' ↦
m'.pos = m.pos ∧ m'.store.readBlock z.1 z.2 2 = some [(zv - xv * yv).re, (zv - xv * yv).im])
mImport NLAlib.Eigensolvers.ShiftedQR.RowSolveUpdate.