Definition ordered_hist h := forall i j (Hi : 0 <= i < j) (Hj : j < Zlength h),
(fst (Znth i h (O, Store (vint 0))) < fst (Znth j h (O, Store (vint 0))))%nat.

(* Specifications: *)
Lemma ordered_cons : forall t e h, ordered_hist ((t, e) :: h) ->
Forall (fun x => let '(m, _) := x in t < m)%nat h /\ ordered_hist h.
Lemma ordered_last : forall t e h (Hordered : ordered_hist h) (Hin : In (t, e) h)
(Ht : Forall (fun x => let '(m, _) := x in m <= t)%nat h), last h (O, Store (vint 0)) = (t, e).