(** The following lemmas establish the [match_env] invariant at the beginning of a function invocation, after allocation of local variables and initialization of the parameters. *)

(* Specifications: *)
Lemma match_env_alloc_variables:
forall cunit, linkorder cunit prog ->
forall e1 m1 vars e2 m2, Clight.alloc_variables ge e1 m1 vars e2 m2 ->
forall tvars te1,
mmap (transl_var cunit.(prog_comp_env)) vars = OK tvars ->
match_env e1 te1 ->
exists te2,
Csharpminor.alloc_variables te1 m1 tvars te2 m2
/\ match_env e2 te2.
Lemma create_undef_temps_match:
forall temps,
create_undef_temps (map fst temps) = Clight.create_undef_temps temps.
Lemma bind_parameter_temps_match:
forall vars vals le1 le2,
Clight.bind_parameter_temps vars vals le1 = Some le2 ->
bind_parameters (map fst vars) vals le1 = Some le2.
Lemma transl_vars_names:
forall ce vars tvars,
mmap (transl_var ce) vars = OK tvars ->
map fst tvars = var_names vars.