Fixpoint splits (l: list T): list (T * list T) :=
    match l with
    | nil => nil
    | h :: t => (h, t) :: map (fun xy => (fst xy, h :: snd xy)) (splits t)
    end.

Lemma splits_are_perms l p: In p (splits l) -> Permutation (fst p :: snd p) l.