induction t; intuition; simpl in *.
destruct o.
destruct (eqd a a0); subst.
exfalso.
eapply H.
simpl.
intuition.
intuition.
intuition.
rewrite IHt1.
rewrite IHt2.
rewrite ratMult_0_l.
rewrite <- ratAdd_0_r.
intuition.
intuition.
eapply H.
unfold getTreeSupport in *.
simpl.
eapply in_getUnique.
eapply in_or_app.
right.
eapply in_getUnique_if.
eauto.
intuition.
eapply H.
unfold getTreeSupport in *.
simpl.
eapply in_getUnique.
eapply in_or_app.
left.
eapply in_getUnique_if.
eauto.
Qed.

(* Specifications: *)
Lemma lowDistApproxFromTree_datMap_inv : forall (A B : Set)(eqda : eq_dec A)(eqdb : eq_dec B)(tb : DistApproxTree B)(ta : DistApproxTree A)(mapRel : B -> DistApproxTree A -> Prop),
datMap mapRel tb ta ->
(forall b, In b (getTreeSupport eqdb tb) -> exists t,  mapRel b t) ->
(forall b t1 t2, mapRel b t1 -> mapRel b t2 -> t1 = t2) ->
forall a r,
sumList_rel
(fun b r' =>
forall ta', mapRel b ta' ->
lowDistApproxFromTree eqdb tb b * lowDistApproxFromTree eqda ta' a == r')
(getTreeSupport eqdb tb)
r ->
lowDistApproxFromTree eqda ta a == r.