Section contents.
Variables (m: Monoid) (ms: m -> nat).
About MonoidMonadTrans.M .
Definition monoid_expec {A: Set}:
MonoidMonadTrans.M m ne_tree_monad.ext A -> R
:= expec (ms ∘ (fst (B:=_:Set))).
Hypothesis mh: monoidHomo m NatAddMonoid ms.
Definition monoid_expec_sum (T U: Set)
(g: T -> MonoidMonadTrans.M m ne_tree_monad.ext U): list T -> R
:= Rsum ∘ map (monoid_expec ∘ g).

Lemma monoid_expec_sum_ext (T U: Set)
(f g: T -> MonoidMonadTrans.M m ne_tree_monad.ext U):
ext_eq f g ->
ext_eq (monoid_expec_sum f) (monoid_expec_sum g).