NLA-lib Explorer

NLAlib.ShiftedQR.solveShiftedWorking_writes

Library · theorem

Exact arithmetic

The working-copy path computes the shifted inverse row or reports actual singularity. [GolubVanLoan2013, §5.2.5]. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.

NLAlib.ShiftedQR.solveShiftedWorking_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 : ℕ}
  {r s v f : ℕ × ℕ} {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {shift : ℂ} {w : Fin (n + 1) → ℂ}
  (hH : IsUpperHessenberg H) (hR : HoldsMatrix r H m.store)
  (hs : m.store.readBlock s.1 s.2 2 = some [shift.re, shift.im])
  (hV : ShiftedQR.HoldsVector v w m.store) (hrv : r.1 ≠ v.1) (hfv : f.1 ≠ v.1)
  (hrs :
    Ops.Fp.Disj (Ops.Store.inBlock r.1 r.2 (2 * ((n + 1) * (n + 1)))) (Ops.Store.inBlock s.1 s.2 2))
  (hf : f.2 + 1 ≤ m.store.len f.1) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.solveShiftedWorking
    (Ops.Env.frame [n + 1] [r, s, v, v, f])
    (Ops.Store.inBlock r.1 r.2 (2 * ((n + 1) * (n + 1))) ⊔
      (Ops.Store.inBlock v.1 v.2 (2 * (n + 1)) ⊔ Ops.Store.inBlock f.1 f.2 1))
    (fun m' ↦ m'.pos = m.pos ∧ ShiftedQR.RowSolveResult v f (H - shift • 1) w m'.store) m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.RowSolveShifted.