NLA-lib Explorer

NLAlib.ShiftedQR.checkedSubstituteColumn_clear

Library · theorem

Exact arithmetic

A previously clear flag either reports an actual zero diagonal or completes the next coordinate using its nonzero pivot. No assumption rules out singular matrices. [GolubVanLoan2013, §3.1.2].

NLAlib.ShiftedQR.checkedSubstituteColumn_clear {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 → ℂ} (j : Fin n)
  (hR : HoldsMatrix a R m.store)
  (hV : ShiftedQR.HoldsVector v (ShiftedQR.solvePrefix R w ↑j) 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.checkedSubstituteColumn
    (Ops.Env.frame [n, ↑j] [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 * ↑j) 2))
    (fun m' ↦
      m'.pos = m.pos ∧
        HoldsMatrix a R m'.store ∧
          (m'.store.get f.1 f.2 = some 1 ∧ R j j = 0 ∨
            m'.store.get f.1 f.2 = some 0 ∧
              R j j ≠ 0 ∧ ShiftedQR.HoldsVector v (ShiftedQR.solvePrefix R w (↑j + 1)) m'.store))
    m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.RowSolveChecked.