Existence of a double integral of given function Problem
Let f be defined on the rectangle Q=[0,1]×[0,1] . f(x,y) is 1 when x=y and 0 elsewhere. 
Prove the double integral exist and equal to zero.
Double
I have no idea how to prove the existence part. It is easy to see that the integral will be zero. I am aware that for f to be integrable both supremum of lower limit and infimum of upper limit should be equal. 
 A: Given $n$, partition $Q$ into $n^2$ squares of area $\frac{1}{n}\times \frac{1}{n}.$   The lower Riemann sum is certainly $0$.  The upper sum is $1$ times the area of $n$ of those squares, which is $\frac{1}{n}$.
The integral is between $0$ and $\frac{1}{n}$ for all $n$.
A: Choose a arbitrary partition $P$ of $[0,1]×[0,1]$ then there are two partitions $P_1=\{0=a_0,a_1,....,a_n=1\}$ and $P_2=\{0=b_0,b_1,...,b_m=1\}$ of $[0,1]$ such that $P=P_1×P_2$.
Now consider the upper sum $$U(P):=\sum_{i=0,j=0}^{i=n-1,j=m-1} M_{ij} \ (a_{i+1}-a_i)(b_{i+1}-b_i)=\sum_{(i,j)\in S}\ (a_{i+1}-a_i)(b_{i+1}-b_i)$$ where $M_{ij}=Max_{(x,y)\in [a_i,a_{i+1}]×[b_j,b_{j+1}]}\ f(x,y)$ and $S$ is collection of those pair $(i,j)$ such that $[a_i,a_{i+1}]×[b_j,b_{j+1}] \cap \{(x,y)\in R^2 : x=y\}\not =\phi$
Similarly consider the lower sum $$L(P):=\sum_{i=0,j=0}^{i=n-1,j=m-1} m_{ij} \ (a_{i+1}-a_i)(b_{i+1}-b_i)=0$$  Since minimum over any rectangle is $0$, where $m_{ij}=min_{(x,y)\in [a_i,a_{i+1}]×[b_j,b_{j+1}]}\ f(x,y)$ .
Now given any $\epsilon >0$ we can choose $P$ in such a way sum of the area $\sum_{(i,j)\in S}\ (a_{i+1}-a_i)(b_{i+1}-b_i)$ of the intervals $[a_i,a_{i+1}]×[b_j,b_{j+1}],(i,j)\in S$ can be made less than $\epsilon$. This is due to the fact the portion of the line $\{(x,y)\in R^2: x=y\}$ in $[0,1]×[0,1]$ can be covered by small rectangles such that total area of these rectangles can be small enough as you want(by drawing picture one can convince), in some sense "area of $\{(x,y)\in R^2: x=y\}$ in $R^2$ is zero".
Therefore for any other partition $Q\subseteq P$ we have $U(Q)-L(Q)≤U(P)-L(P)<\epsilon$. Hence Riemann integral of $f$ over $[0,1]×[0,1]$ exists and equals to $0$.
