(** Preservation by assignment to a temporary *)

(* Specifications: *)
Lemma match_envs_set_temp:
forall f cenv e le m lo hi te tle tlo thi id v tv x,
match_envs f cenv e le m lo hi te tle tlo thi ->
Val.inject f v tv ->
check_temp cenv id = OK x ->
match_envs f cenv e (PTree.set id v le) m lo hi te (PTree.set id tv tle) tlo thi.
Lemma match_envs_set_opttemp:
forall f cenv e le m lo hi te tle tlo thi optid v tv x,
match_envs f cenv e le m lo hi te tle tlo thi ->
Val.inject f v tv ->
check_opttemp cenv optid = OK x ->
match_envs f cenv e (set_opttemp optid v le) m lo hi te (set_opttemp optid tv tle) tlo thi.