Proof using.
induction l using rev_ind; intros; simpl in *.
- rewrite app_nil_r.  auto.
- rewrite execute_log'_app. simpl. repeat break_let.
simpl.
eapply_prop_hyp execute_log execute_log; auto.
+ find_rewrite. simpl in *.
rewrite <- app_ass.
rewrite log_to_IR_app.
simpl.
specialize (H x). conclude_using eauto.
specialize (H0 l [] x l0 d).
break_match; subst; simpl in *.
rewrite app_nil_r.
break_match.
* specialize (H0 o o0 d0). repeat concludes.
apply exported_snoc_IO; congruence.
* apply exported_snoc_IU; auto.
+ intros. apply H. intuition.
+ intros. subst. eapply H0 with (ys0 := ys ++ [x]).
rewrite app_ass. simpl. eauto.
eauto.
eauto.
eauto.
Qed.

(* Specifications: *)
Lemma exported_execute_log :
forall env_i env_o l,
(forall e, In e l -> env_i (eClient e, eId e) = Some (eInput e)) ->
(forall xs ys e tr' st' o o0 st'',
l = xs ++ e :: ys ->
execute_log xs  = (tr', st') ->
handler (eInput e) st' = (o, st'') ->
env_o (eClient e, eId e) = Some o0 ->
o = o0) ->
exported env_i env_o (log_to_IR env_o l) (fst (execute_log l)).