# Infimum is a continuous function, compact set

Let $f: X \times Y \rightarrow \mathbb{R}$ be a continuous map. Show that if $Y$ is compact then the function $g: X \rightarrow \mathbb{R}$ defined by $g(x) = \inf \{f(x,y): y \in Y\}$ is also continuous.

-
This is a standard exercise. Maybe if you tell us what have you tried (and you surely have tried something!) we could provide hints. Otherwise, I cannot think of much more than «use the definition of continuity». –  Mariano Suárez-Alvarez Feb 3 '11 at 23:02
(By the way, you can type a prettier $\inf$ by saying \inf in $\LaTeX$.) –  Mariano Suárez-Alvarez Feb 3 '11 at 23:04
@user6495: At least, start by showing that $g$ is well-defined, that is, that $g(x)\in\mathbb{R}$ for all $x\in X$ (you'll need compactness of $Y$ for this). –  Arturo Magidin Feb 3 '11 at 23:08
@user6496: Well, it's not quite right, since $f$ is defined on $X\times Y$, so $f(y)$ does not make sense. But what you mean, I think, is that by compactness (in $\mathbb{R}$), $f_x(Y)$ is bounded and closed, so its infimum is a minimum, so there is a $y_x$ such that $\inf(f_x(Y)) = f_x(y_x)$. –  Arturo Magidin Feb 3 '11 at 23:29
It might be useful to show that $g^{-1}(a,\infty)$ and $g^{-1}(-\infty,a)$ are open for all $a\in\mathbb{R}$. –  Joe Johnson 126 Feb 3 '11 at 23:39

Following the suggestion of Joe Johnson (I was going using intervals $(a,b)$, but this is simpler) (do you see why Joe's suggestion is enough? The sets $(a,\infty)$ and $(-\infty,a)$ form a subbasis for the topology of $\mathbb{R}$, and for a function to be continuous, it suffices to show that the inverse image of every set in a given subbasis is open).

Let $a\in\mathbb{R}$. What is $g^{-1}(-\infty,a)$? It consists of all $x\in X$ such that $g(x)\lt a$. If $g(x)\lt a$, there exists $y_x$ such that $f(x,y_x)\lt a$. Since $f$ is continuous, $f^{-1}(-\infty,a)$ is open, and $(x,y_x)\in f^{-1}(-\infty,a)$, so there exist open sets $U_x$ and $V_y$ of $X$ and $Y$, respectively, such that $U_x\times V_y\subseteq f^{-1}(-\infty,a)$.

Now, suppose $x'\in U_x$. Then for all $y\in V_y$ (in particular, for $y_x$) you have $f(x',y_x)\in (-\infty,a)$. What does that tell you about $g(x')$? What does that tell you about $g^{-1}(-\infty,a)$?

Now try to do something along those lines with $g^{-1}(a,\infty)$.

-
I think you want that to read "all $x\in X$ such that $g(x)<a$". –  Joe Johnson 126 Feb 3 '11 at 23:56
@Joe: It was wrong, but I think I fixed it; you may want to refresh the page...? –  Arturo Magidin Feb 3 '11 at 23:57
thanks! got it. –  user6495 Feb 4 '11 at 0:33
Your proof does not use the compactness of $Y$. That is because you need it in the (more difficult part) concerning $g^{-1}(a,\infty)$ that you ommited. –  Meneldur Oct 30 '12 at 10:48