NLA-lib Explorer

NLAlib.rotateRows_writes_word

Library · theorem

A scoped row rotation on any machine stores the machine row rotation (NLAlib.machineRowRotation) 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.scalarDecouple, NLAlib.ShiftedQR.shiftedStepRoutine, NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch. The run stated on a named matrix: a step in the proof of NLAlib.rotateRowsRoutine_meets, and the form in which the trees above, which hold the matrix as NLAlib.HoldsMatrix, use it.

NLAlib.rotateRows_writes_word {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] {M : Ops.Machine ℝ}
  {I : Ops.Interp Op Tst ℝ} (hS : Ops.IsScalar M I) {τ : 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 τ rotateRows (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 (machineRowRotation M ⟨k, ⋯⟩ ⟨k + 1, hk⟩ cv sv H) m'.store)
    m

Full source on GitHub

Import NLAlib.Matrix.FinitePrecision.GivensPrograms.