Section Correctness.

(** Correctness of expressions. We strengthen [bisimilar]: initial environments are still related by [Renv], but intermediate ones must now satisfy [sim_rel]. Note that by doing so, we use a _heterogeneous bisimulation_: the trees return values of different types ([alist var value * unit] for _Asm_, [alist var value * value] for _Imp_). The difference is nonetheless mostly transparent for the user, except for the use of the more general lemma [eqit_bind']. *)
Lemma compile_expr_correct : forall {E} e g_imp g_asm l n,
Renv g_imp g_asm ->
@eutt E _ _ (sim_rel l n)
(interp_imp (denote_expr e) g_imp)
(interp_asm (denote_list (compile_expr n e)) g_asm l).