Consider the following function on $[0,1]$: $$ f(x) = \begin{cases} 1/m, & \text{if $x={m\over n} \in \Bbb Q$} \\ 0, & \text{if $x$ $\notin \Bbb Q$} \\ \end{cases}$$
Here, as usual, $\Bbb Q$ is the collection of all rational numbers and we assume that $m$ and $n$ have no common divisors. Prove that the function $f$ is continuous at any point $x \in [0,1]$\ $\Bbb Q$ . (any irrationals in $[0,1]$)
Please give a rigorous proof, or you can just give me a hint.