Fixpoint insert_everywhere (x: T) (l: list T): list (list T) :=
    match l with
    | nil => (x :: nil) :: nil
    | h :: t => (x :: h :: t) :: map (cons h) (insert_everywhere x t)
    end.

(* Specifications: *)
Lemma insert_everywhere_are_perms x l: forall y, In y (insert_everywhere x l) -> Permutation y (x :: l).
Lemma length_insert_everywhere x l: length (insert_everywhere x l) = S (length l).
Lemma perms_are_perms l a: In a (perms l) -> Permutation a l.
Lemma length_perms l: length (perms l) = fact (length l).