I found this problem I have tried but it has been a bit complicated for me,


Let $f:\mathbb{R}\to\mathbb{R}$ a bounded function. For each $\epsilon>0$, let $f\_\epsilon (x)=\inf\{f(y):|y-x|<\epsilon\}$. They ask us to prove that:


1. For each $\epsilon>0$, the function $f\_\epsilon$ is measurable Borel.



> 
> I tried to show that for each $a\in\mathbb{R}$ we have $f\_\epsilon^{-1}((-\infty,a))$ is open in $\mathbb{R}$. Let $x\in f\_\epsilon^{-1}((-\infty,a))\Leftrightarrow f\_\epsilon(x)<a$. On the other hand we have that for all $R>0$ exists $y\_0\in (x-\epsilon,x+\epsilon)$ such that $f(y\_0)<f\_\epsilon(x)+R<a+R$. Then taking $r=\epsilon-|x-y\_0|>0$. Let $z\in (x-r,x+r)$, then $|z-y\_0|=|z-x|+|x-y\_0|<\epsilon\Rightarrow f\_\epsilon(z)\leq f(y\_0)<a+R$, for all $R>0$. Thus $f\_\epsilon(z)\leq a$, then I need prove that $f\_\epsilon(z)\neq a$ that way $(x-r,x+r)\subset f\_\epsilon^{-1}((-\infty,a))$ but I couldn't get that $f\_\epsilon(z)\neq a$. There are any idea for that?
> 
> 
> 


2. The function $h:\mathbb{R}\to\mathbb{R}$ given by $h(x)=\sup\{f\_\epsilon(x):\epsilon>0\}$ is measurable Borel too.



> 
> I don't know how to start this part, since it is a supreme over an arbitrary set that is not even countable.
> 
> 
> 



$f_\epsilon=\inf\{f(y):|y-x|<\epsilon\}$ is measurable Borel
As noted, your idea is right. Let me try to do the proof with greater clarity; to make it easier for the reader to understand.




---


1. 


$f\_\epsilon (x)=\inf\{f(y):|y-x|<\epsilon\}$.


Fix $\epsilon>0$. We claim that $f\_\epsilon$ is Borel measurable. [In fact, even more is true: $f\_\epsilon$ is upper semicontinuous.]


Fix $\lambda \in \mathbb R$. We claim: $E := \{x : f\_\epsilon(x) < \lambda\}$ is open.


Take any point $z \in E$. That means $f\_\epsilon(z) < \lambda$. That is,
$$
\inf\{f(y) : |z-y| < \epsilon\} < \lambda
$$
so there exists $y\_1$ with $|z-y\_1|< \epsilon$ and $f(y\_1) < \lambda$.
Define $\delta = \epsilon - |z-y\_1| > 0$.  

We claim the open ball $B\_\delta(z) \subseteq E$. Indeed, let
$x \in B\_\delta(z)$. Then $|x-z| < \delta$ so
$$
|x-y\_1| \le |x-z|+|z-y\_1| < \delta + |z-y\_1| =
 \big(\epsilon - |z-y\_1|\big)+|z-y\_1| = \epsilon .
$$
Thus
$$
f\_\epsilon(x) = \inf\{f(y):|x-y|<\epsilon\} \le f(y\_1) < \lambda 
$$
so $x \in E$.
This completes the proof that $B\_\delta(z) \subseteq E$.


We have seen: for every $z \in E$, there is $\delta > 0$ so that
$B\_\epsilon(z) \subseteq E$. This shows $E$ is open.


Finally, we have seen: for every $\lambda \in \mathbb R$,
the set $\{x : f\_\epsilon(x) < \lambda\}$ is open (and therefore Borel measurable).
It follows that $f\_\epsilon$ is a Borel measurable function (in fact a lower semicontinuous function).




---


2. 


$h(x)=\sup\{f\_\epsilon(x):\epsilon>0\}$.
Claim: $h$ is Borel measurable.


First note: if $\epsilon\_1 > \epsilon\_2$, then
$f\_{\epsilon\_1}(x) \le f\_{\epsilon\_2}(x)$. So we have
$$
h(x) = \sup\{f\_\epsilon(x):\epsilon>0\} =
\lim\_{\epsilon \to 0^+} f\_\epsilon(x)
= \lim\_{n \to \infty}f\_{1/n}(x) ,
$$
a pointwise limit of a sequence of Borel measruable functions. So $h$ is a Borel measurable function.


