Cardinality of Power Set of Finite Set/Proof 1

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
Let $T = \left\{{0, 1}\right\}$.

For each $A \in \mathcal P \left({S}\right)$, we consider the characteristic function $\chi_A: S \to T$ defined as:


 * $\forall x \in S: \chi_A \left({x}\right) = \begin{cases}

1 & : x \in A \\ 0 & : x \notin A \end{cases}$

Now consider the mapping $f: \mathcal P \left({S}\right) \to T^S$:
 * $\forall A \in \mathcal P \left({S}\right): f \left({A}\right) = \chi_A$

where $T^S$ is the set of all mappings from $S$ to $T$.

Also, consider the mapping $g: T^S \to \mathcal P \left({S}\right)$:
 * $\forall \phi \in T^S: g \left({\phi}\right) = \phi^{-1} \left({\left\{{1}\right\}}\right)$

Note that $g$ is itself a mapping from a set of mappings: $\phi: S \to T$ is itself a mapping. Also note that $\phi^{-1} \left({\left\{{1}\right\}}\right)$ is an elements of $\mathcal P \left({S}\right)$; i.e. a subset of $S$.

Consider the characteristic function of $\phi^{-1} \left({\left\{{1}\right\}}\right)$, denoted $\chi_{\phi^{-1} \left({\left\{{1}\right\}}\right)} \left({x}\right)$.

We have:

So:

So $f \circ g = I_{T^S}$, that is, the identity mapping on $T^S$.

So far so good. Now we consider:
 * $\chi_A^{-1} \left({\left\{{1}\right\}}\right) = A$

from the definition of the characteristic function $\chi_A$ above.

So:

So $g \circ f = I_{\mathcal P \left({S}\right)}$, that is, the identity mapping on $\mathcal P \left({S}\right)$.

It follows from Bijection iff Left and Right Inverse that $f$ and $g$ are bijections.

Thus by Cardinality of Set of All Mappings the result follows.