NLAlib.ShiftedQR.trial_writes
Library · theorem
Exact arithmetic
Every candidate trial returns its exact repeated-shift matrix and its zero/one acceptance classification. A candidate is allowed to fail the acceptance test; total execution does not require an invertible shifted matrix or a successful candidate. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.
NLAlib.ShiftedQR.trial_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.IndexOp Op]
[Ops.Has Ops.CmpTst Tst] {M : Ops.Machine ℝ} {I : Ops.Interp Op Tst ℝ} (hS : Ops.IsScalar M I)
(hE : Ops.ExactModel id M) (hL : Ops.IsIndexLit M I) (hC : Ops.IsCmp id I) {τp : Ops.Tape ℝ}
{m : Ops.Mem ℝ} {n k : ℕ} {a s t target z f : ℕ × ℕ} {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ}
{shift : ℂ} {τ γ : ℝ} (hk : k ≤ n) (hτ : 0 ≤ τ) (hH : HoldsMatrix a H m.store)
(hs : m.store.readBlock s.1 s.2 2 = some [shift.re, shift.im])
(ht : m.store.get t.1 t.2 = some (τ ^ 2))
(hTarget : m.store.get target.1 target.2 = some ((1 - γ) ^ (2 * k) * subdiagNormSqProd k H))
(hl : m.Live [a, s, t, target, z, f]) (hz : z.2 + 2 * ((n + 1) * (n + 1)) ≤ m.store.len z.1)
(hf : f.2 < m.store.len f.1)
(hzf :
Ops.Fp.Disj (Ops.Store.inBlock z.1 z.2 (2 * ((n + 1) * (n + 1)))) (Ops.Store.inBlock f.1 f.2 1))
(hsep :
(Ops.Store.inBlock z.1 z.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock f.1 f.2 1).Disj
(Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock s.1 s.2 2 ⊔
Ops.Store.inBlock t.1 t.2 1 ⊔
Ops.Store.inBlock target.1 target.2 1)) :
Ops.Writes Ops.Mode.total I τp ShiftedQR.trial (Ops.Env.frame [n + 1, k] [a, s, t, target, z, f])
(Ops.Store.inBlock z.1 z.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock f.1 f.2 1)
(fun m' ↦
m'.pos = m.pos ∧
HoldsMatrix z (multiShiftedQRStep H (List.replicate k shift)) m'.store ∧
m'.store.get f.1 f.2 = some (if IsShiftAccept τ γ k H shift then 1 else 0))
mImport NLAlib.Eigensolvers.ShiftedQR.Trial.