9

Let $f: (X, d_X) \rightarrow (Y, d_Y)$ be a function from metric spaces. If $f$ restricted to any compact subset of $X$ is continuous, then $f$ must be continuous everywhere.

Should I proceed with the characterization of continuity that the preimage of a closed set is closed? Except we are working with compact subsets of the domain, not the range, and it is not true that closed sets are mapped to closed sets, so how can I get continuity of $f$ everywhere?

I am also thinking about the fact that compactness is equivalent to sequential compactness in a metric space. Would this help?

  • Did you mean to write dense subset of a metric space? – Dalton Apr 11 '15 at 20:02
  • No, I believe it's supposed to be compact. Wikipedia has the same statement here: http://en.wikipedia.org/wiki/Metric_space#Continuous_maps - "f is continuous if and only if it is continuous on every compact subset of M1" – cappuccino Apr 11 '15 at 20:04
  • Single points are compact. Are you saying that any function continuous at a single point is automatically continuous everywhere? – Adam Hughes Apr 11 '15 at 20:05
  • 3
    The question should say "$f$ restricted to any compact set". –  Apr 11 '15 at 20:06
  • You are missing a crucial part of the hypothesis, namely that $f$ is continuous when restricted to every compact sunspace of $X$, not just a single compact subspace. – Dalton Apr 11 '15 at 20:06
  • Oh, I see the difference. I've changed my statement of the question now, thanks. – cappuccino Apr 11 '15 at 20:07
  • I wrote an answer with more detail, if you're interested. – Dalton Apr 11 '15 at 20:13

4 Answers4

7

Let $C$ be a closed subset of $Y$ and let $x\in\overline{f^{-1}(C)}$.

There exists a sequence $(x_n)$ in $f^{-1}(C)$ that converges to $x$. The set $S=\{x_n:n\ge0\}\cup\{x\}$ is compact, so the restriction of $f$ to $S$ is continuous. Therefore $\lim_{n\to\infty}f(x_n)=f(x)$ and, since $C$ is closed, we have that $f(x)\in C$. Hence $x\in f^{-1}(C)$.

egreg
  • 238,574
  • Could you tell me, why, 'therefore', lim f(xn)=f(x) ? – Pont Jul 26 '21 at 11:23
  • @Nekojiru That's a property of continuous functions: if $f$ is continuous over a set $S$ and the sequence $(x_n)$ in $S$ converges to $x\in S$, then $\lim_{n\to\infty}f(x_n)=f(x)$. Actually, continuity at $x$ is all that's needed. – egreg Jul 26 '21 at 12:01
  • Continuity on S and continuity restricted to S is different thing, I think, your argument is that f restricted to S is continuous. Why can you conclude f is continuous on S ? – Pont Jul 26 '21 at 12:48
  • @Nekojiru Because by assumption (look at the question) the restriction of $f$ to any compact set is continuous. – egreg Jul 26 '21 at 12:56
  • Then, restriction to {x} is continuous, so f is continuous on x, what is wrong with this ? – Pont Jul 26 '21 at 13:24
  • @Nekojiru Sorry, but I don't understand. The assumption is that the restriction of $f$ on every compact set is continuous. I'm using sequential continuity to prove global continuity: where's the problem? Of course the restriction of any function to a singleton is continuous, but so what? – egreg Jul 26 '21 at 14:05
  • 「Continuity on(over) S」(equivalent to continuous at each point of S) and 「continuity restricted to S」 is different thing, right? You proved the latter, and I don't understand why you got the former from latter. – Pont Jul 27 '21 at 13:18
  • @Nekojiru I read the premise “$f$ restricted to any compact set is continuous" as "for any compact set $C$, the restriction $f|_C\colon C\to Y$ is continuous”. You're reading differently, but your interpretation makes little sense, I'm afraid. My argument proves that $f$ is globally sequentially continuous, hence continuous because we're in a metric space. – egreg Jul 27 '21 at 13:21
  • My definition is the same as yours. I again say, you proved 「f is continuous restrcted to S」. From here, how you conclude 「f is continuous at each point of S 」? You understand this argument is meaningless if you take S to be singleton. – Pont Jul 27 '21 at 13:34
  • @Nekojiru But I *don't* take $S$ a singleton, do I? Given a convergent sequence I define a suitable compact set $S$ (the set of points of the sequence and the limit). The restriction of the function on this set $S$ is continuous and this allows us to conclude that $\lim_{n\to\infty}f(x_n)=f(x)$. – egreg Jul 27 '21 at 13:39
  • @Nekojiru Anyway, I changed wording. – egreg Jul 27 '21 at 13:51
  • I'm again and again asking why 「f restricted to S is continous」・・・ ① implies 「f is continuous at each point of S」・・・②. If S is a set of points of the sequence and the limit, how you conclude that ① implies ②? – Pont Jul 27 '21 at 13:55
  • @Nekojiru I tried to explain it. Have you ever heard about sequential continuity? If not, look for it. I *never* claim that continuity of the restriction to $S$ is (global) continuity on the points of $S$. – egreg Jul 27 '21 at 13:59
  • I ofcourse know sequential continuous. I can't find the sentence you exmplained why ①→② holds, but if you are ok, could you explain me again why ①→② holds ? ( You can explain it here if that is what explained already) – Pont Jul 27 '21 at 14:14
  • @Nekojiru Sorry, but you're going in circles. I *never* claim that ①→② – egreg Jul 27 '21 at 14:16
1

Hint: a convergent sequence together with its limit point is a compact set.

Further hint: Also, continuity at a point is equivalent to continuity along (all) sequences converging to that point.

  • I've thought about this as well, but am not really sure it is useful. I know that compact sets map to compact sets under continuous functions, but how does that help me characterize continuity over the entire space? – cappuccino Apr 11 '15 at 20:13
  • This does not suffice to prove the original statement. In fact, the original statement is false. If you meant to answer the corrected statement, then yes it does work as a strategy for proof. – Dalton Apr 11 '15 at 20:14
1

This is false, but as I've commented I believe it is due only to a typo in the original post. The true statement would be to say

If $f$ restricted to every compact subset of $X$ is continuous, then $f$ must be continuous everywhere.

The trivial counter example to your original statement would be something along the lines of: let $f : \mathbb{R} \rightarrow \mathbb{R}$ be identically the zero map on $[0, 1]$, and elsewhere $f(r) = 0$ for every rational number $r$ and $f(x) = 1$ for every irrational number $x$.

Dalton
  • 101
0

egreg's solution is elementary and great. In fact something more is true. A space $X$ is said to be compactly generated if a set $A$ is open if $A\cap C$ is open in $C$ for all compact subset $C$ of $X$. One known fact is that if a space $X$ is first countable, then $X$ is compactly generated space. In particular, metric space is compactly generated space. Now let $V\subset Y$ be an open set. For compact subset $C\subset X$, $f^{-1}(V)\cap C = (f|_C)^{-1}(V)$ is open in $C$ by assumption. Since $X$ is compactly generated, this implies $f^{-1}(V)$ is open which shows the continuity of $f$.