A basic question on measurability of lim sup and lim inf of a function Suppose $f: \Bbb R \to \Bbb R$ is a Borel measurable function. I have to prove that $\{x: $f$ \text{ is discontinuous at } $x$\} \in B(\Bbb R)$. So, I am trying to prove that the complement event i.e. $\{x: $f$ \text{ is continuous at } $x$\}\in B(\Bbb R)$. But, $\{x: $f$ \text{ is continuous at } $x$\}=\{x: \limsup_{t-&gt;x}f(t) = \liminf_{t-&gt;x}f(t)\}$. I know that when $f$ is continuous then the functions $g(x) = \limsup_{t-&gt;x}f(t)$ and $h(x) = \liminf_{t-&gt;x}f(t)$ are measurable. But, how to tell for general $f$ ?
If you have a measurable function $f$ then the sets $\{x : f(x)&gt;t\},\{x : f(x)=t\},\{x: f(x)&lt;t\}$ are all measurable (as inverse images of open or closed sets). If $g,h$ are measurable then $g-h$ is measurable and 
$$ \{x : g(x)=h(x)\}= \{x : g(x)-h(x)=0\}$$
is therefore measurable. Apply this for $g=\limsup...$ and $h=\liminf...$ and you are done.



If $g(y)=\limsup_{t \to y} f(t)$ let's prove that $g$ is upper semicontinuous. Pick $x$ fixed and $t_n \to x$. Suppose that $g(x)&lt;\limsup_{n \to \infty} g(t_n)$. Therefore there is a $\varepsilon&gt;0$ and a subsequence of $(t_n)$ denoted the same for simplicity such that $g(x)+\varepsilon &lt; g(t_n)$. For every $n$, using the definition of $g$ we can find $s_n$ as close as we want to $t_n$ such that $g(x)+\varepsilon/2&lt;f(s_n)$. But $s_n \to x$ so taking limsup in the last inequality gives $g(x)+\varepsilon/2\leq g(x)$. Contradiction.

Therefore $g$ is upper semicontinuous and therefore measurable (Show that every upper semi-continuous real function is measurable)

The $\liminf$ $h$ is lower semicontinuous and therefore it is measurable.
Define $f_{n}$ by $x\mapsto\sup\left\{ f\left(y\right)\mid y\in\left[\frac{1}{n}\lfloor nx\rfloor-\frac{1}{n},\frac{1}{n}\lfloor nx\rfloor+\frac{1}{n}\right)\right\} $.
Then $\limsup f=\lim_{n\rightarrow\infty}f_{n}$.  Function $f_n$ is constant on intervals $\left[\frac{k}{n},\frac{k+1}{n}\right)$ where $k\in \mathbb Z$. This because the function prescribed by $x\mapsto\lfloor nx\rfloor$
is constant on such intervals. So each $f_n$ is measurable and as a limit of measurable functions so is $\limsup f$.