(* Lemma forward_setx: forall Espec {cs: compspecs} Delta P Q R id e, (PROPx P (LOCALx (tc_env Delta :: Q) (SEPx R)) |-- (tc_expr Delta e) && (tc_temp_id id (typeof e) Delta e) ) -> @semax cs Espec Delta (PROPx P (LOCALx Q (SEPx R))) (Sset id e) (normal_ret_assert (EX old:val, PROPx P (LOCALx (`eq (eval_id id) (subst id (`old) (eval_expr e)) :: map (subst id (`old)) Q) (SEPx R)))). *)

Lemma semax_switch_PQR:
forall {Espec: OracleKind}{CS: compspecs} ,
forall n Delta (Pre: environ->mpred) a sl (Post: ret_assert),
is_int_type (typeof a) = true ->
ENTAIL Delta, Pre |-- tc_expr Delta a ->
ENTAIL Delta, Pre |-- local (`(eq (Vint (Int.repr n))) (eval_expr a)) ->
@semax CS Espec Delta
Pre
(seq_of_labeled_statement (select_switch (Int.unsigned (Int.repr n)) sl))
(switch_ret_assert Post) ->
@semax CS Espec Delta Pre (Sswitch a sl) Post.