# Pointwise Sup of continuous functions using Compactness

Consider two topological spaces $X$, $Y$. Assume $X$ is compact.

Question: Is it true that for any continuous function $f:X\times Y\rightarrow Z$ (where $X\times Y$ has the product topology and $[0,1]$ has the usual topology), the function $g:Y\rightarrow Z$ defined as:

$g(y)= \displaystyle \bigsqcup_{x} f(x,y)$

is continuous?

Could you help me with some suggestions on how to try to prove this result?

--------- EDIT -------

Question 2: Furthermore, is it true that if $g(y)=a$ then there exists some $x\in X$ such that $f(x,y)=a$. I.e., can $\bigsqcup_x$ be replaced by $\max_x$: $g(y)= \displaystyle \max_{x} f(x,y)$?

First note that $g^{-1}((a,b)) = \{y\in Y|\exists x\colon f(x,y)>a\}\cap\{y\in Y| \forall x\colon f(x,y)<b\}$. Now $\{y\in Y|\exists x\colon f(x,y)>a\} = \pi_2(f^{-1}((a,1]))$, which is open since $(a,1]$ is open, $f$ is continuous and $\pi_2$ is an open map, since it is the projection of a product. Furthermore, $\{y\in Y| \forall x\colon f(x,y)<b\} = \{y\in Y| \exists x\colon f(x,y)\geq b\}^c = \pi_2(f^{-1}([b,1]))^c$, which is open since $\pi_2$ is a closed map since it is a projection of a product with a compact space.
To answer your second question, note that $f_y\colon X\to [0,1]\colon x\mapsto f(x,y)$ is a continuous map. As such it maps compact sets to compact sets and hence $f_y(X)\subseteq[0,1]$ is compact. Thus indeed $g(y) = \sup f_y(X)\in f_y(X)$.
• Thanks Abel! Before accepting you proof. When you say $\pi_{2}$ is a closed map you assume $X\times Y$ is compact. This requires $Y$ to be compact too. Am I missing something? THANKS Apr 11 '13 at 14:04
• It's even true that for $X$ compact $\pi_2\colon X\times Y\to Y$ is closed. This follows from the tube lemma, a statement and proof of which can be found on en.wikipedia.org/wiki/Tube_lemma.