NLA-lib Explorer

NLAlib.Ops.RunsFromWL.ite

Library · theorem

Branch: one use of the test, then the branch taken, for every Boolean that the test may return.

NLAlib.Ops.RunsFromWL.ite {Op Tst K : Type} {I : Ops.Interp Op Tst K} {W : Op → List ℕ → ℕ}
  {τ : Ops.Tape K} {ρ : Ops.Env} {st : Ops.St Op Tst K} {p : ℕ}
  {Q : Ops.Count Op Tst → Ops.Mem K → Prop} {q : Tst} {ds : List Ops.IExp} {ins : List Ops.Operand}
  {t e : Ops.Stmt Op Tst} {d : List ℕ} {a : List (ℕ × ℕ)} (hd : Ops.IExp.evalList ρ.idx ds = some d)
  (ha : Ops.Operand.evalList ρ ins = some a)
  (h :
    ∀ (b : Bool),
      I.test q d a st.mem = some b →
        Ops.RunsFromWL I W τ (if b = true then t else e) ρ (st.tick q d) p fun c m ↦
          Q (Ops.Count.test q d + c) m) :
  Ops.RunsFromWL I W τ (Ops.Stmt.ite q ds ins t e) ρ st p Q

Full source on GitHub

Import NLAlib.Ops.Counted.