Simple question: the double supremum

Let $f:A\times B\to \mathbb R$. Is it always true that $$f^* = \sup\limits_{a\in A,b\in B}f(a,b) = \sup\limits_{a\in A}\sup\limits_{b\in B}f(a,b).$$ I proved it by the $\varepsilon$-$\delta$ arguments, but I still do not sure if I've done it formal enough.

Proof: Let $g(a) = \sup\limits_{b\in B}f(a,b)$ hence $g(a)\geq f(a,b)$ for all $b\in B$ and for any $\varepsilon>0$ exists $b'_{a,\varepsilon}\in B$ such that $f(a,b'_{a,\varepsilon})\geq g(a)-\varepsilon/2$. We put $g^* = \sup\limits_{a\in A}g(a)$, then $g^*\geq g(a)\geq f(a,b)$ for all $a\in A,b\in A$ and for any $\varepsilon>0$ there exists $a'_\varepsilon\in A$ such that $g(a'_\varepsilon)\geq g^*-\varepsilon/2$.

Now, for an arbitrary $\varepsilon>0$ we can take $a'_\varepsilon\in A$ and $b'_{a',\varepsilon}\in B$ such that $f(a'_\varepsilon,b'_{a',\varepsilon})\geq g(a'_\varepsilon)-\varepsilon/2\geq g^*-\varepsilon$, so $g^* = f^*$.

For the case $f^* = \infty$ I have almost the same proof (just inequalities are different). Should I also put it here?

-
Maybe show your proof. – Raskolnikov Jul 26 '11 at 8:12
@Raskolnikov: showed. – Ilya Jul 26 '11 at 8:36
Looks okay, apart from the typo in the 3rd line of the proof where you have $b\in A$ instead of $b\in B$. It would be just a little clearer if immediately after this you said explicitly that you’ve just shown that $g^*\ge f^*$, and at the end said ‘so $g^*\le f^*$, and hence $g^*=f^*$’. Given what you have here, I’ve no need to see the infinite case. – Brian M. Scott Jul 26 '11 at 8:47
@Brian: thanks. – Ilya Jul 26 '11 at 8:48

Yes. Let $x = \sup\limits_{a \in A, b \in B}f(a,b)$ and $y = \sup\limits_{a \in A}\sup\limits_{b\in B}f(a,b)$, where we assume that both exist. For each $a\in A$ let $y_a = \sup\limits_{b\in B}f(a,b)$; clearly all $y_a$ exist, $y = \sup\limits_{a\in A}y_a$, and of course $y_a \le y$ for each $a \in A$.
Fix $a_0 \in A$; $f(a,b) \le x$ for all $\langle a,b \rangle \in A \times B$, so in particular $f(a_0,b) \le x$ for all $b \in B$, and hence $y_{a_0} = \sup\limits_{b\in B}f(a_0,b) \le x$. Thus, $y_a \le x$ for all $a\in A$, and it follows that $y = \sup\limits_{a\in A} y_a \le x$. Suppose that $y<x$, and fix $z \in (y,x)$. By the definition of $x$ there is some $\langle a,b \rangle \in A \times B$ such that $f(a,b) > z$. But then we must have $y_a \ge f(a,b) > z > y$, which is absurd. Hence $x=y$.