Corollary upd_init_const : forall {A} i b (v v' : A), 0 <= i < b ->
  upd_Znth i (repeat v' (Z.to_nat i) ++ repeat v (Z.to_nat (b - i))) v' =
  repeat v' (Z.to_nat (i + 1)) ++ repeat v (Z.to_nat (b - (i + 1))).

(* Specifications: *)
Lemma list_Znth_eq : forall {A}{d: Inhabitant A} (l : list A), l = map (fun j => Znth j l) (upto (length l)).
Lemma upd_Znth_eq : forall {A} {EqDec : EqDec A} {d: Inhabitant A} (x : A) (l : list A) i, 0 <= i < Zlength l -> upd_Znth i l x = map (fun j => if eq_dec j i then x else Znth j l) (upto (length l)).
Lemma upd_Znth_diff' : forall {A}{d: Inhabitant A} i j l (u : A), 0 <= j < Zlength l -> i <> j -> Znth i (upd_Znth j l u) = Znth i l.
Lemma list_nth_error_eq : forall {A} (l1 l2 : list A) (Heq : forall j, nth_error l1 j = nth_error l2 j), l1 = l2.
Lemma list_Znth_eq' : forall {A} {d: Inhabitant A} (l1 l2 : list A) (Hlen : Zlength l1 = Zlength l2) (Heq : forall j, 0 <= j < Zlength l1 -> Znth j l1 = Znth j l2), l1 = l2.