Proof using.
unfold has_key.
intros. destruct e. simpl. do_bool. intuition (do_bool; auto).
break_if; try congruence. auto.
Qed.

Lemma before_func_deduplicate' :
forall l k k' ks,
before_func (has_key (fst k) (snd k)) (has_key (fst k') (snd k')) l ->
(forall id',
before_func (has_key (fst k) id') (has_key (fst k) (snd k)) l ->
id' <= snd k) ->
(forall i, assoc clientId_eq_dec ks (fst k) = Some i -> i < snd k) ->
before_func (has_key (fst k) (snd k)) (has_key (fst k') (snd k')) (deduplicate_log' l ks).