Let $f: \mathbb R^n \to \mathbb R$ be a measurable function.


We say $f$ is *precise* if for every $x \in \mathbb R^n$ and every compact subset $K$ of $\mathbb R^n$ such that for $|K \cap B\_\delta (x)|>0$ for every $\delta>0$, we have :


* $\lim\_{\delta \to 0^+} \text{essinf}\_{K \cap B\_\delta (x)} f = \lim\_{\delta \to 0^+} \inf\_{K \cap B\_\delta (x)} f$
* $\lim\_{\delta \to 0^+} \text{esssup}\_{K \cap B\_\delta (x)} f = \lim\_{\delta \to 0^+} \sup\_{K \cap B\_\delta (x)} f$.


**Question:** Is it true that $f$ is precise if and only if $f$ is continuous?



A characterisation of continuous real functions
Edit: the proof can be made a little simpler.


Yes, this condition is equivalent to $f$ being continuous. The reverse direction is easy because if $f$ is continuous at $x$ then all of the limits in question equal $f(x)$. For the forward direction, suppose $f$ is not continuous at some point $x$. Wlog $f(x) > \lim\_{\delta \to 0}{\rm inf}\_{B\_\delta(x)} f$. Choose $\epsilon$ so that $f(x) > f(x) - \epsilon > \lim\_{\delta \to 0} {\rm inf}\_{B\_\delta(x)} f$ and set $A = \{y: f(y) \leq f(x) - \epsilon\}$. If for some $\delta > 0$ the set $A \cap B\_\delta(x)$ has measure zero, then ${\rm essinf}\_{B\_{\delta'}} f \geq f(x) - \epsilon$ for all $\delta' \leq \delta$, which means that the limit of the essential infs is $\geq f(x) - \epsilon$, which is strictly greater than the limit of the infs, showing that $f$ is not precise. Otherwise $A \cap B\_\delta(x)$ has positive measure for all $\delta$. For each $n \in \mathbb{N}$ let $K\_n$ be a positive measure compact subset of $A \cap B\_{1/n}(x)$; then $K = \{x\} \cup \bigcup K\_n$ is a compact set for which $\lim\_{\delta \to 0}{\rm esssup}\_{K \cap B\_\delta(x)} f \leq f(x) - \epsilon$ (since the sup on $K \cap B\_\delta(x) \setminus\{x\}$ is at most $f(x) - \epsilon$), whereas $\lim\_{\delta \to 0}\sup\_{K \cap B\_\delta(x)} f \geq f(x)$. So the condition is violated again.


