Let $A \subset \mathbb{R}$ be a measurable set. Define $B$:
$$B =\left\{x\in \mathbb{R}: \lim \limits_{\epsilon \to 0^+} \frac{m([x-\epsilon, x+\epsilon]\bigcap A)}{2\epsilon} = 1\right\}$$
Is $B$ necessarily open?
I couldn't find a counterexample, but I also couldn't prove. does anyone know the answer?
Consider a set $A$ that is closed that has positive measure, but empty interior.
Being closed prevents $A$ from having positive density at points in its complment, i.e. $B\subset A$.
Being of positive measure gives a non-empty subset $B$ of points with density $1$. Recall Lebesgue's density theorem that says that $A\setminus B$ has measure zero. Therefore $A\cap B= B\neq \emptyset$.
Having $A$ empty interior gives that $B$ has empty interior too, and therefore it is not open.
The classical construction of such sets is imitating Cantor's ternary set.