Proof using.
induction xs; intros; subst; simpl in *; intuition eauto.
Qed.

(* Specifications: *)
Lemma distinct_pairs_and_app :
forall A R l1 l2,
distinct_pairs_and (A := A) R l1 ->
distinct_pairs_and R l2 ->
(forall x y,
In x l1 ->
In y l2 ->
R x y) ->
distinct_pairs_and R (l1 ++ l2).