Need help understanding an answer - condition when $E(Y-\lfloor Y \rfloor)$ is uniform I asked a question on the conditions when $S_n-\lfloor S_n \rfloor \sim U([0,1))$ where
$$S_n = \sum\limits_{i=1}^n X_i$$
and the $X_i$ are i.i.d. here. The accepted answer states the conditions that lead to this along with a proof provided by H. H. Rugh. The proof is above my level, but I want to close the gap. So, I decided to ask follow-up questions around the things I don't grasp.
In the answer, he defines for each $m\in {\Bbb Z}$: $\gamma_m = {\Bbb E} \left( e^{2\pi i m X_1} \right)$ and it is claimed that the following two statements are equivalent:

*

*The law of $S_n  \ {\rm mod}\ 1$ converge in distribution to  $\ { U}([0,1))$

*$|\gamma_m|<1$ for every $m\in {\Bbb Z}^*$.

A proof is provided for the equivalence (to understand it, I need to close a lot of gaps), but even before getting into it I don't understand how $|\gamma_m| = |E(\cos(2\pi m X_1)+i \sin(2\pi m X_1))|$ can possibly be anything but $1$.
Isn't it true that for any realization of $X_1$, $|\cos(2\pi m X_1)+i \sin(2\pi m X_1)|=1$? And if so, the expected value over $X_1$ should also be $1$.
What am I missing?

EDIT: Once I wrote this down here, I noticed that we can write -
$$|\gamma_m| = |E(\cos(2\pi m X_1)) + i E(\sin(2\pi m X_1))|$$
This gives me a sense that it might not be $1$ necessarily, but still lost as to why it has to be $<1$.
 A: \begin{align}
\big|E\big(e^{2\pi i mX}\big)\big|&=\Bigg|\int_\mathbb{R} e^{2\pi i mx}dF_X(x)\Bigg|\\
&\le\int_\mathbb{R}\big|e^{2\pi i mx}\big|dF_X(x)\\
&=1\ .
\end{align}
The inequality is not necessarily strict, however, but if $\ \big|E\big(e^{2\pi i mX}\big)\big|=1\ $ then $\ E\big(e^{2\pi i mX}\big)=e^{2\pi i\theta}\ $
for some $\ \theta\in[0,1)\ $, and this can be true only if $\ e^{2\pi i mX}=e^{2\pi i\theta}\ $ almost surely—or, equivalently $\ mX-\theta\ $ is almost surely an integer.  To see why this is true, note that  $\ E\big(e^{2\pi i mX}\big)=e^{2\pi i\theta}\ $ if and only if $\ E\big(1-e^{2\pi i m(X-\theta)}\big)=0\ $. But if this is true, then
\begin{align}
0&=\big|E\big(1-e^{2\pi i (mX-\theta)}\big)\big|^2\\
&=\Bigg(\int_\mathbb{R}\big(1-\cos2\pi(mx-\theta)\big)dF_X(x)\Bigg)^2\\
&\hspace{4em}+\Bigg(\int_\mathbb{R}\sin2\pi(mx-\theta)dF_X(x)\Bigg)^2\ ,
\end{align}
and this can be zero only if $\ \int_\mathbb{R}\big(1-\cos2\pi(mx-\theta)\big)dF_X(x)\ $ and $\ \int_\mathbb{R}\sin2\pi(mx-\theta)dF_X(x)\ $ are both zero. So we have
\begin{align}
0&=\int_\mathbb{R}\big(1-\cos2\pi(mx-\theta)\big)dF_X(x)\\
&\ge\epsilon P\big(\cos2\pi(mX-\theta)<1-\epsilon\big)
\end{align}
for any $\ \epsilon>0\ $, which implies that
$$
 P\big(\cos2\pi(mX-\theta)<1-\epsilon\big)=0
$$
for any $\ \epsilon>0\ $, so $\ \cos2\pi(mX-\theta)=1\ $ with probability $1$, or, equivalently, $\ mX-\theta\ $ is an integer with probability $1$.
