NLA-lib Explorer

NLAlib.ShiftedQR.round_writes

Library · theorem

Exact arithmetic

One exact round computes the mathematical Givens step from the actual working matrix, rotates that matrix on the left, and conjugates the output by the same rotation. 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 {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 ℝ} {n k : ℕ} {w z cf : ℕ × ℕ}
  {W Z : Matrix (Fin n) (Fin n) ℂ} (hk : k + 1 < n) (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 (givensHessenbergStep W k * W) m'.store ∧
          HoldsMatrix z (givensHessenbergStep W k * Z * (givensHessenbergStep W k)ᴴ) m'.store)
    m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.Round.