Fixpoint forNats(n : nat) :=
  match n with
      | 0 => nil
      | S n' =>
        cons n' (forNats n')
  end.

Lemma map_NoDup' : forall (A B : Set) (ls : list A) (f : A -> B), NoDup ls -> (forall a1 a2 : A, In a1 ls -> In a2 ls ->a1 <> a2 -> f a1 <> f a2) -> NoDup (map f ls).