Section filter_map.
Variables A B C : Type.
Proof using.
induction l; intros; simpl in *.
- auto.
- repeat break_match; simpl; auto using f_equal.
Qed.
Proof using.
induction l; intros; simpl in *.
- auto.
- repeat find_higher_order_rewrite; auto.
Qed.

Lemma filterMap_defn :
forall (f : A -> option B) x xs,
filterMap f (x :: xs) = match f x with
| Some y => y :: filterMap f xs
| None => filterMap f xs
end.