Proof using.
intros.
induction ns.
- apply NoDup_nil.
- invc_NoDup.
concludes.
simpl.
break_if; auto.
simpl.
apply NoDup_cons; auto.
apply not_in_map2snd.
assumption.
Qed.

Lemma in_map2snd_snd :
forall h (m : B) ns nm,
In nm (map2snd m (filter_rel R_dec h ns)) ->
snd nm = m.