Set Implicit Arguments.
Require fix_measure_utils.
Set Shrink Obligations.
Variables (T: Set) (cmp: T -> T -> bool). (* "le" *)
Definition counted_cmp (x y: T): SimplyProfiled bool := (1, cmp x y). (* lift *)
Proof with auto with arith.
intros pd.
induction l...
simpl.
destruct (filter SimplyProfiled p l)...
destruct s...
set (pd a).
clearbody e.
destruct (p a)...
simpl in *.
subst.
omega.
Qed.
Proof with auto with arith.
induction l...
simpl.
destruct (filter SimplyProfiled p l).
destruct (filter SimplyProfiled q l).
destruct s.
destruct s0.
simpl in *.
destruct (ex a); [destruct (p a) | destruct (q a)]; simpl in H; subst; simpl; [destruct (q a) | destruct (p a)]; destruct b; simpl; omega.
Qed.

Lemma bind_eqq (M: Monad) (e: extMonad M) (A B: Set) (m n: M A) (f g: A -> M B): m = n -> ext_eq f g -> (m >>= f) = (n >>= g).