Proof using.
intros. unfold has_key in *. break_match.
simpl in *. subst.
break_if; repeat (do_bool; intuition); try congruence.
Qed.

(* Specifications: *)
Lemma applyEntries_cache :
forall l h st os st' o client id id' o',
id < id' ->
applyEntries h st l = (os, st') ->
In (ClientResponse client id o) os ->
getLastId st client <> Some (id', o').