Inductive add_events h : list hist_el -> hist -> Prop :=
| add_events_nil : add_events h [] h
| add_events_snoc : forall le h' t e (Hh' : add_events h le h') (Ht : newer h' t),
add_events h (le ++ [e]) (h' ++ [(t, e)]).
Hint Resolve add_events_nil.

(* FCSL takes the approach that h is always empty, and the previous history is framed out and then combined with the new event by hist join. We can do that, but whether it's preferable might be a matter of taste. *)
Lemma AL_hist_spec : forall sh g R h 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' ++ [Load v])) v * Q v)) (Hsh : sh <> Share.bot),
AL_spec (ghost_hist sh h g * P) (hist_R g R)
(EX h' : hist, fun v => !!(add_events h [Load v] h') && ghost_hist sh h' g * Q v).