Section PRESERVATION.
Variable prog: program.
Variable tprog: program.
Hypothesis TRANSL: match_prog prog tprog.
Let ge := Genv.globalenv prog.
Let tge := Genv.globalenv tprog.
(** * Correctness of the code transformation *)
(** We now show that the transformed code after constant propagation has the same semantics as the original code. *)
Proof (Genv.find_symbol_match TRANSL).
Proof (Genv.senv_match TRANSL).

Lemma functions_translated:
forall (v: val) (f: fundef),
Genv.find_funct ge v = Some f ->
exists cunit, Genv.find_funct tge v = Some (transf_fundef (romem_for cunit) f) /\ linkorder cunit prog.