I am reading the awesome paper Erdos discrepancy problem by Terence Tao and my Fourier-analytic calculations are a bit rusty. On page 11 the author claims that the following (left hand side of (2.3)):
$$\frac{1}{M^r} \sum_{x \in (\mathbb{Z}/M\mathbb{Z})^r} \left\| \sum_{j=1}^n F(x + \pi(j)) \right\|_H^2$$
can be rewritten as
$$\sum_{\xi \in (\mathbb{Z}/M\mathbb{Z})^r} \|\hat F(\xi)\|_H^2 \left|\sum_{j=1}^n e\left(\frac{\pi(j)\cdot \xi}{M}\right)\right|^2$$
by a routine calculation (using the Plancherel identity).
I have tried to do these calculations myself, but I got stuck after expressing $F(x+\pi(j))$ as the Fourier expansion and rewriting the norm as a scalar product. I can see that if the scalar products of different $x, y \in (\mathbb{Z}/M\mathbb{Z})^r$ sum to zero then the rewriting can be done. I do not see that the scalar products sum to zero though.
How can one show that the products will sum to zero? Is there another easier way to do these computations?
The Fourier transform of $x\mapsto F(x+\pi(j))$ is $\xi\mapsto \hat F(\xi) e(\frac{\pi(j)\cdot\xi}M).$
So the Fourier fransform of $x\mapsto \sum_{j=1}^nF(x+\pi(j))$ is $\xi\mapsto \sum_{j=1}^n\hat F(\xi) e(\frac{\pi(j)\cdot\xi}M).$
By Plancherel, the sum over $x$ of $\|\sum_{j=1}^nF(x+\pi(j))\|_H^2,$ multiplied by a normalization constant $1/M^r,$ is the sum over $\xi$ of $\|\sum_{j=1}^n\hat F(\xi) e(\frac{\pi(j)\cdot(\xi)}M)\|_H^2.$