Set of Discontinuities for Thomae's function in $\mathbb{R}^2$ For this question, Label:
Part A: Is $f(x,y)$ integrable? Question $3$-$7$ from Spivak's Calculus on Manifolds 
Part B: Prove $f:[0,1]\times[0,1]→\mathbb{R}$ is integrable.
For part A and B question, I believe that the set of points of discontinuity is exactly equal to $[0,1]\times [0,1]\cap \mathbb{Q}\times \mathbb{Q}$ because part A is the extension of Thomae's funtion to $\mathbb{R}^2$ and part B is produced by taking a cross product of Thomae's funtion.
But when I use the sequential continuity definition, I get a larger set.
For Eg: For this part A; Let $p_n$ be a sequence of rational points converging to $\frac{1}{\sqrt{2}}$ but the sequence $f\left(p_n,\frac{1}{2}\right)=\frac{1}{2}$ doesn't converge to zero i.e. $f\left(\frac{1}{\sqrt{2}},\frac{1}{2}\right)=0$
Is there something wrong with the method? Else if the set is larger, what does the set look like?
Any Help will be appreciated. Thanks in advance.
 A: \begin{equation}
  f(x,y)=\begin{cases}
    0, & \text{if $x$ is irrational}.\\
    0, & \text{if $x$ is rational, $y$ is irrational}. \\
    1/q, & \text{if $x$ is rational, $y=p/q$ in lowest terms}.
  \end{cases}
\end{equation}
Let $\epsilon>0.$ Suppose $(a,b)\subseteq [0,1]\times [0,1]$ with $b$ irrational. Then, $f(a,b)=0.$ Choose an integer $N$ large enough so that  $1/N<\epsilon$ and consider $I\times Q=\{(x,k/n):x\in [0,1],\ \ 1\leq n\leq N, \ 0\le k\le n\}.$
Now $Q$ is a finite set, so as $b$ is irrational,  $\underset{y\in Q}\inf|y-b|=\delta>0.$ Now, if $(x,y)\in I\times (b-\delta,b+\delta),$ and if $x$ is either irrational or $x$ is rational and $y$ is irrational then $f(x,y)=0$. On the other hand, if $x,y$ are rational with $y=p/q$ then $f(x,y)=1/q<\epsilon$ because by construction, $y\notin Q$ so $q>N\Rightarrow 1/q<1/N<\epsilon.$ It follows that $f$ is continuous at all points of the form $(a,b):b$ irrational.
Now since $m(I\times (\mathbb Q\cap I))=0$ we have that the set of possible discontinuities of $f$ has measure zero, and so $f$ is Riemann integrable on $I\times I.$
But if you're going to use measure theory anyway, why not just note that $f$ is zero off a set of measure zero? Or better, do the integral from scratch using partitions: for any partition $P,\ \underline S(f,P)=0.$ And if we take the partition $P=\{(0,1/q,\cdots, q-1/q,1)\times [0,1]\}$, then $\overline S(f,P)=\sum_{k=1}^q\left(\frac{1}{q}\right)\left(\frac{1}{q}\right)=\left(\frac{1}{q^2}\right)\sum_{k=1}^q1=\frac{1}{q}\to 0.$
