(* * Duplicate-free lists *)

Inductive dupfree (X : Type) : list X -> Prop :=
| dupfreeN : dupfree nil
| dupfreeC x A : ~ x el A -> dupfree A -> dupfree (x::A).(* * Duplicate-free lists *)

Inductive dupfree (X : Type) : list X -> Prop :=
| dupfreeN : dupfree nil
| dupfreeC x A : ~ x el A -> dupfree A -> dupfree (x::A).(* * Duplicate-free lists *)

Inductive dupfree (X : Type) : list X -> Prop :=
| dupfreeN : dupfree nil
| dupfreeC x A : ~ x el A -> dupfree A -> dupfree (x::A).

(* Specifications: *)
Lemma dupfree_inv x A : dupfree (x::A) <-> ~ x el A /\ dupfree A.
Lemma dupfree_map Y A (f : X -> Y) : (forall x y, x el A -> y el A -> f x = f y -> x=y) -> dupfree A -> dupfree (map f A).
Lemma dupfree_filter p (p_dec : forall x, dec (p x)) A : dupfree A -> dupfree (filter p A).
Lemma dupfree_dec A : eq_dec X -> dec (dupfree A).