Definition triple0 A B C (t: A * B * C): A := fst (fst t).Definition triple1 A B C (t: A * B * C): B := snd (fst t).Definition triple2 A B C (t: A * B * C): C := snd t.Fixpoint rsplits T (l: list T): list (list T * T * list T) :=
  match l with
  | nil => nil
  | h :: t => (nil, h, t) :: map (fun p => (h :: triple0 p, triple1 p, triple2 p)) (rsplits t)
  end.

Lemma perms_alt_perms T (l: list T): Permutation (perms l) (alt_perms l).