[Math] Convergence to Dirichlet function is not uniform

proof-verificationreal-analysisuniform-convergence

Let $r_{1},r_{2},…$ a sequence that includes all rational numbers in $[0,1]$. Define $$f_n(x)=\begin{cases}1&\text{if }x=r_{1},r_{2},…r_{n}\\0&\text{otherwise}\end{cases}$$

this sequence converges($lim_{n\to \infty}f_n(x)$) to dirichlet function in $[0,1]$

$$f(x)=\begin{cases}1&\text{if }x\in\mathbb Q\\0&\text{otherwise}\end{cases}$$

Question: Is the convergence uniform?

This question is taken from here, below is my attempt to the question:

Let $\varepsilon = \frac{1}{2}.$
For any $N \in \mathbb{N},$ choose $x = r_{N + 1}.$
Then $|f_N(x) – f(x)| = 1 \geq \varepsilon.$ Hence the sequence of functions does not converge uniformly.

Can anyone check my proof?

Best Answer

Yes, you're correct. Your reasoning basically shows

$$ \sup_{n} |f_n (x) - f(x) | = 1 \nrightarrow 0 \ \ \ \text{as} \ \ \ n \rightarrow +\infty $$ hence the convergence can't be uniform.