Definition emp: {p: Partitioning | Permutation (p Eq ++ p Lt ++ p Gt) nil} :=
exist (fun p => Permutation (p Eq ++ p Lt ++ p Gt) nil) (fun _ => nil) (perm_nil T).
End Partitioning.
Fixpoint repeat T (n: nat) (x: T): list T :=
match n with
| 0 => nil
| S n' => x :: repeat n' x
end.

Lemma map_concat T U (l: list (list T)) (f: T -> U): map f (concat l) = concat (map (map f) l).
Proof with auto.