I have the following problem:
Let $(X,d)$ be a metric space and $f:X\rightarrow \mathbb{R}$ be some function. Let
$$\omega(f)(x,r) = sup\{d(f(x_0),f(y_0))\, |\, x_0,y_0\in B(x,r)\}$$ and $$osc(f)(x)=\lim_{r\rightarrow 0}\omega(f)(x,r).$$ Show that {$x\in X\,|\, osc(f)(x)<\epsilon$} is an open set, with the hint, that this set is equal to $$\cup_{r>0}\{x\,|\,\omega(f)(x,r)<\epsilon\}.$$
How can i show that these two sets are equal and why is the set $\cup_{r>0}\{x\,|\,\omega(f)(x,r)<\epsilon\}$ open? I would argue, that because $\omega(f)(x,r)$ is the greatest distance of the function of two points inside an open ball, this set must be open too, but is this sufficient?
Lastly I have to show, that the points of continuity of $f$ form a $G_\delta$-set. This is pretty obvious, because $f$ is continuous iff $osc(f)(x)=0$. With the above, we can see that {$x\,|\,osc(f)=0$}$=\cap_{n\geq 1}\cup_{r>0}${$x\,|\,\omega(f)(x,r)<\frac{1}{n}$}. Does this mean, that there exists a function on $\mathbb{R}$ that is continuous only in the rationals?