End Reduction.
Definition mapo X Y (f : X -> option Y) (A : list X) : list Y :=
concat (map (fun x => match f x with None => [] | Some y => [y] end) A).

(* Specifications: *)
Lemma mapo_app X Y (f : X -> option Y) A B :
mapo f (A ++ B) = mapo f A ++ mapo f B.