NLAlib.Ops.stmtWeightedCost_ifZero_le
Library · theorem
A zero-test guard executes its body at most once, so a uniform bound for the body is also a bound for the guarded statement. Invalid condition evaluation contributes zero.
NLAlib.Ops.stmtWeightedCost_ifZero_le {Op Tst : Type} (op : Op → List ℕ → ℕ)
(query : Tst → List ℕ → ℕ) {e : Ops.IExp} {s : Ops.Stmt Op Tst} {idx : List ℕ} {b : ℕ}
(h : ∀ (i : ℕ), Ops.stmtWeightedCost op query s (idx ++ [i]) ≤ b) :
Ops.stmtWeightedCost op query (Ops.Stmt.ifZero e s) idx ≤ bImport NLAlib.Ops.WeightedCost.