Proof using.
intros.
unfold cacheApplyEntry, applyEntry in *.
repeat break_match; subst; repeat find_inversion; do_bool;
simpl in *; auto; try omega; congruence.
Qed.

Lemma cacheApplyEntry_cache_no_apply :
forall st e os st' id o,
cacheApplyEntry st e = (os, st') ->
getLastId st (eClient e) = Some (id, o) ->
eId e <= id ->
clientCache st = clientCache st'.