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!
The direction you have looks like the right idea, but you could clean up the indexing a little bit. For example, use $A$ itself as an index set: Given $a\in A$ define $B_a=\{b\in B:(a,b)\in R\}$. Then each $B_a$ is nonempty since $dom(R)=A$. Now continue in the same way and apply the axiom of choice to the collection $\{B_a\}_{a\in A}$.
For the other direction: To prove the axiom of choice, you want to take a collection $\{B_i\}_{i\in I}$ of nonempty sets and use the assumption to construct a choice function. So we need some relation $R$ to apply this assumption to. You can reverse engineer the idea from the proof you have. Before, we used the domain $A$ as an index set. So here we use the index set $I$ as a domain. Let $B=\bigcup_{i\in I}B_i$. Define a relation $R$ on $I\times B$ so that $(i,b)\in R$ iff $b\in B_i$. Now apply the assumption to $R$ to get a choice function for the original collection.