Notation AS_witness sh p g R h v P Q :=
(sh%logic, p%logic, v%logic, (ghost_hist sh h g * P)%logic, hist_R g%logic R,
EX h' : hist, !!(add_events h [Store v] h') && ghost_hist sh h' g * Q).

(* Specifications: *)
Lemma AS_hist_spec : forall sh g R h v P Q
(HPQR : forall h' v' (Hhist : hist_incl h h'), apply_hist (vint 0) h' = Some v' ->
view_shift (valid (R h') v' * P) (valid (R (h' ++ [Store v])) v * Q)) (Hsh : sh <> Share.bot)
(Hprecise : precise (EX h : _, R h v)),
AS_spec v (ghost_hist sh h g * P) (hist_R g R)
(EX h' : hist, !!(add_events h [Store v] h') && ghost_hist sh h' g * Q).