compact sets and continuity Let be $X\subset \mathbb{R^m}$, $K\subset \mathbb{R^n}$ compact, $f : X\times K \rightarrow \mathbb{R^p}$ continuous and $c\in \mathbb{R^p}$. Suppose that for every $x\in X$, there is a unique $y \in K$ such that $f(x,y)=c$. Prove that the $y$ depends continuously from $x$.
-My idea was to take a function such that: $\varphi : X\rightarrow K$ where
$$\varphi (x) = y$$ then you should to prove that  $\varphi$ is continuous.
Thank you for your help.
 A: Let $\varphi:X\to K$ be the function that you mentioned above. Let $x\in X$ and $(x_n)_{n\in\mathbb N}$ be a sequence with $x_n\to x$. Let $y_n := \varphi(x_n)$. Assume that $y_n \not\to \varphi(x)$. Then, by compactness there exists a subsequence $(y_{n_j})_{j\in\mathbb N}$ with $y_{n_j}\to z \neq \varphi(x)$.
Since $f$ is continuous $\displaystyle c = \lim_{j\to\infty}f(x_{n_j},y_{n_j}) = f(\lim_{j\to\infty}x_{n_j},\lim_{j\to\infty}y_{n_j}) = f(x,z)$.
Hence $z = \varphi(x)$. Contradiction.
A: Sketch: There's nothing to prove at isolated points of $X$. Let $x$ be an arbitrary limit point of $X$, let $(x_{k})$ be an arbitrary sequence in $X\setminus\{x\}$ converging to $x$, and put $y_{k} = \varphi(x_{k})$ (using your definition of $\varphi$).
You know $K$ is compact, $f(x_{k}, y_{k}) = c$ for all $k$, and $y_{k}$ is the unique element of $K$ satisfying $f(x_{k}, y_{k}) = c$. Use these facts to show successively that:


*

*$(y_{k})$ has a subsequence that converges in $K$.

*Every subsequence of $(y_{k})$ that converges in $K$ has the same limit.

*$(y_{k})$ itself converges in $K$.
Why does this finish the job?
