NLA-lib Explorer

NLAlib.Ops.Examples.cgs_satisfies

Library · theorem

Relative-error BLAS

The certificate of cgs: for every interpretation satisfying the contracts of scalar arithmetic and of the level-1 operations at ε, cgs satisfies its contract, which has two output blocks. Proved by block specifications: two allocations, the loop over the columns in the standard invariant form, and cgsCol_writes in each column.

NLAlib.Ops.Examples.cgs_satisfies {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.Examples.cgsRoutine.impl.Satisfies J Ops.Mode.total
    ((Ops.Examples.cgsRel dec ε).spec (Ops.Examples.CgsOperands ok))

Full source on GitHub

Import NLAlib.Ops.Examples.CgsQR.