Variations on Salem--Zygmund results for random trigonometric polynomials. Application to almost sure nodal asymptotics

On a probability space $(\Omega, \mathcal F, \mathbb P)$ we consider two independent sequences $(a_k)_{k \geq 1}$ and $(b_k)_{k \geq 1}$ of i.i.d. random variables that are centered with unit variance and which admit a moment strictly higher than two. We define the associated random trigonometric polynomial \[ f_n(t) :=\frac{1}{\sqrt{n}} \sum_{k=1}^n a_k \cos(kt)+b_k \sin(kt), \quad t \in \mathbb R. \] In their seminal work, for Rademacher coefficients, Salem and Zygmund showed that $\mathbb P$ almost surely: \[ \forall t\in\mathbb R,\quad \frac{1}{2\pi}\int_{0}^{2\pi} \exp\left(i t f_n(x)\right) dx \xrightarrow[n\to\infty]~e^{-\frac{t^2}{2}}. \] In other words, if $X$ denotes an independent random variable uniformly distributed on $[0,2\pi]$, $\mathbb{P}$ almost surely, under the law of $X$, $f_n(X)$ converges in distribution to a standard Gaussian variable. In this paper, we revisit the above result from different perspectives. Namely, i) we establish a possibly sharp convergence rate for some adequate metric via the Stein's method, ii) we prove a functional counterpart of Salem--Zygmund CLT, iii) we extend it to more general distributions for $X$, iv) we also prove that the convergence actually holds in total variation. As an application, in the case where the random coefficients have a symmetric distribution and admit a moment of order $4$, we show that $\mathbb{P}$ almost surely, for any interval $[a,b] \subset [0, 2\pi]$ \[\frac{\mathcal N(f_n,[a,b])}{n} \xrightarrow[n \to +\infty]{} \frac{(b-a)}{\pi \sqrt{3}},\] where $\mathcal N(f_n,[a,b])$ denotes the number of real zeros of $f_n$ in the interval $[a,b]$. To the best of our knowledge, such an almost sure result is new in the framework of random trigonometric polynomials, even in the case of Gaussian coefficients.

In their seminal work, for Rademacher coefficients, Salem and Zygmund showed that P almost surely: In other words, if X denotes an independent random variable uniformly distributed over [0, 2π], P almost surely, under the law of X, f n (X) converges in distribution to a standard Gaussian variable. In this paper, we revisit the above Salem-Zygmund result from different perspectives. Namely, i) we establish a possibly sharp convergence rate for some adequate metric via the Stein's method, ii) we prove a functional counterpart of Salem-Zygmund CLT, iii) we extend it to more general distributions for X, iv) we also prove that the convergence actually holds in total variation.
As an application, in the case where the random coefficients have a symmetric distribution and admit a moment of order 4, we show that, P almost surely, for any interval [a, b] where N (f n , [a, b]) denotes the number of real zeros of f n in the interval [a, b]. To the best of our knowledge, such an almost sure result is new in the framework of random trigonometric polynomials, even in the case of Gaussian coefficients.
1 Introduction and statement of the results

Introduction
Let us start by describing the framework of our study and fix the notations. We consider a probability space (Ω, F, P) which carries two independent sequences (a k ) k≥1 and (b k ) k≥1 of independent and identically distributed random variables. A generic element in Ω will be denoted by ω ∈ Ω. We then consider an independent random variable X with distribution P X in [0, 2π]. This can be achieved by considering the product space with X seen as the identity map from ([0, 2π], B([0, 2π]) to itself. The expectation with respect to P and P X will be denoted by E and E X respectively. If Y is an independent copy of X, which is also independent of the whole sequence (a k , b k ) k≥1 , we will denote by E X,Y the expectation under P X ⊗ P Y . To the sequence (a k , b k ) k≥1 , one can naturally associate a sequence of random trigonometric polynomials setting for all n ≥ 1 f n (t) := 1 √ n n k=1 a k cos(kt) + b k sin(kt), t ∈ R.
The starting point of the article is the following celebrated result of Salem and Zygmund in [SZ54], which, slightly adapted to our context, reads as follows: Theorem 1 (Theorem 3.1.1 of [SZ54]). Suppose that (a k , b k ) k≥1 is a sequence of independent and identically distributed random variables that are centered with unit variance and admit a third moment. Let X be an independent random variable that is uniformly distributed over [0, 2π]. Then, P almost surely, under P X we have the following convergence in distribution f n (X) in the sense that P almost surely ∀t ∈ R, E X e itfn(X) = 1 2π This result has a long heritage, in particular there is a tremendous literature on its extension to lacunary trigonometric polynomials, with large or bounded gaps, i.e. polynomials of the form 1 √ n n k=1 a k cos(n k t) + b k sin(n k t) with n k+1 /n k ≥ q > 1 or 1 < n k+1 − n k = O(1), see e.g. [EO56,Ber79,BG07,Fuk11] and the references therein. We rather focus here on the standard case where n k = k, and let us emphasize that the two problems, non-lacunar or lacunar, are of very different nature. Indeed, provided that the subsequence (n k ) k≥1 has a sufficient growth rate, one has 1 √ n n k=1 cos(n k X) In particular, there is no need to add random weights in front of the cosine in order to catch a Gaussian behavior with respect to P X . Roughly speaking, this is due to the fine arithmetic properties on the subsequence (n k ) k≥1 that are guaranteed by the lacunarity. Nevertheless, if no lacunarity is imposed, there is no Gaussian limit behavior in general, as illustrated by the simple counterexample Let us also emphasize that Theorem 1 or its lacunar analogues are somewhat reminiscent to a derandomization phenomenon, since the result holds almost surely in the coefficients (a k , b k ) k≥1 , and the homogenization follows from the single randomness of the uniform variable X. Such phenomena are at the heart of the method developed in [Bou14,BW16] to get estimates for nodal observables associated to deterministic eigenfunctions on the torus, starting from the ones associated to random Gaussian eigenfunctions.
As stated in the abstract, our main goal in this article is first, to extend the above Salem-Zygmund Theorem 1 in different directions. These generalizations are described informally just below and in more details in the next Section 1.2. Secondly, we show that these variations on Salem-Zygmund results allow to deduce almost sure asymptotics for the empirical measure associated with the real roots of the random trigonometric polynomial f n . In particular, in Theorem 6 which is formally stated in Section 1.3 below, we prove under mild conditions on the distribution of (a k , b k ) k≥1 , that P almost surely, and for any interval [a, b] where N (f n , [a, b]) denotes the number of real zeros of f n in the interval [a, b]. To the best of our knowledge, this almost sure asymptotics is new, even in the case of Gaussian coefficients.
In the case where the random coefficients (a k , b k ) k≥1 are not Gaussian, an important additional step in the proof of (3) consists in proving some log integrability of f n . To do so, we rely on the nice recent results of [NNS13]. Note that in the case of Gaussian coefficients, this delicate step can be bypassed by elementary means. Let us also highlight that, since the limit does not depend on the particular distribution of the random coefficients (a k , b k ) k≥1 , the above almost sure convergence can be seen as a universality phenomenon. In particular, under an extra moment assumption on the coefficients (a k , b k ), one immediately recovers the main result of [Fla17], since taking the expectation in (3), and using dominated convergence, we get indeed that Before doing it more formally in the next section, let us now say a few words on the kind of extensions of Salem-Zygmund result that are needed to establish the aforementioned almost sure asymptotics. As a first ingredient, we obtain a quantitative version of Theorem 1, i.e. an explicit rate of convergence, by using the so-called Stein's method. The latter is indeed a powerful and versatile method enabling to establish quantitative limit theorems for a great variety of target distributions, see [CGS11] for a nice introduction to the subject. We moreover prove a functional version of Salem-Zygmund result, showing that, P almost surely, under P X , the sequence of processes (f n (X + t/n)) t∈[0,2π] converges in distribution in the C 1 topology to a stationary limit Gaussian process with sin c covariance function. These two first results are key steps in our proof of the almost sure convergence (3).
We also obtain more general conditions on X so that (1) holds, and we prove that the convergence holds not only in distribution but also in total variation. Concretely, we prove that P almost surely, f n (X) has a density under P X and the latter converges in L 1 to the standard Gaussian density. Although there are not used in the almost sure nodal asymptotics, these two results are of independent interest.
As said above, our initial motivation to establish these variations on Salem-Zygmund convergence (1) is the study of the nodal set associated to the random trigonometric polynomial f n . The number of real zeros of f n is the object of a vast literature. For example, in the case of Gaussian coefficients, the expected number of real zeros in a given interval has been investigated in [Dun66,Sam78,Far91], whereas the variance of this number of zeros was first described in [GW11] and then revisited and generalized in [AL13, ADL + 16]. For more general coefficients, some universality results at local and global scales were obtained in a series of recent papers, see for instance [AP15,Fla17,IKM16,APP18,DNV18,BCP18] and the references therein. Quite surprisingly, in the case of real roots of random trigonometric polynomials, the question of the almost sure asymptotics (3) has not been tackled until now. To establish such an almost sure result, a classical and natural strategy would be to get some good estimates on the variance or some higher moment, i.e. for some p large enough, to show that This is precisely the approach used by Ancona and Letendre in their recent paper [AL19] on the almost sure asymptotics of the real roots of Kostlan algebraic polynomials. It has also been used for instance in [Neu00] in the case of nodal set of random spherical harmonics. We refer to Theorem 1 in [Zel09] for related discussions. Unfortunately, in the case of random trigonometric polynomials, only the variance, thus the case p = 2, has been investigated in [GW11], where the authors showed that the summands in (5) are exactly of the order 1/n, which is naturally not sufficient to conclude to the convergence of the above serie. Such a strategy would thus require at least to handle the case p ≥ 4, which if doable, would imply quite involved computations.
The method we employ here is radically different since we work with the sole randomness induced by the variable X, hence in essence, our approach provides almost sure results with respect to the probability P associated with the random coefficients. In particular, we do not require any estimate on the variance of the number of zeros.

Variations on Salem-Zygmund Theorem
Let us now describe more formally and in more details our main results in relation with Salem-Zygmund Theorem 1. The proofs of Theorems 2, 3, 4, and 5 stated below are the object of the whole Section 2 of the article.

A quantitative version of Salem-Zygmund Theorem
A first direction in which Theorem 1 can be extended is a quantification of the convergence in distribution for an appropriate choice of metric. Concretely, let us introduce the C 3 distance with respect to X, that is defined by whenever U and V are measurable with respect to F ⊗ B([0, 2π]). Then, using the separability of the space of C 3 functions with bounded derivatives, the above distance d X C 3 (U, V ) is a F−measurable random variable. It actually quantifies the distance between the laws of U and V , under P X , conditionally on F. Therefore, it is a convenient tool to measure the rate of convergence in Theorem 1.
Theorem 2. Suppose that (a k , b k ) k≥1 is a sequence of independent and identically distributed random variables such that E [a 1 ] = 0, E a 2 1 = 1 and E a 4 1 < ∞. Setting, if G is σ(X)−measurable and if G ∼ N (0, 1) under P X , then one has The last estimate (6) gives an upper bound for the expected rate of convergence in Theorem 1. Using some standard Borel-Cantelli arguments, it is then possible to extract a rate of convergence in the almost sure sense.
Corollary 1. Under the assumptions of Theorem 2, for every β < 1 6 , P almost surely, there exists a constant C(ω) > 0 such that for all n ≥ 1 Remark 1. Let us emphasize here that the content of Corollary 1 is not expected to be sharp, as Theorem 2 indicates that the correct order of convergence is of magnitude 1/ √ n, as in the classical Berry-Essen inequality. However, the estimate (7) is sufficient to carry out our proof of the almost sure convergence of empirical measure of roots associated with random trigonometric polynomials.
The proofs of Theorem 2 and of its Corollary 1 are the object of Section 2.1 below.

A functional version of Salem-Zygmund Theorem
Let us introduce the stochastic process (g n (t)) t∈[0,2π] defined by g n (t) := f n X + t n .
The convergence (1) is naturally equivalent to the fact that P almost surely, under P X , the sequence g n (0) converges in distribution to a Gaussian variable. Our next result show that, in fact, the whole process (g n (t)) t∈[0,2π] actually converges to an explicit stationary Gaussian process.
Theorem 3. Suppose that (a k , b k ) k≥1 is a sequence of independent and identically distributed random variables that are centered with unit variance. Then P almost surely, as n goes to infinity, the process (g n (t)) t∈[0,2π] converges in distribution in the C 1 topology, to a stationary Gaussian process (g ∞ (t)) t∈[0,2π] with sin c covariance function, i.e.
Associated with the continuous mapping Theorem and the continuity of the number of zeros with respect to the C 1 topology at non-degenerate points, the last Theorem ensures that P almost surely, the number of roots of g n in a compact set, converges in distribution under P X , towards its analogue for g ∞ , see Section 3.2 below.
The proof of Theorem 3 is the object of Section 2.2 below.

Salem-Zygmund Theorem for a non-uniform distribution
In the next Section 2.3 below, we give an alternative proof of Theorem 1 which noticeably differs from the original one. Our strategy mainly exploits the fact that, for all ξ ∈ R sufficiently fast in order to use some Borel-Cantelli argument. In order to do so, if Y denotes an independent copy of X, one must show that ε n (X, Y ) := 1 n n k=1 cos (k(X − Y )) tends to zero in L 2 at some adequate speed. In the original case treated by Salem and Zygmund where X and Y are independent uniform variables, we have the exact computation E X,Y [ε n (X, Y ) 2 ] = 1/2n which is sufficient to conclude. But this averaging strategy applies to more general frameworks. Indeed, the use of Fubini inversion of sums in (8) reveals that a quantified bivariate central convergence of (f n (X), f n (Y )) as n → ∞ is enough to carry out this strategy. Following the latter method, one can indeed extend Theorem 1 to more general distributions P X over [0, 2π].
Theorem 4. Let (a k , b k ) k≥1 be a sequence of independent and identically distributed random variables that are centered with unit variance and which admit a moment of order β ≥ 3. Let X be an independent random variable on [0, 2π] whose Fourier coefficients satisfy Then, provided that β > 2 min(α, 1 2 ) , P almost surely, under P X , one has Remark 2. The condition imposed on X in the previous Theorem 4 is satisfied whenever X admits a density which is Hölder regular. It can also be satisfied for non absolutely continuous distributions like for instance uniform distributions on Cantor sets.
The proof of Theorem 4 is the object of Section 2.3 below.

Salem-Zygmund Theorem in total variation
Our last extension of Salem-Zygmund Theorem is a total variation version of the convergence in distribution (1). As before, for U and V two random variables that are measurable with respect to F ⊗ B([0, 2π]), let us introduce the total variation distance with respect to P X As for the C 3 distance with respect to X, the above quantity represents the conditional total variation distance with respect to X, conditionally on F. It induces a much stronger topology than the convergence in distribution, hence the next Theorem is a substantial reinforcement of Theorem 1.
Theorem 5. Let (a k , b k ) k≥1 be independent and identically distributed random variables that are centered with unit variance and admit a third moment. Almost surely with respect to the probability P, if G is σ(X)−measurable and if G ∼ N (0, 1) under P X , then as n goes to infinity, we have lim The proof of Theorem 5 is the object of Section 2.4 below.

Application to almost sure nodal asymptotics
Let us now describe how the extensions of Salem-Zygmund result stated above can be used to obtain almost sure results for the number of zeros of random trigonometric polynomials. Our main result is the following.
Theorem 6. Let us consider a random trigonometric polynomial where (a k ) and (b k ) are independent sequences of independent and identically distributed random variables with a symmetric distribution, with unit variance and a moment of order four. Then, P almost surely, we have as n goes to infinity and more generally for any interval The proof of Theorem 6 is the object of the whole Section 3. The starting point of the proof is a simple representation of the number of zeros N (f n , [0, 2π]) as an expectation under E X , where X is an independent uniform variable, see Section 3.1. Then, the two main ingredients of the proof are Theorem 2 and Theorem 3 stated above. Associated with some logarithmic integrability estimates, see Section 3.3, they allow us to deduce some moment estimates in Section 3.4, and to conclude in Section 3.5. The next synthetic scheme gives the architecture of the proof.
Logarithmic integrability, Section 3.3 Functional CLT, Theorem 3 and Section 3.2 Quant. estimates., Corollary 1 Probabilistic representation, Section 3.1 Moment estimates, Section 3.4 Conclusion, Section 3.5 In this section, we give the proofs of the variations on Salem-Zygmund Theorem, namely our main Theorems 2 to 5 stated in Section 1.2 above.

A quantitative Salem-Zygmund Theorem via Stein's method
We use the powerful method of Stein to provide a proof of Theorem 2, i.e. to quantify the rate of convergence for some appropriate metric in the Salem-Zygmund central limit Theorem. This quantitative bound will play a central role in the proof of the almost sure asymptotics of the number of real zeros of random trigonometric polynomials.
Proof of Theorem 2. The proof will be divided into several steps, directly inspired from the celebrate proof of the Central Limit Theorem which is due to Charles Stein.
Step 1: using the Stein equation Let h ∈ C 3 b (R) which is centered with respect to the Gaussian distribution and which The following Theorem is at the heart of the Stein methodology for Gaussian approximation, see Chapter 2.2 of [CGS11].
, then there exists a unique solution to (9) which satisfies: At the end of the proof, we shall need the following technical corollary which proceeds directly from Theorem 7.

Corollary 2. Under the stronger assumption
Proof of the Corollary 2. Taking two derivatives of the equation (9) gives the equation φ (2) and the previous bounds guarantee that xφ We shall denote by E the set of functions which satisfy the conditions (10) and (11). Based on the combination of (9),(10) and (11), any function h that is centered for the standard Gaussian distribution and whose three first derivatives are bounded by one can be written φ h − xφ h for some φ ∈ E. We have thus We fix in the forthcoming estimates some function φ which obeys to the bounds given in Equation (10). For convenience, we also set R k (X) := a k cos(kX) + b k sin(kX) and S k n (X) := S n (X) − R k (X). Using Taylor expansions and denoting by U an independent random variable uniformly distributed over [0, 1], we may write We shall now estimate each of the terms A n , B n and C n separately. First, the term C n can be bounded in the following way Step 2: bounding the term B n We can write the following decomposition: Using Stein's bounds given in (10) we then get Then, using in the one hand the formula cos(2x) = 2 cos 2 (x) − 1 and Cauchy-Schwarz inequality on the other hand, we may infer Exactly in the same way, we obtain as well as Gathering all these bounds, we finally obtain Step 3: bounding the term A n in the particular case φ(·) = exp (iξ·) Bounding the term A n term is arguably the most difficult part of the proof. Note that for the moment, the estimates obtained for B n and C n are almost sure with respect to P. We were not able to give such an almost sure estimate for A n , but it is possible to estimate its expectation under P. In order to capture the correct order of convergence, we will first handle the case φ(·) = exp (iξ·) with ξ ∈ R. To this end, let us definẽ The next Lemma shows thatÃ n (ξ) is of the order 1/n.
The proof of Lemma 1 is quite technical, in order to facilitate the global reading of the paper, it is postponed in Section A.1 of the appendix.
Step 4: bounding the term A n Let φ the unique solution of the Stein equation Step 1 of the proof we know that φ ∈ E which means that estimates (10) and (11) are fulfilled. In particular, using Plancherel Theorem we have Using Fourier inversion Theorem, we then get Taking the expectation with respect to P, the Cauchy-Schwarz inequality associated with the above Lemma 1 gives us where we have used in the last estimate that Step 5: synthesis The compilation of Step 1 and Step 2, give the following upper bound Taking the expectation with respect to P leads to Taking expectation in (14) .
As 20380 π ≈ 80.54 one can simplify a bit and get with Let us now detail how Corollary 1 can be deduced from Theorem 2.
Proof of Corollary 1. Let β < 1 6 . Based on the inequality (6), we obtain that Using Borel-Cantelli Lemma, P almost surely, there exists a constant C(ω) > 0, which may change from line to line, such that On the other hand, for any integer m ≥ 1 one may find n ≥ 1 such that Gathering the previous estimates provides the desired conclusion since

Functional Central Limit Theorem
In this section, we give the proof of Theorem 3. The convergence in law of the sequence of processes (g n (t)) t∈[0,2π] classically splits into two parts: on the one hand the convergence of finite dimensional marginals, and on the other hand a suitable tightness argument associated with the C 1 topology. Let us first establish the convergence of the finite marginals of the process (g n (t)) t∈[0,2π] .
Proposition 1. Almost surely with respect to the probability P, as n goes to infinity, the finite marginals of the process (g n (t)) t∈[0,2π] converge to the ones of a Gaussian process (g ∞ (t) t∈[0,2π] with sin c covariance function, i.e.
A straightforward computation then yields the following "orthogonality" relations, for all 1 ≤ k ≤ n and 1 ≤ ≤ m and so that by symmetry In particular, we have Set By the Fubini inversion theorem, we have then for Y an independent copy of X where we have set By the classical comparison results for sum of independent variables with their Gaussian analogues, we can infer that if ( a k ) k≥1 and ( b k ) k≥1 are independent sequences of i.i.d. standard Gaussian variables, then uniformly in X, Y But since the variables are now independent and Gaussian, the above expectations are explicit. Namely, if we set after simplification we have simply As a consequence, we have Since uniformly in X, Y we have |E n (t, λ)| ≤ ||λ|| 2 1 , using the fact that there exists a constant C λ such that |e x − 1| ≤ C λ |x| for |x| ≤ ||λ|| 2 1 , we have n .
An immediate application of Cauchy-Schwarz inequality then yields As a conclusion, we get that Therefore, choosing a subsequence of the form n γ with γ > 2, by Borel-Cantelli Lemma, we obtain that P almost surely, we have Now for a generic integer m ≥ 1, we can choose n such that n γ < m ≤ (n + 1) γ and then Applying Cauchy-Schwarz inequality, using the orthogonality relations (18) and (20) and the uniform upper bound (21), we get By the strong law of large number, the above square root is P almost surely bounded, hence we have P almost surely In the same manner, we have Finally, using once again Cauchy-Schwarz inequality and the orthogonality relations (18) and (19), since max 1≤i≤p |t i | ≤ 2π, we have P almost surely As a conclusion, we get that P almost surely hence the result.
Let us now establish the tightness of the family of distributions of (g n (t)) t∈[0,2π] under P X , for the C 1 topology.
Proposition 2. Almost surely with respect to the probability P, the family of distributions under P X of (g n (t)) t∈[0,2π] for n ≥ 1 is tight with respect to the C 1 topology on C 1 ([0, 2π]).
Proof. By Theorem 1 and Remark 1 of [RS01], in order to establish the tightness in the C 1 topology of the family (g n (t)) t∈[0,2π] , it is sufficient to establish some Lamperti-type criteria for both E X |g n (t) − g n (s)| 2 and E X |g n (t) − g n (s)| 2 . Using the trigonometric identities cos kX + kt n − cos kX + ks n = −2 sin kX + k(t+s) By the strong law of large numbers, C := sup n≥1 1 2n n k=1 (a 2 k + b 2 k ) is P almost surely bounded. Therefore, using the fact that vect(cos(kx), sin(kx)) and vect(cos( x), sin( x)) are orthogonal in L 2 ([0, 2π]) for 1 ≤ k, ≤ n with k = , and that cos(kx) ⊥ sin(kx), we have thus P almost surely, for all s, t ∈ [0, 2π] In the same manner, we get for all s, t ∈ [0, 2π] hence the result.
Remark 3. Note that the limit process (g ∞ (t)) t∈[0,2π] is non degenerate in the sense that, P ⊗ P X almost surely, we have Indeed, by stationarity we have E[g ∞ (t) 2 ] = 1, hence the classical Bulinskaya Lemma applies, see e.g. Proposition 6.11 of [AW09].

Salem-Zygmund Theorem for a non-uniform distribution
Before giving the proof of Theorem 4, which generalizes Theorem 1 to a large class of distributions P X , let us first give an alternative proof of Theorem 1.
Alternative proof of Theorem 1. The proof below is based on the averaging procedure raised in Section 1.2.3. Namely we show that the L 2 (P) distance between the characteristic function of f n (X) under P X and its limit goes sufficiently fast to zero in order to apply a Borel-Cantelli argument and conclude that the convergence is in fact almost sure under P. To do so, let us set, for ξ ∈ R If Y is an independent copy of X, by Fubini Theorem, one first write The convergence to zero of ∆ n,1 (ξ), resp. ∆ n,2 (ξ), is then a simple application of the standard bivariate, resp. univariate, Central Limit Theorem under P. Namely, where φ denotes the characteristic function of a 1 . Since a 1 ∈ L 3 (P), the function log(φ) is three times differentiable at the neighborhood of 0. Using Taylor-Lagrange inequality and the fact that the random variables are centered with variance one, for some absolute constant C > 0 which may change from line to line and for every |t| < 1 2 : Let ξ be fixed in the sequel, then for n large enough we have ∀k ∈ {1, · · · , n}, ξ cos(kX) − cos(kY ) √ n < 1 2 .
In the forthcoming computations, n is assumed to be large enough so that the aforementioned estimate holds. Since (22) applies, we obtain n k=1 log φ ξ cos(kX) − cos(kY ) In the same way, we have Note that (cos(kX) − cos(kY )) 2 + (sin(kX) − sin(kY )) 2 = 2 + 2 cos (k(X − Y )) and set Combining the two last estimates yields The exponential function being Lipschitz, one thus obtains for some constant C(ξ), which changes from line to line and which only depends on ξ n k=1 φ ξ cos(kX) − cos(kY ) Hence, we have |∆ n,1 (ξ)| ≤ C(ξ) √ n + e −ξ 2 (1+εn) − e −ξ 2 ≤ C(ξ) √ n + ξ 2 ε n and taking the expectation under P X ⊗ P Y , by Cauchy-Schwarz inequality, we get Following the exact same strategy, we have in the same manner Gathering these facts provide the estimate ∆ n (ξ) ≤ C(ξ) √ n . Using Borel-Cantelli Lemma, one thus gets that P almost surely Applying the latter for each ξ ∈ Q, and then ξ ∈ R by continuity, we have P almost surely, the central convergence of f n 3 (X) under P X . On the other hand, for every positive integers m, n such that n 3 ≤ m < (n + 1) 3 , we also have and as in the end of the proof of Theorem 2, we have As announced, P almost surely, f n (X) indeed converges in distribution to standard Gaussian variable under P X .
Let us now give the proof of Theorem 4, which roughly follows the same lines as the alternative proof of Theorem 1 given above, except that we shall skip some explicit computations using characteristic functions and replace them by the standard quantitative Berry-Esseen estimates in the Central Limit Theorem. For the sake of concision, we only focus on the main steps of the proof.
Proof of Theorem 4. Let X and Y be independent, identically distributed random variables, fulfilling the assumptions of the statement. By the multivariate central limit Theorem, conditionally on (X, Y ), the couple (f n (X), f n (Y )) converges in distribution, under P, towards a centered Gaussian vector ( given by (23). Then, the standard Berry-Esseen inequality implies that the speed of the aforementioned convergence is of order 1 √ n . Otherwise, a simple computation gives the formula cos(k(x − y)) cos(l(x − y)) = 1 2 (cos((k + l)(x − y)) + cos((k − l)(x − y))) .
Noticing that E X,Y e ik(X−Y ) = P (k) 2 , one thus gets Therefore, under P, (f n (X), f n (Y )) converges in distribution to a standard bivariate Gaussian vector at a polynomial speed 1 n c with c = min α, 1 2 . Using again Borel-Cantelli Lemma, one deduces the central convergence under P X for the subsequence n a with a > 1 c . Finally, for n a < m < (n + 1) a one has Using hypercontractivity estimates for L p norms of multi-linear polynomials, for p > a, one then deduces that Hence, Borel-Cantelli Lemma again ensures that E X f m (X) − f n a (X) 2 goes to 0 as n goes to infinity, P almost surely. This concludes the proof, since under our assumptions, β is large enough to find such an exponent p.

Convergence in total variation
We give here the proof of Theorem 5 stated in Section 1.2.4, dealing with the total variation version of Theorem 1. The proof is based on a variational calculus which is associated with a so-called Wright-Fisher differential operator.
Proof of Theorem 5. Let us consider a random variable I which is uniformly distributed over {0, 1, · · · , n−1} and which is independent of X. We denote by E I,X the expectation with respect to the product lax P I ⊗ P X . We start the proof by noticing that Indeed, for every suitable function φ one may write where we have made the change of variables u = 2πk n + t n . Let us now, introduce the following operators Then, one has the following integration by parts formula, which is the cornerstone of the proof, ∀φ ∈ C 1 ([0, 2π] Let us now fix some continuous function φ which we assume to be compactly supported and bounded by one. Let us also introduce its anti-derivative Φ(x) = x 0 φ(t)dt. One first write with g n,I (x) = f n 2π n I + x n . We then write, for α > 0 E I,X [φ (g n,I (X))] = E I,X φ (g n,I (X)) Γ[g n,I (X), g n,I (X)] + α Γ[g n,I (X), g n,I (X)] + α ≤ E I,X φ (g n,I (X)) Γ[g n,I (X), g n,I (X)] Γ[g n,I (X), g n,I (X)] + α :=An(φ) + E I,X α Γ[g n,I (X), g n,I (X)] + α :=Bn(α) with Γ[g n,I (X), g n,I (X)] = g n,I (X) 2 (2π − X) X. Otherwise, using the chain rule associated with Γ, we have φ (g n,I (X)) Γ[g n,I (X), g n,I (X)] = Γ [Φ (g n,I (X)) , g n,I (X)], and the integration by parts formula (25) leads to A n (φ) = −E I,X Φ (g n,I (X)) L [g n,I (X)] Γ[g n,I (X), g n,I (X)] + α −E I,X Φ (g n,I (X)) Γ g n,I (X), 1 Γ[g n,I (X), g n,I (X)] + α .
We then notice that E I,X Φ (g n,I (X)) × L [g n,I (X)] Γ[g n,I (X), g n, a.s.
Using Salem-Zygmund CLT, we know that converges in distribution towards a non-degenerate Gaussian distribution G. This ensures us that Letting α → 0 and then λ → 0 one obtains that lim α→0 lim sup n→∞ |B n (α)| = 0.
If µ n is the law of g n,I (X) under P I ⊗ P X , which naturally coincides with the law of f n (X) under P X , and if µ ∞ is the law of the standard Gaussian, the desired conclusion proceeds from the following lemma, whose proof is given in Section A.2 of the Appendix.
Lemma 2. Let µ n a sequence of probability distributions which converges in law towards µ ∞ . Assume further that for any continuous function bounded by one and compactly supported φ we have Then µ n converges towards µ ∞ in total variation.

Almost sure asymptotics for the number of real zeros
This whole section is devoted to the proof of Theorem 6 stated in Section 1.3. Let us recall that the object of interest is the random trigonometric polynomial

A probabilistic representation of the number of zeros
Let us start with the very simple following result.
Lemma 3. If f is a 2π−periodic function with a finite number of zeros, then for any 0 < h < 2π, we have where X is a random variable, with uniform distribution in [0, 2π].
Proof. Set N = N (f, [0, 2π]) which is finite by hypothesis, and denote by x 1 , . . . , x N the zeros of f in [0, 2π] and µ f the associated empirical measure Naturally, we have for all a < b such that b − a ≤ 2π If X is uniform in [0, 2π], we have then applying Fubini inversion of sums Applying Lemma 3 with f n and h = 2π/n, we thus get if X is a random variable with uniform distribution on [0, 2π], independent of the sequences (a k ) k≥1 and (b k ) k≥1 , then

Functional convergence in distribution
The last Equation (27) naturally invites to consider the process (g n (t)) t∈[0,2π] defined by By Theorem 3, we know that (g n (t)) t∈[0,2π] converges in distribution in the C 1 topology to a limit Gaussian process (g ∞ (t)) t∈[0,2π] with sin c covariance function, which is almost surely non-degenerate by Remark 3. Furthermore, it is well known that the number of zeros of a smooth function in a given interval is a continuous functional for the C 1 topology, in the neighborhood of any non-degenerate function, see [RS01,APP18]. Therefore, by the continuous mapping Theorem, we get the following asymptotics.
Proposition 3. Almost surely with respect to P, as n goes to infinity converges in distribution under P X to N (g ∞ , [0, 2π]).

Logarithmic integrability
Having the above Proposition 3 in mind, the proof of Theorem 6 would be complete if we had some moment control on the number of zeros of g n in the interval [0, 2π]. As a first step towards this goal, let us first establish some logarithmic moment estimates for f n (X) = g n (0).
Lemma 4. Suppose that the random variables (a k , b k ) k≥1 are independent standard Gaussian variables or more generally are that they are independent and identically distributed with a symmetric distribution with bounded variance. Then P almost surely, for all p > 1 and for all 0 < θ < 1, there exists a constant C p,θ = C p,θ (ω) such that Proof. We first give the proof in the Gaussian framework, in which case it is elementary. Indeed, if (a k , b k ) k≥1 are independent standard normal variables, then under P, the variable f n (X) is then also a standard Gaussian variable so that for all p > 1 Using Markov and Jensen inequalities, we have thus Therefore, by Borel-Cantelli Lemma, we deduce that P almost surely, for n sufficiently large, we have E X [|log(|f n (X)|)| p ] ≤ n θ , hence the result. Let us now turn to the more general case of symmetric random variables. The proof then follows the same lines as in the Gaussian case but the starting point, i.e. the finiteness of the moments under P ⊗ P X is here ensured by the powerful results of [NNS13] for Rademacher Fourier series. Indeed, let us introduce another probability space (Ω ε,η , F ε,η , P ε,η ) which carries a sequence (ε k , η k ) k≥1 of independent symmetric Rademacher variables. Then, under P, the whole sequence (a k , b k ) k≥1 has the same law as the sequence (ε k |a k |, η k |b k |) k≥1 under P ⊗ P ε,η . Following Corollary 1.2 of [NNS13], for any p > 1, there exists a deterministic constant K p such that In particular, we get where we have set By Markov inequality with respect to P ε,η , as in the proof of Lemma 4, we have then for all θ > 0 Now, by the law of large numbers, P almost surely, for n ≥ n 0 = n 0 (ω) sufficiently large, we have K p,n ≤ 2 p K p + 1 so that applying Borel-Cantelli Lemma with respect to P ε,η , we thus get that P ⊗ P ε,η almost surely, for n sufficiently large But since the law of (ε k |a k |, η k |b k |) k≥1 under P⊗P ε,η coincides with the one of (a k , b k ) k≥1 under P, we can thus conclude that P almost surely, for n sufficiently large hence the result.
Thanks to the explicit rate of convergence in Salem-Zygmund estimates established in Theorem 2 and more precisely in Corollary 1 above, the last result can actually be reinforced to show that the logarithmic moments are in fact P almost surely bounded.
Lemma 5. Suppose that the random variables (a k , b k ) k≥1 are independent standard Gaussian variables or more generally are that they are independent and identically distributed with a symmetric distribution with bounded variance. Then P almost surely, for all p > 1, there exists a constant C p = C p (ω) such that uniformly in n ≥ 1 Proof of Lemma 5. Let a > 0, then for x small enough, we have Fix M > e so that log(M ) > 1 and let us introduce the following smooth truncation of the logarithm function, defined for all x ≥ 0 The By the triangle inequality, if G ∼ N (0, 1) under P X , we can now write Moreover, thanks to Theorem 2 and Corollary 1, since the function log p M is of class C 3 with bounded derivatives, for some β < 1/6, we have P almost surely for n large enough Finally, we can upper bound A n in the following way A n ≤ A n,1 + A n,2 + A n,3 + A n,4 , where A n,1 = E X |log(|f n (X)|)| p 1 |fn(X)|<1/M A n,2 := E X |log M (|f n (X)|)| p 1 |fn(X)|<1/M A n,3 = E X |log(|f n (X)|)| p 1 |fn(X)|>M A n,4 := E X |log M (|f n (X)|)| p 1 |fn(X)|>M .
Next, since || log M || ∞ ≤ log(M ) + 2, we have By Markov inequality, we deduce that Let us now make use of the following general lemma which allow to compare the C 3 distance used in Theorem 2 and Corollary 1 to the more classical Kolmogorov distance. Its proof is given in Section A.3 of the appendix.
Lemma 6. Let (Y n ) a sequence of random variables which converges in distribution towards a standard Gaussian variable G under P X , then we have Applying Lemma 6 with Y n = f n (X), in conjunction with Corollary 1, we have As a result, we get Otherwise, using Cauchy-Schwarz inequality, we have |A n,1 | 2 ≤ E X |log(|f n (X)|)| 2p P X (|f n (X)| < 1/M ) , |A n,3 | 2 ≤ E X |log(|f n (X)|)| 2p P X (|f n (X)| > M ) .
By Lemma 4, we then get that P almost surely, for all θ > 0 and as above As a conclusion, choosing M = M (n) of the form n γ with 0 < γ < β/4, and θ < γ, we obtain that P almost surely, as n goes to infinity hence the result.

Moment estimates
Let us now describe how the above estimates of Section 3.3 on the logarithmic moments of |f n (X)| = |g n (0)| actually allow to obtain some moment estimates for the number of zeros N (g n , [0, 2π]) of g n in [0, 2π]. Precisely, the goal of this section is to prove the following result. By iterating Rolle Lemma s times, see for example p.19 of [APP18], the last probability can then be upper bounded as follows so that for any R > 0 Applying Markov inequality, we get Now, comparing the uniform norm with Sobolev norms, see Lemma 5.15 p.107 of [Ada75], if || · || 2 denotes the standard L 2 norm in L 2 ([0, 2π]), there exists a universal constant C > 0 such that But for any integer , we have Let us now choose R = R(s) of the form R(s) := (1 + |s|) p to get that Now, for s large enough we have then (2π) s R(s) s ! < 1, and by Lemma 5, uniformly in n and for all q ≥ 1, we have P almost surely that is, for all q ≥ 1, P almost surely, for s large enough (32) Choosing q > p and combining Equations (30), (31) and (32), we thus get that P almost surely sup n≥1 +∞ 0 s p−1 P X (N (g n , [0, 2π]) > s) ds < +∞, hence the result.
Combining the last Proposition 4 with the convergence in distribution established in Proposition 3, we obtain the convergence of all the moments.
Corollary 3. For all p ≥ 1, we have P almost surely

Conclusion
Following Lemma 3 and Equations (27) and (28) , we have Applying the above Corollary 3, with p = 1, we thus get that P almost surely By Theorem 3, under P X , the limit process (g ∞ (t)) t∈[0,2π] is a Gaussian process with sin c covariance so that, as it is well known More generally, a similar proof would yield that P almost surely, for any The above almost sure convergence can be rephrased as follows in terms of the empirical measure associated with the real zeros of f n .
Corollary 4. Let us denote by ν n the empirical measure associated with the real roots of the random trigonometric polynomial f n , namely Then, P almost surely, as n goes to infinity, ν n converge in distribution to the normalized Lebesgue measure on [0, 2π].
Next, by the same strategy since cos(k(X − Y )) . where the Cauchy-Schwarz inequality as well as the orthogonality of the random variables (cos(k(X − Y ))) k≥1 have been used in the last inequality. As a matter of fact, one deduces that

A.2 Proof of Lemma 2
Let us now give the proof of Lemma 2 used in the proof of the total variation version of Salem-Zygmund convergence.
Since by assumption µ n tends to µ ∞ in distribution and since d F M is a metric for this convergence, d F M (µ n , µ ∞ ) goes to zero as n goes to infinity. Taking the lim sup for n going to infinity in the previous inequality gives lim sup n→+∞ d T V (µ n , µ ∞ ) ≤ lim sup n |B n (α)| + 2 α R |y|ρ(y)dy Then letting go to zero and next α go to zero, we get the desired conclusion.

A.3 Proof of Lemma 6
Finally, let us give the proof of Lemma 6 allowing to compare the Kolomogorov and C 3 distances, which was used in the proof of Lemma 5 on the finiteness of the logarithmic moments of f n (X).
Proof of Lemma 6. Let us fix some small h > 0 and introduce the smooth approximations of 1 ·≤x We have then ρ h− x (y) ≤ 1 y≤x ≤ ρ h+ x (y) for all y ∈ R, and there exists a constant C such that max(||ρ h± x || ∞ , ||ρ h± x || ∞ , ||ρ h± x || ∞ , ||ρ h± x || ∞ ) ≤ C h 3 . We can then write Hence, since the Gaussian density is uniformly bounded by 1/ √ 2π ≤ 1, uniformly in x, we get In the same manner, we have Therefore, we have which yields the desired result after optimizing in h.