Fixpoint nats (x n: nat) {struct n}: Vector.t (natBelow (x + n)) n :=
  match n as n0 return Vector.t (natBelow (x + n0)) n0 with
  | 0 => Vector.nil
  | S n0 => map (fun d => eq_rec_r natBelow d (trans_plus_n_Sm x n0))
    (Vector.cons (mkNatBelow x n0) (nats (S x) n0))
  end.Definition nb_nats (x n: nat): Vector.t nat n := map nb_val (nats x n).

(* Specifications: *)
Lemma nats_S (x n: nat): nats x (S n) = map (fun d => eq_rec_r natBelow d (trans_plus_n_Sm x n)) (Vector.cons (mkNatBelow x n) (nats (S x) n)).
Lemma nb_nats_S (x n: nat): nb_nats x (S n) = Vector.cons x (nb_nats (S x) n).
Lemma In_nats_S v u w: List.In w (nats u v) -> List.In (Snb w) (nats (S u) v).
Lemma In_nb_nats v n m: List.In (v + m) (nb_nats m (S (v + n))).
Lemma In_nb_nats' x m n: m <= x -> x < m + n -> List.In x (nb_nats m n).
Lemma In_as_nb_val n (x: natBelow n) m (l: Vector.t (natBelow n) m): List.In (nb_val x) (map nb_val l) -> List.In x l.
Lemma In_nats_0 n x: List.In x (nats 0 n).
Lemma S_rect A n (P: Vector.t A (S n) -> Type): (forall h t, P (Vector.cons h t)) -> forall v, P v.
Lemma In_inv_perm (X: Set) (x: X) n (v: Vector.t X (S n)): List.In x v -> exists v': Vector.t X n, Permutation (Vector.cons x v') v.
Lemma NoDup_incl_Permutation (A: Set) n (a b: Vector.t A n): List.NoDup a -> List.incl a b -> Permutation a b.
Lemma In_nats_inv z y (x: natBelow (y + z)): List.In x (nats y z) -> y <= x < z + y.
Lemma In_nb_nats_inv z y x: List.In x (nb_nats y z) -> y <= x < z + y.
Lemma NoDup_nats y x: List.NoDup (nats x y).
Lemma tail_map (A B: Set) (f: A -> B) n (l: Vector.t A (S n)): tail (map f l) = map f (tail l).
Lemma tail_cons (A: Set) (a: A) n (l: Vector.t A n): tail (Vector.cons a l) = l.
Lemma nth_nats m (i: natBelow m) n: nb_val (nth (nats n m) i) = n + i.
Lemma nth_nats3 m i n: nth (nats (S n) m) i = Snb (nth (nats n m) i).
Lemma nth_nats_0 n i: nth (nats 0 n) i = i.