Proof using.
induction tr; intros; simpl in *; intuition; subst.
- rewrite <- surjective_pairing. intuition.
- break_match; simpl; eauto.
subst.
destruct (key_eq_dec (c, n) k).
+ subst. auto.
+ right. apply remove_preserve.
* congruence.
* eauto.
- apply in_or_app.
right.
apply in_remove_all_preserve.
+ intro. find_apply_lem_hyp in_dedup_was_in.
find_apply_lem_hyp In_filterMap.
break_exists. break_and.
break_match; try discriminate.
+ eauto.
Qed.

(* Specifications: *)
Lemma get_IR_input_of_log_to_IR :
forall env log,
get_IR_input_keys _ (log_to_IR env log) =
map (fun e => (eClient e, eId e)) log.