A Function that is Continuous on a Closed Subset

Topology
Author

Hirofumi Shiba

Published

4/17/2025

Japanese Abstract
関数の連続点の集合は \(G_\delta\) 集合になる.任意の \(G_\delta\) 集合はある関数の連続点の集合になる.\(\mathbb{R}\) 上の関数で,ちょうど \((-\infty,0]\) 上でのみ連続なものを構成する.

For the sake of simplicity, we focus on the case of \(f:\mathbb{R}\to\mathbb{R}\).

This article is concerned with the continuity set of \(f\), defined as \[ \mathrm{Cont}(f):=\left\{x\in\mathbb{R}\mid f\text{ is continuous at }x\right\}. \]

Most continuous functions are treated on open sets. We might be easily tricked to think that \(\mathrm{Cont}(f)\) should be open.

Is this conjecture true?1 As a starting point, proving that \(\mathrm{Cont}(f)\) is a countable intersection of open sets is not difficult.

1 \(\mathrm{Cont}(f)\) is \(G_\delta\)

We denote an open ball of radius \(\delta\) centered at \(x\) by \(U_\delta(x)\).

Proposition

\(\mathrm{Cont}(f)\) is a \(G_\delta\) set, meaning that it is a countable intersection of open sets. Specifically, \[ \mathrm{Cont}(f)=\bigcap_{n=1}^\infty\left\{x\in\mathbb{R}\,\middle|\,\exists_{\delta>0}\;\forall_{y,z\in U_\delta(x)}\;\lvert f(y)-f(z)\rvert<\frac{1}{n}\right\}. \]

It is straightforward to check that each \(\left\{x\in\mathbb{R}\,\middle|\,\exists_{\delta>0}\;\forall_{y,z\in U_\delta(x)}\;\lvert f(y)-f(z)\rvert<\frac{1}{n}\right\}\) is open.

The easy part is the \(\supset\) direction, since for every \(\epsilon>0\), there exists a \(N>0\) satisfying \(\frac{1}{N}<\epsilon\).

\(\subset\) direction is also straightforward, following from the definition of continuity and triangle inequality.

2 \(G_\delta\) sets are continuity sets

A fun fact is that every \(G_\delta\) set is the continuity set \(\mathrm{Cont}(f)\) of some function \(f\), proved in, for example, a almost one-page article (Kim, 1999).

(Theorem p.258 Kim, 1999)

Let \(X\) be a nonempty metric space without isolated points. Then every \(G_\delta\) subset \(G\subset X\) is the continuity set of some function \(f:X\to\mathbb{R}\).

This construction can be understood as a generalization of the example given later in Section 3.

Given that \(G\) is a \(G_\delta\) set, the complement \(G^\complement\) is a countable union of closed sets: \[ G^\complement=\bigcup_{n=1}^\infty F_n,\qquad F_n\overset{\textrm{closed}}{\subset}X. \]

Using \(\{F_n\}\), we construct a function \(g:X\to\mathbb{R}\) as follows: \[ g(x):=\sum_{n=1}^\infty\frac{1}{2^n}1_{F_n}(x). \] Observe that \(g=0\;\mathrm{on}\;G\). Building upon this, we define \(f:X\to\mathbb{R}\) by \[ f(x):=g(x)\left(1_A(x)-\frac{1}{2}\right) \] where \(A\subset X\) be a set that both \(A\) and \(A^\complement\) are dense in \(X\).

This set \(A\) corresponds \(\mathbb{Q}\) in the example given later in Section 3.

3 Example of \(f:\mathbb{R}\to\mathbb{R}\) with closed \(\mathrm{Cont}(f)\)

In perfectly regular spaces, every closed set is a \(G_\delta\) set (Tong, 1952).

So there should be an example on \(\mathbb{R}\) that \(\mathrm{Cont}(f)\) is closed.

Example2

The function \(f\) defined as follows has \(\mathrm{Cont}(f)=(-\infty,0]\): \[ f(x):=\begin{cases} 0,&x\le0,\\ \frac{1}{n},&x\in(0,\infty)\cap\mathbb{Q},\\ -\frac{1}{n},&x\in(0,\infty)\setminus\mathbb{Q}. \end{cases} \]

References

Kim, S. S. (1999). A characterization of the set of points of continuity of a real function. The American Mathematical Monthly, 106(3), 258–259.
Tong, H. (1952). Some characterizations of normal and perfectly normal spaces. Duke Mathematical Journal, 19(2), 289–292.

Footnotes

  1. It is not true.↩︎

  2. My colleague Nakajima-san taught me this example.↩︎