Let $L,K$ be to compact metric spaces, let $f:K\times L \to \Bbb{R}$ be a continuous function. Define $\varphi : L \to \Bbb{R}$ as $\varphi(y)=\sup_{x\in K} f(x,y)$. Show that $\varphi$ is continuous.
My attempt;
Let $y\in L$ consider $\left. f \right.|_{K \times \{y\}}:K \times \{y\} \to \Bbb{R}$. Since $\left.f\right.|_{K \times \{y\}}$ is continuous, $K \times \{y\}$ compact, $\left.f\right.|_{K \times \{y\}}$ attains it's maximum say $f(x_0,y)$ and therefore, $\varphi(y)=f(x_0,y)$
Now given $\epsilon >0$ I look for $\delta >0$ such that $d(y_1,y_2)<\delta$ implies $|\varphi(y_1)-\varphi(y_2)| < \epsilon$
So $$|\varphi(y_1)-\varphi(y_2)|=|f(x_1,y_1)-f(x_2,y_2)|$$ for some $x_1,x_2 \in K$
Using the continuity of $f$ we have that given $\epsilon$, there exist $\delta_0$ such that $d(y_1,y_2) \leq d((x_1,y_1)(x_2,y_2)) < \delta_0$ implies $|f(x_1,y_1)-f(x_2,y_2)|<\epsilon$. Taking $\delta=\delta_0$ we have that $\varphi$ is continuous.
Is the proof allright? Im not sure in the steps of defining $\left.f\right.|_{K \times \{y\}}$, and saying that the supremum is attained.