NLA-lib Explorer

NLAlib.Ops.Examples.cgsCol_writes

Library · theorem

Relative-error BLAS

Column j of cgs as one block specification, from facts at its first memory: the coefficients (a relational fill of column j of R), the work vector, the updates (a loop), the norm, the scaling and the copy into column j of Q.

NLAlib.Ops.Examples.cgsCol_writes {K Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  [Ops.Has Ops.Blas1Op Op] [Inhabited K] {M : Ops.Machine K} {dec : K → ℝ} {ε : Ops.Blas1Err}
  {ok : ℕ → Prop} {J : Ops.Interp Op Tst K} (hS : Ops.IsScalar M J) (hJ : Ops.IsBlas1 dec ε ok J)
  (hneg : ∀ (x : K), dec (M.neg x) = -dec x) {τ : Ops.Tape K} {n p j L : ℕ} {A Q R : ℕ × ℕ}
  {m₁ : Ops.Mem K} {qs a : List K} (hok : ok n) (_hAQ : A.1 ≠ Q.1) (hAR : A.1 ≠ R.1)
  (hQR : Q.1 ≠ R.1) (hL : A.1 < L ∧ R.1 < L ∧ Q.1 < L) (hlen : List.length m₁.store = L + 2)
  (hqs : m₁.store.readBlock Q.1 Q.2 (j * n) = some qs)
  (ha : m₁.store.readBlock A.1 (A.2 + j * n) n = some a) (hRz : R.2 + j * p + j < m₁.store.len R.1)
  (hQz : Q.2 + j * n + n ≤ m₁.store.len Q.1) (ht : m₁.store.len L = 1)
  (hv : m₁.store.len (L + 1) = n) :
  Ops.Writes Ops.Mode.total J τ Ops.Examples.cgsCol
    ((((Ops.Env.frame [n, p] ([A, R] ++ [Q, R])).pushBuf L).pushBuf (L + 1)).pushIdx j)
    (Ops.Store.inBlock R.1 (R.2 + j * p) (j + 1) ⊔ Ops.Store.inBlock Q.1 (Q.2 + j * n) n ⊔
        Ops.Store.inBuf L ⊔
      Ops.Store.inBuf (L + 1))
    (fun m' ↦
      m'.pos = m₁.pos ∧
        ∃ rp ρ qj,
          m'.store.readBlock R.1 (R.2 + j * p) (j + 1) = some (rp ++ [ρ]) ∧
            m'.store.readBlock Q.1 (Q.2 + j * n) n = some qj ∧
              Ops.Examples.CgsCol dec ε n j qs a rp ρ qj)
    m₁

Full source on GitHub

Import NLAlib.Ops.Examples.Cgs.