End AEHist.
Notation hist := (nat -> option AE_hist_el).
(* the lock invariant used to encode an atomic invariant *)
Definition AE_inv x g i R := EX h : list AE_hist_el, EX v : val,
!!(apply_hist i h = Some v /\ tc_val tint v) &&
(data_at Ews tint v x * ghost_ref h g * R h v).

(* Specifications: *)
Lemma AE_inv_exclusive : forall x g i R, exclusive_mpred (AE_inv x g i R).
Hint Resolve AE_inv_exclusive.