TITLE: Equivalent statements of the Axiom of Choice
QUESTION [15 upvotes]: As a little project for myself this winter break, I'm trying to go through as much of Enderton's Elements of Set Theory as I can. I hit a snag trying to show two forms of the Axiom of Choice are equivalent. This is exercise 31 on page 55. 
The first form is:

For any relation $R$ there is a function $G\subseteq R$ with $\text{dom}\ G=\text{dom}\ R$.

and the second form is:

For any set $I$ and any function $H$ with domain $I$, if $H(i)\neq\emptyset$ for all $i\in I$, then $\times_{i\in I}H(i)\neq\emptyset$.

Here is what I have so far:
Assume the first form. Take any set $I$ and let $H$ be a function with domain $I$ such that $H(i)\neq\emptyset$ for all $i\in I$. This function $H$ is a relation, so by the Axiom of Choice, there exists a function $G\subseteq H$ such that $\text{dom}\ G=\text{dom}\ H=I$. Since $\text{dom}\ G=I$, for each $i\in I$, there exists some $G(i)$ such that $(i,G(i))\in G$. But since $G\subseteq H$, $(i,G(i))=(j,H(j))$ for some $j\in I$. Since these are ordered pairs, $i=j$ and $G(i)=H(j)$? I suppose I want to be able to show that for all $i\in I$, I can have $G$ "choose" some element $G(i)\in H(i)$, and thus $G\in\times_{i\in I}H(i)$, showing that $\times_{i\in I}H(i)\neq\emptyset$, but I don't see how the first form allows one to do that. Instead, all I see is that $G(i)=H(i)$.
Conversely, I assume the second form. I take any relation $R$, and denote $\text{dom}\ R=I$. Let $H$ be any function with domain $I$. Now if $H(i)\neq\emptyset$ for all $i$, then $\times_{i\in I}H(i)\neq\emptyset$, so then I could take some $f\in\times_{i\in I}H(i)$, so by definition, $\text{dom} f=I$, and for all $i$, $f(i)\in H(i)$. If it is the case that $(i,H(i))\in R$, then $f\subseteq R$, and the first form would be proven. Again, I suppose I want $H$ to be a function that, for each $i\in I$, $H$ takes the value of exactly one $y_i$ such that $iRy_i$, but again, I don't see how the assumed axiom allows one to do this.
Can anyone explain how to get around these two issues? Thank you.

REPLY [8 votes]: Assume the first form. Let $I$ be any set and let $H$ be any function such that $\text{dom}\ H=I$, and $H(i)\neq\emptyset$ for all $i\in I$. Define a relation $R\subseteq I\times\bigcup_{i\in I}H(i)$ by
$$
\langle i,x\rangle\in R\Leftrightarrow x\in H(i).
$$
By assumption, there exists a function $G\subseteq R$ with $\text{dom}\ G=\text{dom}\ R=I$, as for each $i\in I$, $i\in\text{dom}\ R$ since $H(i)$ is nonempty. So for all $\langle i,G(i)\rangle\in G$, $\langle i,G(i)\rangle\in R$, and thus by the definition of $R$, $G(i)\in H(i)$. It follows that $G\in\prod_{i\in I}H(i)$, so $\prod_{i\in I}H(i)\neq\emptyset$. Thus the second form follows from the first.
Conversely, let $R$ be any relation, and denote $\text{dom}\ R=I$. Define a function 
$$
H\colon I\to\mathscr{P}(\text{ran}\ R)\colon i\mapsto H(i):=\{x\in\text{ran}\ R\ |\ iRx\}.
$$
In particular, $H$ is a function with domain $I$, and $H(i)\neq\emptyset$ for all $i\in I$. So by the second form, $\prod_{i\in I}H(i)\neq\emptyset$, so take $G\in\prod_{i\in I}H(i)$. Hence $\text{dom}\ G=I$, and for all $i\in I$, $G(i)\in H(i)$. Also, for any $\langle i,G(i)\rangle\in G$, $G(i)\in H(i)\subseteq\text{ran}\ R$, and so $\langle i,G(i)\rangle\in R$, so $G\subseteq R$. Hence the two statements of the Axiom of Choice are equivalent.