NLA-lib Explorer

NLAlib.Ops.ContextLinearRounded.satisfies_guarded

Library · theorem

Relative-error BLAS

Isolated matrix data and the target's local scalar/vector contracts give exhaustive rounded source laws for the proof-side guarded interpretation.

NLAlib.Ops.ContextLinearRounded.satisfies_guarded
  {I : Ops.Interp Ops.RCLikeBlas.Operation Ops.CmpTst ℝ} {M : Ops.Machine ℝ} {e : Ops.Blas1Err}
  {ok : ℕ → Prop} (hS : Ops.IsScalar M I) (hB : Ops.IsBlas1 id e ok I) (context : List (ℕ × ℕ))
  (index : Fin context.length) {n : ℕ} {C : ℕ → Prop} (reference : Ops.Store ℝ) (raw : List ℝ)
  {error : ℝ} (herror : 0 ≤ error)
  (hError :
    ∀ (xs : List ℝ),
      ‖WithLp.toLp 2
            (Ops.StoredOperator.denseMatrix n n raw *ᵥ Ops.decv id n xs -
              Ops.decv id n (List.map (Ops.StoredDense.rowWord M n n raw xs) (List.range n)))‖ ≤
        error * ‖WithLp.toLp 2 (Ops.decv id n xs)‖)
  (hc : ∀ z ∈ context, C z.1)
  (hData : reference.readBlock context[index].1 context[index].2 (n * n) = some raw)
  (o : Ops.Standard.Operation) :
  ((I.linkContext (Ops.ContextLinear.table context.length ↑index) context).guardIsolated
        (fun o ↦
          (Ops.ContextLinearRounded.relation M e (Ops.StoredOperator.denseMatrix n n raw) error
                o).spec
            (Ops.ContextLinearRounded.admissible ok n o))
        (Ops.Mem.Isolated C reference) C
        (Ops.ContextLinearRounded.fallback I (Ops.StoredOperator.denseMatrix n n raw))).Satisfies
    Ops.Mode.total o
    ((Ops.ContextLinearRounded.relation M e (Ops.StoredOperator.denseMatrix n n raw) error o).spec
      (Ops.ContextLinearRounded.admissible ok n o))

Full source on GitHub

Import NLAlib.Ops.Profiles.ContextLinearRoundedGuarded.