Definition value_of e :=
  match e with
  | Load v => v
  | Store v => v
  | CAS r c w => if eq_dec r c then w else r
  end.Definition value_of_hist (h : hist) := value_of (snd (last h (O, Store (vint 0)))).Notation ordered_hist := (ordered_hist (Store (vint 0))).

Lemma hist_list_value : forall h l v (Horder : ordered_hist h) (Hl : hist_list h l) (Hv : apply_hist (vint 0) l = Some v), value_of_hist h = v.