NLA-lib Explorer

NLAlib.rotateColumns_writes

Library · theorem

Exact arithmetic

A scoped column rotation computes the exact right adjoint Givens product and releases its scratch. The matrix and each coefficient view are spatially disjoint; the coefficient views may overlap. [GolubVanLoan2013, §5.1.8]. Shared by the trees of NLAlib.ShiftedQR.deflationRoutine, NLAlib.hessenbergReduceLast, NLAlib.ShiftedQR.shiftedStepRoutine, NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.rotateColumns_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 k : ℕ} {a c s : ℕ × ℕ} {H : Matrix (Fin n) (Fin n) ℂ} {cv sv : ℂ}
  (hk : k + 1 < n) (hH : HoldsMatrix a H m.store)
  (hc : m.store.readBlock c.1 c.2 2 = some [cv.re, cv.im])
  (hs : m.store.readBlock s.1 s.2 2 = some [sv.re, sv.im])
  (hca : Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 (2 * (n * n))) (Ops.Store.inBlock c.1 c.2 2))
  (hsa : Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 (2 * (n * n))) (Ops.Store.inBlock s.1 s.2 2)) :
  Ops.Writes Ops.Mode.total I τ rotateColumns (Ops.Env.frame [n, k] [a, c, s, a])
    (Ops.Store.inBlock a.1 a.2 (2 * (n * n)))
    (fun m' ↦ m'.pos = m.pos ∧ HoldsMatrix a (H * (givens ⟨k, ⋯⟩ ⟨k + 1, hk⟩ cv sv)ᴴ) m'.store) m

Full source on GitHub

Import NLAlib.Matrix.FinitePrecision.GivensPrograms.