NLAlib.ShiftedQR.finishRowSolve_writes
Library · theorem
Exact arithmetic
The actual final flag branch returns either a genuine singularity certificate or the row multiplied by the original matrix inverse. No determinant premise is assumed. [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.finishRowSolve_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 : ℕ}
{v cf t f : ℕ × ℕ} {D : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {w : Fin (n + 1) → ℂ}
(hD : IsUpperHessenberg D) (hCf : ShiftedQR.HoldsCoefficients cf D n m.store)
(hcase :
(m.store.get f.1 f.2 = some 1 ∧ ∃ i, givensHessenbergR D i i = 0) ∨
m.store.get f.1 f.2 = some 0 ∧
ShiftedQR.HoldsVector v (rowForwardSubst (givensHessenbergR D) w) m.store ∧
∀ (i : Fin (n + 1)), givensHessenbergR D i i ≠ 0)
(hvc : v.1 ≠ cf.1) (htv : t.1 ≠ v.1) (htc : t.1 ≠ cf.1) (hfv : f.1 ≠ v.1) (hft : f.1 ≠ t.1)
(hc : cf.2 + 4 * (n + 1) ≤ m.store.len cf.1) (ht : t.2 + 10 ≤ m.store.len t.1) :
Ops.Writes Ops.Mode.total I τ ShiftedQR.finishRowSolve (Ops.Env.frame [n + 1] [v, cf, t, f, v, f])
(Ops.Store.inBlock v.1 v.2 (2 * (n + 1)) ⊔ Ops.Store.inBlock t.1 t.2 10)
(fun m' ↦ m'.pos = m.pos ∧ ShiftedQR.RowSolveResult v f D w m'.store) mImport NLAlib.Eigensolvers.ShiftedQR.RowSolveFinish.