Section two_lists_rect.
Variables (T: Type) (P: list T -> list T -> Type)
(Pnil_l: forall x, P nil x) (Pnil_r: forall x, P x nil)
(Pcons: forall x x' y y', P x' (y :: y') -> P (x :: x') y' -> P (x :: x') (y :: y')).
Let R: relation (list T * list T) := pair_rel (ltof (list T) (@length _)) (ltof (list T) (@length _)).
Let wf_R: well_founded R.
*)
Proof with auto.
induction l...
simpl.
rewrite <- IHl.
unfold Basics.compose.
rewrite map_app.
rewrite concat_app...
Qed.

Lemma Permutation_concatMap T U (f g: T -> list U) l:
(forall x, In x l -> Permutation (f x) (g x)) ->
Permutation (concat (map f l)) (concat (map g l)).