Proof of a bijection to the set of subsets? For part of a proof I wanted to show that $f: \{1,2\} \to \mathcal{S}(X)$ is a bijection, where $\mathcal{S}(X)$ is the set of subsets of $X$, which in this case I know to be $\{\emptyset , X\}$. So I define $f$ as $f(1) = \emptyset$ and $f(2) = X$. But then $f(1) = \emptyset \iff 1\in f^{-1}\emptyset$, and $f$ is a bijection means $f^{-1}$ is a bijection, so $f^{-1}\emptyset = \{f^{-1}(x) : x\in \emptyset\}$. But no such x is in the empty set, so $f^{-1}\emptyset = \emptyset$, when it should have 1 as an element.
I'm confused as to what exactly is going wrong here; I'm pretty sure that $\mathcal{S}(X)$ should have size 2 so it should biject to $\{1,2\}$.
Any clarifications would be appreciated!

You are confusing between $f^{-1}(a)=\{x\mid f(x)=a\}$ and $f^{-1}(a)=\{x\mid f(x)\in a\}$. The latter is sometimes written as $f^{-1}[a]$ to avoid this sort of confusion when $f(x)$ is a set itself.
So $f^{-1}(\varnothing)=\{1\}$ and $f^{-1}[\varnothing]=\varnothing$.
