proposition: Lemma datMap_left_total : forall (A B : Set)(eqdb : eq_dec A)(t : DistApproxTree A)(f : A -> DistApproxTree B -> Prop), (forall a, In a (getTreeSupport eqdb t) -> exists b, f a b) -> exists t', datMap f t t'.
proof: Proof. induction t; intuition; simpl in *. destruct o. destruct (H a). simpl. intuition. econstructor. econstructor. eauto. econstructor. econstructor. edestruct IHt1; eauto. intuition. edestruct H. unfold getTreeSupport in *. simpl in *. eapply in_getUnique. eapply in_or_app. left. eapply in_getUnique_if. eauto. econstructor; eauto. edestruct IHt2; eauto. intuition. edestruct H. unfold getTreeSupport in *. simpl in *. eapply in_getUnique. eapply in_or_app. right. eapply in_getUnique_if. eauto. econstructor; eauto. econstructor. econstructor; eauto. Qed.
imports: FCF.Comp FCF.DetSem FCF.DistSem FCF.Rat Arith FCF.StdNat FCF.Fold FCF.Limit Permutation ZifyNat