Let $(A, \le_A)$ and $(B, \le_B)$ be partially ordered sets. Let $f: A \to B$ be a function s.t.
$$(\forall x \in A)(\forall y \in A)(x \le_A y \iff f(x) \le_B f(y)) $$
How can I prove that f is 1-1?
Comment: I think I know all the definitions needed (standard set theory definitions) but I don't know how to combine them to find the answer.
You have to use the fact that $z=w$ if and only if $z \le w$ and $z \ge w$. How can you get injectivity from this formulation?
Take $x,y$ such that $f(x) = f(y)$. By the observation above, we have that $f(x) \le f(y)$ and $f(x) \ge f(y)$. Because of the hypothesis, this implies $x \le y$ and $x \ge y$. Again, by the observation above this means $x=y$, and the thesis is shown.
Insight. How did I come up with the observation above? I just made a simple example of non-injectivity that seemed to respect the hypothesis, that is $$ f: \{1,2,3\} \to \{1,2\} \ \ \ \ \ \ f(1) = 1, f(2) = 2, f(3) = 2$$ And I found where the hypothesis was not respected. You can think to the hypothesis as something like: "it is possible to understand if $x \le y$ by looking at their images $f(x), f(y)$", but here it's not possible with $2,3$. Formally, we have that $f(2) \ge f(3)$, which is false in the domain ($2 \ge 3$).