Given $f: E\to\mathbb R$, define $G: E\to\mathbb R^2$ by $G(x) = (x,f(x))$ for all $x\in E$. $E$ is a compact subset of $\mathbb R$. The following are equivalent:
- $f$ is continuous.
- $G$ is continuous.
- The graph of $f$ is a compact subset of $\mathbb R^2$.
First, let $E = [a,b]$. I have shown $1\implies 2$ and $2\implies 3$. Proving $3\implies 1$ would help me complete the argument full circle. Please let me know if the following makes sense (point out errors if any), and help me complete the proof.
$[1\implies 2]$: If $x_n\to x$ and $f$ is continuous, then $f(x_n)\to f(x)$, and hence $G(x_n)\to G(x)$ meaning $G$ is continuous. Does this need more argument?
$[2\implies 3]:$ The continuous image of a compact set is compact. Hence, $G([a,b])$, i.e. the graph of $f$ is compact in $\mathbb R^2$.
I found the following for $[3\implies 1]$:
Let $G([a,b])$ be compact and $x_n\rightarrow x$ be a convergent sequence in $[a,b]$. We show that $f(x_n)$ converges to $f(x)$. Since the graph is compact, $f(x_n)$ has a convergent subsequence,
Q1. $G([a,b])$ is compact, so $(x_n,f(x_n))$ has a convergent subsequence. How does this tell us that $f(x_n)$ has a convergent subsequence? I feel we need to add some details here.
i.e. $f(x_{n_j})\rightarrow y$. That is $(x_{n_j}, f(x_{n_j}))\rightarrow (x, y)$. The graph is closed. That is, the limit of every convergent sequence in $G([a,b])$ is again in $G([a,b])$. Therefore $(x,y)\in G([a,b])$, i.e. $y=f(x)$. Since this is true for every convergent subsequence, we showed that $f(x)$ is the only limit point of $f(x_n)$, i.e. $f(x_n)$ converges to $f(x)$.
Q2. How is the last sentence concluded? We choose an arbitrary convergent subsequence $f(x_{n_j}) \to y$, and found $y = f(x)$. What now?
My attempt for $[3\implies 1]$:
Suppose $G_f = \{(x,f(x)): x\in [a,b]\}$ is compact in $\mathbb R^2$. Define $\phi_1(x,y) = x, \phi_2(x,y) = y$. Suppose $S\subset\mathbb R$ is an arbitrary closed set in $\mathbb R$. $$f^{-1}(S) = \{x\in [a,b]: f(x) \in S\}$$ We can write $$f^{-1}(S) = \phi_1(G_f \cap \phi_2^{-1}(S))$$ The above expression seems good intuitively but I need help establishing it by showing $\subseteq$ and $\supseteq$ inclusions. Next, $S\subset \mathbb R$ is closed tells us that $\phi_2^{-1}(S) \subset \mathbb R^2$ is closed - since $\phi_1,\phi_2$ are continuous. $G_f \cap \phi_2^{-1}(S)\subset G_f$, and $G_f \cap \phi_2^{-1}(S)$ is closed. So, $G_f \cap \phi_2^{-1}(S)$ is compact. $\phi_1$ is continuous, which means $f^{-1}(S)$ is compact. Hence, $f^{-1}(S)$ is closed. Done!
Please help me fill in the gaps in my attempt, and let me know if you've any other ideas to solve the problem, such as $[3\implies 2]$ and $[2\implies 1]$. I'd also like to understand the proof posted above my attempt. Thank you!
Basically, since $f = \phi_2 \circ (\phi_1|{G_f})^{-1}$ and $\phi_1|{G_f}$ has continuous inverse (restricted to the graph), due to Aloizio comments, then f is continuous as composition of continuous functions. This argument requires a bit of topology, but since your argument is as good as Aloizio argument, I would say to not go too deep in it.
– R. W. Prado Mar 24 '21 at 06:38