Definition newer (l : hist_part) t := forall t', l t' <> None -> (t' < t)%nat.

(* Specifications: *)
Lemma newer_trans : forall l t1 t2, newer l t1 -> (t1 <= t2)%nat -> newer l t2.
Corollary newer_upd : forall l t1 e t2, newer l t1 -> (t1 < t2)%nat ->
newer (map_upd l t1 e) t2.
Lemma newer_over : forall h t t', newer h t -> (t <= t')%nat -> h t' = None.
Corollary newer_out : forall h t, newer h t -> h t = None.
Lemma add_new_inj : forall h h' t t' v v' (Ht : newer h t) (Ht' : newer h' t'),
map_upd h t v = map_upd h' t' v' -> h = h' /\ t = t' /\ v = v'.
Lemma hist_incl_lt : forall h l, hist_incl h l -> newer h (length l).
Corollary hist_list_lt : forall h l, hist_list h l -> newer h (length l).
Inductive hist_list' : hist_part -> list hist_el -> Prop :=
| hist_list'_nil : hist_list' empty_map []
| hist_list'_snoc : forall h l t e (Hlast : newer h t) (Hrest : hist_list' h l),
hist_list' (map_upd h t e) (l ++ [e]).