NLA-lib Explorer

NLAlib.Ops.ContextLinearRounded.matvec_active

Library · theorem

A context-isolated scalar dense product meets its rounded local source contract. Its error premise concerns only the actual word kernel, not an execution of the enclosing program.

NLAlib.Ops.ContextLinearRounded.matvec_active {I : Ops.Interp Ops.RCLikeBlas.Operation Ops.CmpTst ℝ}
  {M : Ops.Machine ℝ} (hS : Ops.IsScalar M I) (context : List (ℕ × ℕ)) (index : Fin context.length)
  {n : ℕ} {C : ℕ → Prop} {reference : Ops.Store ℝ} (raw : List ℝ) {e : Ops.Blas1Err} {error : ℝ}
  {ok : ℕ → Prop}
  (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) {d : List ℕ}
  {ins outs : List (ℕ × ℕ)} {τ : Ops.Tape ℝ} {mem : Ops.Mem ℝ}
  (hs : Ops.Mem.Isolated C reference mem) (ho : ∀ z ∈ outs, ¬C z.1)
  (hp :
    (((Ops.ContextLinearRounded.relation M e (Ops.StoredOperator.denseMatrix n n raw) error
                  Ops.Standard.Operation.matvec).spec
              (Ops.ContextLinearRounded.admissible ok n Ops.Standard.Operation.matvec)).on
          Ops.Mode.total d ins outs τ mem).pre
      mem) :
  Ops.Mode.total.Holds
    ((I.linkContext (Ops.ContextLinear.table context.length ↑index) context).callS
      Ops.Standard.Operation.matvec d ins outs τ mem)
    ((((Ops.ContextLinearRounded.relation M e (Ops.StoredOperator.denseMatrix n n raw) error
                  Ops.Standard.Operation.matvec).spec
              (Ops.ContextLinearRounded.admissible ok n Ops.Standard.Operation.matvec)).on
          Ops.Mode.total d ins outs τ mem).post
      mem)

Full source on GitHub

Import NLAlib.Ops.Profiles.ContextLinearRoundedGuarded.