Problem Involving a Generalized Cartesian Product Let $I$ be a set, and for each $i \in I$, let $U_i$ and $V_i$ be sets. Furthermore, suppose for each $i \in I$, there is a bijection $f_i:U_i \to V_i$. Prove that there is a bijection $g:\prod_{i \in I}U_i \to \prod_{i \in I}V_i$.
Essentially, my mindset was to try demonstrating a bijective function $f$ using the information I was given. Basically, I think of the Cartesian products of $U_i$ and $V_i$ for $i \in I$ as follows:
$\left\{\left(a_i\right)_{i \in I}:\forall i \in I\left(a_i \in U_i\right)\right\}$, and $\left\{\left(b_i\right)_{i \in I}:\forall i \in I\left(b_i \in V_i\right)\right\}$
Then, $\forall i \in I$, we know that $f_i:U_i \to V_i$ is a bijection. Then define $g:\prod_{i \in I}U_i \to \prod_{i \in I}V_i$ by setting $g\left(\left(a_i\right)_{i \in I}\right)=\left(f_i\left(a_i\right)\right)_{i\in I}$.
Then, let $\left(a_i\right)_{i \in I} \ne \left(b_i\right)_{i \in I}$. Then, at least one element of $\left(a_i\right)_{i \in I}$ must differ from its corresponding element in $\left(b_i\right)_{i \in I}$. Without loss of generality, pick some $a_0$ and its corresponding $b_0$ from $\left(a_i\right)_{i \in I}$ and $\left(b_i\right)_{i \in I}$, respectively, and let $a_0 \ne b_0$.
Since for all $i \in I$, $f_i$ is bijective, $f_0\left(a_0\right) \ne f_0\left(b_0\right)$. Then, since $g\left(\left(a_i\right)_{i \in I}\right)=\left(f_i\left(a_i\right)\right)_{i\in I}$ and we have $a_0 \ne b_0$, it must be true that $g\left(\left(a_i\right)_{i \in I}\right) \ne g\left(\left(b_i\right)_{i \in I}\right)$.
Therefore, $g$ is injective. However, I am completely dumbfounded as to proving that $g$ is surjective. Any comments of suggestions for the proof I have so far are definitely welcome, and any advice as to how I should go about proving that $g$ is surjective would be greatly appreciated.
 A: The proof of surjectivity is quite straightforward.
Let $(b_i)_{i\in I}$ be a sequence in $\prod_{i\in I}V_i$, then for every $i\in I$ there is a unique $a_i\in U_i$ such that $f_i(a_i)=b_i$, because each $f_i$ is a bijection...
And you can see where this is going.
You can also use a Cantor-Bernstein argument. Since $f_i$ is a bijection, $f_i^{-1}$ is also a bijection. From the part you have shown about injectivity it follows there is an injection from $\prod V_i$ into $\prod U_i$ as well.

Interestingly enough, this statement does not require the axiom of choice, because the sequence of bijections is given. But without having the sequence of $f_i$'s it is consistent that there are families $U_i$ and $V_i$, and for each $i\in I$ there exists a bijection between $U_i$ and $V_i$, and yet $\prod U_i=\varnothing$, but $\prod V_i\neq\varnothing$. 
Of course the catch is that we need the axiom of choice to choose a bijection. It wouldn't even be sufficient to assume that both products are non-empty, because we can arrange that the products are both non-empty but have different cardinalities.
Weird, don't you think?
A: Let $(b_i)_{i\in I} \in \prod_{i\in I}V_i$. Then, for each $b_j \in (b_i)_{i\in I}$, we know that $b_j\in V_j$. Consider $f_j^{-1}(b_j)=c_j\in U_j$ since $f_j$ is a bijection. Therefore, $(f_j^{-1}(b_j))_{j\in I}$ is well-defined since $(f_j^{-1}(b_j))_{j\in I} = (c_j)_{j\in I} $  and $(f_j^{-1}(b_j))_{j\in I} \in \prod_{j\in I}U_j$. 
Now, we have that $g((c_j)_{j\in I})=f_j((c_j))_{j\in I}=f_j(f_j^{-1}(b_j))_{j\in I}$ and since $f_j$ is a bijection for each $j\in I$, $f_j(f_j^{-1}(b_j))_{j\in I} =(b_j)_{j\in I}$ which shows that $g$ is a surjection. 
Furthermore, I should also note that $\prod_{i\in I}U_i \neq \emptyset$ follows from the axiom of choice. 
