Local Notation cont A := (ans A -> heap -> Prop).
Section EvalDo.
Variables (A B : Type).

Lemma try_do (s : spec A) s1 s2 i j (r : cont B) :
s.1 i ->
(forall x m, s.2 (Val x) i m -> verify (s1 x) (m :+ j) r) ->
(forall e m, s.2 (Exn e) i m -> verify (s2 e) (m :+ j) r) ->
verify (try_s s s1 s2) (i :+ j) r.