induction a; inversion 1; intuition; simpl in *.
subst.
rewrite H2.
f_equal.
eapply IHa.
trivial.
Qed.

(* Specifications: *)
Theorem getAllPerms_permute_eq :
forall (A : Set)(ls : list A),
list_pred (fun (a : list A) (b : list nat) => a = permute ls b)
(getAllPermutations ls) (getAllPermutations (allNatsLt (length ls))).