Your problem arises from the fact that you ended the definition of the option_function
with Qed
instead of Defined
.
Using Qed
, you somehow 'hide' the internals of fmap
. Then you can no longer unfold its definition (e.g. using the unfold
and simpl
tactics). Using Defined
instead of Qed
let you tell Coq that you intend to use the definition of fmap
latter, so it should be unfoldable.