Prove that there isn't a sequence of continuous function on $[0,1]$ that converges pointwise to the function $f$ on $[0,1]$ defined by $f(x)=0$ if $x$ is rational and $f(x)=1$ if $x$ is irrational.
What I've tried:
By contradiction: Suppose that indeed exists one(say $f_n$) and let's take $a$ in $[0,1]\cap \mathbb{Q}$, then $f_n(a)$ approaches to $0$ when $n$ is sufficiently large, say $n\ge N$. Let's take in particular $n=N$. Since $f_N$ is continuous, there exists a neighborhood of $a$, $(a-d,a+d)$, in which $f_N(x)$ is near $f_N(a)$, and thus is near to $0$. Let's take now $b$ irrational in that neighborhood. Then, for $n$ sufficiently large,say $n\ge K$, $f_n(b)$ is near $1$. This should be the contradiction, since $b$ would be at the same time near $0$ and $1$ (suppose I've chosen the right epsilons). The problem is that the $K$ may be larger than the $N$, and so there is no contradiction. If I then try to make the $N$ larger, then I modify the $d$, which modifies the $b$, and therefore there's no sense in taking that particular $b$. I've also tried to apply continuity to $f_k(x)$, but the neighborhood in which $f_k(x)$ is near $f_k(b)$ (which is near $1$) may not have anything in common with the previous neighborhood...
I wish you could help me. Thanks in advance.