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

Lemma cacheApplyEntry_stateMachine_apply_none :
forall st e os st' o' d,
cacheApplyEntry st e = (os, st') ->
getLastId st (eClient e) = None ->
handler (eInput e) (stateMachine st) = (o', d) ->
stateMachine st' = d.