$\newcommand{\lrp}[1]{\left(#1\right)}$ $\newcommand{\lrmod}[1]{\left|#1\right|}$
I am trying to understand the proof of the van der Corput inequality given in Lemma 1 of this blog entry due to Tao. We will use the Big-O notation, whose definition can be found here.
Lemma. (Van der Corput Inequality). Let $a_1 a_2, a_3 , \ldots$ be a sequence of complex numbers bounded by magnitude $1$. Then for any $1\leq H\leq N$ we have $$ \lrmod{ \frac{1}{N} \sum_{n=1}^N a_n } \leq \lrp{ \frac{1}{H}\sum_{h=0}^{H-1} \lrmod{ \frac{1}{N} \sum_{n=1}^N a_{n+h}\bar a_n} }^{1/2} + O\lrp{ \frac{H}{N}} $$
The proof Tao has provided proceeds as follows. It is easy to see that $$ \lrmod{ \frac{1}{N} \sum_{n=1}^N a_n - \frac{1}{N} \sum_{n=1}^N a_{n+h} } = O\lrp{\frac{H}{N}} $$ Therefore $$ \frac{1}{H}\sum_{h=0}^{H-1}\lrmod{ \frac{1}{N} \sum_{n=1}^N a_n - \frac{1}{N} \sum_{n=1}^N a_{n+h} } = O\lrp{\frac{H}{N}} $$ and hence by triangle inequality we have that $$ \lrmod{\frac{1}{N} \sum_{n=1}^N a_n - \frac{1}{N}\sum_{n=1}^N \frac{1}{H}\sum_{h=0}^{H-1} a_{n+h}} = O\lrp{\frac{H}{N}} $$ Write $$ x= \frac{1}{N} \sum_{n=1}^N a_n \text{ and } y_n= \frac{1}{H} \sum_{h=0}^{H-1} a_{n+h} $$ So the last equation becomes $$ \lrmod{x- \frac{1}{N}\sum_{n=1}^N y_n} = O\lrp{ \frac{H}{N}} $$ Again by triangle inequality we have that $$ |x| \leq \lrmod{ \frac{1}{N} \sum_{n=1}^N y_n} + O\lrp{ \frac{H}{N}} \leq \frac{1}{N} \sum_{n=1}^N |y_n| + O\lrp{ \frac{H}{N}} $$ By Jensen's inequality we have $$ \lrp{\frac{1}{N} \sum_{n=1}^N |y_n|}^2 \leq \frac{1}{N}\sum_{n=1}^N |y_n|^2 $$ Thus we get $$ |x| \leq \lrp{ \frac{1}{N}\sum_{n=1}^N |y_n|^2}^{1/2} + O\lrp{ \frac{H}{N}} $$ which is nothing but $$ \lrmod{ \frac{1}{N}\sum_{n=1}^N a_n} \leq \lrp{ \frac{1}{N} \sum_{n=1}^N \lrmod{\frac{1}{H} \sum_{h=0}^{H-1} a_{n+h}}^2}^{1/2} + O\lrp{ \frac{H}{N}} $$ At this point Tao writes that ``Expanding out the square and rearranging a bit, we soon obtain the desired upper bound." I am unable to follow this step. Can somebody please give some details here. Also, if you can comment on what this inequality is trying to capture then please feel free to share.