End DupfreeLength.
(* * Cardinality *)
Section Cardinality.
Variable X : Type.
Context {eq_X_dec : eq_dec X}.
Implicit Types A B : list X.
Definition card (A : list X) : nat := |undup A|.

Lemma card_ex A B :
card A < card B -> exists x, x el B /\ ~ x el A.