(* Vsorted *)

  Inductive sorted: forall n, Vector.t X n -> Prop := (* Coq.Sorting's definition sucks *)
    | sorted_nil: sorted Vector.nil
    | sorted_one x: sorted (Vector.cons x Vector.nil)
    | sorted_more (a b: X) n (t: Vector.t X n):
        Xle a b -> sorted (Vector.cons b t) -> sorted (Vector.cons a (Vector.cons b t)).(* Vsorted *)

  Inductive sorted: forall n, Vector.t X n -> Prop := (* Coq.Sorting's definition sucks *)
    | sorted_nil: sorted Vector.nil
    | sorted_one x: sorted (Vector.cons x Vector.nil)
    | sorted_more (a b: X) n (t: Vector.t X n):
        Xle a b -> sorted (Vector.cons b t) -> sorted (Vector.cons a (Vector.cons b t)).(* Vsorted *)

  Inductive sorted: forall n, Vector.t X n -> Prop := (* Coq.Sorting's definition sucks *)
    | sorted_nil: sorted Vector.nil
    | sorted_one x: sorted (Vector.cons x Vector.nil)
    | sorted_more (a b: X) n (t: Vector.t X n):
        Xle a b -> sorted (Vector.cons b t) -> sorted (Vector.cons a (Vector.cons b t)).(* Vsorted *)

  Inductive sorted: forall n, Vector.t X n -> Prop := (* Coq.Sorting's definition sucks *)
    | sorted_nil: sorted Vector.nil
    | sorted_one x: sorted (Vector.cons x Vector.nil)
    | sorted_more (a b: X) n (t: Vector.t X n):
        Xle a b -> sorted (Vector.cons b t) -> sorted (Vector.cons a (Vector.cons b t)).

Lemma sorted_lt_values_lt_indices n (v: Vector.t X n): sorted v -> forall i j, Xlt (nth v i) (nth v j) -> i < j.