NLAlib.ShiftedQR.round_writes_word
Library · theorem
One round on any machine computes the coefficient words (cv, sv) of the actual working column (NLAlib.roundedGivensCoeffs), rotates the rows k, k + 1 of the working matrix and conjugates the output by them (NLAlib.machineRowRotation, NLAlib.machineColRotation). The two matrices and four coefficient words are separated views; output aliases are exact.
Shared by the trees of NLAlib.ShiftedQR.deflationRoutine, NLAlib.ShiftedQR.shiftedStepRoutine, NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.
NLAlib.ShiftedQR.round_writes_word {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)
(hCmp : Ops.IsCmp id I) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {n k : ℕ} {w z cf : ℕ × ℕ}
{W Z : Matrix (Fin n) (Fin n) ℂ} {cv sv : ℂ} (hk : k + 1 < n)
(hcs : roundedGivensCoeffs M (W ⟨k, ⋯⟩ ⟨k, ⋯⟩) (W ⟨k + 1, hk⟩ ⟨k, ⋯⟩) = (cv, sv))
(hW : HoldsMatrix w W m.store) (hZ : HoldsMatrix z Z m.store) (hc : cf.2 + 4 ≤ m.store.len cf.1)
(hwz :
Ops.Fp.Disj (Ops.Store.inBlock w.1 w.2 (2 * (n * n))) (Ops.Store.inBlock z.1 z.2 (2 * (n * n))))
(hwc : Ops.Fp.Disj (Ops.Store.inBlock w.1 w.2 (2 * (n * n))) (Ops.Store.inBlock cf.1 cf.2 4))
(hzc : Ops.Fp.Disj (Ops.Store.inBlock z.1 z.2 (2 * (n * n))) (Ops.Store.inBlock cf.1 cf.2 4)) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.round (Ops.Env.frame [n, k] [w, z, cf, w, z])
(Ops.Store.inBlock w.1 w.2 (2 * (n * n)) ⊔ Ops.Store.inBlock z.1 z.2 (2 * (n * n)) ⊔
Ops.Store.inBlock cf.1 cf.2 4)
(fun m' ↦
m'.pos = m.pos ∧
HoldsMatrix w (machineRowRotation M ⟨k, ⋯⟩ ⟨k + 1, hk⟩ cv sv W) m'.store ∧
HoldsMatrix z
(machineColRotation M ⟨k, ⋯⟩ ⟨k + 1, hk⟩ cv sv
(machineRowRotation M ⟨k, ⋯⟩ ⟨k + 1, hk⟩ cv sv Z))
m'.store)
mImport NLAlib.Eigensolvers.ShiftedQR.Round.