If $g(y)=\max\limits_{x \in X} f(x,y)=f(h(y),y).$ Prove that $h(y)$ is continuous Let $ X\subset\mathbb{R}^m$ and $Y\subset\mathbb{R}^n$ non empty, convex and compact sets, and let $f : X\times Y\rightarrow\mathbb{R}$ continuous funtion.
If
$f(\cdot,y):Y\rightarrow\mathbb{R}$ convex for every $y\in Y$
$f(x,\cdot):X\rightarrow\mathbb{R}$ concave for every $x\in X$
If $g(y)=\max\limits_{x \in X} f(x,y)=f(h(y),y).$
Prove that
$\cdot \quad g(y)$ is continuous
My attempt.
Proof:
Suppose g(y) is not continuous. So
there exist $ \epsilon>0$ and  a sequence $\{y_i\}\subseteq Y$ : $ y_i \rightarrow y_0 \in Y$,such that $\Vert g(y_i)-g(y_0)\Vert>\varepsilon$  for every $i$.
and for the function $f(h(y).\cdot)$ :
$|f(h(y_i),y_0)-f(h(y_0),y_0)|>\delta,\quad i=1,2,...$
we subtract and add $f(h(y_0),y_i)$:
$\delta < |f(h(y_i),y_0)-f(h(y_0),y_0)+f(h(y_0),y_i)-f(h(y_0),y_i)|$
$ = |f(h(y_i),y_0)-f(h(y_0),y_i)+f(h(y_0),y_i)-f(h(y_0),y_0)|$
$\leq |f(h(y_i),y_0)-f(h(y_i),y_0)|+ |f(h(y_0),y_i)-f(h(y_0),y_0)|$
I'm not sure if this the correct way of proving it.
I suppose i could try applying that f is continuous on a compact set.
 A: Suppose $y_k \to y$. We could like to show that $g(y_k) \to g(y)$.
Here is a terse proof. It relies on the result that $z_k \to z$ iff for all subsequences $K \subset \mathbb{N}$ there exists a further subsequence $K' \subset K$ such that $z_k \overset{K'}{\rightarrow}z$
Since $X$ is compact, there are $x_k$ such that $f(x_k,y_k) = g(y_k)$.
Pick a subsequence $K$. Then there is some $K' \subset K$ and $x' \in X$ such that $x_k \overset{K'}{\rightarrow}x'$. Then we have (i) $g(y_k)=f(x_k,y_k) \overset{K'}{\rightarrow} f(x',y)$ and (ii) since $f(x,y_k) \le f(x_k,y_k)$ for all $k$ and $x$, taking limits gives $f(x,y) \le f(x',y)$ for all $x$ and hence $g(y) = f(x',y)$ and so $g(y_k) \overset{K'}{\rightarrow}g(y)$.
Consequently $g(y_k) \to g(y)$ as required.
A: This is a special case of the maximum theorem.
Nevertheless, we can prove it with weaker arguments.
The below does not use any of the presumed convexity, relying only on compactness and continuity.
Let $(y_{n})_{n}$ be a sequence converging in $Y$ to some point $\hat{y}$.
Since $Y$ is compact, this point is in $Y$.
Next, pick $(x_{n})_{n}$ such that
$$
f(x_{n},y_{n})=\max_{x}f(x,y_{n}).
$$
Since $X$ is compact, we can pick a subsequence along which $x_{n}$ converges.
Therefore, w.l.o.g., suppose $x_{n}$ converges to a point $\hat{x}$.
We claim that $\max_{x}f(x,\hat{y})=f(\hat{x},\hat{y})$.
In this case,
$$
g(y_{n})-g(\hat{y})=f(x_{n},y_{n})-f(\hat{x},\hat{y})\rightarrow0
$$
and hence $g$ is continuous, as desired.
Let us return to the unproved claim of the previous paragraph.
Let $x$ be arbitrary.
Then,
$$
f(\hat{x},\hat{y})=\lim_{n}f(x_{n},y_{n})\geq\lim_{n}f(x,y_{n})=f(x,\hat{y}).
$$
Since $x$ was arbitrary, it follows that $f(\hat{x},\hat{y})\geq\max_{x}f(x,\hat{y})$.
The reverse inequality is trivial.
