Proof (proj2 eval_simple_steps).

(* Specifications: *)
Corollary eval_simple_rvalue_safe:
forall C a v,
eval_simple_rvalue e m a v ->
context RV RV C -> safe (ExprState f (C a) k e m) ->
safe (ExprState f (C (Eval v (typeof a))) k e m).
Corollary eval_simple_lvalue_safe:
forall C a b ofs,
eval_simple_lvalue e m a b ofs ->
context LV RV C -> safe (ExprState f (C a) k e m) ->
safe (ExprState f (C (Eloc b ofs (typeof a))) k e m).
Lemma simple_can_eval:
forall a from C,
simple a = true -> context from RV C -> safe (ExprState f (C a) k e m) ->
match from with
| LV => exists b, exists ofs, eval_simple_lvalue e m a b ofs
| RV => exists v, eval_simple_rvalue e m a v
end.
Lemma simple_can_eval_rval:
forall r C,
simple r = true -> context RV RV C -> safe (ExprState f (C r) k e m) ->
exists v, eval_simple_rvalue e m r v
/\ safe (ExprState f (C (Eval v (typeof r))) k e m).
Lemma simple_can_eval_lval:
forall l C,
simple l = true -> context LV RV C -> safe (ExprState f (C l) k e m) ->
exists b, exists ofs, eval_simple_lvalue e m l b ofs
/\ safe (ExprState f (C (Eloc b ofs (typeof l))) k e m).
Corollary eval_simple_rvalue_safe:
forall C a v,
eval_simple_rvalue e m a v ->
context RV RV C -> safe (ExprState f (C a) k e m) ->
safe (ExprState f (C (Eval v (typeof a))) k e m).
Corollary eval_simple_lvalue_safe:
forall C a b ofs,
eval_simple_lvalue e m a b ofs ->
context LV RV C -> safe (ExprState f (C a) k e m) ->
safe (ExprState f (C (Eloc b ofs (typeof a))) k e m).
Lemma simple_can_eval:
forall a from C,
simple a = true -> context from RV C -> safe (ExprState f (C a) k e m) ->
match from with
| LV => exists b, exists ofs, eval_simple_lvalue e m a b ofs
| RV => exists v, eval_simple_rvalue e m a v
end.
Lemma simple_can_eval_rval:
forall r C,
simple r = true -> context RV RV C -> safe (ExprState f (C r) k e m) ->
exists v, eval_simple_rvalue e m r v
/\ safe (ExprState f (C (Eval v (typeof r))) k e m).
Lemma simple_can_eval_lval:
forall l C,
simple l = true -> context LV RV C -> safe (ExprState f (C l) k e m) ->
exists b, exists ofs, eval_simple_lvalue e m l b ofs
/\ safe (ExprState f (C (Eloc b ofs (typeof l))) k e m).