NLAlib.ShiftedQR.substitutionLoop_writes
Library · theorem
Exact arithmetic
The checked substitution loop either reports a genuine zero diagonal or returns the exact triangular forward substitution with every diagonal entry nonzero. No hypothesis excludes singular triangular inputs. [GolubVanLoan2013, §3.1.2]. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.
NLAlib.ShiftedQR.substitutionLoop_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 : ℕ}
{a v z t f : ℕ × ℕ} {R : Matrix (Fin n) (Fin n) ℂ} {w : Fin n → ℂ} (hn : 0 < n)
(hR : HoldsMatrix a R m.store) (hV : ShiftedQR.HoldsVector v w m.store) (hva : v.1 ≠ a.1)
(hza : z.1 ≠ a.1) (hzv : z.1 ≠ v.1) (hta : t.1 ≠ a.1) (htv : t.1 ≠ v.1) (htz : t.1 ≠ z.1)
(hfa : f.1 ≠ a.1) (hfv : f.1 ≠ v.1) (hfz : f.1 ≠ z.1) (hft : f.1 ≠ t.1)
(hf0 : m.store.get f.1 f.2 = some 0) (hz : z.2 + 2 ≤ m.store.len z.1)
(ht : t.2 + 4 ≤ m.store.len t.1) (hf : f.2 + 1 ≤ m.store.len f.1) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.substitutionLoop (Ops.Env.frame [n] [a, v, z, t, f, v, f])
(Ops.Store.inBlock f.1 f.2 1 ⊔
(Ops.Store.inBlock t.1 t.2 4 ⊔ Ops.Store.inBlock z.1 z.2 2 ⊔
Ops.Store.inBlock v.1 v.2 (2 * n)))
(fun m' ↦
m'.pos = m.pos ∧
HoldsMatrix a R m'.store ∧
((m'.store.get f.1 f.2 = some 1 ∧ ∃ i, R i i = 0) ∨
m'.store.get f.1 f.2 = some 0 ∧
ShiftedQR.HoldsVector v (rowForwardSubst R w) m'.store ∧ ∀ (i : Fin n), R i i ≠ 0))
mImport NLAlib.Eigensolvers.ShiftedQR.RowSolveForward.