I have to face to following problem: let $X$ be a separable metric space and $x_0 \in X$ fixed.
Consider an open bounded set $A \subset X$.
I want to know if the function $f: [0, \infty) \mapsto [0, \infty)$ bellow is measurable:
$$f(r) = \operatorname{diam}[ S(x_0, r) \cap A ]$$
with $S(x_0,r) = \{x \in X: d(x,x_0)=r\}$.
Of course, I'd say it is, but how to show? I don't know what to say about the inverse image sets of $f$.
What do you think?
Let's take $X$ to be the union of $[-1,0]$ and a nonmeasurable subset of $(0,1]$ (with the usual metric of $\mathbb R$, this is a separable metric space), $x_0 = 0$, and $A = X$. Then $S(0,r)$ is either $\{-r\}$ or $\{-r,r\}$ depending on whether or not $r \in X$, and correspondingly $f(r) = 0$ or $2r$. Since $f^{-1}(\{0\}) = \{0\} \cup X$, the function $f$ is not measurable.