Prove that $f$ is not continuous for any value in $\mathbb R$. I'm having some trouble in the following proof:
Let $f:\mathbb{R\to R}$ be given by:
$$
  f(x) = \begin{cases}
1,&x\in\mathbb Q
\\
0,&x\notin\mathbb Q
\end{cases}
$$
Prove that $f$ is not continuous for any value in $\mathbb R$.
Can anyone please help me with this?
Thank you!
 A: Let $x\in \Bbb R$, and $\epsilon=1/2$. If $f$ is continuous, then there should be a $\delta$ region around $x$ which is sent entirely inside $(f(x)-\epsilon, f(x)+\epsilon)$. 
But what do you know about rationals and irrationals in intervals? Draw a picture for the two cases ($f(x)=1$ and $f(x)=0$) and you should see what's going on. 
A: Let $x\in\mathbb R$. Show that there is a sequence of rational numbers $q_n\to x$ and another sequence of irrational numbers $r_n\to x$.
We have that $\lim_{n\to\infty} q_n=\lim_{n\to\infty} r_n$. But what can you say about $\lim_{n\to\infty} f(q_n)$ and $\lim_{n\to\infty} f(r_n)$?
A: Recall that if a function is continuous, then it is also sequentially continuous.
Now consider $x \in \mathbb{R}$.
If $x \in \mathbb{Q}$, consider the sequence $x_n = x - \dfrac1{n\sqrt2}$. Clearly, $x_n \in \mathbb{R} \backslash \mathbb{Q}$ and $x_n \to x$.
Hence, $f(x_n) = 0$ for all $x_n$, whereas $f(x) = 1$.
Do a similar argument when $x \in \mathbb{R} \backslash \mathbb{Q}$. Consider the sequence $x_n = \dfrac{\lfloor 10^n x \rfloor}{10^n}$. Clearly, $x_n \in \mathbb{Q}$ and $x_n \to x$.
Hence, $f(x_n) = 1$ for all $x_n$, whereas $f(x) = 0$.
A: Let $x \in \mathbb{R}$.  Let $0 < \epsilon < 1$.   By the density of $\mathbb{Q}$ and $\mathbb{R} \setminus \mathbb{Q}$, for any $\delta > 0$, we can find a rational $q \in  (x - \delta, x + \delta)$ and an irrational $r \in  (x - \delta, x + \delta)$.  If $x \in \mathbb{Q}$, then $|f(x) - f(r)| = 1$.  Otherwise, $|f(x) - f(r)| = 1$.  Hence, $f$ is not continuous at $x$.
