Definition full_hist h v := exists l, hist_list h l /\ apply_hist (vint 0) l = Some v.
Definition full_hist' h v := exists l, hist_list' h l /\ apply_hist (vint 0) l = Some v.

(* Specifications: *)
Lemma full_hist_weak : forall h v (Hl : full_hist h v), full_hist' h v.
Lemma full_hist'_drop : forall h h' v (Hh : full_hist' h v)
(Hh' : incl h' h) (HNoDup : NoDup (map fst h'))
(Hdiff : forall t e, In (t, e) h -> ~In (t, e) h' -> forall v, ~writes e v),
full_hist' h' v.
Lemma full_hist'_nil : forall n l, Forall2 full_hist' (repeat [] n) l -> l = repeat (vint 0) n.
Corollary full_hist_nil : forall n l, Forall2 full_hist (repeat [] n) l -> l = repeat (vint 0) n.
Definition hist_R g R v := EX h : _, !!(apply_hist (vint 0) h = Some v) && ghost_ref h g * valid (R h) v.