NLA-lib Explorer

NLAlib.ShiftedQR.halfNormWithScratch_writes

Library · theorem

Exact arithmetic

The caller-scratch half norm initializes every needed vector component and output word. [BanksGarzaVargasSrivastava2021, §4.3]. Shared by the trees of NLAlib.ShiftedQR.findRitzNorms and NLAlib.ShiftedQR.halfNorm.

NLAlib.ShiftedQR.halfNormWithScratch_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 a h e : ℕ} {b ss v t z f : ℕ × ℕ} {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ}
  {shifts : List ℂ} (hH : IsUpperHessenberg H) (hB : HoldsMatrix b H m.store)
  (hSS : ShiftedQR.HoldsShifts ss shifts m.store) (hak : a + h ≤ k) (hal : a + h ≤ shifts.length)
  (hSep : ShiftedQR.HalfSolveSeparate (n + 1) k b ss v f) (hl : m.Live [b, ss, v, t, z, f])
  (htv : t.1 ≠ v.1) (htf : t.1 ≠ f.1)
  (hzf : Ops.Fp.Disj (Ops.Store.inBlock z.1 z.2 1) (Ops.Store.inBlock f.1 f.2 1))
  (hv : v.2 + 2 * (n + 1) ≤ m.store.len v.1) (ht : t.2 + 3 ≤ m.store.len t.1)
  (hz : z.2 + 1 ≤ m.store.len z.1) (hf : f.2 + 1 ≤ m.store.len f.1) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.halfNormWithScratch
    (Ops.Env.frame [n + 1, k, a, h, e] [b, ss, v, t, z, f])
    (Ops.Fp.blocks [v, t, z, f] [2 * (n + 1), 3, 1, 1])
    (fun m' ↦
      m'.pos = m.pos ∧ ShiftedQR.HalfNormResult z f H (ShiftedQR.halfSegment shifts a h) e m'.store)
    m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.HalfNorm.