NLAlib.ShiftedQR.residualTerms_writes
Library · theorem
Exact arithmetic
The scalar product loop computes the exact residual of a triangular column. Its three scratch words and the accumulator are separate from the matrix and vector buffers. [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.residualTerms_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 ℝ} {n : ℕ} {a v z t : ℕ × ℕ} {R : Matrix (Fin n) (Fin n) ℂ} {w : Fin n → ℂ}
(j : Fin n) (hR : HoldsMatrix a R m.store) (hV : ShiftedQR.HoldsVector v w m.store)
(hza : z.1 ≠ a.1) (hzv : z.1 ≠ v.1) (hta : t.1 ≠ a.1) (htv : t.1 ≠ v.1) (htz : t.1 ≠ z.1)
(hacc : m.store.readBlock z.1 z.2 2 = some [(w j).re, (w j).im]) (hz : z.2 + 2 ≤ m.store.len z.1)
(ht : t.2 + 3 ≤ m.store.len t.1) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.residualTerms (Ops.Env.frame [n, ↑j] [a, v, z, t, z])
(Ops.Store.inBlock t.1 t.2 3 ⊔ Ops.Store.inBlock z.1 z.2 2)
(fun m' ↦
m'.pos = m.pos ∧
m'.store.readBlock z.1 z.2 2 =
some [(ShiftedQR.residualPrefix R w j ↑j).re, (ShiftedQR.residualPrefix R w j ↑j).im])
mImport NLAlib.Eigensolvers.ShiftedQR.RowSolveResidual.