Proof using.
induction xs; intros; simpl in *.
- intuition.
- invc_NoDup. intuition; subst; auto; exfalso.
+ repeat find_rewrite. auto using in_map.
+ repeat find_reverse_rewrite. auto using in_map.
Qed.

Lemma remove_length_not_in : forall (x : A) xs,
~ In x xs ->
length (remove A_eq_dec x xs) = length xs.