Definition plusnb (y x: nat) (nb: natBelow x): natBelow (x + y) :=
  match nb in natBelow x' return natBelow (x' + y) with
  | mkNatBelow a b => eq_rec_r natBelow (mkNatBelow a (b + y)) (eq_S _ _ (plus_assoc_reverse a b y))
  end.

(* Specifications: *)
Lemma val_plusnb y x (nb: natBelow x): nb_val (plusnb y nb) = nb_val nb.
Lemma map_app (A B: Type) (f: A -> B) n (v: Vector.t A n) m (w: Vector.t A m): map f (app v w) = app (map f v) (map f w).
Lemma app_eq A m (x x': Vector.t A m) n (y y': Vector.t A n): x = x' -> y = y' -> app x y = app x' y'.
Lemma nats_plus x n y: nats n (x + y) = map (fun nb => eq_rec_r natBelow nb (plus_assoc n x y)) (app (map (@plusnb y _) (nats n x)) (nats (n + x) y)).
Lemma nb_nats_plus x n y: nb_nats n (x + y) = app (nb_nats n x) (nb_nats (n + x) y).
Lemma map_cons A B (f: A -> B) (h: A) n (t: Vector.t A n): map f (Vector.cons h t) = Vector.cons (f h) (map f t).
Lemma Permutation_mapping (X: Set) n (a b: Vector.t X n): Permutation a b -> exists l: Vector.t (natBelow n) n, (forall x, List.In x l) /\ map (nth b) l = a.