(* 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. *)

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.