Definition evalDet_equiv(A : Set)(c1 c2 : Comp A) :=
  (forall s y, evalDet c1 s y <-> evalDet c2 s y).

(* Specifications: *)
Lemma evalDet_equiv_symm : forall (A : Set)(c1 c2 : Comp A), evalDet_equiv c1 c2 -> evalDet_equiv c2 c1.
Theorem evalDet_steps_bind_done_inv_h : forall (A : Set)(x y : comp_state A), evalDet_steps x y -> forall (B : Set)(c1 : Comp B)(c2 : B -> Comp A) s s' a, x = (cs_more (Bind c1 c2) s) -> y = (cs_done a s') -> exists b s'', evalDet_steps (cs_more c1 s) (cs_done b s'') /\ evalDet_steps (cs_more (c2 b) s'') (cs_done a s').
Theorem evalDet_steps_bind_done_inv : forall (A B : Set)(c1 : Comp B)(c2 : B -> Comp A) s s' a, evalDet_steps (cs_more (Bind c1 c2) s) (cs_done a s') -> exists b s'', evalDet_steps (cs_more c1 s) (cs_done b s'') /\ evalDet_steps (cs_more (c2 b) s'') (cs_done a s').
Theorem evalDet_steps_bind_eof_inv_h : forall (A : Set)(x y : comp_state A), evalDet_steps x y -> forall (B : Set)(c1 : Comp B)(c2 : B -> Comp A) s, x = (cs_more (Bind c1 c2) s) -> y = (@cs_eof A) -> evalDet_steps (cs_more c1 s) (@cs_eof B) \/ exists b s', evalDet_steps (cs_more c1 s) (cs_done b s') /\ evalDet_steps (cs_more (c2 b) s') (@cs_eof A).
Theorem evalDet_steps_bind_eof_inv : forall (A B : Set)(c1 : Comp B)(c2 : B -> Comp A) s, evalDet_steps (cs_more (Bind c1 c2) s) (@cs_eof A) -> evalDet_steps (cs_more c1 s) (@cs_eof B) \/ exists b s', evalDet_steps (cs_more c1 s) (cs_done b s') /\ evalDet_steps (cs_more (c2 b) s') (@cs_eof A).
Theorem evalDet_bind_assoc : forall (A : Set)(c1 : Comp A)(B C : Set)(c2 : A -> Comp B)(c3 : B -> Comp C), evalDet_equiv (Bind (Bind c1 c2) c3) (Bind c1 (fun a => (Bind (c2 a) c3))).