I ran into this problem :
Prove that the axiom of choice is equivalent to the proposition that for every pair of sets A,B, and for every relation R such that $R \subseteq A \times B$ and $\text{dom}(R) = A$, there exists a function $f : A \to B$ such that $f \subseteq R$.
So, first off I'm not sure how to prove equivalence, but I assumed it would be similar to an if and only if kind of proof where you show both directions lead to each other, here's what I did for the first direction:
Let us assume the axiom of choice, and let $A,B$ be two sets.
Let $R$ be a relation such that $R \subseteq A\times B$ and $\text{dom}(R) = A$ .
Let $B' \subseteq B$ such that $B' = \{b \mid \exists a (\langle a,b\rangle \in R)\}$, let $I$ be a set of indices such that for every $i \in I$, there exists a set $B_{i}$ and an element $a_{i}$ such that $B_{i} = \{ b \mid \langle a_{i}, b\rangle \in R\}$.
Since $B' = \bigcup_{i\in I}B_{i}$, from the axiom of choice there exists a function $f : \bigcup_{i\in I}B_{i}\to B'$ such that $f( B_{i}) = b_{i} \in B_{i}$ for every $i$ in $I$.
Therefore we may define a set $A_{i}$ such that $A_{i} = \{ a \mid \langle a, b_{i}\rangle \in R\}$ for every $i$ in $I$.
Since $B' = \bigcup_{i\in I}B_{i}$ and $A = \bigcup_{i\in I}A_{i}$, we may define a function $g: A\to B$ such that for every $a \in A_{i}$, $g(a) = b_{i} \blacksquare$.
I'm not sure that I used the axiom of choice the way I was supposed to, but more importantly I have no idea how to go about the other direction, how do deduce the existance of an axiom?
Any help would be much appreciated, thanks!