Proof using.
induction xs; simpl; repeat break_match; simpl; intuition (auto; try congruence).
Qed.

(* Specifications: *)
Lemma filterMap_of_filterMap :
forall (f : B -> option C) (g : A -> option B) xs,
filterMap f (filterMap g xs) =
filterMap (fun a => match g a with
| Some b => f b
| None => None
end) xs.