proving Riemann-Lebesgue lemma I have looked at proofs of the Riemann-Lebesgue lemma on the internet; all of these proofs use the technique of Riemann integration and making step functions.
E.g.(https://proofwiki.org/wiki/Riemann-Lebesgue_Lemma)
But if we know Parseval's identity (or Plancherel's identity for Fourier transform)
then, can I use
$$
\sum_{-\infty}^\infty |a_n|^2 = \|f\|^2 = M<\infty
$$

then the tails of the sum is very small, $a_n \rightarrow 0$ as $n \rightarrow \infty$?

There's a really nice proof that "avoids step functions".
With a $u-$substitution you can conclude that $$ \hat{f}(\xi) = \int_{\mathbb{R}} f(x)e^{ix\xi} dx 
\\ 
  = \int_{\mathbb{R}} f(x + \frac{\pi}{\xi})e^{ix\xi}e^{i \pi}  dx \\   
  = - \int_{\mathbb{R}} f(x + \frac{\pi}{\xi})e^{ix\xi} \ dx $$
By averaging these two representations of Fourier transform, we obtain  $$\hat{f}(\xi) = \frac{1}{2} \int_{\mathbb{R}} (f(x) - f(x + \pi/\xi) ) e^{ix\xi}  \ dx $$
Since $|e^{ix}| = 1$, we can then conclude that
$$\hat{f}(\xi) \leq \frac{1}{2} \int_{\mathbb{R}} |f(x) - f(x+\pi/\xi)| dx $$
Letting $\xi \to 0$, finishes the proof assuming we can interchange limits and the integral. We can, but the proof of why (at least the ones I know) still require that step function type argument which is why I put "avoid step functions" in quotes.
