induction p; intuition.
simpl.
assert (n = 0%nat). omega.
subst. trivial.
simpl.
destruct (le_dec n p).
rewrite filter_app.
rewrite IHp; intuition.
simpl.
destruct (lt_dec p n ).
omega.
eapply app_nil_r.
assert (n = S p).
omega.
subst.
simpl.
rewrite filter_app.
f_equal.
eapply filter_true.
intuition.
destruct (lt_dec a (S p)); intuition.
apply allNatsLt_lt in H0.
omega.
simpl.
destruct (lt_dec p (S p)); intuition.
Qed.

Theorem map_eq_all :
forall (A B : Type)(ls : list A)(f1 f2 : A -> B),
map f1 ls = map f2 ls ->
(forall a, In a ls -> f1 a = f2 a).