Proof with auto.
intros.
rewrite monoid_expec_bind_leaf.
unfold monoid_expec.
rewrite (@expec_ext _ (ms ∘ monoid_mult m (fst n) ∘ fst (A:=m) (B:=Y)) (plus (ms (fst n)) ∘ ms ∘ fst)).
rewrite <- comp_ass.
rewrite (ext_eq_rw (expec_plus_c (ms ∘ fst (A:=m) (B:=Y)) (ms (fst n)))).
reflexivity.
intro.
repeat rewrite comp_apply.
apply (monoidHomo_mult mh).
Qed.

(* Specifications: *)
Lemma monoid_expec_bind_det (X: Set) (v: prod m X) (x: MonoidMonadTrans.M m ne_tree_monad.ext X):
ne_tree_monad.deterministic x v -> forall (Y: Set) (f: X -> MonoidMonadTrans.M m ne_tree_monad.ext Y), monoid_expec (x >>= f) = monoid_expec x + monoid_expec (f (snd v)).