If $X$ is a metric space and $f: X \to \mathbb{R}$ a map such that $E_r = \{x \in X \mid f(x) < r \}$ is open for all $r \in \mathbb{Q}$, then show that $E_r$ is open for all $r \in \mathbb{R}$.
If $E_r$ is open for all $r \in \mathbb{Q}$ it means that for all $x \in E_r$ there is an $\varepsilon >0$ such that $B(x, \varepsilon) \subset E_r$. However I also have that $\mathbb{R} \subset \mathbb{Q}$ doesn't this immediately imply that $E_r$ is open for all $r \in \mathbb{R}$?