# Proving continuity and discontinuity

Let $$\{F_n\}_{n\geq1}$$ be a sequence of closed sets such that $$F_n\subseteq F_{n+1}$$ for all $$n\geq1$$. Let $$F=\cup_{n\geq 1}F_n$$ and $$F_0=\emptyset$$. For $$n\geq 1$$ we define $$A_n=[(F_n\setminus F_{n-1})\setminus Int(F_n\setminus F_{n-1})]\cup [Int(F_n\setminus F_{n-1})\cap Q]$$. Let $$f:R\to R$$ given by $$f(x)=2^{-n}$$ if $$x\in A_n$$, $$f(x)=0$$ if $$x\notin \cup _{n\geq 1}A_n$$. Show that $$f$$ is discontinuous on $$F$$ and continuous on $$R\setminus F$$.

I don't even know how to start with this thing. I suppose continuity is easier to show? So I pick $$x\in R\setminus F$$, I need to find $$\delta>0$$ such that $$f(B_{\delta}(x))\subseteq B_{\epsilon}(0)$$. Considering infinite union of closed sets can be non-closed, I would have to enter the territory of $$F$$. Since $$F_n$$ is nested, we can go in a little bit of $$F$$ and the value there should still be small? How do I write this in math? And I don't have much clue about discontinuity.

For the proof that $$f$$ is continuous on $$\mathbb{R} \backslash F$$ one can formalize your (good) intuition as follows: fix $$\varepsilon > 0$$ and $$x_0 \in \mathbb{R} \backslash F$$. We must show that there is $$\delta >0$$ so that if $$|x - x_0| \leq \delta$$, then $$|f(x) - f(x_0)| \leq \varepsilon$$. We note that $$f(x_0) = 0$$ because $$\mathbb{R} \backslash F \subset \mathbb{R} \backslash A$$. Thus, we must find an interval around $$x_0$$ on which $$f$$ is small. For this, let $$N$$ be such that $$2^{-N} < \varepsilon$$. Since each $$F_n$$ is closed, the finite union $$\cup_{n \leq N} F_n$$ is closed, which means its complement is open. Consequently, we can choose $$\delta > 0$$ so that
$$(x_0, - \delta, x_0 + \delta) \subset \mathbb{R} \backslash (\cup_{n \leq N} F_n) \subset \mathbb{R} \backslash (\cup_{n \leq N} A_n),$$ which means that for $$x \in (x_0, - \delta, x_0 + \delta)$$, we have $$|f(x) - f(x_0)| = |f(x)| < 2^{-N} \leq \varepsilon.$$

To prove that $$f$$ is discontinuous on $$F$$, we will show that if $$x_0 \in \mathbb{R}\backslash F$$, then there exists $$\varepsilon_0 > 0$$ so that for any $$\delta > 0$$, there is $$x \in \mathbb{R}$$ with $$|f(x) - f(x_0)| \geq \varepsilon_0$$. If $$F$$ is empty, we are done. Otherwise, let $$x_0 \in F$$ be fixed. There must be some $$n \geq 1$$ so that $$x_0$$ is in $$F_n$$ but not in $$F_{n-1}$$. For such an $$x_0$$, we can take $$\varepsilon_0 = 2^{-n}$$. This is because:

(a) if $$x \in A_n$$, then any open interval around $$x_0$$ contains a member of $$F_{n} \backslash F_{n-1}$$ that is irrational, and

(b) if $$x_0 \in F_{n} \backslash F_{n-1}$$ but not in $$A_n$$, then any open interval around $$x_0$$ contains a member of $$A_n$$.
(I can provide more details for these last two assertions if you wish.)

• (a) is due to irrationals is dense in R. (b) is saying An closure contains Fn\Fn-1. (b) should be caused by rationals is dense in R but I have trouble writing (b) down. Could you please explain more about (b)? – Fluffy Skye Feb 6 '19 at 18:21
• Actually, (a) is due to density of irrationals and (b) is due to density of rationals. If $x_0 \in F_n \backslash F_{n-1}$ but not in $A_n$, then $x_0$ is an irrational number in the interior of $F_n \backslash F_{n-1}$. Any open interval around $x_0$ contains a rational number that is also in the interior of $F_n \backslash F_{n-1}$ and hence a member of $A_n$. – Jordan Green Feb 6 '19 at 18:26
• Ok. So there are two cases for (a). If x is in interior of Fn\Fn-1. Then x is rational. Then any small open ball around it contains irrationals who are not in An and we're good. But what if it's not in interior of Fn\Fn-1? – Fluffy Skye Feb 6 '19 at 22:46
• @FluffySkye If $x \notin \operatorname{int} F_n \setminus F_{n-1}$, then $B_r(x)$ is not contained in $F_n \setminus F_{n-1}$ for any $r > 0$. Given $f(x) = 2^{-n}$, we can consider $\varepsilon = 2^{-n-1} > 0$, and, assuming continuity at $x$, find $\delta > 0$ such that $$|y - x| < \delta \implies |f(y) - f(x)| < \varepsilon.$$ If you work this out, you'll find that $2^{-n-1} < f(y) < 2^{-n+1}$, which means $f(y) = 2^{-n}$. This can only happen if $y \in F_n \setminus F_{n-1}$, hence $B_\delta(x) \subseteq F_n \setminus F_{n-1}$. This is a contradiction. – Theo Bendit Feb 7 '19 at 2:04