Hint Rewrite @sublist_nil' using list_solve: sublist.
Hint Rewrite @app_nil_l : sublist.
Hint Rewrite @Zlength_rev : sublist.
Hint Rewrite @sublist_rejoin' using list_solve : sublist.

(* Specifications: *)
Lemma subsub1:
forall a b : Z, (a-(a-b)) = b.
Lemma upd_Znth_Zlength {A} i (l:list A) v: 0<=i < Zlength l ->
Zlength (upd_Znth i l v) = Zlength l.
Lemma upd_Znth_map {A B} (f:A -> B) i l v:
upd_Znth i (map f l) (f v) =
map f (upd_Znth i l v).
Lemma upd_Znth_lookup K {A}{d: Inhabitant A}: forall l (L:Zlength l = K) i j (v:A) (I: 0<=i<K) (J: 0<=j<K),
(i=j /\ Znth i (upd_Znth j l v) = v) \/
(i<>j /\ Znth i (upd_Znth j l v) = Znth i l).
Lemma upd_Znth_lookup' K {A}{d: Inhabitant A}: forall l (L:Zlength l = K) i (I: 0<=i<K) j (J: 0<=j<K) (v:A),
Znth i (upd_Znth j l v) = if zeq i j then v else Znth i l.
Lemma upd_Znth_char {A} n l1 (v:A) l2 w: Zlength l1=n ->
upd_Znth n (l1 ++ v :: l2) w = l1 ++ w :: l2.
Lemma upd_Znth_same {A}{d: Inhabitant A}: forall i l u, 0<= i< Zlength l -> Znth i (upd_Znth i l u) = u.
Lemma upd_Znth_diff {A}{d: Inhabitant A}: forall i j l u, 0<= i< Zlength l -> 0<= j< Zlength l -> i<>j ->
Znth i (upd_Znth j l u) = Znth i l.
Lemma upd_Znth_app1 {A} i l1 l2 (I: 0 <= i < Zlength l1) (v:A):
upd_Znth i (l1++l2) v = upd_Znth i l1 v ++ l2.
Lemma upd_Znth_app2 {A} (l1 l2:list A) i v:
Zlength l1 <= i <= Zlength l1 + Zlength l2 ->
upd_Znth i (l1 ++ l2) v = l1 ++ upd_Znth (i-Zlength l1) l2 v.
Lemma upd_Znth0 {A} (l:list A) v:
upd_Znth 0 l v = v :: sublist 1 (Zlength l) l.
Lemma sublist_upd_Znth_r: forall {A} (l: list A) i lo hi v,
0 <= i < lo ->
lo <= hi <= Zlength l ->
sublist lo hi (upd_Znth i l v) = sublist lo hi l.
Lemma sublist_upd_Znth_lr: forall {A} (l: list A) i lo hi v,
0 <= lo <= i->
i < hi <= Zlength l ->
sublist lo hi (upd_Znth i l v) = upd_Znth (i - lo) (sublist lo hi l) v.