(* 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 select_switch_case_signed:
forall y n x c sl,
Z.modulo x Int.modulus = Z.modulo y Int.modulus ->
0 <= x < Int.modulus ->
select_switch_case n (LScons (Some x) c sl) =
if zeq (Int.unsigned (Int.repr y)) n then Some (LScons (Some x) c sl)
else select_switch_case n sl.