Proof that a sequence of continuous functions $(f_n)$ cannot converge pointwise to $1_\mathbb{Q}$ on $[0,1]$
Solution 1:
Here is a rather elementary proof. First we will need a lemma:
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.