Hint Rewrite @upd_Znth_app1 using list_solve : sublist.
Hint Rewrite @upd_Znth_app2 using list_solve : sublist.

(* Specifications: *)
Lemma map_list_repeat: forall {A B} (f: A->B) n (x:A), map f (list_repeat n x) = list_repeat n (f x).
Hint Rewrite @map_list_repeat : sublist.
Lemma Zlength_sublist_correct: forall {A} (l: list A) (lo hi: Z),
0 <= lo <= hi ->
hi <= Zlength l ->
Zlength (sublist lo hi l) = hi - lo.
Lemma Zlength_sublist_incorrect: forall {A} (l: list A) (lo hi: Z),
0 <= lo < hi ->
hi > Zlength l ->
Zlength (sublist lo hi l) < hi - lo.
Lemma nth_Znth {A} {d: Inhabitant A}:
forall n (xs:list A), 0 <= n < Zlength xs -> (nth (Z.to_nat n) xs d) = (Znth n xs).