(** *** Disjointness *)
Definition disjoint A B :=
~ exists x, x el A /\ x el B.

(* Specifications: *)
Lemma disjoint_forall A B :
disjoint A B <-> forall x, x el A -> ~ x el B.
Lemma disjoint_symm A B :
disjoint A B -> disjoint B A.
Lemma disjoint_incl A B B' :
B' <<= B -> disjoint A B -> disjoint A B'.
Lemma disjoint_nil B :
disjoint nil B.
Lemma disjoint_nil' A :
disjoint A nil.
Lemma disjoint_cons x A B :
disjoint (x::A) B <-> ~ x el B /\ disjoint A B.
Lemma disjoint_app A B C :
disjoint (A ++ B) C <-> disjoint A C /\ disjoint B C.
Lemma disjoint_forall A B :
disjoint A B <-> forall x, x el A -> ~ x el B.
Lemma disjoint_symm A B :
disjoint A B -> disjoint B A.
Lemma disjoint_incl A B B' :
B' <<= B -> disjoint A B -> disjoint A B'.
Lemma disjoint_nil B :
disjoint nil B.
Lemma disjoint_nil' A :
disjoint A nil.
Lemma disjoint_cons x A B :
disjoint (x::A) B <-> ~ x el B /\ disjoint A B.
Lemma disjoint_app A B C :
disjoint (A ++ B) C <-> disjoint A C /\ disjoint B C.