Definition hists_mono (h1 h2 : list (hist * hist)) := Forall2 (fun a b =>
(exists l, fst b = fst a ++ l) /\ (exists l, snd b = snd a ++ l)) h1 h2.
Instance hists_mono_refl : RelationClasses.Reflexive hists_mono.
Hint Resolve hists_mono_refl.
Instance hists_mono_trans : RelationClasses.Transitive hists_mono.

Lemma add_items_Znth : forall h la h' j, add_items_trace h la h' -> 0 <= j < Zlength la ->
exists h1 h2, let '(k, v, i, s) := Znth j la (0, 0, 0, false) in
add_item_trace h1 k v i s h2 /\ hists_mono h h1 /\ hists_mono h2 h'.