Proof using.
intros a b l1 l2 l3.
apply permutation_app_comp; auto.
change
(permutation ((a :: nil) ++ l2 ++ (b :: nil) ++ l3)
((b :: nil) ++ l2 ++ (a :: nil) ++ l3)) in |- *.
repeat rewrite <- app_ass.
apply permutation_app_comp; auto.
apply permutation_trans with ((b :: nil) ++ (a :: nil) ++ l2); auto.
apply permutation_app_swap; auto.
repeat rewrite app_ass.
apply permutation_app_comp; auto.
apply permutation_app_swap; auto.
Qed.

(* An element of a list can be put on top of the list to get a permutation *)
Theorem in_permutation_ex :
forall a l, In a l -> exists l1 : list A, permutation (a :: l1) l.