Section expec_ctors.
Variables (T: Set) (f: T -> nat).
End expec_ctors.
(* misc expec *)
Add Parametric Morphism (A: Set): (@expec A)
with signature (@ext_eq A nat) ==> (@ext_eq (ne_tree.T A) R)
as expec_ext_morph.
Proof with auto.
induction t.
repeat rewrite expec_Leaf.
apply plus_INR.
repeat rewrite expec_Node_one...
repeat rewrite expec_Node_cons.
rewrite IHt.
rewrite IHt0.
field...
Qed.

Lemma expec_map (T U: Set) (g: T -> U) (f: U -> nat) (t: ne_tree.T T):
expec f (ne_tree.map g t) = expec (f ∘ g) t.