Solution (source code)

= Solution

Each of the $n$ elements is either included or excluded, so the <rule of product> gives $|\mathcal P(\{1,\ldots,n\})|=2^n$. Alternatively, partition the <power set> into <disjoint> families according to <cardinality>. The family of $k$-element <subsets> has size equal to the <binomial coefficient> $\binom nk$. The <rule of sum> therefore gives
$$
\boxed{2^n=\sum_{k=0}^n\binom nk.}
$$