Definition substopt {A} (ret: option ident) (v: val) (P: environ -> A)  : environ -> A :=
   match ret with
   | Some id => subst id v P
   | None => P
   end.

(* Specifications: *)
Lemma fst_split {T1 T2}: forall vl: list (T1*T2), fst (split vl) = map fst vl.
Lemma snd_split {T1 T2}: forall vl: list (T1*T2), snd (split vl) = map snd vl.
Lemma eval_exprlist_relate: forall (Delta : tycontext) (fsig0 : funsig) (bl : list expr) (psi : genv) (vx : env) (tx : temp_env) (rho : environ) m, denote_tc_assert (typecheck_exprlist Delta (snd (split (fst fsig0))) bl) rho (m_phi m) -> typecheck_environ Delta rho -> genv_cenv psi = cenv_cs -> rho = construct_rho (filter_genv psi) vx tx -> forall f : function, fsig0 = fn_funsig f -> Clight.eval_exprlist psi vx tx (m_dry m) bl (type_of_params (fn_params f)) (eval_exprlist (snd (split (fst fsig0))) bl rho).
Lemma bind_exists_te : forall l1 l2 t1 t2 te, bind_parameter_temps l1 l2 t1 = Some te -> exists te2, bind_parameter_temps l1 l2 t2 = Some te2.
Lemma smaller_temps_exists'' : forall l l1 te id i t, bind_parameter_temps l l1 (PTree.set id Vundef t)= Some te -> i <> id -> exists te', (bind_parameter_temps l l1 t = Some te').
Lemma free_juicy_mem_level: forall jm m b lo hi H, level (free_juicy_mem jm m b lo hi H) = level jm.
Lemma free_juicy_mem_ghost: forall jm m b lo hi H, ghost_of (m_phi (free_juicy_mem jm m b lo hi H)) = ghost_of (m_phi jm).
Lemma free_list_free: forall m b lo hi l' m', free_list m ((b,lo,hi)::l') = Some m' -> {m2 | free m b lo hi = Some m2 /\ free_list m2 l' = Some m'}.