Corollary wf_table_upd_same : forall T k v i (Hwf : wf_table T) (HT : Zlength T = size)
  (Hi : fst (Znth i T) = k) (Hk : k <> 0), wf_table (upd_Znth i T (k, v)).

Lemma apply_hist_app : forall h1 h2 H, apply_hist H (h1 ++ h2) = match apply_hist H h1 with Some H' => apply_hist H' h2 | None => None end.