Definition match_prog (p: Csharpminor.program) (tp: Cminor.program) :=
  match_program (fun cu f tf => transl_fundef f = OK tf) eq p tp.

(* Specifications: *)
Lemma transf_program_match: forall p tp, transl_program p = OK tp -> match_prog p tp.
Lemma symbols_preserved: forall (s: ident), Genv.find_symbol tge s = Genv.find_symbol ge s.
Lemma senv_preserved: Senv.equiv ge tge.
Lemma function_ptr_translated: forall (b: block) (f: Csharpminor.fundef), Genv.find_funct_ptr ge b = Some f -> exists tf, Genv.find_funct_ptr tge b = Some tf /\ transl_fundef f = OK tf.
Lemma functions_translated: forall (v: val) (f: Csharpminor.fundef), Genv.find_funct ge v = Some f -> exists tf, Genv.find_funct tge v = Some tf /\ transl_fundef f = OK tf.
Lemma sig_preserved_body: forall f tf cenv size, transl_funbody cenv size f = OK tf -> tf.(fn_sig) = Csharpminor.fn_sig f.
Lemma sig_preserved: forall f tf, transl_fundef f = OK tf -> Cminor.funsig tf = Csharpminor.funsig f.
Lemma load_freelist: forall fbl chunk m b ofs m', (forall b' lo hi, In (b', lo, hi) fbl -> b' <> b) -> Mem.free_list m fbl = Some m' -> Mem.load chunk m' b ofs = Mem.load chunk m b ofs.
Lemma perm_freelist: forall fbl m m' b ofs k p, Mem.free_list m fbl = Some m' -> Mem.perm m' b ofs k p -> Mem.perm m b ofs k p.
Lemma nextblock_freelist: forall fbl m m', Mem.free_list m fbl = Some m' -> Mem.nextblock m' = Mem.nextblock m.
Lemma free_list_freeable: forall l m m', Mem.free_list m l = Some m' -> forall b lo hi, In (b, lo, hi) l -> Mem.range_perm m b lo hi Cur Freeable.
Lemma nextblock_storev: forall chunk m addr v m', Mem.storev chunk m addr v = Some m' -> Mem.nextblock m' = Mem.nextblock m.
Lemma match_temps_invariant: forall f f' le te, match_temps f le te -> inject_incr f f' -> match_temps f' le te.
Lemma match_temps_assign: forall f le te id v tv, match_temps f le te -> Val.inject f v tv -> match_temps f (PTree.set id v le) (PTree.set id tv te).