intros a b x H; case (set_add_elim _ _ _ H); intros; trivial.
case H1; trivial.
Qed.
#[local]
Hint Resolve set_add_intro set_add_elim set_add_elim2 : core.

Lemma set_remove_iff (a b : A) (l : set) :
NoDup l -> (In a (set_remove b l) <-> In a l /\ a <> b).