Section Pairwise.
Variables (T : Type) (r : T -> T -> bool).
Implicit Types (x y : T) (xs ys : seq T).
Fixpoint pairwise xs : bool :=
if xs is x :: xs then all (r x) xs && pairwise xs else true.

Lemma pairwise_all2rel :
reflexive r -> symmetric r -> forall xs, pairwise xs = all2rel r xs.