Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I thought that if I have a function $f: \mathbb Q \to \mathbb R$ that is continuous then I can (uniquely) extend it to a continuous function $F: \mathbb R \to \mathbb R$ as follows: for $r \in \mathbb R \setminus \mathbb Q$ pick a sequence $q_n$ converging to $r$ and then define $F(r) = \lim_{n \to \infty} f(q_n)$.

So I thought there must be a theorem saying that given a continuous function $f: D \to Y$ where $D$ is a dense subset of a metric space $X$ one can uniquely extend it to $F: X \to Y$.

Instead I found a theorem stating this but with the additional requirement that $f$ has to be uniformly continuous. Now I'm confused: is my example above wrong? Where does uniform continuity come in here?


share|cite|improve this question
Well, here's an easy counterexample: try extending $x \mapsto 1/x$ defined on $\mathbb{R} \setminus \{ 0 \}$ to all of $\mathbb{R}$... – Zhen Lin Jul 12 '12 at 6:02
up vote 8 down vote accepted

Uniform continuity ensures that the Cauchy sequence $(q_n)$ in $\mathbb Q$ is mapped to a Cauchy (and hence convergent) sequence $\bigl(f(q_n)\bigr)$ in $\mathbb R$. If $f$ is just continuous, $\bigl(f(q_n)\bigr)$ needn't converge (remember: $f$ is just continuous on $\mathbb Q$, so you can't argue, that convergent sequences $q_n \to r \not\in\mathbb Q$ are mapped onto convergent sequences by $f$). For example $x\mapsto \frac 1{x - \sqrt 2}$ is continuous (not uniformly!) on $\mathbb Q$ and can't be extendend.

In fact, you only need the property, that Cauchy sequences are mapped to Cauchy sequences, which is a little weaker than uniform continuity, and a little stronger than continuity (for some properties of such functions, see here for start).

share|cite|improve this answer
Regarding the last comment, e.g. uniform continuity on bounded sets suffices. – Jonas Meyer Jul 12 '12 at 6:09
@MattN: No, it is weaker than uniform continuity, and uniform continuity doesn't imply Lipschitz. E.g.: $\sqrt[3]{x}$ is uniformly continuous but not Lipschitz, and $x^2$ maps Cauchy sequences to Cauchy sequences but is not uniformly continuous. – Jonas Meyer Jul 12 '12 at 6:12
@MattN. But perserving C-sequences is, what you need in the prove of the extension theorem: If $X$, $Y$ are metric spaces, $Y$ complete, $D \subseteq X$ is dense, $f \colon D \to Y$ is a Cauchy continuous map, then there is a unique extension to a continuous $F \colon X \to Y$. – martini Jul 12 '12 at 6:18
@MattN. No. As Lipschitz is even stronger than uniform continuity. – martini Jul 12 '12 at 6:22
Oops. ${}{}{}{}$ – Rudy the Reindeer Jul 12 '12 at 6:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.