About the proof of an equality related to the DFT [sampling the DTFT to obtain the DFT]
The right hand side is the periodic repetition of the left, tells the last equation.

Starting from Fourier transform $$X(\omega)=\sum_{n=-\infty}^{\infty}x(n)e^{-j\omega n}$$ and $X(\omega)$ is periodic with period $2\pi$. So only the samples in the fundamental frequency range are sufficient.

Now we take $N$ equi-distance samples in the iterval $0\leq\omega\leq 2\pi$, so the spacing will be $\dfrac{2\pi}{N}$

Let $k$ be the sample index and $k=0,1,\dots,N-1$ and we evaluate $\omega$ at $\left(\dfrac{2\pi k}{N}\right)$

$$X\left(\dfrac{2\pi}{N}k\right)=\sum_{n=-\infty}^{\infty}x(n)e^{-j2\pi kn/N}$$ 

which can be written as

$$X\left(\dfrac{2\pi}{N}k\right)=\sum_{l=-\infty}^{\infty}\sum_{n=lN}^{lN+N-1}x(n)e^{-j2\pi kn/N}$$

Now change the index $n$ to $n-lN$ which results in 

$$X\left(\dfrac{2\pi}{N}k\right)=\sum_{n=0}^{N-1}\left[\sum_{l=-\infty}^{\infty}x(n-lN)\right]e^{-j2\pi kn/N}$$

The sequence inside the square brackets is the periodic repetition of $x(n)$ of period $N$

$$x_p(n)=\sum_{l=-\infty}^{\infty}x(n-Nl)$$

Thus $$x_p(n)=\begin{cases}
               x(n),\;\;\;\;0\leq n \leq N-1\\
                     \\
               0,\;\;\;\;\;\;\;\;\;\;\;     \mathrm{elsewhere}\\
            \end{cases}$$