Definition card (A : list X) : nat := |undup A|.

(* Specifications: *)
Lemma card_ex A B : card A < card B -> exists x, x el B /\ ~ x el A.
Lemma card_cons x A : card (x::A) = if decision (x el A) then card A else 1 + card A.
Lemma card_cons_rem x A : card (x::A) = 1 + card (rem A x).
Lemma card_0 A : card A = 0 -> A = nil.
Lemma complete_induction (p : nat -> Prop) (x : nat) : (forall x, (forall y, y<x -> p y) -> p x) -> p x.
Lemma size_induction X (f : X -> nat) (p : X -> Prop) : (forall x, (forall y, f y < f x -> p y) -> p x) -> forall x, p x.