Meaning of a set in the exponent

Let $ D = 2^\mathbb{N} $, i.e., D is the set of all sets of natural numbers.

What's the meaning of this definition? Intuitively, I would suggest that $ D = \{1,2,4,...\} $ but the explanation "set of all sets" leads me to the guess that this is wrong.


Solution 1:

We write $A^B$ as the set of all functions $f\colon B\to A$. Namely $f$ is a function whose domain is $B$ and takes values in $A$.

In this case $A=\{0,1\}$ and $B=\Bbb N$. So this is the set of all functions from $\Bbb N$ into $\{0,1\}$. If we think about those as indicator functions then we have a natural way of thinking about $2^\Bbb N$ as the power set of $\Bbb N$, also denoted by $\mathcal P(\Bbb N)$, which is the set of all subsets of $\Bbb N$.

(In some parts of set theory where this notation can be confused with other types of exponentiation, you can see the notation ${}^BA$ used instead.)

Solution 2:

A power set $\mathcal P(S)$ of a set $S$ is sometimes denoted $2^S$. If $S$ is a finite set with $|S| = n$ elements, then the number of subsets of $S$ is $|\mathcal P(S)|=2^n$. This is the motivation for the notation $2^S$.