Show that the set of discontinuities of $f(x,y) = 1/q,x\in\mathbb{Q},y=p/q$ has measure $0$ Show that $f:[0,1]\times[0,1]\to\mathbb{R}$ is integrable, $f$ being defined by:
$$f(x,y) = \begin{cases} 0, & x\notin \mathbb{Q} \\ 0, & x\in\mathbb{Q},y\notin\mathbb{Q}\\1/q,&x\in\mathbb{Q},y=p/q (irreducible)\end{cases}$$
and that 
$$\int_{[0,1]\times[0,1]}f(x,y)dxdy=0$$
Attempt: To show this function is integrable I must show that $\lambda(D_f)=0$
with $\lambda$ the Lebesgue measure and $D_f$ the set of discontinuities of $f$ in $[0,1]\times[0,1]$
It seems that given $\epsilon>0$, there'll be infinit points $f(x,y)=1/q<\epsilon$ and only a finite set of points $f(x,y)>\epsilon$ and so the Lebesgue measure would indeed be $\lambda(D_f)=0$.
But I couldn't go beyond this intuitive idea, nor put it into formal math. Any help would be appreciated.
 A: The set of discontunities in the unit square is the set of all points with rational coordinates. Since this set is countable, $D_f$ has measure zero. Here is a proof of this statement: https://proofwiki.org/wiki/Countable_Sets_Have_Measure_Zero.
To see that the points which do not have both rational coordinates are not discontinuities, let $\epsilon >0$ and $P=(x_0,y_0)$ be a point in the unit square such that $x_0\notin \mathbb{Q}$ or $y_0\notin \mathbb{Q}$. 
Let $A_q$ be the set of rational points such that the denominator of the irreducible fraction is less than $q$. For every $q$, the set $A_q$ is finite. Hence, the minimum distance between $A_q$ and $P$ is greater than $0$.
Choose $q^*>\frac{1}{\epsilon}$ and let $\delta$ be equal to the minimum distance between $P$ and $A_{q^*}$. 
Then if $d((x,y),P)<\delta$, this implies that $d(f(x,y),f(P))=d(f(x,y),0)<\frac{1}{q^*}<\epsilon$.
A: If $y\in \mathbb R$ \ $\mathbb Q$ and $(p_n/q_n)_n$ is a sequence converging to $y$ with $p_n,q_n\in \mathbb Z$ then $\lim_{n\to \infty} 1/|q_n|=0$ because for any $q\in \mathbb Z$ \  $\{0\}$ we have $0<\min \{|y-p/q|:p\in \mathbb Z\}.$
If $x\in \mathbb R$ and $y\in \mathbb R$ \ $\mathbb Q$  and if we are given $\epsilon >0,$ take $\delta>0 $ such that $\forall p,q \in \mathbb Z \;(|y-p/q|<\delta \implies |1/q|<\epsilon).$ 
Then $\forall (u,v)\;((u-x)^2+(v-y)^2<\delta^2\implies f(u,v)<\epsilon).$ Since $f(x,y)=0,$ therefore $f$ is continuous at $(x,y).$ So the set of discontinuities of $f$ is a subset of   $\mathbb R \times \mathbb Q,$ which is a measure-$0$ set because it is the union of the countable family $\{\mathbb R\times \{s\}:s\in \mathbb Q\}$ of measure-$0$ sets.
