proposition: Theorem lin_flat_map : forall (A B : Type) (f : A -> list B) (l : list A) (y : B), LIn y (flat_map f l) <=> {x : A $ LIn x l # LIn y (f x)}.
proof: Proof. induction l; simpl; sp. split; sp. trw in_app_iff. trw IHl. split; sp; subst; sp. exists a; sp. exists x; sp. right; exists x; sp. Qed.
imports: UsefulTypes bin_rels Omega