(********************)
(* Separation monad *)
(********************)
Prenex Implicits fr.
Notation "[ s ]" := (fr s).
Definition STsep A (s : spec A) := ST [s].
Section SepReturn.
Variable (A : Type) (x : A).
Definition ret_s : spec A := (emp, fun y i m => m = i /\ y = Val x).

(* Specifications: *)
Lemma retP : Model.conseq (Model.ret_s x) [ret_s].
Definition ret := Model.Do (Model.ret x) retP.