(* Rather than carry the initial value, let's just write it as the first element in the history. *)
Definition atomic_loc_hist sh p g R (h : hist) := atomic_loc sh p (hist_R g R) * ghost_hist sh h g.

(* Specifications: *)
Lemma atomic_loc_hist_isptr : forall sh p g R h,
atomic_loc_hist sh p g R h = !!(isptr p) && atomic_loc_hist sh p g R h.
Lemma hist_R_precise : forall p R v, precise (EX h : _, R h v) -> precise (hist_R p R v).
Hint Resolve hist_R_precise.
Lemma atomic_loc_hist_precise : forall sh p g R, readable_share sh ->
precise (EX h : _, atomic_loc_hist sh p g R h).