Proof with auto. (* todo: prove in terms of the vec equivalent *)
induction a in b |- *; intros.
destruct b.
apply perm_nil.
discriminate.
assert (In a b).
apply H1.
left...
destruct (In_inv_perm a b H2).
apply perm_trans with (a :: x)...
apply perm_skip.
apply IHa.
cset (Permutation_length H3).
rewrite <- H in H4.
inversion_clear H4...
inversion_clear H0...
cut (incl a0 (a :: x)).
intros.
intro.
intros.
cset (H4 a1 H5).
inversion_clear H6...
subst.
inversion_clear H0.
elimtype False...
apply incl_tran with b...
intro.
intros.
apply H1.
right...
apply Permutation_incl.
apply Permutation_sym...
Qed.

Lemma NoDup_map' A B (f: A -> B) (l: list A):
(forall x y: A, In x l -> In y l -> x <> y -> f x <> f y) ->
NoDup l -> NoDup (map f l).