NLA-lib Explorer

NLAlib.ShiftedQR.repeatedStepWithScratch_writes

Library · theorem

Exact arithmetic

Repeating a supplied shift composes the actual in-place step exactly k times. No convergence, pivot, or successful-execution hypothesis is used. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.

NLAlib.ShiftedQR.repeatedStepWithScratch_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 s t : ℕ × ℕ} {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {shift : ℂ} (hl : m.Live [a, s, t, a])
  (hH : HoldsMatrix a H m.store) (hs : m.store.readBlock s.1 s.2 2 = some [shift.re, shift.im])
  (ht : t.2 + 2 * ((n + 1) * (n + 1)) ≤ m.store.len t.1)
  (hat :
    Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))))
      (Ops.Store.inBlock t.1 t.2 (2 * ((n + 1) * (n + 1)))))
  (hsa :
    Ops.Fp.Disj (Ops.Store.inBlock s.1 s.2 2) (Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1)))))
  (hst :
    Ops.Fp.Disj (Ops.Store.inBlock s.1 s.2 2)
      (Ops.Store.inBlock t.1 t.2 (2 * ((n + 1) * (n + 1))))) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.repeatedStepWithScratch
    (Ops.Env.frame [n + 1, k] [a, s, t, a])
    (Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔
      Ops.Store.inBlock t.1 t.2 (2 * ((n + 1) * (n + 1))))
    (fun μ ↦ μ.pos = m.pos ∧ HoldsMatrix a (multiShiftedQRStep H (List.replicate k shift)) μ.store)
    m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.MultiStep.