Proof using.
intros. induction xs; simpl; auto.
repeat break_match.
- apply IHxs.
intros. apply H; intuition.
- exfalso. specialize (H a a).
apply H; intuition.
do_in_app. intuition.
- exfalso. apply n. intuition.
- simpl. f_equal.
apply IHxs.
intros. apply H; intuition.
Qed.

Lemma in_dedup_was_in :
forall xs (x : A),
In x (dedup xs) ->
In x xs.