Let $X:=\mathbb{R}^m$ and $Y:= \mathbb{R}^n$ be two sets and $f: X \times Y \to \mathbb{R}$ be a map over $X \times Y.$ I would like to show that $$ \inf_{(\textbf{x},\textbf{y}) \in X \times Y} f(\textbf{x},\textbf{y}) = \inf_{\textbf{x} \in X} \widetilde{f}(\textbf{x}) $$ where $$ \widetilde{f}(\textbf{x}) = \inf_{\textbf{y} \in Y} f(\textbf{x},\textbf{y}). $$
Below is my attempt: Begin by noting that $ \inf_{ (\textbf{x},\textbf{y}) \in X \times Y} f(\textbf{x}, \textbf{y}) \leq \inf_{\textbf{x} \in X} \widetilde{f}(\textbf{x}). $ Hence, it reamins to show that the the reverse inequality also holds; i.e., we need to show $ \inf_{ (\textbf{x},\textbf{y}) \in X \times Y} f(\textbf{x}, \textbf{y}) \geq \inf_{\textbf{x} \in X} \widetilde{f}(\textbf{x})$. To this end, we observe that $$ f( \overline{\textbf{x}}, \overline{\textbf{y}}) \geq \inf_{\textbf{y} \in Y} f(\overline{\textbf{x}}, { \textbf{y} }) $$ for all $\overline{\textbf{x}} \in X, \overline{\textbf{y}} \in Y.$ Then take infimum over $X \times Y$ on both sides, we obtain $$ \inf_{ (\textbf{x},\textbf{y}) \in X \times Y}f( {\textbf{x}}, {\textbf{y}}) \geq \inf_{ (\textbf{x},\textbf{y}) \in X \times Y} \widetilde{f}(\textbf{x}) = \inf_{\textbf{x} \in X} \widetilde{f}(\textbf{x}) $$ which is desired.
Does the proof look fine? or I am making some logical error here. Thank you.