NLAlib.coefficients_writes
Library · theorem
Exact arithmetic
Scoped coefficient computation returns the exact complex Givens coefficients and releases all scratch. Input and output views may overlap; the two output views are apart. The actual radius test covers the zero pair without a division by zero. [GolubVanLoan2013, Algorithm 5.1.3]. Shared by the trees of NLAlib.ShiftedQR.deflationRoutine, NLAlib.hessenbergReduceLast, NLAlib.ShiftedQR.scalarDecouple, NLAlib.ShiftedQR.shiftedStepRoutine, NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.
NLAlib.coefficients_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.CmpTst Tst]
{M : Ops.Machine ℝ} {I : Ops.Interp Op Tst ℝ} (hS : Ops.IsScalar M I) (hE : Ops.ExactModel id M)
(hCmp : Ops.IsCmp id I) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {a b c s : ℕ × ℕ} {u v : ℂ}
(hcs : Ops.Fp.Disj (Ops.Store.inBlock c.1 c.2 2) (Ops.Store.inBlock s.1 s.2 2))
(hu0 : m.store.get a.1 a.2 = some u.re) (hu1 : m.store.get a.1 (a.2 + 1) = some u.im)
(hv0 : m.store.get b.1 b.2 = some v.re) (hv1 : m.store.get b.1 (b.2 + 1) = some v.im)
(hc : c.2 + 2 ≤ m.store.len c.1) (hs : s.2 + 2 ≤ m.store.len s.1) :
Ops.Writes Ops.Mode.total I τ coefficients (Ops.Env.frame [] [a, b, c, s])
(Ops.Fp.blocks [c, s] [2, 2])
(fun m' ↦
m'.pos = m.pos ∧
m'.readBlocks [c, s] [2, 2] =
some
[[(givensCoeffs u v).1.re, (givensCoeffs u v).1.im],
[(givensCoeffs u v).2.re, (givensCoeffs u v).2.im]])
mImport NLAlib.Matrix.FinitePrecision.GivensCoefficients.