dijkarte said:
Thanks for you informative reply. Now I realize the mistakes I made. :)
I wrote up a solution to this.
Problem: We want to define f: A -> B using set-builder notation.
What's a function between two sets A and B? First and foremost it's a
relation. A relation is just an arbitrary collection of ordered pairs of elements (a, b) with a \in A and b \in B. In other words a relation is a subset of the Cartesian product A \times B; and another way to say that is that a relation is an element of \mathscr{P}(A \times B), where \mathscr{P} denotes the Powerset -- the collection of all subsets of A \times B.
So we say that f is a function from A to B; in symbols f: A \rightarrow B if
(1) {f \in \mathscr{P}(A \times B)}
and (2) ... what's the other condition? We have to work out the notation for the constraint that turns an arbitrary relation into a function. We want to say that if (a, b1) and (a, b2) \in f, then b1 = b2.
But what exactly are a, b1, and b2? Well, a \in A and b1 and b2 \in B.
But are they
particular values of a and b1 and b2? No, what we are really saying is that for
any a, b1, and b2, if (a, b1) and (a, b2) are in f, then b1 = b2. The word
any tells us we need a couple of
universal quantifiers.
So the function requirement becomes:
2) ( \forall a \in A)\space(\forall b1, b2 \in B)\space[(a, b1) \in f and (a, b2) \in f \Rightarrow b1 = b2 ].
So we can now say that (1) and (2) define the property of a set being a function. Writing down those two statements is the best we can do to satisfy the original problem.
If we were to put (1) and (2) together into a single set-builder spec, what would we get?
? \space = \space \{f \in \mathscr{P}(A \times B) | ( \forall a \in A)\space(\forall b1, b2 \in B)\space[(a, b1) \in f and (a, b2) \in f \Rightarrow b1 = b2 ]
This is not the definition a function in general; rather, it's a set-builder specification for some
particular set. And what set is it? A little thought will convince you that it's the set of all the possible function from A to B. This set is commonly denoted as B^{A}.
Conclusion:
* We can't actually characterize the
property of being a function, using only one line of set-builder notation. Instead we make a definition, saying that f: A -> B is a shorthand for the two conditions (1) and (2) above.
* If you put (1) and (2) together into a single set-builder spec, you get B^{A}, the set of all functions from A to B.
* B^{A}\space = \space \{f \in \mathscr{P}(A \times B) | ( \forall a \in A)\space(\forall b1, b2 \in B)\space[(a, b1) \in f and (a, b2) \in f \Rightarrow b1 = b2 ].