(Analysis 1 by Tao) Exercise 8.4.1. Show that the axiom of choice implies Proposition 8.4.7. (Hint: consider the sets $Y_x : = \{ y\in Y : P(x, y) \text{is true}\}$ for each $x \in X$.) Conversely, show that if Proposition 8.4.7 is true, then the axiom of choice is also true.
Proposition 8.4.7. Let $X$ and $Y$ be sets, and let $P(x,y)$ be a property pertaining to an object $x \in X$ to an object $y \in Y$ such that for every $x \in X$ there is at least one $y \in Y$ such that $P(x,y)$ is true. Then there exists a function $f: X \to Y$ such that $P(x, f(x))$ is true for all $x \in X$.
Axiom 8.1 (Choice) : Let $I$ be a set, and for each $\alpha \in I$, let $X_\alpha$ be a non-empty set. Then $\prod_{\alpha \in I} X_\alpha$ is also non-empty. In other words, there exists a function $(x_\alpha)_{\alpha \in I}$ which assigns to each $\alpha \in I$ an element $x_\alpha \in X_{\alpha}$.
My understanding of the axiom of choice is that we are able to pick an arbitrary element form a non-empty set.
But, how does this and the hint given help us solve this question? Any help would be appreciated.
Since $I_x:=\{y\in Y:P(x,y)\}\neq\emptyset$ for each $x\in X$ the axiom of choice gaurantees there exists a function $f:X\to\bigcup_{x\in X} I_x$ satisfying $f(x)\in I_x$ for each $x\in X$ and therefore $P(x,f(x))$.