I am currently struggling with exponential sum for finite fields and here is the question.
Let $p$ be prime and $a_1, \dots,a_n \in \mathbb F_p$ such that $a_i \in [-1,1]$. Show that $\mid \sum _{i=1} ^n e^{\frac{2\pi.i}{p}a_i} \mid \ge n. \cos(\frac{2\pi}{p})$
My attempts: Since we are in finite fields then $a_i$ can be $-1,0$ and $1$. First let me denote exponential sum by $e_p(a_i) = \sum _{i=1} ^n e^{\frac{2\pi.i}{p}a_i}$. After the calculating $e_p (-1)= \cos(2\pi /p) - i \sin(2\pi/p)$,$e_p (1)= \cos(2\pi /p) + i \sin(2\pi/p)$ and $e_p (0)= 1$ I guessed it would be enough to multiply these by how many of them are exist. Let say $m_1 = \# \{ 1\le i\le n: a_i=1\}$, $m_0 = \# \{ 1\le i\le n: a_i=0\}$ and $m_{-1} = \# \{ 1\le i\le n: a_i=-1\}$.
So, the whole sum would be $m_{-1}.e_p (-1)+m_1.e_p (1)+m_0.e_p (0)=m_{-1}.\cos(2\pi /p) - i \sin(2\pi/p)+\cos(2\pi /p) + i \sin(2\pi/p) + m_0$
After some elimination(writing $n=m_0+m_1+m_{-1}$) I got $\cos(2\pi /p )(m_1+m_{-1}) + i \sin (2\pi /p)(m_1-m_{-1}) + m_0$
How can I reach the conclusion? Any help is appreciated.
By the way, I also think that let say $p=5$ then we are in finite field of order $5$ which is $\mathbb F_5=\{0,1,2,3,4\}$. (I know there must be bar in the numbers.) Since $a_i$'s in between $-1$ and $1$ then $0 \in m_0,1\in m_1$ and $4 \in m_{-1}$. Okay that is not correct notation because $m_i$ is giving number of elements in set. What I mean is that these $m_i = 1$ because $2$ and $3$ is not in $[-1,1]$. So in any prime $p$, these $m_i$'s must be $1$. Am I right?
Viewing $\Bbb C$ as $\Bbb R^2$, in the LHS we have the length of a vector $L$ of form $b_- v_- + b_0 v_0 + b_+ v_+$, where $b$'s are nonnegative integers with $b_- + b_0 + b_+ = n$, and $v_- = (\cos \phi, -\sin \phi), v_0 = (1, 0), v_+ = (\cos \phi, \sin \phi)$, where $\phi = 2\pi/p$. On the RHS we have $n \cos \phi$.
If $p = 2$ or $3$, then the cosine is negative and the inequality is trivially true. For $p \ge 5$ the cosine is positive and less than $1$, thus the projection of $L$ to $Ox$ is greater or equal to $n \cos \phi$, and so is the length of $L$.