NLA-lib Explorer

NLAlib.ShiftedQR.iterationConstantsWithScratch_writes

Library · theorem

Exact arithmetic

Actual scalar arithmetic computes the squared absolute tolerance and the contraction factor to power twice the degree. The two output words may share an arena but are disjoint. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.

NLAlib.ShiftedQR.iterationConstantsWithScratch_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  {M : Ops.Machine ℝ} {I : Ops.Interp Op Tst ℝ} (hS : Ops.IsScalar M I) (hE : Ops.ExactModel id M)
  {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {k : ℕ} {p t a b : ℕ × ℕ} {tol B theta alpha gamma : ℝ}
  (hP : m.store.readBlock p.1 p.2 5 = some [tol, B, theta, alpha, gamma]) (htp : t.1 ≠ p.1)
  (hta : t.1 ≠ a.1) (htb : t.1 ≠ b.1)
  (hPout :
    Ops.Fp.Disj (Ops.Store.inBlock p.1 p.2 5)
      (Ops.Store.inBlock a.1 a.2 1 ⊔ Ops.Store.inBlock b.1 b.2 1))
  (hab : Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 1) (Ops.Store.inBlock b.1 b.2 1))
  (ht : t.2 + 1 ≤ m.store.len t.1) (ha : a.2 + 1 ≤ m.store.len a.1)
  (hb : b.2 + 1 ≤ m.store.len b.1) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.iterationConstantsWithScratch
    (Ops.Env.frame [k] [p, t, a, b]) (Ops.Store.inBlock t.1 t.2 1 ⊔ Ops.Fp.blocks [a, b] [1, 1])
    (fun μ ↦ μ.pos = m.pos ∧ μ.readBlocks [a, b] [1, 1] = some [[tol ^ 2], [(1 - gamma) ^ (2 * k)]])
    m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.Constants.