Definition match_prog (prog tprog: program) :=
  match_program (fun cu f tf => tf = transf_fundef (romem_for cu) f) eq prog tprog.

(* Specifications: *)
Lemma transf_program_match: forall prog, match_prog prog (transf_program prog).
Lemma symbols_preserved: forall (s: ident), Genv.find_symbol tge s = Genv.find_symbol ge s.
Lemma senv_preserved: Senv.equiv ge tge.
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.
Lemma function_ptr_translated: forall (b: block) (f: fundef), Genv.find_funct_ptr ge b = Some f -> exists cunit, Genv.find_funct_ptr tge b = Some (transf_fundef (romem_for cunit) f) /\ linkorder cunit prog.
Lemma sig_function_translated: forall rm f, funsig (transf_fundef rm f) = funsig f.
Lemma init_regs_lessdef: forall rl vl1 vl2, Val.lessdef_list vl1 vl2 -> regs_lessdef (init_regs vl1 rl) (init_regs vl2 rl).
Lemma transf_ros_correct: forall bc rs ae ros f rs', genv_match bc ge -> ematch bc rs ae -> find_function ge ros rs = Some f -> regs_lessdef rs rs' -> exists cunit, find_function tge (transf_ros ae ros) rs' = Some (transf_fundef (romem_for cunit) f) /\ linkorder cunit prog.
Lemma const_for_result_correct: forall a op bc v sp m, const_for_result a = Some op -> vmatch bc v a -> bc sp = BCstack -> genv_match bc ge -> exists v', eval_operation tge (Vptr sp Ptrofs.zero) op nil m = Some v' /\ Val.lessdef v v'.
Lemma match_successor_rec: forall f rs m bc ae, ematch bc rs ae -> forall n pc, match_pc f rs m n pc (successor_rec n f ae pc).
Lemma match_successor: forall f rs m bc ae pc, ematch bc rs ae -> match_pc f rs m num_iter pc (successor f ae pc).