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 [itex]A[/itex] and [itex]B[/itex]? First and foremost it's a
relation. A relation is just an arbitrary collection of ordered pairs of elements [itex](a, b)[/itex] with [itex]a \in A[/itex] and [itex]b \in B[/itex]. In other words a relation is a subset of the Cartesian product [itex]A \times B[/itex]; and another way to say that is that a relation is an element of [itex]\mathscr{P}(A \times B)[/itex], where [itex]\mathscr{P}[/itex] denotes the Powerset -- the collection of all subsets of [itex]A \times B[/itex].
So we say that f is a function from [itex]A[/itex] to [itex]B[/itex]; in symbols [itex]f: A \rightarrow B[/itex] if
(1) [itex]{f \in \mathscr{P}(A \times B)}[/itex]
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 [itex](a, b1)[/itex] and [itex](a, b2)[/itex] [itex]\in f[/itex], then [itex]b1 = b2[/itex].
But what exactly are [itex]a[/itex], [itex]b1[/itex], and [itex]b2[/itex]? Well, [itex]a \in A[/itex] and [itex]b1[/itex] and [itex]b2 \in B[/itex].
But are they
particular values of [itex]a[/itex] and [itex]b1[/itex] and [itex]b2[/itex]? No, what we are really saying is that for
any [itex]a[/itex], [itex]b1[/itex], and [itex]b2[/itex], if [itex](a, b1)[/itex] and [itex](a, b2)[/itex] are in [itex]f[/itex], then [itex]b1 = b2[/itex]. The word
any tells us we need a couple of
universal quantifiers.
So the function requirement becomes:
2) [itex]( \forall a \in A)\space(\forall b1[/itex], [itex]b2 \in B)\space[(a, b1) \in f[/itex] and [itex](a, b2) \in f \Rightarrow b1 = b2 ][/itex].
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?
[itex]? \space = \space \{f \in \mathscr{P}(A \times B)[/itex] [itex]|[/itex] [itex]( \forall a \in A)\space(\forall b1[/itex], [itex]b2 \in B)\space[(a, b1) \in f[/itex] and [itex](a, b2) \in f \Rightarrow b1 = b2 ][/itex]
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 [itex]B^{A}[/itex].
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 [itex]B^{A}[/itex], the set of all functions from [itex]A[/itex] to [itex]B[/itex].
* [itex]B^{A}\space = \space \{f \in \mathscr{P}(A \times B)[/itex] [itex]|[/itex] [itex]( \forall a \in A)\space(\forall b1[/itex], [itex]b2 \in B)\space[(a, b1) \in f[/itex] and [itex](a, b2) \in f \Rightarrow b1 = b2 ][/itex].