Continuity of minimum function on topological spaces The question I have is the following:
Suppose $X,Y$ are compact Hausdorff topological spaces and $f: X \times Y \longrightarrow \mathbb{R}$ is continuous. Define $g: X \longrightarrow \mathbb{R}$ by $g(x) = \min_{y \in Y} f(x,y)$.  Show that $g$ is continuous on $X$ using basic definitions of continuity.  I hypothesized using the closed graph theorem ($g$ is a closed map) but the prompt wants me to use basic characterizations of continuity.
My basic approach was to let $(x_n)_{n=1}^{\infty} \subset X$ converge to $x \in X$.  Then for each $n \in \mathbb{N}$, there exists a $y_n \in Y$ corresponding to $\text{argmin}_{y \in Y} f(x_n,y)$.  Consider the sequence $(x_n,y_n) \subset X \times Y$.  Since $Y$ is compact, we can drop to a subsequence $(x_{n_k},y_{n_k})_{k=1}^{\infty}$ such that $(x_{n_k},y_{n_k}) \longrightarrow (x,y)$.
This is where I get stuck.  I don't even know if $g(x_{n_k})=f(x_{n_k},y_{n_y}) \longrightarrow f(x,y) = g(x)$ since $y$ need not be a minimizing value of $f$.
Even if it was, I will have only shown that the image of a specific subsequence under $g$ converges.
Any help is appreciated.
 A: You can quickly see this to be true using some category theory as follows:
Since everything in sight is locally compact and hausdorff, we know (by the exponential adjunction) that maps $f : X \times Y \to \mathbb{R}$ are the same thing as maps $\tilde{f} : X \to \mathbb{R}^Y$, where $\mathbb{R}^Y$ is given the compact-open topology. Since $Y$ is compact and $\mathbb{R}$ is metric, this agrees with the $\sup$-norm topology. But it's clear that $\min : \mathbb{R}^Y \to \mathbb{R}$ is continuous with respect to the $\sup$-norm topology on $\mathbb{R}^Y$, and we're done.
We can unravel this category theoretic language to get a proof using only "basic" facts as follows:
Say $f : X \times Y \to \mathbb{R}$ is continuous.

*

*Show the map $x \mapsto f(x,-) : X \to C(Y)$ is continuous, where $C(Y)$ is the space of continuous functions on $Y$ with the $\sup$-norm.

*Show the map $g \mapsto \min_y g(y) : C(Y) \to \mathbb{R}$ is continuous.

*Then conclude $x \mapsto f(x,-) \mapsto \min_y f(x,y)$ is continuous, as a composite of continuous functions.

If you're struggling to show $1$, you might want to look into "joint continuity" being stronger than "separate continuity". If you're struggling to show $2$, you might consider the identity
$$\min_y g(y) = - \left ( \big \lVert \lVert g \rVert_\infty - g \big \rVert_\infty - \lVert g \rVert_\infty \right )$$
(notice $\lVert g \rVert_\infty - g \geq 0$, and its maximum value is $\lVert g \rVert_\infty$ more than the minimum value of $g$).

I hope this helps ^_^
