(* STEP RELATION *)

(* Specifications: *)
Lemma subst_closed' :
forall e n v,
closed' (S n) e ->
closed' n (subst n v e).
Lemma closed_subst_env : forall env e x n,
closed' (length env + x) e ->
closed' (x + n) (subst_env' (x + n) env e).
Lemma closed_step : forall x y ,
step x y ->
closed (snd x) ->
closed (snd y).
Lemma values_stopped: forall e,
isValue e ->
forall m,
stopped m e.
Lemma stopped_New: forall m e,
stopped m (New e) ->
stopped m e.
Lemma stopped_Deref: forall m e,
stopped m (Deref e) ->
stopped m e.
Lemma stopped_Update: forall m e1 e2 e3,
stopped m (Update e1 e2 e3) ->
stopped m e1 \/ (isValue e1 /\ stopped m e2).
Lemma step_deterministic: forall m e m1 e1 m2 e2,
step (m,e) (m1,e1) ->
step (m,e) (m2,e2) ->
m1 = m2 /\ e1 = e2.
Lemma stepn_value: forall j m v st,
isValue v ->
stepn j (m, v) st ->
st = (m, v).
Lemma stepstar_search : forall f m e m' e',
(forall m e m' e',
step (m,e) (m',e') -> step (m,f e) (m',f e')) ->
stepstar (m,e) (m',e') ->
stepstar (m,f e) (m', f e').
Lemma stepn_trans : forall n m st1 st2 st3,
stepn n st1 st2 ->
stepn m st2 st3 ->
stepn (n+m) st1 st3.
Lemma stepstar_stepn : forall st st',
stepstar st st' <-> exists n, stepn n st st'.