I want to prove that if $||x||$ is the distance between $x$ and the nearest integer to $x$, $\{\alpha_1,\ldots, \alpha_N\}$ are points in $\mathbb{R}$/$\mathbb{Z}$ and we define $$S(y) = \sum_{m=1}^{N}\sum_{n=1}^N||\alpha_m-\alpha_n-y||,$$
we have that $S(0) \leq S(y) \leq S(\frac{1}{2})$ for all $y \in \mathbb{R}$/$\mathbb{Z}$.
The $||x||$ function has Fourier series given by
$$\frac{1}{4} + \frac{1}{2\pi^2}\sum_{k \in \mathbb{Z}\backslash\{0\}}\frac{(-1)^k - 1}{k^2}\exp(2\pi ikx).$$
So,
$$S(y) = \sum_{m=1}^{N}\sum_{n=1}^N\left(\frac{1}{4} + \frac{1}{2\pi^2}\sum_{k \in \mathbb{Z}\backslash\{0\}}\frac{(-1)^k - 1}{k^2}\exp(2\pi ik[\alpha_m-\alpha_n-y])\right).$$
I couldn't see why those 3 inequalities would be true, so I tried do "evaluate" $S(y)-S(0)$ to see if $S(y)-S(0) \geq 0$, but that wasn't very helpful...
I also tried to prove this by induction on the number of points, but it only gave me more series to work with...
Does someone can give a hint, solution or a way to proceed on this?
Thanks!
Hint: