NLA-lib Explorer

NLAlib.CGS2.round_writes

Library · theorem

A round keeps the invariant. From a memory with the layout of the rounds, the basis qs, the words read at entry in column c of the block and the invariant before round c, the round writes only its three columns and the scratch, keeps the position, and establishes the invariant before round c + 1. Shared by the trees of NLAlib.reduceLastStep, NLAlib.ShiftedQR.sweep, NLAlib.ShiftedQR.roundedDecoupleExit and 44 more.

NLAlib.CGS2.round_writes {K Op Tst : Type} [Inhabited K] [Ops.Has Ops.ScalarOp Op]
  [Ops.Has Ops.Blas1Op Op] [Ops.Has Ops.CmpTst Tst] {M : Ops.Machine K} {dec : K → ℝ} {ed : ℕ → ℝ}
  {ea : ℝ} {N : ℕ → (ℕ → K) → K → Prop} {S : ℕ → K → (ℕ → K) → (ℕ → K) → Prop} {ok : ℕ → Prop}
  {I : Ops.Interp Op Tst K} (ops : CGS2.ColOps M dec ed ea N S ok I) {τ' : Ops.Tape K} {τ : ℚ}
  {n k b c : ℕ} {Q W C : ℕ × ℕ} {hb tb : ℕ} {m : Ops.Mem K} {qs ws : List K}
  (L : CGS2.ColMem n k b Q W C hb tb m) (hc : c < b) (hok : ok n)
  (hqs : m.store.readBlock Q.1 Q.2 (k * n) = some qs)
  (hw : m.store.readBlock W.1 (W.2 + c * n) n = some (List.take n (List.drop (c * n) ws)))
  (hinv : CGS2.ColsStored M dec (ed n) ea (N n) (S n) τ n k b Q W C qs ws c m.store) :
  Ops.Writes Ops.Mode.total I τ' (CGS2.cgs2ExtendColumn τ) (CGS2.colEnv n k b c Q W C hb tb)
    (CGS2.colFp n k b c Q W C hb tb)
    (fun m' ↦
      m'.pos = m.pos ∧
        CGS2.ColsStored M dec (ed n) ea (N n) (S n) τ n k b Q W C qs ws (c + 1) m'.store)
    m

Full source on GitHub

Import NLAlib.Krylov.Orthogonalization.CGS2.ExtendLoop.