Definition deterministic (X: Set) (x: M X) (v: X): Prop := x = ne_tree.Leaf v.

Lemma bind_eq (X X' Y XM: Set) (f: X -> M Y) (f': X' -> M Y) (xm: X -> XM) (xm': X' -> XM): (forall p q, xm p = xm' q -> f p = f' q) -> forall (x: M X) (x': M X'), ne_tree.map xm x = ne_tree.map xm' x' -> bind x f = bind x' f'.