Fixpoint insertion_sort n: Vector.t X n -> Vector.t X n :=
    match n return Vector.t X n -> Vector.t X n with
    | 0 => fun _ => Vector.nil
    | S n' => fun v => insert_ordered (head v) (insertion_sort (tail v))
    end.

Lemma insertion_sort_sorts n (l: Vector.t X n): sorted (insertion_sort l).