Bijection from a set of functions to a Cartesian product of sets Let S be an arbitrary set. Let $F=\{f:\{0,1\}\to S\}$ be the set of functions from $\{0,1\}$ to S. Construct a bijection $F→S \times S$. 
I think I would define the function $a(f)=(f(0),f(1))$ because we know that both $f(0)$ and $f(1)$ are in $S$, but I don't know where to go from there.

Consider the following mapping $\phi:F\to S\times S$: $$\phi(f)=(f(0),f(1))\quad\forall f\in F.$$ It's injective, since if $\phi(f)=\phi(g)$ for $f,g\in F$, then $(f(0),f(1))=((g(0),g(1))$. This means that $f(0)=g(0)$ and $f(1)=g(1)$, so that $f=g$ identically. It's also surjective, since if $(s,t)\in S\times S$, then construct a function $f:\{0,1\}\to S$ as $f(0)=s$ and $f(1)=t$. Then, $f\in F$ and $\phi(f)=(s,t)$.
