intros.
unfold merges.
destruct merges_ex.
simpl in *.
induction m...
destruct r...
Qed.
End splits_and_perms.
Existing Instance Permutation_perms.

(* Specifications: *)
Lemma map_repeat A B (f: A -> B) c (l: list A):
(forall x, In x l -> f x = c) -> map f l = repeat (length l) c.