(*Proof. intros; red; intros. inv TE. exploit H3; eauto. intros [rs1 [tm1 [EX1 [ME1 [RR1 [RO1 EXT1]]]]]]. exploit external_call_mem_extends; eauto. intros [v' [tm2 [A [B [C [D E]]]]]]. exploit function_ptr_translated; eauto. simpl. intros [tf [P Q]]. inv Q. exists (rs1#rd <- v'); exists tm2. (* Exec *)
split. eapply star_trans. eexact EX1.
eapply star_left. eapply exec_Icall; eauto.
simpl. rewrite symbols_preserved. rewrite H. eauto. auto.
eapply star_left. eapply exec_function_external.
eapply external_call_symbols_preserved; eauto. exact symbols_preserved. exact varinfo_preserved.
apply star_one. apply exec_return.
reflexivity. reflexivity. reflexivity.
(* Match-env *)
split. eauto with rtlg.
(* Result reg *)
split. rewrite Regmap.gss. auto.
(* Other regs *)
split. intros. rewrite Regmap.gso. auto. intuition congruence.
(* Mem *)
auto.
Qed.
*)

(* Specifications: *)
Lemma Efftransl_exprlist_Enil_correct:
forall (le : letenv),
Efftransl_exprlist_prop le Enil nil.
Lemma Efftransl_exprlist_Econs_correct:
forall (le : letenv) (a1 : expr) (al : exprlist) (v1 : val)
(vl : list val),
eval_expr ge sp e m le a1 v1 ->
Efftransl_expr_prop le a1 v1 ->
eval_exprlist ge sp e m le al vl ->
Efftransl_exprlist_prop le al vl ->
Efftransl_exprlist_prop le (Econs a1 al) (v1 :: vl).
Lemma Efftransl_condexpr_CEcond_correct:
forall le cond al vl vb,
eval_exprlist ge sp e m le al vl ->
Efftransl_exprlist_prop le al vl ->
eval_condition cond vl m = Some vb ->
Efftransl_condexpr_prop le (CEcond cond al) vb.
Lemma Efftransl_condexpr_CEcondition_correct:
forall le a b c va v,
eval_condexpr ge sp e m le a va ->
Efftransl_condexpr_prop le a va ->
eval_condexpr ge sp e m le (if va then b else c) v ->
Efftransl_condexpr_prop le (if va then b else c) v ->
Efftransl_condexpr_prop le (CEcondition a b c) v.
Lemma Efftransl_condexpr_CElet_correct:
forall le a b v1 v2,
eval_expr ge sp e m le a v1 ->
Efftransl_expr_prop le a v1 ->
eval_condexpr ge sp e m (v1 :: le) b v2 ->
Efftransl_condexpr_prop (v1 :: le) b v2 ->
Efftransl_condexpr_prop le (CElet a b) v2.
Theorem Efftransl_expr_correct:
forall le a v,
eval_expr ge sp e m le a v ->
Efftransl_expr_prop le a v.