Section TRANSLATION.
Variable prog: Csharpminor.program.
Variable tprog: program.
Hypothesis TRANSL: transl_program prog = OK tprog.
Let ge : Csharpminor.genv := Genv.globalenv prog.
Let tge: genv := Genv.globalenv tprog.
Proof (Genv.find_symbol_transf_partial transl_fundef _ TRANSL).
Proof (Genv.find_funct_ptr_transf_partial transl_fundef _ TRANSL).
Proof (Genv.find_funct_transf_partial transl_fundef _ TRANSL).
Proof (Genv.find_var_info_transf_partial transl_fundef _ TRANSL).
(** * Derived properties of memory operations *)
(** * Correspondence between C#minor's and Cminor's environments and memory states *)
(** In C#minor, every variable is stored in a separate memory block. In the corresponding Cminor code, these variables become sub-blocks of the stack data block.  We capture these changes in memory via a memory injection [f]: [f b = Some(b', ofs)] means that C#minor block [b] corresponds to a sub-block of Cminor block [b] at offset [ofs].  A memory injection [f] defines a relation [val_inject f] between values and a relation [Mem.inject f] between memory states.  These relations will be used intensively in our proof of simulation between C#minor and Cminor executions. *)
(** ** Matching between Cshaprminor's temporaries and Cminor's variables *)
Definition match_temps (f: meminj) (le: Csharpminor.temp_env) (te: env) : Prop :=
forall id v, le!id = Some v -> exists v', te!(id) = Some v' /\ val_inject f v v'.

Lemma match_temps_invariant:
forall f f' le te,
match_temps f le te ->
inject_incr f f' ->
match_temps f' le te.