Solution (source code)

= Solution

Suppose $f:S\to\mathcal P(S)$ were a <surjective function>. Form the <subset>
$$
D=\{s\in S:s\notin f(s)\}.
$$
Since $D$ belongs to the <power set>, surjectivity would give $D=f(d)$ for some $d\in S$. But then $d\in D$ holds if and only if $d\notin f(d)=D$, a contradiction. Thus no such function is surjective, and in particular \b[there is no <bijection> from $S$ to its <power set>]. This is <Cantor theorem>; the argument also applies when $S$ is empty.

For infinite <binary sequences>, use the <bijection>
$$
(x_n)_{n\geq1}\longmapsto\{n\in\mathbb N:x_n=1\}
$$
with $\mathcal P(\mathbb N)$, taking $\mathbb N=\{1,2,\ldots\}$. Conversely, a subset determines its sequence of membership indicators. The <power set> is infinite, since it contains all singletons, and <Cantor theorem> rules out a bijection with $\mathbb N$. Hence it is an <uncountable set>, as is the set of infinite <binary sequences>. Equivalently, a proposed enumeration $(x_n^{(j)})_{n\geq1}$ is defeated by the sequence $y_j=1-x_j^{(j)}$, which differs from its $j$th listed sequence at position $j$. This is the <Cantor diagonal argument>.