End Dupfree.
Section Undup.
Variable X : Type.
Context {eq_X_dec : eq_dec X}.
Implicit Types A B : list X.
Fixpoint undup (A : list X) : list X :=
match A with
| nil => nil
| x::A' => if decision (x el A') then undup A' else  x :: undup A'
end.

Lemma dupfree_lt A B x :
dupfree A -> dupfree B -> A <<= B ->
x el B -> ~ x el A  -> |A| < |B|.