Sequence of functions converges pointwise at irrationals

pointwise-convergencereal-analysis

Let $g:\mathbb{N}\to \mathbb Q$ be a bijection; let $x_n=g(n)$. Define the function $f:\mathbb{R}\to \mathbb{R}$ as $$x_n\mapsto 1/n \text{ for } x_n\in \mathbb Q$$
$$x\mapsto 0 \text{ for } x\notin \mathbb Q. $$
I proved that this function is continuous precisely at $\mathbb R\setminus\mathbb Q$. But I need to find also a sequence of continuous functions $f_n:\mathbb R\to \mathbb R$ that converge pointwise to $f$. Here is my attempt:

Fin $n\in \mathbb N$, for every $k\in \{1,\ldots, n\}$ set $\delta_{nk}=1/4 \text{ min}\bigr(\{1/n\}\cup \{\vert x_m-x_r\vert: m\neq r\text{ and }m,r=1,\ldots,n\} \bigr)$. Then use Urysohn Lemma to set continuous functions $h_{nk}:\mathbb{R}\to [0,1/n]$ such that $h_{nk}(x_k)=1/k$ and $h_{nk}(U_{nk}^c)=0$, where $U_{nk}$ is the open interval about $x_k$ with diameter $\delta_{nk}$; and $U_{nk}^c$ denotes its complement. So defined, the sequence $\{f_n\}$ clearly converges pointwise at $\mathbb Q$; but I cannot shows it also converges at each irrational.

Also, this is a question at the end of the section on Baire Cathegory Theorem in Munkres' Topology book. I do not find the connection of this with this exercise.

Best Answer

Suppose there is some irrational $x$ such that $f_n(x)\not\to f(x)=0$. That is, for every $\epsilon>0$ and every $N\in \mathbb N$ we can find some positive integer $m>N$ such that $f_m(x)\geq \epsilon$. Thus there is some subsequence $\{f_{n_i} \}$ such that $f_{n_i}\geq \varepsilon$ for some positive real $\varepsilon$. By the construction of the $f_{n}$'s for fixed $n_i$, we have that $x$ lies within $U_{n_i k_i}$ for some rational $x_{k_i}$. The construction of $\delta_{nk}$ implies that if $i<j $, then $k_i<k_j$ (This is because $U_{nk}$ and $U_{n\tau}$ are disjoint for $k\neq \tau$). This means that $k_i\to \infty $ as $i\to \infty$. Continuity of $f_{n_i}$ implies that $f(x)\leq f(x_{k_i})=1/k_i\to 0$, a contradiction.

Related Question