Let $X,Y \ne\varnothing$ and $g:X\times Y \rightarrow \mathbb{R}$. Show that $$\sup_{y \in Y} \inf_{x \in X}g(x,y) \leq \inf_{x \in X} \sup_{y \in Y} g(x,y).$$
First note that $$ g(\overline{x},\overline{y}) \leq \sup_{y \in Y}g(\overline{x},y)$$ for all $\overline{x} \in X$ and $\overline{y} \in Y$. Then take the infimum wrt $X$ on both sides, giving $$ \inf_{x \in X}g(x,\overline{y}) \leq \inf_{x \in X}\sup_{y \in Y}g(x,y) $$ which now holds for all $\overline{y} \in Y$. Thus we can take the supremum over $Y$ on the lhs to give the desired result.
Question
Why taking the supremum over $Y$ on the lhs in the last inequality won't affect the inequality?
Could someone explain please?
I found this solved exercise here How to show $ \sup \inf g(x,y) \leq \inf \sup g(x,y)$?
In the last inequality $$ \inf_{x \in X}g(x,\overline{y}) \leq \inf_{x \in X}\sup_{y \in Y}g(x,y), \quad \text{for all $\,\overline{y}\in Y$}, $$ the RHS does NOT depend on $\overline{y}$, whereas the LHS does. So it is basically an inequality of the form $$ f(\overline{y})\le A \quad \text{for all $\,\overline{y}\in Y$}, $$ and hence $A$ is an upper bound of all the values $f(\overline{y})$, for $\,\overline{y}\in Y$. Thus $A$ is great or equal to the least upper bound of the values $f(\overline{y})$, for $\,\overline{y}\in Y$, and therefore $$ \sup_{\overline{y}\in Y} f(\overline{y})\le A \quad \text{for all $\,\overline{y}\in Y$}. $$ and hence $$ \sup_{\overline{y}\in Y}\inf_{x \in X}g(x,\overline{y}) \leq \inf_{x \in X}\sup_{y \in Y}g(x,y). $$