NLAlib.Ops.PairMatrix.stmtCost_identity
Library · theorem
Identity writes one zero literal per word and one one literal per diagonal entry.
NLAlib.Ops.PairMatrix.stmtCost_identity {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] (n y : ℕ) :
Ops.stmtCost Ops.PairMatrix.identity [n, y] =
(2 * (n * n)) • Ops.Count.one (Ops.Has.inj (Ops.ScalarOp.lit 0)) [] +
n • Ops.Count.one (Ops.Has.inj (Ops.ScalarOp.lit 1)) []Import NLAlib.Ops.Blas.Matrix.