Proof using.
unfold applyEntry.
intros.
repeat break_match; repeat find_inversion. simpl.
rewrite execute_log_app. simpl. repeat break_let.
simpl in *. congruence.
Qed.

(* Specifications: *)
Lemma deduplicate_log_cases :
forall es e,
(deduplicate_log (es ++ [e]) = deduplicate_log es /\
exists e', In e' es /\ eClient e' = eClient e /\ eId e <= eId e') \/
(deduplicate_log (es ++ [e]) = deduplicate_log es ++ [e] /\
(forall e', In e' es -> eClient e' = eClient e -> eId e' < eId e)).