I was trying to solve the following question:
Consider an image $8\times 8$ so: $$ f(m,n)=0.5\cdot\left((-1)^{m+n}+1\right) $$ Find the DFT of the image.
In the solution they did: (sorry in advanced for it being a picture)
I don't understand how they got from $0.5\sum_{m=0}^{M-1}\sum_{n=0}^{N-1}\exp(-i2\pi (um+vn)/8)$ to $0.5\cdot 8^2\delta(u,v)$. I'm studying from the "Gonzalez & Woods image processing" book so the definition there of the $\delta$ function is (Dirac delta function): $$ \delta(t,z)=\begin{cases} \infty & t=z=0\\ 0 & \text{otherwise} \end{cases} $$ How did they got to $0.5\cdot 8^2\delta(u,v)$? What is the property of $\delta$ did they use?
It looks like the formula is: $$ \sum_{m=0}^{M-1}\sum_{n=0}^{N-1}e^{-i2\pi\left(\frac{\left(k-x\right)}{M}m+\frac{\left(l-x\right)}{N}n\right)}=MN\cdot\delta(k-x,l-x) $$ Is it correct? Why?

This image is like a checkerboard alternating 0 and 1.
The DFT in this particular case can be written as \begin{eqnarray*} F[u,v] &=& \sum_{p,q=0}^3 \exp \left[ -2\pi j \frac{2pu+2qv}{8} \right] + \sum_{p,q=0}^3 \exp \left[ -2\pi j \frac{(2p+1)u+(2q+1)v}{8} \right] \\ &=& \left[ 1+ \exp \left( -2\pi j \frac{u+v}{8} \right) \right] G[u,v] \tag{*} \end{eqnarray*} where $$ G[u,v] = \sum_{p,q=0}^3 \exp \left[ -2\pi j \frac{pu+qv}{4} \right] $$
The G term in (*) is the DFT of a constant $4\times 4$ image. It is thus equal to 16 for $u=0,v=0$ and also by periodicity for 3 other pairs $(0,4),(4,0),(4,4)$ and zero otherwise.
The first term in (*) is null for the pairs $(0,4),(4,0)$ and equal to 2 for the pairs $(0,0),(4,4)$.
The DFT value is 32 for the pairs $(0,0),(4,4)$.