Section contents.
Variable m: Monoid.
Variable X: Set.
Definition pick (l: ne_list.L X): MonoidMonadTrans.M m ne_tree_monad.ext X
:= lift (MonoidMonadTrans.T m) ne_tree_monad.ext X (ne_tree_monad.pick l).
Proof with auto.
unfold compose, ext_eq.
unfold pick.
unfold lift.
simpl.
unfold ne_tree_monad.pick.
intros.
unfold compose.
simpl.
repeat rewrite ne_list.map_map...
Qed.

Lemma In_pick_inv (l: ne_list.L X) (r: prod m X):
ne_tree.In r (pick l) -> fst r = monoid_zero m /\ In (snd r) (ne_list.to_plain l).