# Is $f$ necessarily measurable?

(1) Suppose a function $f$ has a [Lebesgue] measurable domain and is continuous except at a finite number of points. Is $f$ is necessarily [Lebesgue] measurable?
Comments For (1), If $f$ is defined on a [Lebesgue] measurable set $E$ and is continuous except for a finite number of values say $x_1,x_2, ... x_n$ are those points of discontinuity, then can't we describe the pre-images of $f$ just as a finite union of of the pre-images of the collection of continuous functions $\{f_i\}_{i=1}^{n}$, where each $f_i$ is defined up between each point of discontinuity of $f$? Or am I missing something here?

(2) Suppose the function $f$ is defined on a measurable set $E$ and has the property that $\{x \in E | f(x) > c\}$ is measurable for each rational number $c$. Is $f$ necessarily [Lebesgue] measurable?
Comments I got this one, thanks to everyone who commented.

Any hints would be appreciated. The text being used is Royden-Fitzpatrick 4th Edition.

-
$\{x \in E | f(x) > c\}=\cup_{q>c, q\in\mathbb{Q}}\{x \in E | f(x) > q\}$ is a countable union of measurable sets – yoyo May 11 '13 at 18:45
Gah, I feel dumb. Thanks – Archie May 11 '13 at 23:31
Also, I edited what I have observed for (1), but I'm still not quite there yet. – Archie May 11 '13 at 23:32
@Archie If you look my answer I also answered the question assuming Lebesgue measurable functions. – Gastón Burrull May 12 '13 at 22:40

Let $A$ be the measurable domain of $f$ and let $X=\{x_i\}_{i=1}^n$ be the finite collection of discontinuities. Since $|X|$ is finite, we can order them from smallest, say $x_1$, to largest, say $x_n$. Then for $1\le i\le n+1$ define $$A_i=A\cap (x_{i-1},x_i),$$ where $x_0=-\infty$ and $x_{n+1}=\infty$. Observe that each $A_i$ is measurable and $$\{x\in A\,:\, f(x)>c\}=\left(\bigcup_{i=1}^{n+1}\{x\in A_i\,:\, f(x)>c\}\right) \cup \{x\in X\,:\,f(x)>c\}$$ For each $c$, each set in the indexed union is measurable (because $f$ is measurable on each A_i) and each subset of $X$ is either empty or contains no more than $n$ points and is therefore measurable as well.

-

(2) It is true, this not contradicts the proposition 1 (Page 54), just is an equivalent form of proposition 1.

Suppose $\{x\in E : f(x)>c\}$ measurable for each rational $c$. Let $r\in\mathbb{R}$, then exist a sequence $\{c_n\}$ of rational numbers such that $c_n\to r$ and $c_n\geq r$ for all $n\in\mathbb{N}$. Note that

$$A=\{x\in E : f(x)>r\}=\{x\in E : f(x)\leq r\}^c=\left(\bigcap\{x\in E : f(x)\leq c_n\}\right)^c=\bigcup \{x\in E : f(x)> c_n\}$$

Hence $A$ is measurable. Try (1) by yourself.

(1) When you say "where each $f_i$ is defined up between each point of discontinuity of $f$" you are wrong, $E$ does not necessarily has a good order, we only know that $E$ is a topological space. If you don't assume that each open set in a topology space must be measurable, (1) is obviously false (indeed, proposition 3 in page 55 Royden 4th ed. will fail). The correct word in this Royden Chapter is Lebesgue Measurable functions instead of measurable function, then we know that $E\subset\mathbb{R}$.

If $E\subset\mathbb{R}$ (1) is true. Instead of considering $f_n$ consider simply $f|\{E\setminus{x_1,\ldots,x_n}\}$, define $f(x_i)=y_i\in\mathbb{R}$. What happen when an open interval $I$ contains some of $y_i$? (in this case is much easier work with $y_n$ rather than $x_n$)

How fails "preimage of open set is open" when a continuous function $f\colon\mathbb{R}\to\mathbb{R}$ has finitely many discontinuities?. Note that the only case of preimage of an open interval that is not an open set correspond to closed intervals, semi-open intervals (for example in $[a,b)$ form) or numerable union of them, so that not only the function $f$ is measurable, it is also Borel measurable (preimage of open sets are Borel Measurable).

In any topological space $(X,\tau)$ where each open set is measurable, and consider as measurable sets the Borel $\sigma$-algebra (the smallest sigma algebra containing the open sets) I don't know if (1) is true.

-
I made an edit for (1), am I on the right track? I'm just having issues sketching the details. – Archie May 12 '13 at 0:00
@Archie I edited my answer with (1). – Gastón Burrull May 12 '13 at 2:26
I guess I should have stated Lebesgue measurable set $E$ and we working under the standard topology. But thank you for the input. – Archie May 12 '13 at 17:00
However when we define $f(x_i) = y_i$ wouldn't there be cases when this would be undefined since we stated that the $x_i$'s are the points in which $f$ is not continuous? – Archie May 12 '13 at 17:02
@Archie $\frac{1}{x}$ is not discontinuous at $0$ is undefined in $0$, that means the domain does not contains $0$, then $f$ is continuous in the whole domain $\mathbb{R}\setminus\{0\}$. If you define in cases $f$ by $f(x)=877$ if $x=0$ and $f=\frac{1}{x}$ if $x\neq 0$ then $f$ has only one discontinuity in $0$ (in this case $x_1=0$, $y_1=877$). – Gastón Burrull May 12 '13 at 21:40