Corollary fold_join_hists_length : forall lh h, Forall (fun h' => Zlength h' = Zlength h) lh ->
  Zlength (fold_right join_hists h lh) = Zlength h.Corollary join_hists_empty_length : forall lh, Forall (fun h => Zlength h = size) lh ->
  Zlength (fold_right join_hists empty_hists lh) = size.

Lemma join_hists_base : forall l h, Zlength h = size -> fold_right join_hists (join_hists h empty_hists) l = join_hists (fold_right join_hists empty_hists l) h.