Proof using.
induction l; intros; simpl in *; intuition.
repeat break_match; simpl in *; do_bool; intuition; subst; eauto;
repeat find_rewrite; repeat find_inversion; intuition.
- destruct (clientId_eq_dec (eClient e) (eClient a)); repeat find_rewrite.
* find_injection.
eapply IHl with (id := eId a) in H1; try omega.
repeat find_rewrite. eauto using get_set_same.
* eapply IHl with (id := id) in H1; try omega.
rewrite get_set_diff; auto.
- congruence.
- destruct (clientId_eq_dec (eClient e) (eClient a)); repeat find_rewrite.
* congruence.
* eapply IHl with (id := id) in H1; try omega.
rewrite get_set_diff; auto.
Qed.

(* Specifications: *)
Lemma NoDup_deduplicate_log' :
forall l ks,
NoDup (map (fun e => (eClient e, eId e)) (deduplicate_log' l ks)).