Cardinality of Power Set of Finite Set/Proof 3

Theorem
Let $S$ be a set such that:
 * $\left|{S}\right| = n$

where $\left|{S}\right|$ denotes the cardinality of $S$,

Then:
 * $\left|{\mathcal P \left({S}\right)}\right| = 2^n$

where $\mathcal P \left({S}\right)$ denotes the power set of $S$.

Proof
Proof by induction:

For all $n \in \N$, let $P \left({n}\right)$ be the proposition:
 * $\left|{S}\right| = n \implies \left|{\mathcal P \left({S}\right)}\right| = 2^n$

Do not confuse $P \left({n}\right)$, which is a propositional function on $\N$, with $\mathcal P \left({S}\right)$, the power set of $S$.

Basis for the Induction
From Cardinality of Empty Set, we have:
 * $S = \varnothing \iff \left|{S}\right| = 0$

Then:
 * $\mathcal P \left({\varnothing}\right) = \left\{{\varnothing}\right\}$

has one element, that is, $\varnothing$.

So:
 * $\left|{\mathcal P \left({\varnothing}\right)}\right| = \left|{\left\{{\varnothing}\right\}}\right| = 1 = 2^{0}$

thus confirming that $P \left({0}\right)$ holds.

This is our basis for the induction.

Induction Hypothesis
Now we need to show that, if $P \left({k}\right)$ is true, where $k \ge 2$, then it logically follows that $P \left({k+1}\right)$ is true.

So this is our induction hypothesis:
 * $\left|{S}\right| = k \implies \left|{\mathcal P \left({S}\right)}\right| = 2^k$

Then we need to show:
 * $\left|{S}\right| = k+1 \implies \left|{\mathcal P \left({S}\right)}\right| = 2^{k+1}$

Induction Step
This is our induction step:

Let $\left|{S}\right| = k+1$.

Let $x \in S$.

Consider the set $S\,' = S \setminus \left\{{x}\right\}$ where $x$ is any element of $S$.

We see that $\left|{S\,'}\right| = k$.

Let $A \subseteq S$.

Then either $x \in A$ or $x \notin A$.

If $x \notin A$ then $A \subseteq S\,'$.

However, if $x \in A$ then there exists a unique set $A' \subseteq S\,'$ such that $A = A' \cup \left\{{x}\right\}$.

In fact, $A' = A \setminus \left\{{x}\right\}$.

Let $K$ be the number of subsets of $S$ with an even number of elements.

So $P \left({k}\right) \implies P \left({k+1}\right)$ and the result follows by the Principle of Mathematical Induction.

Therefore:
 * $\forall n \in \N: \left|{S}\right| = n \implies \left|{\mathcal P \left({S}\right)}\right| = 2^n$