Transparent Znth.

(* Specifications: *)
Lemma add_three : forall lr lk lv (Hlen : Zlength lr = 3)
(Hadd : Forall (fun '(h, li, ls) => add_items_trace (repeat ([], []) (Z.to_nat size))
(combine (combine (combine [1; 2; 3] [1; 1; 1]) li) ls) h) lr)
(H3 : Forall (fun '(_, li, ls) => Zlength li = 3 /\ Zlength ls = 3) lr)
(Hrepk : Forall repable_signed lk) (Hrepv : Forall repable_signed lv)
(Hfullk : Forall2 full_hist (map fst (fold_right join_hists empty_hists (map fst (map fst lr)))) lk)
(Hfullv : Forall2 full_hist (map snd (fold_right join_hists empty_hists (map fst (map fst lr)))) lv)
(Hvalk : Forall2 (fun h v => forall t e, In (t, e) h -> value_of e <> vint 0 -> vint v = value_of e)
(map fst (fold_right join_hists empty_hists (map fst (map fst lr)))) lk),
Zlength (filter id (concat (map snd lr))) = 3.