NLA-lib Explorer

NLAlib.Ops.StoredOperator.matvecRoutine_implements

Library · theorem

A matrix-vector routine implements the stored-operator contract of its data length, the operands of the routine being the inputs followed by the output.

NLAlib.Ops.StoredOperator.matvecRoutine_implements {K Op Tst : Type} [Semiring K]
  (dataLength : ℕ → ℕ → ℕ) (matrix : (m n : ℕ) → List K → Matrix (Fin m) (Fin n) K)
  (body : Ops.Stmt Op Tst) :
  (Ops.StoredOperator.matvecRoutine dataLength body).Implements
    (Ops.StoredOperator.functions dataLength matrix Ops.StoredOperatorOp.matvec).rel
    (Ops.StoredOperator.OutApart dataLength) fun ins outs ↦ ins ++ outs

Full source on GitHub

Import NLAlib.Ops.Profiles.StoredRoutine.