NLA-lib Explorer

NLAlib.ShiftedQR.clearBelowSubdiagonal_writes_word

Library · theorem

The deletion below the subdiagonal on any machine: NLAlib.ShiftedQR.clearBelowSubdiagonal replaces every entry (i, j) with j + 1 < i by the pair of the literal 0 of the machine and keeps every other entry; the tape position is unchanged. With an exact zero literal this is NLAlib.ShiftedQR.clearBelowSubdiagonal_writes. Shared by the trees of NLAlib.hessenbergReduceLast, NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.ShiftedQR.clearBelowSubdiagonal_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 : ℕ} {a : ℕ × ℕ} {A : Matrix (Fin n) (Fin n) ℂ} (hl : m.Live [a])
  (hA : HoldsMatrix a A m.store) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.clearBelowSubdiagonal (Ops.Env.frame [n] [a])
    (Ops.Store.inBlock a.1 a.2 (2 * (n * n)))
    (fun m' ↦
      m'.pos = m.pos ∧
        HoldsMatrix a (of fun i j ↦ if ↑j + 1 < ↑i then { re := M.lit 0, im := M.lit 0 } else A i j)
          m'.store)
    m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.Hessenberg.