Is there a term for functions $f:\mathbb{R}\to\mathbb{R}$ such that for any $c\in \mathbb{R}$, $\{x\in \mathbb{R}:f(x)>c\}$ is a countable union of disjoint intervals?
For example, if $f$ is upper semicontinuous, $\{x\in \mathbb{R}:f(x)>c\}$ is an open set and thus a countable union of disjoint open intervals. I would like to know the one for any intervals.
Following Jack's comment, I googled piecewise continuity and found the following definition:
Let $f$ be a real function defined on $\mathbb{R}$.
$f$ is piecewise continuous if and only if for any closed interval $[a,b]$, there exists a finite subdivision $\{x_0,x_1,\dots,x_n\}$ of $[a,b]$, where $x_0=a$ and $š„_n=b$, such that for all $i\in\{1,2,\dots,n\}$, $f$ is continuous on $(x_{iā1},x_i)$.
I am struggling to show the following:
$f$ is piecewise continuous if and only if for any $c\in \mathbb{R}$, $\{x\in \mathbb{R}:f(x)>c\}$ is a countable union of disjoint intervals.
-
Only if part:
Fix any interval $[a,b]$ and $c\in \mathbb{R}$.
Since $f$ is piecewise continuous, there exists $\{x_0,x_1,\dots,x_n\}$, where $x_0=a$ and $š„_n=b$, such that for all $i\in\{1,2,\dots,n\}$, $f$ is continuous on $(x_{iā1},x_i)$. Since any open set is a countable union of open intervals,
$$\{x\in(x_{i-1},x_i):f(x)>c\}=\bigcup_{j\in J_i}I^i_j,$$
where $I^i_j$ is an open interval and $J_i$ is a countable set. Thus,
$$ \{x\in[a,b]:f(x)>c\}=\left(\bigcup_{i=1}^n\bigcup_{j\in J_i}I^i_j\right)\cup\{x\in\{x_0,x_1,\dots,x_n\}:f(x)>c\},$$
which is a countable union of intervals.
How can we show that $\{x\in\mathbb{R}:f(x)>c\}$ is a countable union of intervals as well? -
If part: I have no idea where to start.
Could anyone help me prove it? Thanks in advance!
Thanks to Divide1918's answer, I figured that the if part of the statement above does not hold. Now I wonder if the following is true:
$f$ is piecewise continuous if and only if for any $a,b,c\in \mathbb{R}$, $\{x\in[a,b]:f(x)>c\}$ is a finite union of disjoint intervals.
I will update once I figure it out, but I appreciate any help.
Update: Even the only if part does not hold. Counterexample: $x \sin \frac{1}{x}$.
It seems there is no term for functions such that for any $a,b,c\in \mathbb{R}$, $\{x\in[a,b]:f(x)>c\}$ is a finite union of disjoint intervals?
Best Answer
The only if part follows from what you have done, since $\Bbb R=\bigcup_{k\in\Bbb Z}[k,k+1]$. If the intervals overlap at some integer point, you may make one interval to be open and the other to be closed there, thus making all intervals disjoint.
I believe I have found a counter example to the reverse direction.
Let $f=1-\chi_C$ where $C$ is the Cantor set. Then for any $c\in\Bbb R, \{f(x)\gt c\}\cap [0,1]$ is countable union of disjoint intervals, since it is either $[0,1], [0,1]-C,$ or $\emptyset$. But $\{f(x)\le \frac12\}=C$ contains no interval. $f$ is continuous on $[0,1]-C$, but each $x\in C$ is a discontinuity point of $f$. Since $C$ is uncountable, $f$ cannot be piecewise continuous.