(* Lemma Znth_indep : forall {A} i (l : list A) d d', 0 <= i < Zlength l -> Znth i l d = Znth i l d'. *)
Fixpoint upto n :=
match n with
| O => []
| S n' => 0 :: map Z.succ (upto n')
end.
Opaque Z.of_nat.

Corollary Zlength_upto : forall n, Zlength (upto n) = Z.of_nat n.