$f$ is a mapping from $X \times Y$ to $Z$.
$X$ and $Y$ are sets.
$Z$ is a set with $\sup$ defined ( I am not very sure how to formulate that. Is $Z$ required to have some total order?), and can be but not necessarily $\mathbb R$ (although $Z=\mathbb R$ is what I am considering, I also like to know more general).
Is it true that $$ \sup_x \sup_y f(x,y) = \sup_y \sup_x f(x,y) = \sup_{(x,y)} f(x,y)?$$
Thanks.
Yes:
Assume $z$ is an upper bound for $\{\sup_y\,f(x,y)\,:\,x\in X\}$, then as $z\ge \sup_y f(x,y)$ for all $x$, we get $$z\ge f(x,y)$$ for all $x$ and $y$.
Conversely, if $z$ is an upper bound for $\{f(x,y)\,:\,x\in X,\,y\in Y\}$, then again trivially $z\ge\sup_y f(x,y)$ for any $x$, hence $z\ge \sup_x\left(\sup_y f(x,y)\right)$.
So we find that the sets of upper bounds for $\{\sup_y\,f(x,y)\,:\,x\in X\}$ and for $\{f(x,y)\,:\,x\in X,\,y\in Y\}$ coincide, so their least element (the $\sup$) is the same.
Note that it works for any complete (semi-)lattice $Z$ (i.e. partially ordered set with all of its subsets having supremum).