$F=\{f:A \to \{0,1\}\mid f \text{ is a function} \}.$ Prove that $\mathcal{P}$ is equipotent to $F$ Given a nonempty set $A$, define
$$F=\{f:A \to \{0,1\}\mid  f \text{ is a function} \}.$$
Prove that $\mathcal{P(A)}$ is equipotent to $F$ ($\mathcal{P(A)}$~$F$), where $\mathcal{P}$ is the power set of $A$.
How would one prove this? 
I try
Definate a function,, with $B \subseteq \mathcal{P}(a) $
\begin{array}{rcl}
    \phi: \mathcal{P}(A) & \to & F
  \\ B & \to & X_b:A \to \{0,1\}
  \\&& x \to X_B(x) =  &&  
\end{array}
Where $X_B(x)=1 $ if $x\in B$ and $X_B(x)=0 $ if $x \notin B$
How proof that $\phi$ is bijetive ??
 A: Suppose $G \ne H$ that means there is either a $x \in G$ so that $x \not \in H$ or there is an $x \in H$ so that $x \not \in G$.  Wolog assume $x \in G; x\not \in H$.  Then $\phi(G)(x) = 1$ but $\phi(H)(x) = 0$ so $\phi(G) \ne \phi(H)$ so $\phi$ is injective.
Let $f: X \rightarrow \{0,1\}$.  Let $B = \{x\in X| f(x) = 1\}$.  Then $B \subset X$.  $\phi(B)(y) = 1$ if $y \in B$ which would mean $f(y) = 1$. And $\phi(B)(y) = 0$ if $y \not \in B$ which would mean $f(y) \ne 1$ which would mean $f(y) = 0$.   So $\phi(B)(y) = f(y); \forall y \in X$.  So $\phi(B) = f$ and $\phi$ is surjective.
A: $$\phi(B_1)=\phi(B_2)\iff \chi_{B_1}=\chi_{B_2}\iff B_1=B_2$$
Then take $f:A\rightarrow\{0,1\}$ and $B=\{x\in A:f(x)=1\}$. Then prove $F(B)=f$
A: *

*Given a subset $S$ of $A$, define the function $f_S(x)=\mathbb{I}(x\in S)$.

*Given a function $g:A\to\{0,1\}$, define the set $S_g=\{x\in A:g(x)=1\}$
Then, the mappings $S\mapsto f_S$ and $g\mapsto S_g$ are mutually inverse, and provide a bijection between the sets $F$ and $\mathcal{P(A)}$.
