Proof using.
induction xs; intros; simpl in *; intuition; invc_NoDup;
break_if; subst; intuition (simpl; try congruence).
now rewrite remove_length_not_in.
Qed.

Lemma subset_size_eq :
forall xs,
NoDup xs ->
forall ys,
NoDup ys ->
(forall x : A, In x xs -> In x ys) ->
length xs = length ys ->
(forall x, In x ys -> In x xs).