intuition.
destruct H2. (*dat_correct_bind2 *)
intuition.
inversion H1; clear H1; subst. (*lowDistApprox_bind *)
unfold dat_correct in *.
symmetry.
eapply lowDistApproxFromTree_datMap_inv; intuition.
eapply H4.
destruct (@dat_exists n _ (c2 b)).
eapply H0.
eapply getTreeSupport_in.
eauto.
eauto.
econstructor.
eauto.
simpl in *.
eapply dat_correct_func; eauto.
eapply sumList_rel_ls_intersect.
eapply sumList_rel_body_eq_strong.
eapply H2.
intuition.
erewrite H5.
eapply eqRat_refl.
eapply low_tree_approx_same.
trivial.
eapply H3.
eapply low_tree_approx_same.
eapply H0.
eapply H1.
eapply H6.
intuition.
eauto.
eapply getSupport_NoDup.
eapply getUnique_NoDup.
eapply comp_eq_dec; eauto.
intuition.
destruct (@dat_exists n _ (c2 a0)).
eapply H0.
trivial.
rewrite <- H5.
rewrite H6.
intuition.
eauto.
eauto.
intuition.
eapply ratMult_0.
left.
eapply getTreeSupport_approx_0.
eauto.
intuition.
eapply ratMult_0.
left.
eapply getTreeSupport_approx_0.
intuition.
eapply H5.
eapply getTreeSupport_in; eauto.
Grab Existential Variables.
eapply comp_eq_dec; eauto.
Qed.

(* Specifications: *)
Lemma in_flattenPair_inv : forall (A B : Set)(ls : list (A * list B)) a b,
In (a, b) (flattenPair ls) ->
exists lsb,
In b lsb /\ In (a , lsb) ls.