Proof using.
intros.
apply applied_entries_log_lastApplied_same;
intros; update_destruct; subst; rewrite_update; auto.
Qed.

(* Specifications: *)
Lemma applied_entries_cases :
forall sigma,
applied_entries sigma = [] \/
exists h,
applied_entries sigma = rev (removeAfterIndex (log (sigma h)) (lastApplied (sigma h))).