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.

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.