NLA-lib Explorer

NLAlib.ShiftedQR.substituteColumn_keepFlag_writes

Library · theorem

Exact arithmetic

A substitution column preserves a disjoint zero flag during its arithmetic update. A fragment of the exact decoupler NLAlib.ShiftedQR.scalarDecouple, which exact shifted QR (NLAlib.ShiftedQR.deflationRoutine) takes as its decoupler.

NLAlib.ShiftedQR.substituteColumn_keepFlag_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 ℝ} {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) (hpivot : R j j ≠ 0)
  (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) (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) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.substituteColumn (Ops.Env.frame [n, ↑j] [a, v, z, t, v])
    (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 0 ∧
            ShiftedQR.HoldsVector v (ShiftedQR.solvePrefix R w (↑j + 1)) m'.store)
    m

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.RowSolveChecked.