# Proof Critique – There’s no function that is continuous at all rational and discontinuous at all irrational

Claim. If f(x)f(x) on [0,1][0,1] is continuous at all rational points, we can find an irrational point at which f(x)f(x) is also continuous.

Proof. Let r1∈Q∩[0,1]r_1 \in \mathbb{Q} \cap [0,1] be arbitrary. Since f(x)f(x) is continuous at r1r_1, there exists a ϕ1>0\phi_1 > 0 such that for all x∈(r1−ϕ1,r1+ϕ1)x\in ( r_1-\phi_1,r_1+\phi_1), we have |f(x)−f(r1)|<1/2\left|f(x) - f(r_1)\right| < 1/2. Let δ1=min(ϕ12,1).\delta_1 = min(\frac{\phi_1}{2} , 1). Then for all x∈[r1−δ1,r1+δ1]x\in [r_1-\delta_1,r_1+\delta_1], we have |f(x)−f(r1)|<1/2\left|f(x) - f(r_1)\right| < 1/2. Then for all x1,x2∈[r1−δ1,r1+δ1]x_1,x_2\in[r_1-\delta_1, r_1+\delta_1], we have |f(x1)−f(x2)|≤|f(x1)−f(r1)|+|f(r1)−f(x2)|<1.\left|f(x_1) - f(x_2)\right| \leq \left|f(x_1) - f(r_1)\right| + \left|f(r_1) - f(x_2)\right| < 1. Let r2∈Q∩(r1−δ1,r1+δ1)r_2 \in \mathbb{Q} \cap (r_1-\delta_1, r_1+\delta_1) be arbitrary. Since f(x)f(x) is continuous at r2r_2, there exists a ϕ2>0\phi_2 > 0 such that for all x∈(r2−ϕ2,r2+ϕ2)x\in(r_2 – \phi_2 , r_2 + \phi_2), we have |f(x)−f(r2)|<1/4\left|f(x) - f(r_2)\right|<1/4. Let δ2=min(ϕ22,14,r2−(r1−δ1),−r2+(r1+δ1))\delta_2 =min\left(\frac{\phi_2}{2}, \frac{1}{4},r_2-(r_1-\delta_1), -r_2+(r_1+\delta_1)\right) then for all x∈[r2−δ2,r2+δ2]x\in[r_2 - \delta_2 , r_2 + \delta_2], we have |f(x)−f(r2)|<1/4\left|f(x) - f(r_2)\right|<1/4. Then we have a δ2≤1/4\delta_2\leq 1/4 such that (r1−δ1)≤(r2−δ2)≤(r2+δ2)≤(r1+δ1)(r_1-\delta_1)\leq (r_2 - \delta_2) \leq (r_2+\delta_2)\leq(r_1+\delta_1). Also for all x1,x2∈[r2−δ2,r2+δ2]x_1,x_2 \in [r_2 - \delta_2,r_2+\delta_2], we have |f(x1)−f(x2)|≤|f(x1)−f(r2)|+|f(r2)−f(x2)|<12.\left|f(x_1) - f(x_2)\right| \leq \left|f(x_1) - f(r_2)\right| + \left|f(r_2) - f(x_2)\right| < \frac{1}{2}. Recursively, let rn+1∈Q∩(rn−δn,rn+δn)r_{n+1} \in \mathbb{Q} \cap (r_n-\delta_n, r_n+\delta_n) be arbitrary. Since f(x)f(x) is continuous at rn+1r_{n+1}, there exists a ϕn+1\phi_{n+1} such that for all x∈(rn+1−ϕn+1,rn+1+ϕn+1)x\in (r_{n+1} - \phi_{n+1},r_{n+1}+\phi_{n+1}), we have \left|f(x) - f(r_{n+1})\right|<\frac{1}{2(n+1)}\left|f(x) - f(r_{n+1})\right|<\frac{1}{2(n+1)}. Let \delta_{n+1} = min(\frac{\phi_{n+1}}{2},\frac{1}{2^{n+1}},r_{n+1}- (r_n-\delta_n),-r_{n+1}+(r_n+\delta_n))\delta_{n+1} = min(\frac{\phi_{n+1}}{2},\frac{1}{2^{n+1}},r_{n+1}- (r_n-\delta_n),-r_{n+1}+(r_n+\delta_n)) then for all x\in[r_{n+1} - \delta_{n+1} , r_{n+1} + \delta_{n+1}]x\in[r_{n+1} - \delta_{n+1} , r_{n+1} + \delta_{n+1}], we have \left|f(x) - f(r_{n+1})\right|<\frac{1}{2(n+1)}\left|f(x) - f(r_{n+1})\right|<\frac{1}{2(n+1)}. We also have a \delta_{n+1}\leq \frac{1}{2^{n+1}}\delta_{n+1}\leq \frac{1}{2^{n+1}} such that (r_n-\delta_n)\leq (r_{n+1} - \delta_{n+1}) \leq (r_{n+1}+\delta_{n+1})\leq(r_n+\delta_n)(r_n-\delta_n)\leq (r_{n+1} - \delta_{n+1}) \leq (r_{n+1}+\delta_{n+1})\leq(r_n+\delta_n). We also have that for all x_1,x_2 \in [r_{n+1} - \delta_{n+1},r_{n+1}+\delta_{n+1}]x_1,x_2 \in [r_{n+1} - \delta_{n+1},r_{n+1}+\delta_{n+1}], \left|f(x_1) - f(x_2)\right| \leq \left|f(x_1) - f(r_{n+1})\right| + \left|f(r_{n+1})- f(x_2)\right| < \frac{1}{n+1}.\left|f(x_1) - f(x_2)\right| \leq \left|f(x_1) - f(r_{n+1})\right| + \left|f(r_{n+1})- f(x_2)\right| < \frac{1}{n+1}. Then we have (r_1-\delta_1)\leq (r_2 - \delta_2) \leq (r_3 - \delta_3) \leq \cdots \leq (r_3+\delta_3) \leq (r_2+\delta_2)\leq(r_1+\delta_1)(r_1-\delta_1)\leq (r_2 - \delta_2) \leq (r_3 - \delta_3) \leq \cdots \leq (r_3+\delta_3) \leq (r_2+\delta_2)\leq(r_1+\delta_1) According to Nested Interval Theorem, we have \exists! x \ x\in \bigcap_{n\in\mathbb{N}^+}[r_n-\delta_n, r_n+\delta_n]\exists! x \ x\in \bigcap_{n\in\mathbb{N}^+}[r_n-\delta_n, r_n+\delta_n] Let a be such x. By such construction, we can see that \lim_{x\to a} f(x) = f(a)\lim_{x\to a} f(x) = f(a) By Dedekind Cut, we know that aa is irrational. Thus we find a irrational point where f(x)f(x) is continuous. I used \delta = \frac{\phi}{2}\delta = \frac{\phi}{2} because in the definition of limit, the it's "for all x in (x-\delta, x+\delta)(x-\delta, x+\delta)", while for here I need it to be closed interval. I constructed the nested intervals in a similar way as constructing a Cauchy sequence. Is it clear that \lim_{x\to a} f(x) = f(a)\lim_{x\to a} f(x) = f(a)? I used Dedekind cut to prove the unique a is irrational, but I don't know if I need to be more specified. =================      Doesn't it suffice to prove that for every interval of rational numbers there exist an irrational number? – shai horowitz 2 days ago      @shaihorowitz I think to prove the statement in the title I only need to prove for a small interval. Because if there is such function on R, then there is such a function on [0,1]. By contraposition I can prove the statement in the title. – Zhongwei Zhao 2 days ago      my claim is easier to prove but it's not sufficient due to popcorn function – shai horowitz 2 days ago      @shaihorowitz ohh I misunderstood you. I thought about that, but that will require every r_n-\delta_nr_n-\delta_n to be rational... – Zhongwei Zhao 2 days ago      or to have a rational approximations – shai horowitz 2 days ago ================= 1 Answer 1 ================= Your proof is nice. I didn't comb it carefully, but it seems to be right. It isn't obvious to me that you have constructed a Dedekind cut, so I would perhaps recommend providing more detail there. The other critique I have would be where you said: \exists! x \ x\in \bigcap_{n\in\mathbb{N}^+}[r_n-\delta_n, r_n+\delta_n].\exists! x \ x\in \bigcap_{n\in\mathbb{N}^+}[r_n-\delta_n, r_n+\delta_n]. I would change it to: \exists! a \text{ such that } \ a\in \bigcap_{n\in\mathbb{N}^+}[r_n-\delta_n, r_n+\delta_n].\exists! a \text{ such that } \ a\in \bigcap_{n\in\mathbb{N}^+}[r_n-\delta_n, r_n+\delta_n]. It makes it less confusing when you later say \displaystyle\lim_{x\to a} f(x) = f(a)\displaystyle\lim_{x\to a} f(x) = f(a) because there is no longer 2 uses of the letter xx.      Thank you so much! I was thinking that no one would bother reading my long laborious proof. By the way, is it plausible to use Dedekind cut here? I haven't learned it a lot. The only thing I know is that it fills the gaps between rationals. – Zhongwei Zhao 2 days ago