(* not this version! Lemma sublist_list_repeat {A} i j k (v:A) (I: 0<=i) (IJK: (Z.to_nat i <= Z.to_nat j <= k)%nat): sublist i j (list_repeat k v) = list_repeat (Z.to_nat (j-i)) v. *)

(* Specifications: *)
Lemma sublist_list_repeat {A} i j k (v:A) (I: 0<=i)
(IJK: i <= j <= k):
sublist i j (list_repeat (Z.to_nat k) v) = list_repeat (Z.to_nat (j-i)) v.
Lemma Zlength_list_repeat:
forall {A} n (x: A),
0 <= n ->
Zlength (list_repeat (Z.to_nat n) x) = n.
Lemma list_repeat_0:
forall {A} (x:A), list_repeat (Z.to_nat 0) x = nil.
Lemma Znth_list_repeat_inrange:
forall {A}{d: Inhabitant A} i n (a: A),
(0 <= i < n)%Z ->
Znth i (list_repeat (Z.to_nat n) a) = a.
Lemma firstn_nil {A} n: firstn n (nil:list A) = nil.
Lemma skipn_In {A} (x:A): forall l n, In x (skipn n l) -> In x l.
Lemma sublist_In {A} lo hi data (x:A) (I:In x (sublist lo hi data)): In x data.
Lemma sublist_rejoin':
forall {A} lo mid mid' hi (al: list A),
mid=mid' ->
0 <= lo <= mid ->
mid' <= hi <= Zlength al ->
sublist lo mid al ++ sublist mid' hi al = sublist lo hi al.