NLA-lib Explorer

NLAlib.ShiftedQR.subdiagProductWithScratch_writes_word

Library · theorem

The bottom product on any scalar machine: NLAlib.ShiftedQR.subdiagProductWithScratch stores the rounded product of the rounded literal 1 and the machine squared moduli of the last k \le n subdiagonal entries, for the matrix at A, three scratch words at T and the output P, pairwise disjoint; it writes only P and T and keeps the tape position. Shared by the trees of NLAlib.ShiftedQR.scalarDecouple and NLAlib.ShiftedQR.shqrSmallEigRoutine, on their scratch.

NLAlib.ShiftedQR.subdiagProductWithScratch_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 t p : ℕ × ℕ} {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} (hk : k ≤ n)
  (hH : HoldsMatrix a H m.store) (ht : t.2 + 3 ≤ m.store.len t.1) (hp : p.2 < m.store.len p.1)
  (hat :
    Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1)))) (Ops.Store.inBlock t.1 t.2 3))
  (hap :
    Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1)))) (Ops.Store.inBlock p.1 p.2 1))
  (htp : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 3) (Ops.Store.inBlock p.1 p.2 1)) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.subdiagProductWithScratch
    (Ops.Env.frame [n + 1, k] [a, t, p]) (Ops.Store.inBlock p.1 p.2 1 ⊔ Ops.Store.inBlock t.1 t.2 3)
    (fun m' ↦
      m'.pos = m.pos ∧
        m'.store.get p.1 p.2 =
          some
            (prodWords M
              (ShiftedQR.normSqFactors M (M.lit 1) fun j ↦ ShiftedQR.subdiagEntry H (n - k + j)) k))
    m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.RoundedRitz.