Definition RndPerm(n : nat) :=
  shuffle _ (allNatsLt n).

(* Specifications: *)
Theorem list_pred_map_both': forall (A B C D : Set) (lsa : list A) (lsb : list B) (P : C -> D -> Prop) (f : A -> C)(g : B -> D), list_pred (fun (a : A) (b : B) => P (f a) (g b)) lsa lsb -> list_pred P (map f lsa) (map g lsb).
Theorem addInAllLocations_pred : forall (A B : Set) (R : A -> B -> Prop) (a : list A) (b : list B), list_pred R a b -> forall a1 a2, R a1 a2 -> list_pred (list_pred R) (addInAllLocations a1 a) (addInAllLocations a2 b).
Theorem getAllPermutations_pred : forall (A B : Set)(R : A -> B -> Prop)(lsa : list A)(lsb : list B), list_pred R lsa lsb -> list_pred (list_pred R) (getAllPermutations lsa) (getAllPermutations lsb).
Theorem nth_error_app_Some : forall (A : Set)(ls : list A) n (a a' : A), nth_error ls n = Some a -> nth_error (ls ++ (a' :: nil)) n = Some a.
Theorem nth_error_app_length : forall (A : Set)(ls : list A) (a : A), nth_error (ls ++ (a :: nil)) (length ls) = Some a.
Theorem allNats_nth_pred : forall (A : Set)(ls : list A), list_pred (fun (a : A) (b : nat) => nth_error ls b = Some a) ls (allNatsLt (length ls)).
Theorem permute_nth_equiv : forall (A : Set)(ls : list A) a b, list_pred (fun (a0 : A) (b0 : nat) => nth_error ls b0 = Some a0) a b -> a = permute ls b.
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))).
Theorem list_pred_nth_exists : forall (A B : Set)(P : A -> B -> Prop) lsa lsb, list_pred P lsa lsb -> forall n a, nth_option lsa n = Some a -> exists b, nth_option lsb n = Some b /\ P a b.
Theorem rndListElem_pred : forall (A B : Set)(eqda : EqDec A)(eqdb : EqDec B)(P : A -> B -> Prop)(lsa : list A)(lsb : list B), list_pred P lsa lsb -> comp_spec (fun a b => match a with | None => b = None | Some a' => exists b', b = Some b' /\ P a' b' end) (rndListElem _ lsa) (rndListElem _ lsb).
Theorem shuffle_RndPerm_spec : forall (A : Set)(eqd : EqDec A)(ls : list A), comp_spec (fun a b => a = permute ls b) (shuffle eqd ls) (shuffle _ (allNatsLt (length ls))).
Theorem RndPerm_In_support : forall n ls, In ls (getSupport (RndPerm n)) -> Permutation (allNatsLt n) ls.
Theorem RndPerm_In_support_length : forall n ls, In ls (getSupport (RndPerm n)) -> length ls = n.
Theorem RndPerm_wf : forall n, well_formed_comp (RndPerm n).