Proof (Genv.find_funct_match TRANSL).
(** * Matching between environments *)
(** In this section, we define a matching relation between a Clight local environment and a Csharpminor local environment. *)
Record match_env (e: Clight.env) (te: Csharpminor.env) : Prop :=
mk_match_env {
me_local:
forall id b ty,
e!id = Some (b, ty) -> te!id = Some(b, Ctypes.sizeof ge ty);
me_local_inv:
forall id b sz,
te!id = Some (b, sz) -> exists ty, e!id = Some(b, ty)
}.

(* Specifications: *)
Lemma match_env_globals:
forall e te id,
match_env e te ->
e!id = None ->
te!id = None.
Lemma match_env_same_blocks:
forall e te,
match_env e te ->
blocks_of_env te = Clight.blocks_of_env ge e.
Lemma match_env_free_blocks:
forall e te m m',
match_env e te ->
Mem.free_list m (Clight.blocks_of_env ge e) = Some m' ->
Mem.free_list m (blocks_of_env te) = Some m'.
Lemma match_env_empty:
match_env Clight.empty_env Csharpminor.empty_env.