induction ls; intuition; simpl in *.
right.
eapply listReplace_in_nil.
eauto.
destruct i; simpl in *.
intuition.
intuition.
edestruct (IHls); eauto.
Qed.

(* Specifications: *)
Theorem firstn_map :
forall (A B : Set)(f : A -> B)(ls : list A) n,
firstn n (map f ls) = map f (firstn n ls).