Definition value_of_hist (h : hist) := value_of (snd (last h (O, Store (vint 0)))).

(* Specifications: *)
Lemma ordered_last_value : forall h v (Hordered : ordered_hist h), last_value h v <-> value_of_hist h = v.
Definition wf_map (m : list (Z * Z)) := Forall (fun i => repable_signed i /\ i <> 0) (map fst m).
Lemma value_of_hist_snoc : forall h t e, value_of_hist (h ++ [(t, e)]) = value_of e.
Notation ordered_hist := (ordered_hist (Store (vint 0))).
Lemma ordered_last_value : forall h v (Hordered : ordered_hist h), last_value h v <-> value_of_hist h = v.
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.
Lemma value_of_hist_snoc : forall h t e, value_of_hist (h ++ [(t, e)]) = value_of e.
Notation ordered_hist := (ordered_hist (Store (vint 0))).
Lemma ordered_last_value : forall h v (Hordered : ordered_hist h), last_value h v <-> value_of_hist h = v.
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.