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

Lemma applyEntries_spec :
forall es h st os st',
applyEntries h st es = (os, st') ->
log st' = log st /\
lastApplied st' = lastApplied st /\
commitIndex st' = commitIndex st.