Proof using.
intros.
induction ns; intros; simpl in *; intuition.
break_if.
- simpl in *.
break_or_hyp; intuition eauto.
- apply IHns.
assumption.
Qed.

Lemma in_map2snd_related_in :
forall (m : B) ns n h,
In (n, m) (map2snd m (filter_rel R_dec h ns)) ->
R h n /\ In n ns.