NLA-lib Explorer

NLAlib.ShiftedQR.halfNorm_writes

Library · theorem

Exact arithmetic

The scalar half-norm routine is total without any assumption excluding eigenvalue shifts. It returns the exact norm or an initialized zero placeholder and a genuine singularity witness. The selected segment lies inside both the stored block and the supplied mathematical list. [BanksGarzaVargasSrivastava2021, §4.3]. A fragment: its tree runs only inside the tree of NLAlib.ShiftedQR.findRitzNorms. Shared by the trees of NLAlib.ShiftedQR.findRitzNorms, NLAlib.ShiftedQR.halfNormWithScratch.

NLAlib.ShiftedQR.halfNorm_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 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) (hl : m.Live [b, ss, z, f])
  (hfa :
    Ops.Fp.Disj (Ops.Store.inBlock f.1 f.2 1) (Ops.Store.inBlock b.1 b.2 (2 * ((n + 1) * (n + 1)))))
  (hfs : Ops.Fp.Disj (Ops.Store.inBlock f.1 f.2 1) (Ops.Store.inBlock ss.1 ss.2 (2 * k)))
  (hzf : Ops.Fp.Disj (Ops.Store.inBlock z.1 z.2 1) (Ops.Store.inBlock f.1 f.2 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.halfNorm (Ops.Env.frame [n + 1, k, a, h, e] [b, ss, z, f])
    (Ops.Store.inBlock z.1 z.2 1 ⊔ Ops.Store.inBlock f.1 f.2 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.