Dick said:
The way you prove two sets are the same size is to show there is a bijection between them.
Yes, which is why I would rather not start out assuming a bijection exists in order to prove that this particular function is one.
I started my solution a few ways making different assumptions. I haven't gotten to proving injection without using facts about the binary representation.
PROBLEM. Show that [itex]s : \mathbb{N} \to \mathcal{F}(\mathbb{N}),[/itex] [itex]s(n) = \{i | \exists (b_0,...,b_k) \in \{0,1\}^{k+1}[/itex][itex][n = \sum_j b_j 2^j\ \wedge \ b_i=1]\}[/itex], where [itex]\mathcal{F}(\mathbb{N})[/itex] is the set of finite subsets of [itex]\mathbb{N}[/itex], is bijective. (Note: [itex]0 \in \mathbb{N} \Leftrightarrow \emptyset \in \mathcal{F}(\mathbb{N})[/itex])
PROOF. Assuming
s is indeed a function,
s is injective since each set sums to at most one number (i.e., [itex]\forall n,m \in \mathbb{N}\ [s(n) = s(m) \implies n = m][/itex]).
s is surjective since each set sums to at least one number in [itex]\mathbb{N}[/itex] (i.e., [itex]\forall x \in \mathcal{F}(\mathbb{N}) \exists n \in \mathbb{N}\ [x=s(n)][/itex]). In other words,
s-1 is a function, so both are bijective.
Alternatively, note that the members of
s(n) correspond to the positions of
1s in the base-two representation of
n, with 0 corresponding to the last/ones position. Let
T be the set of base-two representations of members of [itex]\mathbb{N}[/itex], [itex]f : \mathbb{N} \to T[/itex] be the function encoding the representations, and [itex]g: T \to \mathcal{F}(\mathbb{N})[/itex] be the function that collects the positions of the
1s of a representation into a set. Then
f and
g are both bijections, and
s is the composition of
g with
f, thus
s is also a bijection.
Alternatively, let [itex]s^{-1} : \mathcal{F}(\mathbb{N}) \to \mathbb{N}, s^{-1}(\{x_1,\ldots,x_k\}) = \sum_j 2^{x_j}[/itex]. That
s-1 is a surjection follows by induction. [itex]s^{-1}(\emptyset) = 0[/itex], and if [itex]s^{-1}(x)=n[/itex], then there exists some [itex]y \in \mathcal{F}(\mathbb{N})[/itex] such that [itex]s^{-1}(y)=n+1[/itex]. There are two cases: (i) if [itex]0 \notin x[/itex], then [itex]y = x \cup \{0\}[/itex]; (ii) if [itex]0 \in x[/itex], then if first-missing(
x) is the smallest number not in
x and below-first-missing(
x) is the set of numbers less than first-missing(
x), then [itex]y = (x - \text{below-first-missing}(x)) \cup \text{first-missing}(x)[/itex]. The mechanics for this working can be seen by considering the noted correspondence with
T. If the base-two representation of
n ends in
0 ([itex]0 \notin x[/itex]), then adding 1 will change the last digit to
1 and leave the other digits unchanged. If the representation of
n ends in
1, then the added 1 will carry until it reaches the first position containing
0, changing it to
1 and all positions passed over to
0. (This dependence on the correspondence with
T is merely expository, as is singling out the first case, which is just a special case of the second.)
That
s-1 is injective... not sure. I was thinking of trying induction and breaking it into cases of odd and even. If
n is even, and
x is the unique set mapped to
n, then
x U {0} is clearly (by properties of odds and evens wrt addition and multiplication) the only way to get a set for
n+1, which is unique by hypothesis. The even case is not as obvious to me, but I was thinking of a reductio argument as I was falling alseep last night. But it seems troublesomely complicated to start a contradiction when already in the second case of an induction.