Proof using.
induction l; intros; simpl in *.
- find_apply_lem_hyp Permutation_nil.
find_rewrite.
auto.
- assert (In a l').
apply Permutation_in with (l := a :: l); auto with datatypes.
find_apply_lem_hyp in_split.
break_exists.
find_rewrite.
find_apply_lem_hyp Permutation_cons_app_inv.
find_apply_hyp_hyp.
find_rewrite.
rewrite map_app.
simpl.
apply Permutation_cons_app.
rewrite <- map_app.
auto.
Qed.

Lemma snd_eq_not_in_map :
forall (l : list (A * B)) n m,
(forall nm, In nm l -> snd nm = m) ->
~ In (n, m) l ->
~ In n (map fst l).