# Proof that a sequence of continuous functions $(f_n)$ cannot converge pointwise to $1_\mathbb{Q}$ on $[0,1]$

As a homework question, we got asked the following:

Construct a function $f:[0,1] \rightarrow \mathbb{R}$ which is not the pointwise limit of any sequence of continuous functions

Thinking about it, a function which is nowhere continuous should be sufficient; thus I decided to try to use the indicator function on the rationals, $1_\mathbb{Q}$. Basically, I was just wondering if my proof was alright or not:

Suppose $(f_n)$ is a sequence of continuous functions converging pointwise to $1_\mathbb{Q}$; thus for any $\epsilon > 0$ we have that for all $x$ we can find a $N$ such that if $n \geq N$ then $| f_n(x) - 1_\mathbb{Q} (x) | < \epsilon$. In particular, we have for some $x_1 \in \mathbb{Q}, x_2 \notin \mathbb{Q}$ a $N_1$ and $N_2$ respectively such that

• if $n \geq N_1$ then $| f_n(x_1) - 1 | < \epsilon$
• if $n \geq N_2$ then $| f_n(x_2) | < \epsilon$

Now, as $f_k$ is continuous, for any $\epsilon > 0$ we have that for all $x$ there exists a $\delta > 0$ such that if $| x- y | < \delta$ then $|f_k(x) - f_k(y) | < \epsilon$. However, if we pick an arbitrary $x \in \mathbb{Q}$, for $n \geq \max\{N_1, N_2\}$, for any $\delta > 0$ we can pick a $y \notin \mathbb{Q}$ such that $| x- y| < \delta$ yet $| f_n(x) - f_n(y) - 1| < 2\epsilon$ (by the triangle inequality and using the pointwise convergence properties); so if we choose $\epsilon = 1/10$, say, then we have by continuity that $|f_n(x) - f_n(y)| < 1/10$, yet $| f_n(x) - f_n(y) - 1| < 1/5$, which (I believe) is absurd, so we have a contradiction.

I'm a bit iffy about whether this is alright or not (I feel I may be subtly abusing the definitions here), so any feedback would be much appreciated.

• It is quite a bit harder than that. See math.stackexchange.com/questions/77307/… – Rob Arthan Oct 27 '13 at 17:03
• @RobArthan Unfortunately, we've been asked this question in a course which doesn't involve measure theory/functional analysis or the likes. While I'm aware of how the result follows by the Baire categorization theorem because $1_\mathbb{Q}$ is discontinuous everywhere, the idea is to try and find a proof without using such a thing. The general idea (I presume) is that because the limit function is discontinuous everywhere, at some point $f_n$ has to be very close to two discontinuous points which seems to give a contradiction; I can't think of a good way of going about this though. – Andrew D Oct 27 '13 at 17:13
• I think you should post the answer then if you find or learn of a simpler proof. – Rob Arthan Oct 27 '13 at 19:08
• I should have said that the problem with your proposed answer is that $\delta$ depends on $x$, while you are going to need one $\delta$ that works for two distinct values of $x$, one rational and one irrational. The argument in the link I cited solves this problem by giving you a point where the limit is continuous. – Rob Arthan Oct 28 '13 at 0:12
• @RobArthan Ah, I see then; thanks! I'll post an answer giving a more "elementary" proof when I learn of one. – Andrew D Oct 28 '13 at 9:20

Lemma For all non-empty segment $S \subseteq [0,1]$, there exists an arbitrarily large $N$ and a non-empty segment $S' \subseteq S$ such that $f_N(S') = [\frac 1 4, \frac 3 4]$.
Proof: let $S$ such a segment, we can find $x$ and $y$ in $S$ such that $x$ is rational, $y$ is irrational and $x < y$. Since $(f_n)$ converges pointwise to $1_{\mathbb Q}$, there exists an arbitrarily large $N$ such that $f_N(x) \geq \frac 3 4, f_N(y) \leq \frac 1 4$. By the intermediate value theorem, there exists a non-empty segment $S' \subseteq[x,y] \subseteq S$ such that $f_N(S') = [\frac 1 4, \frac 3 4]$.
Using this fact, we can build a subsequence $f_{\phi(n)}$ and a non-increasing sequence of non-empty segments $(S_n)$ such that $f_{\phi(n)}(S_n) = [\frac 1 4, \frac 3 4]$. Using compactness, $\bigcap_{n} S_n \neq \emptyset$: let $x \in \bigcap_{n} S_n$. We have $f(x) = \lim_{n \to \infty} f_{\phi(n)}(x) \in [\frac 1 4, \frac 3 4]$, a contradiction.