proposition: 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.
proof: Proof. induction ls; intuition; simpl in *. intuition. apply in_app_or in H. intuition. apply in_map_iff in H0. destruct H0. intuition. inversion H0; clear H0; subst. econstructor. split. eauto. left. trivial. edestruct IHls. eauto. intuition. econstructor. split. eauto. right. trivial. Qed.
imports: FCF.Comp FCF.DetSem FCF.DistSem FCF.Rat Arith FCF.StdNat FCF.Fold FCF.Limit Permutation ZifyNat