Proof using.
intros.
unfold doGenericServer in *.
break_let. break_if.
- right. do_bool. find_inversion.
simpl in *.
intuition; eauto;
use_applyEntries_spec; subst; simpl in *; auto.
- left. do_bool.  find_inversion.
match goal with
| _ : applyEntries _ _ (rev ?l) = _ |- _ =>
enough (l = []) by
(repeat find_rewrite; simpl in *; find_inversion;
destruct r; simpl in *; auto)
end.
erewrite filter_fun_ext_eq; eauto using filter_false.
intros. simpl in *.
apply Bool.not_true_is_false.
intuition.
do_bool. intuition. do_bool.
use_applyEntries_spec. subst. simpl in *. omega.
Qed.

Lemma deduplicate_log_app :
forall l l',
exists l'',
deduplicate_log (l ++ l') = deduplicate_log l ++ l''.