Consider $E$ to be the set of all $(x,y) \in [0,1] \times [0,1]$ such that there exists a $p \geq 2$ prime and $m,n \in \mathbb{N}$ such that $(x,y) = (\frac{m}{p},\frac{n}{p}).$ Take $f$ to be the indicator function for the set, i.e. $f(x,y) = \mathcal{1}_{(x,y) \in E}$. I want to prove that $f$ is not Riemann integrable, but I am having issues figuring out the proper method to prove this instance. I had a suggestion that I should prove the denstiy of $E$ and $[0,1] \times [0,1] \setminus E$, but I am not sure how this would go about proving my result. Any suggestions on such a situation?
Otherwise, I have a decent sense of how to go about proving the density of $E$. Consider $(x,y) \in [0,1] \times [0,1] \setminus E$, and consider the open ball around $(x,y)$ for an arbitrary $r > 0,$ $B(r,(x,y)).$ I understand that by the density of the rationals that I could find some rational $m$ such that $|x-m| < r$ and I could potentially find some rational $n$ such that $|y-n| < r$. That being said, I am trying to figure out how to combine these two results to find a point in this open ball that is also in $E$. Any suggestions?
Pick $(x,y) \in [0,1]\times[0,1]$ and $\varepsilon>0$. Take a prime $p>\frac{2}{\varepsilon}$. Take positive integers $m,n$ such that $1\leq m,n \leq p-1$ with $|x-\frac{m}{p}| \leq \frac{1}{p}$ and $|y-\frac{n}{p}| \leq \frac{1}{p}$. To see why you can do this, do marks on the real line at $\frac{1}{p},\frac{2}{p},\frac{3}{p},\dots,\frac{p-1}{p}$ and observe that no point in $[0,1]$ can be at distance greater than $\frac{1}{p}$ from every mark. Now you have $(x,y) \in (0,1)\times(0,1)$ with $$ | (x,y) - (\frac{m}{p},\frac{n}{p}) | = \sqrt{{(x-\frac{m}{p})}^2 + {(y-\frac{n}{p})}^2} \leq \sqrt{\frac{1}{p^2} + \frac{1}{p^2}} = \frac{\sqrt{2}}{p} < \frac{2}{p} < \varepsilon$$
and you are done. For every rectangle in the partition get a point with that form in its interior and prove that the upper Riemann sum is 1. Picking irrationals in the interiors, prove that the lower Riemman sum is 0.