1 Introduction

1.1 A central limit theorem for fibrations

Let V be a smooth projective variety over \({\mathbb {Q}}\) equipped with a dominant morphism \(\pi : V \rightarrow {\mathbb {P}}^n\) with geometrically integral generic fibre. We view \(\pi \) as defining a family of varieties given by the fibres of \(\pi \).

A natural problem is to study the distribution of the varieties in the family with a rational point. In the case of families of conics, this problem was studied by Serre [20]. He obtained precise upper bounds for the counting function

$$\begin{aligned} N(\pi ,B) := \sharp \{ x \in {\mathbb {P}}^n({\mathbb {Q}}) : x \in \pi (V({\mathbb {Q}})), H(x) \leqslant B\} \end{aligned}$$

of the number of varieties in the family with a rational point. (Here H is the usual naive height on \({\mathbb {P}}^n({\mathbb {Q}})\)). For example, his results show that for families of conics if \(\pi \) admits no section over \({\mathbb {Q}}\) then \(N(\pi ,B) = o(B^{n+1})\), i.e. \(100\%\) of the fibres of \(\pi \) have no rational point. He did this by showing that \(100\%\) of the fibres fail to be p-adically soluble for all primes p.

This subject has been studied in various settings by different authors; the reader is referred to [13, 14] for a history of the subject. The main result from [14] generalised Serre’s result from families of conics to arbitrary families of varieties \(\pi : V \rightarrow {\mathbb {P}}^n\) for any smooth projective variety V. Again the authors considered the closely related problem of counting the number of varieties in the family which are everywhere locally soluble. They proved an upper bound of the shape

$$\begin{aligned} \sharp \{ x \in {\mathbb {P}}^n({\mathbb {Q}}) : x \in \pi (V({\mathbf {A}}_{\mathbb {Q}})), H(x) \leqslant B\} \ll \frac{B^{n+1}}{(\log B)^{\Delta (\pi )}}, \end{aligned}$$
(1.1)

for an explicit non-negative \(\Delta (\pi ) \in {\mathbb {Q}}\). (Here \({\mathbf {A}}_{\mathbb {Q}}\) denotes the adeles of \({\mathbb {Q}}\).) Moreover, they conjectured in [14, Conj. 1.6] that the upper bound (1.1) is sharp, under the necessary assumptions that the set being counted is non-empty and that the fibre over every codimension 1 point of \({\mathbb {P}}^n\) contains an irreducible component of multiplicity 1. As it will occur frequently in our results, we recall the definition of \(\Delta (\pi )\) here.

Definition 1.1

Let \(\pi :V \rightarrow X\) be a dominant proper morphism of smooth irreducible varieties over a field k of characteristic 0. For each (scheme-theoretic) point \(x \in X\) with residue field \(\kappa (x)\), the absolute Galois group \({{\,\mathrm{Gal}\,}}(\overline{\kappa (x)}/ \kappa (x))\) of the residue field acts on the irreducible components of \(\pi ^{-1}(x)_{\overline{\kappa (x)}}:=\pi ^{-1}(x) \times _{\kappa (x)} \overline{\kappa (x)}\) of multiplicity 1. We choose some finite group \(\Gamma _x\) through which this action factors. Then we define

$$\begin{aligned} \delta _x(\pi )= & {} \frac{\sharp \left\{ \gamma \in \Gamma _x : \begin{array}{l} \gamma \text { fixes an irreducible component} \\ \text {of }\pi ^{-1}(x)_{\overline{\kappa (x)}} \text { of multiplicity } 1 \end{array} \right\} }{\sharp \Gamma _x } \ \\ \text { and } \Delta (\pi )= & {} \sum _{D \in X^{(1)}} ( 1 - \delta _D(\pi )), \end{aligned}$$

where \(X^{(1)}\) denotes the set of codimension 1 points of X.

These invariants are defined by group theoretic data which can often be calculated in practice. In this paper we consider the following problem which is closely related to Serre’s:

Given a family of varieties \(\pi : V \rightarrow {\mathbb {P}}^n\) and \(j \in {\mathbb {Z}}_{\geqslant 0}\), what is the distribution of varieties in the family which fail to have a p-adic point for exactly j primes p?

To study this problem, for \(x \in {\mathbb {P}}^n({\mathbb {Q}})\) we consider the function

$$\begin{aligned} \omega _\pi (x):=\sharp \big \{\text {primes } p:\pi ^{-1}(x)({\mathbb {Q}}_p)=\emptyset \big \}. \end{aligned}$$
(1.2)

Note that \(\omega _\pi (x)\) need not be finite in general; however it is finite if \(\pi ^{-1}(x)\) is geometrically integral, as follows from the Lang–Weil estimates [16] and Hensel’s lemma. If the generic fibre of \(\pi \) is geometrically integral, then \(\omega _\pi (x)\) is finite for all x outside of some proper Zariski closed set. (In practice, we restrict to the smooth fibres of \(\pi \).) One can also consider variants of the function \(\omega _\pi \) from (1.2), by considering real solubility or by dropping conditions at finitely many primes; we discuss this possibility in Sect. 4.6.

As is clear from (1.1), if \(\Delta (\pi ) > 0\) then the function \(\omega _\pi (x)\) is almost always positive. Our first result gives more specific information about the distribution of \(\omega _\pi (x)\), and is an analogue of the Erdős–Kac theorem [9] in our setting. Recall that this states that the function

$$\begin{aligned} \omega (m):=\sharp \{ \text {primes } p: p \mid m\} \end{aligned}$$
(1.3)

behaves likes a normal distribution with mean and variance \(\log \log n\); more formally, for every interval \(\mathcal {J}\subset {\mathbb {R}}\) one has

$$\begin{aligned} \lim _{x\rightarrow \infty } \frac{1}{x} \sharp \Big \{1\leqslant m \leqslant x: \frac{\omega (m)-\log \log m}{\sqrt{\log \log m}} \in {\mathcal {J}} \Big \} =\frac{1}{\sqrt{2\pi }} \int _{\mathcal {J}} \mathrm {e}^{-\frac{t^2}{\!2}} \mathrm {d}t . \end{aligned}$$

This theorem is one of the foundational results in probabilistic number theory.

For our analogue, we need some notation. For each \(B\in {\mathbb {R}}_{\geqslant 1}\) and \(A\subseteq {\mathbb {P}}^n({\mathbb {Q}})\) we define

$$\begin{aligned} \nu _B(A):= \frac{\sharp \big \{ x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B, x \in A \big \}}{\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\}} . \end{aligned}$$
(1.4)

If \(\lim _{B\rightarrow \infty }\nu _B(A)\) exists then its value is to be conceived as the “density” of A. Our result is the following. (Here, and in what follows, we also commit the minor abuse of implicitly excluding the finitely many rational points x with \(\log H(x) \leqslant 1\).)

Theorem 1.2

Let V be a smooth projective variety over \({\mathbb {Q}}\) equipped with a dominant morphism \(\pi : V \rightarrow {\mathbb {P}}^n\) with geometrically integral generic fibre and \(\Delta (\pi )\ne 0\). Let H be the usual naive height on \({\mathbb {P}}^n\). Then for any interval \({\mathcal {J}}\subset {\mathbb {R}}\) we have

$$\begin{aligned} \lim _{B\rightarrow \infty } \nu _B \left( \left\{ x \in {\mathbb {P}}^n({\mathbb {Q}}): \frac{\omega _\pi (x)-\Delta (\pi )\log \log H(x)}{\sqrt{\Delta (\pi )\log \log H(x)}} \in {\mathcal {J}} \right\} \right) =\frac{1}{\sqrt{2\pi }} \int _{\mathcal {J}} \mathrm {e}^{-\frac{t^2}{\!2}} \mathrm {d}t .\end{aligned}$$

Note that the probability distribution obtained only depends on the invariant \(\Delta (\pi )\) from Definition 1.1; the geometric properties of the smooth members of the family are irrelevant. A measure-theoretic interpretation of Theorem 1.2 is as follows: It says that

$$\begin{aligned} {\mathcal {J}} \mapsto \lim _{B\rightarrow \infty } \nu _B \Bigg ( x; \frac{\omega _\pi (x)-\Delta (\pi )\log \log H(x)}{\sqrt{\Delta (\pi )\log \log H(x)}}\in {\mathcal {J}}\Bigg ) \end{aligned}$$

defines a probability measure on \({\mathbb {R}}\) which equals the standard Gaussian measure. Informally, it says \(\omega _\pi (x)\) is normally distributed with mean and variance \(\Delta (\pi ) \log \log H(x)\).

Theorem 1.2 is proved by studying the moments

$$\begin{aligned} \mathcal {M}_r(\pi , B):= \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ \pi ^{-1}(x) \text { smooth} \end{array}} \left( \frac{ \omega _\pi (x) - \Delta (\pi )\log \log B }{\sqrt{\Delta (\pi )\log \log B}} \right) ^{r}\!\!\!, \quad (r \in {\mathbb {Z}}_{\geqslant 0}). \end{aligned}$$
(1.5)

Theorem 1.3

Keep the assumptions of Theorem 1.2. Then for each \(r \in {\mathbb {Z}}_{\geqslant 0}\) we have

$$\begin{aligned} \frac{ \mathcal {M}_r(\pi ,B) }{\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\} }= & {} \mu _r+O_{r}\Big (\frac{\log \log \log \log B}{(\log \log B)^{1/2}}\Big ), \quad \text {where } \\ \mu _r:= & {} {\left\{ \begin{array}{ll} \frac{r!}{2^{r/2}(r/2)!}, &{} r \text { even, }\\ 0, &{} r \text { odd.} \end{array}\right. } \end{aligned}$$

Here \(\mu _r\) is the r-th moment of the standard normal distribution. Our main tool in the proof of Theorem 1.3 is the result of Granville and Soundararajan [11]. Theorem 1.2 is proved from Theorem 1.3 via a standard argument, which rests on the fact that the normal distribution is determined by its moments

There are general conditions under which one can prove an Erdős–Kac law for certain additive functions defined on \({\mathbb {Z}}^{n+1}\), see [10, §12] for example. In principle, these results could be extended to cover additive arithmetic functions restricted to values of a general polynomial, i.e. \( \sum _{p|f(x)}h(p) \) for integer polynomials f and functions h of certain growth over the primes; see the work of Xiong [25]. However, \(\omega _\pi \) does not admit any such interpretation, as the following example shows.

Example 1.4

Consider the following family of conics

$$\begin{aligned} ax^2 + by^2 = cz^2 \qquad \subset {\mathbb {P}}^2 \times {\mathbb {P}}^2, \end{aligned}$$

equipped with the projection \(\pi \) to (a : b : c). Take \((a,b,c) \in {\mathbb {Z}}^3\) pairwise coprime, square-free and all congruent to \(1 \bmod 4\). A Hilbert symbol calculation shows that

$$\begin{aligned} \omega _\pi (a:b:c)= & {} \Bigg (\frac{1}{2}\sum _{p\mid a} \Big (1- \Big (\frac{bc}{p}\Big ) \Big ) \Bigg ) + \Bigg (\frac{1}{2}\sum _{p\mid b} \Big (1- \Big (\frac{ac}{p}\Big ) \Big ) \Bigg ) \nonumber \\&+ \Bigg (\frac{1}{2}\sum _{p\mid c} \Big (1- \Big (\frac{-ab}{p}\Big ) \Big ) \Bigg ) , \end{aligned}$$
(1.6)

where \((\frac{\cdot }{p})\) is the Legendre symbol (cf. [12, p. 13]). One cannot directly apply the aforementioned general results here, since the function in (1.6) is not the restriction of an additive function to the values of a polynomial. Nevertheless Theorem 1.2 implies that the function \(\omega _\pi \) has normal order \(\frac{3}{2}\log \log H(a:b:c)\) in this case.

We also give an application of our results to a family of curves of genus 1.

Example 1.5

Let \(c,d \in {\mathbb {Z}}\) be such that \(cd(c-d) \ne 0\) and let \(f(t) \in {\mathbb {Z}}[t]\) be a square-free polynomial of even degree. Consider the variety

$$\begin{aligned} W: \quad x^2 - cw^2 = f(t)y^2, \quad x^2 - dw^2 = f(t)z^2 \qquad \subset {\mathbb {P}}^2 \times {\mathbb {A}}^{1}. \end{aligned}$$

Let \(\pi : V \rightarrow {\mathbb {P}}^1\) be a non-singular compactification of the natural projection \(W \rightarrow {\mathbb {P}}^1\) to the t-coordinate. The generic fibre of \(\pi \) is a smooth intersection of two quadrics in \({\mathbb {P}}^3\), hence is a genus 1 curve. The singular fibres occur over the closed points corresponding to the irreducible polynomials dividing f. Moreover, by [8, Prop. 4.1], the fibre over every such closed point P is a double fibre, hence \(\delta _P(\pi ) = 0\). Theorem 1.2 therefore implies that \(\omega _\pi \) has normal order \(r(f)\log \log H(1:t)\) in this case, where r(f) is the number of irreducible polynomials dividing f.

This last example is particularly interesting, as the upper bound (1.1) is conjecturally sharp only if the fibre over every codimension 1 point contains an irreducible component of multiplicitly 1. No such assumptions are required in the statements of our theorems.

The next example illustrates how to (essentially) recover the usual \(\omega \) (1.3) as a special case of our \(\omega _\pi \).

Example 1.6

Let V be a smooth projective variety over \({\mathbb {Q}}\) equipped with a dominant morphism \(\pi :V \rightarrow {\mathbb {P}}^1\) such that:

  1. (1)

    The fibre over (0 : 1) has multiplicity \(m > 1\), i.e. we have \(\pi ^*((0:1)) = mD\) for some divisor D on V.

  2. (2)

    All other fibres are geometrically integral.

Examples of such varieties are “unnodal Halphen surfaces of index m” [6, §2].

Let now \((x_0,x_1)\) be a primitive integer vector and \(P=(x_0:x_1) \in {\mathbb {P}}^1({\mathbb {Q}})\). Then our methods will yield the existence of some \(A > 0\) such that for all primes \(p > A\) we have

$$\begin{aligned} v_p(x_0) = 0 \implies \pi ^{-1}(P)({\mathbb {Q}}_p) \ne \emptyset , \quad v_p(x_0) = 1 \implies \pi ^{-1}(P)({\mathbb {Q}}_p) =\emptyset , \end{aligned}$$

where \(v_p\) denotes the p-adic valuation. Thus if \(x_0\) is square-free and \(p \not \mid x_0\) for all \(p \leqslant A\), then \(\omega _{\pi }(P) = \omega (x_0).\) (We shall see that small primes and primes of higher multiplicity do not effect the overall probabilistic behaviour, so our results essentially recover the usual Erdős–Kac theorem.)

1.2 The pseudo-split case

Our results from Sect. 1.1 only apply when \(\Delta (\pi ) \ne 0\). It turns out that a normal distribution does not hold when \(\Delta (\pi ) = 0\). We refer to the case \(\Delta (\pi ) = 0\) as the “pseudo-split case”. This is because the condition \(\Delta (\pi ) = 0\) is equivalent to the condition that the fibre over every codimension 1 point of \({\mathbb {P}}^n\) is pseudo-split, in the sense of [15, Def. 1.3]. The pseudo-split case is interesting from an arithmetic perspective, as these are exactly the families of varieties for which a positive proportion of the fibres can be everywhere locally soluble (see [14, Thm. 1.3]).

In the pseudo-split case there is a discrete probability distribution, in a sense that is made precise in the following theorem. For \(j\in {\mathbb {Z}}_{\geqslant 0}\) and \(B\geqslant 1\) we define

$$\begin{aligned} \tau _\pi (j,B) := \frac{\sharp \{ x\in {\mathbb {P}}^n({\mathbb {Q}}): H(x)\leqslant B, \pi ^{-1}(x) \text { smooth}, \omega _\pi (x)=j \}}{\sharp \{ x\in {\mathbb {P}}^n({\mathbb {Q}}): H(x)\leqslant B \}} . \end{aligned}$$
(1.7)

Theorem 1.7

Let V be a smooth projective variety over \({\mathbb {Q}}\) equipped with a dominant morphism \(\pi : V \rightarrow {\mathbb {P}}^n\) with geometrically integral generic fibre and \(\Delta (\pi ) = 0\). Then

$$\begin{aligned} \tau _\pi : {\mathbb {Z}}\rightarrow {\mathbb {R}}, \quad j \mapsto \tau _\pi (j) := \lim _{B\rightarrow \infty } \tau _\pi (j,B) \end{aligned}$$
(1.8)

is well-defined and defines a probability measure on \({\mathbb {Z}}\). Moreover, for every \(j\in {\mathbb {Z}}_{\geqslant 0}\) we have the following upper bound

$$\begin{aligned} \tau _\pi (j) \ll _\pi \frac{1}{(1+j)^{j} (\log (2+j))^{j/2}} , \end{aligned}$$
(1.9)

where the implied constant depends at most on \(\pi \).

One way to interpret Theorem 1.7 is that \(\omega _\pi (x)\) has a limit law. A limit law is originally defined for functions defined in the integers (see [24, Def. 2.2, p. 427]), however, the definition easily extends to functions defined in \({\mathbb {P}}^n({\mathbb {Q}})\): We say that a function \(f:{\mathbb {P}}^n({\mathbb {Q}})\rightarrow {\mathbb {R}}\) has a limit law with distribution function F if

$$\begin{aligned} \lim _{B\rightarrow +\infty } \nu _B(x\in {\mathbb {P}}^n({\mathbb {Q}}): f(x)\leqslant z) = F(z) \end{aligned}$$

holds for a function \(F:{\mathbb {R}}\rightarrow [0,1]\) which is non-decreasing, right-continuous and satisfies \(F(-\infty )=0\), \(F(+\infty )=1\), for all \(z\in {\mathbb {R}}\) for which F is continuous at z. The function \(\omega _\pi \) takes values in \({\mathbb {Z}}_{\geqslant 0}\) and for such functions \(f:{\mathbb {P}}^n({\mathbb {Q}})\rightarrow {\mathbb {Z}}_{\geqslant 0}\) the definition of the limit law is equivalent to the existence of the limit

$$\begin{aligned} \lim _{B\rightarrow +\infty } \nu _B(x\in {\mathbb {P}}^n({\mathbb {Q}}): f(x)=j) \end{aligned}$$

for every fixed \(j\in {\mathbb {Z}}_{\geqslant 0}\) and the property

$$\begin{aligned} \sum _{j=0}^\infty \lim _{B\rightarrow +\infty } \nu _B(x\in {\mathbb {P}}^n({\mathbb {Q}}): f(x)=j)= 1 . \end{aligned}$$

These are the two properties that are verified in Theorem 1.7, in addition to a bound in terms of j for the limits.

We illustrate Theorem 1.7 with some examples.

Example 1.8

Let \(d,n > 1\). Let \(\pi : V \rightarrow {\mathbb {P}}_{\mathbb {Q}}^{N-1}\) be the family of all hypersurfaces of degree d in \({\mathbb {P}}_{\mathbb {Q}}^n\), where \(N = {\left( {\begin{array}{c}n+d\\ d\end{array}}\right) }\). (Note that V is regular.) If \((d,n) = (2,2)\), i.e. the family of all plane conics, then \(\Delta (\pi ) = 1/2\) [20, Ex. 4] and Theorem 1.2 applies. If however \((d,n) \ne (2,2)\), then the fibre over every codimension 1 point is geometrically integral, thus \(\Delta (\pi ) = 0\) and Theorem 1.7 applies. (See the proof of [19, Thm. 3.6] for this fact.) We deduce that when \((d,n) \ne (2,2)\), the probability that a smooth hypersurface has no p-adic point for exactly j many primes p is well-defined and exists.

A particularly interesting case is when \(n \geqslant d^2\). Here the Ax–Kochen theorem [1] implies that the map \(V({\mathbb {Q}}_p) \rightarrow {\mathbb {P}}^{N-1}({\mathbb {Q}}_p)\) is surjective for all but finitely many primes p. In particular, we have \(\tau _\pi (j)=0\) for all but finitely many \(j \in {\mathbb {Z}}\).

An example where the measure \(\tau _\pi \) has infinite support is the following.

Example 1.9

Let

$$\begin{aligned} V: \quad \sum _{i=0}^3 y_i x_i^3=0 \qquad \subset {\mathbb {P}}^3 \times {\mathbb {P}}^3 \end{aligned}$$

and let \(\pi :V\rightarrow {\mathbb {P}}^3\) be the projection onto the y-coordinate; here \(\pi \) is the family of all diagonal cubic surfaces. In Sect. 4.2 we will show that there exists an absolute constant \(c>0\) such that \(\tau _\pi (j) > c (1+j)^{-3j}\) for all \(j \in {\mathbb {Z}}_{\geqslant 0}\). This shows that \(\tau _\pi \) has infinite support in this case and that (1.9) cannot be significantly improved.

It turns out that one has the following characterisation for when the measure \(\tau _\pi \) has finite support; it happens if and only if an Ax–Kochen-type property holds.

Theorem 1.10

Keep the assumptions of Theorem 1.7. Then the measure \(\tau _\pi \) has finite support if and only if \(V({\mathbb {Q}}_p) \rightarrow {\mathbb {P}}^n({\mathbb {Q}}_p)\) is surjective for all but finitely many primes p.

Families for which \(V({\mathbb {Q}}_p) \rightarrow {\mathbb {P}}^n({\mathbb {Q}}_p)\) is surjective for all but finitely many p were studied in [15]. A geometric criterion for when this holds can be found in [15, Thm. 1.4].

Our methods also allow us to prove the following local-global principle for existence of varieties in the family which are non-locally soluble at exactly a given finite set of places.

Theorem 1.11

Keep the assumptions of Theorem 1.7. Let S be a finite set of places of \({\mathbb {Q}}\). Assume that \(\pi (V({\mathbb {Q}}_v)) \ne {\mathbb {P}}^n({\mathbb {Q}}_v)\) for all \(v \in S\) and that \(\pi (V({\mathbb {Q}}_v)) \ne \emptyset \) for all \(v \notin S\). Then there exists \(x \in {\mathbb {P}}^n({\mathbb {Q}})\) such that \(\pi ^{-1}(x)\) is smooth and

$$\begin{aligned} \pi ^{-1}(x)({\mathbb {Q}}_v)= \emptyset \quad \iff \quad v \in S. \end{aligned}$$

Note that for conics Hilbert’s version of quadratic reciprocity implies that a conic over \({\mathbb {Q}}\) fails to have a \({\mathbb {Q}}_v\)-point at exactly a set of places S of even cardinality, despite there being a conic \(C_v\) over every \({\mathbb {Q}}_v\) with \(C_v({\mathbb {Q}}_v) = \emptyset \). Theorem 1.11 shows that for families of varieties with \(\Delta (\pi ) = 0\) there is no such reciprocity law. (This phenomenon was first observed in the case of curves of genus at least 1 by Poonen and Stoll [18].)

One of the major differences between the case \(\Delta (\pi )>0\) and \(\Delta (\pi )=0\) is that the function \(\omega _\pi (x)\) becomes arbitrarily large on average only when \(\Delta (\pi )>0\). To make this precise we study the moments of \(\omega _\pi \). Define for \(r\in {\mathbb {Z}}_{\geqslant 0}\) the function

$$\begin{aligned} \mathcal {N}_r(\pi , B) := \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ \pi ^{-1}(x) \text { smooth} \end{array}} \omega _\pi (x)^{r}. \end{aligned}$$
(1.10)

Note that an obvious consequence of Theorem 1.3 is that if \(\Delta (\pi )>0\) then

$$\begin{aligned} \mathcal {N}_r(\pi , B) B^{-n-1}>\!\!>_{\pi ,r} (\log \log B)^r. \end{aligned}$$

In contrast, if \(\Delta (\pi )=0\) then for all \(r\geqslant 0\) the function \(\mathcal {N}_r(\pi , B) B^{-n-1}\) remains bounded as \(B\rightarrow \infty \); specifically we have the following counterpart of Theorem 1.3.

Theorem 1.12

Keep the assumptions of Theorem 1.7. Then for every \(r \in {\mathbb {Z}}_{\geqslant 1}\) we have

$$\begin{aligned} \lim _{B\rightarrow \infty } \frac{\mathcal {N}_r(\pi , B)}{\sharp \{x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B \}} =\sum _{j=0}^\infty j^r \tau _\pi (j) .\end{aligned}$$
(1.11)

Note that, apart from very special cases, existence of moments does not automatically imply existence of a limit law or vice versa.

1.3 Layout of the paper and proof ingredients

We begin in Sect. 2 with an elementary result on counting rational points in \({\mathbb {P}}^n({\mathbb {Q}})\) which lie in a given residue class.

We prove Theorem 1.3 in Sect. 3. For this we show in Proposition 3.9 that the moments of a ‘truncated’ version of \(\omega _\pi \) are approximated by the moments of the standard normal distribution. The proof is based on equidistribution properties of the fibers of \(\pi \) that are verified during the earlier stages in Sect. 3 and subsequently fed into work of Granville and Soundararajan [11]. We finish the proof of Theorem 1.3 in Sect. 3.4 by showing that the moments of \(\omega _\pi \) and the moments of the truncated version of \(\omega _\pi \) have the same asymptotic behaviour. Theorem 1.2 is then deduced from Theorem 1.3 in Sect. 3.5.

In Sect. 4 we prove the results from Sect. 1.2. The most difficult part of the proof of Theorem 1.7 is establishing the existence of the limit (1.8), which we achieve via Bhargava’s effective version of the Ekedahl sieve [3]. Theorems 1.10 and 1.12 are proved using similar methods and the results from Sect. 2. We finish Sect. 4 by briefly explaining how our results generalise in a straightforward manner to minor variants given by considering real solubility or by dropping conditions at finitely many primes.

Notation

For an integral homogeneous polynomial f, a point \(x \in {\mathbb {P}}^n({\mathbb {Q}})\) and \(Q \in {\mathbb {N}}\), we say that “\(f(x) \equiv 0 \bmod Q\)” if \(f({\mathbf {x}}) \equiv 0 \bmod Q\) for some primitive representative \({\mathbf {x}}\in {\mathbb {Z}}^{n+1}\) of x. We use the notation “\(Q \mid f(x)\)” analogously.

The quantities \(\delta _x(\pi )\) and \(\Delta (\pi )\) are introduced in Definition 1.1, the function \(\omega _\pi (x)\) is defined in (1.2) and the indicator function \(\theta _p(x)\) is introduced in (3.2). The arithmetic functions \(\omega ,\mu ,\varphi \) respectively denote the number of prime divisors, the Möbius function and the Euler totient function, respectively.

2 Explicit equidistribution on projective space

2.1 Counting with congruences

We will be required to count rational points in projective space which satisfy imposed congruence conditions. To state our result, we let

$$\begin{aligned} c_n = \lim _{B \rightarrow \infty } \frac{\sharp \{ x \in {\mathbb {P}}^n({\mathbb {Q}}): H(x) \leqslant B\} }{B^{n+1}} = \frac{2^{n}}{\zeta (n+1)} , \end{aligned}$$
(2.1)

where \(\zeta (s)\) denotes the Riemann zeta function.

Proposition 2.1

Let \(B > 1\), \(Q \in {\mathbb {N}}\) and \(\Upsilon \subseteq {\mathbb {P}}^n({\mathbb {Z}}/Q{\mathbb {Z}})\). Then

$$\begin{aligned}&\sharp \left\{ x \in {\mathbb {P}}^n({\mathbb {Q}}): \begin{array}{l} H(x) \leqslant B, \\ x \bmod Q \in \Upsilon \end{array} \right\} \\&\quad = \frac{c_n \sharp \Upsilon }{\sharp {\mathbb {P}}^n({\mathbb {Z}}/Q{\mathbb {Z}})} B^{n+1} + O\left( Q \sharp \Upsilon \left( B+\frac{B^n}{Q^{n}} (\log B)^{[1/n]} \right) \right) , \end{aligned}$$

where \([\cdot ]\) denotes the integer part.

Proof

Let \({\widehat{\Upsilon }} = \{{\mathbf {x}}\in ({\mathbb {Z}}/Q{\mathbb {Z}})^{n+1} : {\mathbf {x}}\not \equiv {\mathbf {0}} \bmod p \, \forall p \mid Q, (x_0:\cdots :x_n) \in \Upsilon \}\) be the affine cone of \(\Upsilon \). Applying Möbius inversion we see that the cardinality in question is

$$\begin{aligned}&\frac{1}{2} \sharp \{ {\mathbf {x}}\in {\mathbb {Z}}^{n+1}: \max \{|x_0|, \ldots , |x_n| \} \leqslant B, \text {gcd}(x_0,\ldots , x_n) = 1, {\mathbf {x}}\bmod Q \in {\widehat{\Upsilon }}\} + O(1)\\&\quad = \frac{1}{2} \sum _{\begin{array}{c} k \leqslant B \\ \text {gcd}(k,Q)=1 \end{array}} \mu (k) \sharp \{ {\mathbf {x}}\in {\mathbb {Z}}^{n+1}: \max \{|x_0|, \ldots , |x_n| \} \leqslant B/k, k{\mathbf {x}}\bmod Q \in {\widehat{\Upsilon }}\} {+} O(1) \\&\quad = \frac{1}{2} \sum _{{\mathbf {y}}\in {\widehat{\Upsilon }}} \sum _{\begin{array}{c} k \leqslant B \\ \text {gcd}(k,Q)=1 \end{array}} \mu (k) \sharp \{ {\mathbf {x}}\in {\mathbb {Z}}^{n+1}: \max \{|x_0|, \ldots , |x_n| \} \leqslant B/k, {\mathbf {x}}\equiv k^{-1}{\mathbf {y}}\bmod Q\} + O(1) \\&\quad = \frac{1}{2} \sum _{{\mathbf {y}}\in {\widehat{\Upsilon }}} \sum _{\begin{array}{c} k \leqslant B \\ \text {gcd}(k,Q)=1 \end{array}} \mu (k) \left( \left( \frac{2B}{kQ}\right) + O(1) \right) ^{n+1} + O(1). \end{aligned}$$

Continuing, we use the estimate \(\sum _{k>B}k^{-n-1}\ll B^{-n}\) to find that the main term is

$$\begin{aligned}&\frac{2^n \sharp {\widehat{\Upsilon }}B^{n+1}}{Q^{n+1}} \sum _{\begin{array}{c} k \in {\mathbb {N}}\\ \text {gcd}(k,Q)=1 \end{array}} \frac{\mu (k)}{k^{n+1}} + O\left( \frac{\sharp {\widehat{\Upsilon }}B}{Q^{n+1}}\right) \\&\qquad = \frac{c_n \sharp {\widehat{\Upsilon }}}{Q^{n+1}\prod _{p \mid Q}(1 - 1/p^{n+1})} \cdot B^{n+1} + O\left( \frac{\sharp {\widehat{\Upsilon }}B}{Q^{n+1}}\right) . \end{aligned}$$

Recall that

$$\begin{aligned} \sharp {\mathbb {P}}^n({\mathbb {Z}}/p^k{\mathbb {Z}}) = p^{n(k-1)} \cdot \frac{p^{n+1} -1}{p-1} . \end{aligned}$$
(2.2)

From this it is easy to establish

$$\begin{aligned} Q^{n+1}\prod _{p \mid Q}(1 - 1/p^{n+1}) = \varphi (Q) \sharp {\mathbb {P}}^n({\mathbb {Z}}/Q{\mathbb {Z}}) , \end{aligned}$$

where \(\varphi \) is Euler’s totient function. We obtain the main term as stated in our proposition via \(\sharp {\widehat{\Upsilon }} = \varphi (Q) \sharp \Upsilon \). To deal with the error terms observe that

$$\begin{aligned} \left( \left( \frac{2B}{kQ}\right) + O(1) \right) ^{n+1} - \left( \frac{2B}{kQ}\right) ^{n+1} \ll \sum _{0\leqslant \ell \leqslant n} \left( \frac{B}{kQ}\right) ^{\ell } \ll 1+ \left( \frac{B}{kQ}\right) ^{n} ,\end{aligned}$$

where the last inequality stems from \(\sum _{0\leqslant \ell \leqslant n} t^\ell \leqslant (n+1)(1+t^n)\), valid for every \(t\geqslant 0\) and \(n\in {\mathbb {N}}\). We obtain the error term

$$\begin{aligned}&\sum _{{\mathbf {y}}\in {\widehat{\Upsilon }}} \sum _{\begin{array}{c} k \leqslant B \\ \text {gcd}(k,Q)=1 \end{array}} |\mu (k)| \Bigg \{ \left( \left( \frac{2B}{kQ}\right) + O(1) \right) ^{n+1} -\left( \frac{2B}{kQ}\right) ^{n+1}\Bigg \} \\&\qquad \ll \sharp {\widehat{\Upsilon }} \Big \{B+(B/Q)^n (\log B)^{[1/n]} \Big \} .\end{aligned}$$

Using \(\sharp {\widehat{\Upsilon }} \ll Q \sharp \Upsilon \) completes the proof. \(\square \)

Before continuing we record an elementary lemma here.

Lemma 2.2

For \(n,Q\in {\mathbb {N}}\) we have

$$\begin{aligned} Q^n \leqslant \sharp {\mathbb {P}}^n({\mathbb {Z}}/Q{\mathbb {Z}}) \leqslant 2^{\omega (Q)} Q^n . \end{aligned}$$

Proof

It suffices to prove the result when \(Q = p^k\) for some prime p. By (2.2) we have

$$\begin{aligned} p^{kn} \leqslant \sharp {\mathbb {P}}^n({\mathbb {Z}}/p^k{\mathbb {Z}}) = p^{n(k-1)} \cdot \frac{p^{n+1} -1}{p-1} \leqslant p^{n(k-1)} \cdot (2p^n) = 2p^{kn}. \end{aligned}$$

\(\square \)

2.2 Some probability measures

2.2.1 Measures on \({\mathbb {P}}^n({\mathbb {Q}}_p)\)

Let p be a prime. The finite sets \({\mathbb {P}}^n({\mathbb {Z}}/p^k{\mathbb {Z}})\) come with a natural uniform probability measure. Taking the limit \({\mathbb {P}}^n({\mathbb {Z}}_p) = \lim _{k \rightarrow \infty } {\mathbb {P}}^n({\mathbb {Z}}/p^k{\mathbb {Z}})\) we obtain a well-defined probability measure \(\vartheta _p\) on \({\mathbb {P}}^n({\mathbb {Z}}_p)\) (this measure differs from Peyre’s local Tamagawa measure [17, §2.2] by a constant). These measures admit the following explicit description. Let \(\Upsilon \subset {\mathbb {P}}^n({\mathbb {Z}}/p^k{\mathbb {Z}})\). Then

$$\begin{aligned} \vartheta _p\left( \{ x \in {\mathbb {P}}^n({\mathbb {Q}}_p) : x \bmod p^k \in \Upsilon \} \right) = \frac{\sharp \Upsilon }{\sharp {\mathbb {P}}^n({\mathbb {Z}}/p^k{\mathbb {Z}})}. \end{aligned}$$
(2.3)

These “residue disks” generate the \(\sigma \)-algebra on \({\mathbb {P}}^n({\mathbb {Z}}_p)\), hence the measure \(\vartheta _p\) is uniquely determined by (2.3). Proposition 2.1 may be viewed as an effective version of equidistribution of rational points on \({\mathbb {P}}^n\) with respect to the measures \(\vartheta _p\).

One relates the measure \(\vartheta _p\) to the usual Haar measure on \({\mathbb {Z}}_p\) via the following.

Lemma 2.3

Let \(\mu _p\) denote the Haar probability measure on \({\mathbb {Z}}_p^{n+1}\). Let \(\Upsilon \subset {\mathbb {P}}^n({\mathbb {Z}}_p)\) and let \({\widehat{\Upsilon }} \subset {\mathbb {Q}}_p^{n+1}\) be its affine cone. Then \(\vartheta _p(\Upsilon ) = \mu _p({\widehat{\Upsilon }} \cap {\mathbb {Z}}_p^{n+1})\).

Proof

It suffices to prove the result for the residue disks

$$\begin{aligned} \Upsilon = \{ x \in {\mathbb {P}}^n({\mathbb {Z}}_p) : x \equiv (a_0:a_1:\dots :a_n) \bmod p^k\} \end{aligned}$$

for some \(a_i \in {\mathbb {Z}}_p\); we have \(\vartheta _p(\Upsilon ) = 1/\sharp {\mathbb {P}}^n({\mathbb {Z}}/p^k{\mathbb {Z}})\). Note that one of the \(a_i\) may be taken to be a unit; for simplicity we assume this is \(a_0\). A moment’s thought reveals that

$$\begin{aligned} {\widehat{\Upsilon }} \cap {\mathbb {Z}}_p^{n+1} = \left\{ {\mathbf {x}} \in {\mathbb {Z}}_p^{n+1} : \left| \frac{x_i}{p^{v_p(x_0)}} - \frac{a_ix_0}{a_0p^{v_p(x_0)}} \right| _p \leqslant p^{-k}, i = 1,\dots ,n\right\} . \end{aligned}$$

Thus, by (2.2) we find that

$$\begin{aligned}&\mu _p({\widehat{\Upsilon }}\cap {\mathbb {Z}}_p^{n+1}) \\&\quad = \sum _{m = 0}^\infty \{ {\mathbf {x}} \in {\mathbb {Z}}_p^{n+1} : v_p(x_0) = m, |x_i - a_i x_0/a_0|_p \leqslant p^{-k-m}, i = 1,\dots ,n\} \\&\quad = \sum _{m = 0}^\infty \frac{1}{p^m} \left( 1 - \frac{1}{p}\right) \left( \frac{1}{p^{k+m}}\right) ^n = \frac{1}{p^{n(k-1)}}\left( \frac{p-1}{p^{n+1}-1}\right) = \frac{1}{\sharp {\mathbb {P}}^n({\mathbb {Z}}/p^k{\mathbb {Z}})}. \end{aligned}$$

\(\square \)

2.2.2 Measure on \({\mathbb {P}}^n({\mathbb {R}})\)

We let \(\vartheta _\infty \) be the pushforward of the usual probability measure on the n-sphere \(S^n\) via the quotient map \(S^n \rightarrow {\mathbb {P}}^n({\mathbb {R}})\).

3 An Erdős–Kac theorem for fibrations

3.1 Set-up

We begin the proof of the results from Sect. 1.1. Let V be a smooth projective variety over \({\mathbb {Q}}\) with a dominant morphism \(\pi : V \rightarrow {\mathbb {P}}^n_{\mathbb {Q}}\) with geometrically integral generic fibre. (We assume \(\Delta (\pi ) > 0\) from Sect. 3.3.) We choose a model for \(\pi \), i.e. a proper scheme \({\mathcal {V}}\) over \({\mathbb {Z}}\) together with a proper morphism \(\pi :{\mathcal {V}} \rightarrow {\mathbb {P}}^n_{\mathbb {Z}}\) (also denoted \(\pi \) by abuse of notation), which extends \(V \rightarrow {\mathbb {P}}_{\mathbb {Q}}^n\). In what follows, all implied constants are allowed to depend on \(\pi \), the choice of model, and the A and f occurring in Lemma 3.2.

We begin by studying the basic properties of \(\omega _\pi (x)\). We first show that it enjoys analogous bounds to the usual \(\omega \).

Lemma 3.1

There exists \(D > 0\) with the following property. Let \(x \in {\mathbb {P}}^n({\mathbb {Q}})\) be such that \(\pi ^{-1}(x)\) is smooth. Then

$$\begin{aligned} \omega _\pi (x) \ll \frac{ \log H(x) }{\log \log H(x) }, \quad \max \{ p : \pi ^{-1}(x)({\mathbb {Q}}_p) = \emptyset \} \ll H(x)^D. \end{aligned}$$

Proof

Let \(S \subset {\mathbb {P}}^n_{\mathbb {Q}}\) denote the non-smooth locus of \(\pi \); this is a proper closed subset of \({\mathbb {P}}^n_{\mathbb {Q}}\). Let \({\mathcal {S}}\) be the closure of S in \({\mathbb {P}}^n_{{\mathbb {Z}}}\) and choose a finite collection of homogeneous polynomials \(f_1,\ldots ,f_s\) which generate the ideal of \({\mathcal {S}}\). Let \(D = \max _i \{ \deg f_i \}\).

For all sufficiently large primes p, the fibre \(\pi ^{-1}(x \bmod p)\) is smooth if and only if \(x \bmod p \notin {\mathcal {S}}\), which happens if and only if \(p \not \mid f_i(x)\) for some i. Moreover, by the Lang–Weil estimates [16] and Hensel’s lemma, for all sufficiently large primes p (independently of x) if \(\pi ^{-1}(x \bmod p)\) is smooth then \(\pi ^{-1}(x)({\mathbb {Q}}_p) \ne \emptyset \). It follows that

$$\begin{aligned} \sharp \{ p : \pi ^{-1}(x)({\mathbb {Q}}_p) = \emptyset \} \leqslant \sharp \{ p : p \mid f_i(x) \,\forall \, i \in \{1,\dots ,s\} \} + O(1). \end{aligned}$$

Letting \({\mathbf {x}}\) be a primitive representative of x and using the bound \(\omega (n)\ll (\log n)(\log \log n)^{-1}\), we obtain

$$\begin{aligned}&\omega _\pi (x) \leqslant \sum _{i=1}^r \omega (f_i({\mathbf {x}})) + O(1) \ll \frac{ \log (H(x)^D) }{\log \log (H(x)^D)},\\&\max \{ p : \pi ^{-1}(x)({\mathbb {Q}}_p) = \emptyset \} \ll H(x)^D. \end{aligned}$$

\(\square \)

To simplify notation it will be easier to work with some choice of polynomial which vanishes on the singular locus, rather than the whole singular locus. The proof of the following is a minor adaptation of the proof of Lemma 3.1 (just choose \(f = f_1\)).

Lemma 3.2

Let \(f \in {\mathbb {Z}}[x_0,\ldots , x_n]\) be a homogeneous square-free polynomial such that \(\pi \) is smooth away from the divisor \(f(x) = 0 \subset {\mathbb {P}}^n_{\mathbb {Q}}\). Then there exists \(A > 0\) such that for all primes \(p > A\) the following hold.

  1. 1.

    The restriction of \(\pi \) to \({\mathbb {P}}^n_{{\mathbb {F}}_p}\) is smooth away from the divisor \(f(x) = 0 \subset {\mathbb {P}}^n_{{\mathbb {F}}_p}\).

  2. 2.

    Let \(x \in {\mathbb {P}}^n({\mathbb {Q}})\). If \(\pi ^{-1}(x)({\mathbb {Q}}_p) = \emptyset \) then \(p \mid f(x)\).

In Sect. 3.2, we allow ourselves to increase A as necessary to take care of bad behaviour at small primes.

3.2 Equidistribution properties in the fibres

The next step is to translate the condition \(\pi ^{-1}(x)({\mathbb {Q}}_p)=\emptyset \) into something amenable to tools from analytic number theory. We do this by using the tools developed in [14]. The key result is [14, Thm. 2.8], which is a valuative criterion for non-existence of a p-adic point in a fibre, for sufficiently large primes p. In the special case of the conic bundle over \({\mathbb {Q}}\)

$$\begin{aligned} x^2 + y^2 = tz^2 \qquad \subset {\mathbb {P}}^2 \times {\mathbb {A}}^1, \end{aligned}$$

the criterion [14, Thm. 2.8] says that if \(p \equiv 3 \bmod 4\) and the p-adic valuation of t is 1, then the fibre over t has no \({\mathbb {Q}}_p\)-point, as is familiar from the theory of Hilbert symbols.

We introduce the quantity which will arise in this analysis. For any prime p let

$$\begin{aligned} \sigma _p:= \frac{\sharp \big \{x \in {\mathbb {P}}^n({\mathbb {F}}_{p}): \pi ^{-1}(x) \text{ is } \text{ non-split }\big \}}{\sharp {\mathbb {P}}^n({\mathbb {F}}_p)}. \end{aligned}$$
(3.1)

(Here we use the term “non-split” in the sense of Skorobogatov [23, Def. 0.1].)

Lemma 3.3

Let A and f be as in Lemma 3.2 and \(p > A\). Then

$$\begin{aligned} \sigma _p \leqslant \frac{d}{p}, \qquad \text {where } d = \deg f. \end{aligned}$$

Proof

A non-split fibre is necessarily singular. Hence by Lemma 3.2, for \(p > A\) we have

$$\begin{aligned} \sharp \big \{x \in {\mathbb {P}}^n({\mathbb {F}}_{p}): \pi ^{-1}(x) \text{ is } \text{ non-split }\big \} \leqslant \sharp \big \{x \in {\mathbb {P}}^n({\mathbb {F}}_{p}): f(x) = 0\big \}. \end{aligned}$$

Projecting to a suitable hyperplane, this is at most \(d \sharp {\mathbb {P}}^{n-1}({\mathbb {F}}_{p})\). The result follows. \(\square \)

We now use results from [14] to deduce an equidistribution result for \(\theta _p\). To simplify notation, we denote the characteristic function of the p-adically insoluble fibres by

$$\begin{aligned} \theta _p(x):= {\left\{ \begin{array}{ll} 1, &{}\text{ if } \pi ^{-1}(x)({\mathbb {Q}}_p)=\emptyset ,\\ 0, &{} \text{ otherwise }.\end{array}\right. } \end{aligned}$$
(3.2)

Our result is the following asymptotic upper and lower bounds. (Here \(c_n\) is as in (2.1).)

Proposition 3.4

Let \(d = \deg f\). Enlarging A if necessary, there exists \(\alpha \geqslant 0\) with the following property. Let \(Q \in {\mathbb {N}}\) be square-free with \(p \not \mid Q\) for all \(p \leqslant A\). Then

$$\begin{aligned}&\pm \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}) \\ H(x)\leqslant B\\ \pi ^{-1}(x) \text { smooth} \end{array}} \prod _{p \mid Q}\theta _{p}(x) \\&\qquad \leqslant \pm c_n \Big (\prod _{p \mid Q} (\sigma _{p} \pm \alpha /p^2) \Big ) B^{n+1} + O\left( (4d)^{\omega (Q)} ( Q^{2n+1} B + Q B^n(\log B)^{[1/n]} ) \right) , \end{aligned}$$

where the implied constant is independent of B and Q.

Proof

Let \(p > A\) be a prime. Enlarging A if necessary, the Lang–Weil estimates and Hensel’s lemma show that if \(\pi ^{-1}(x \bmod p)\) is split then \(\pi ^{-1}(x)\) has a \({\mathbb {Q}}_p\)-point. Thus the sum in the proposition is

$$\begin{aligned} \leqslant \sharp \{ x \in {\mathbb {P}}^n({\mathbb {Q}}):H(x) \leqslant B, \pi ^{-1}(x \bmod p) \text{ is } \text{ non-split } \, \forall p\mid Q\} . \end{aligned}$$

Applying Proposition 2.1 with \(\Upsilon =\{x \in {\mathbb {P}}^n({\mathbb {Z}}/Q{\mathbb {Z}}){:}~~\pi ^{-1}(x \bmod p) \text{ is } \text{ non-split } \forall p\mid Q\}\), we infer that the above cardinality equals

$$\begin{aligned}&c_n B^{n+1}\prod _{p\mid Q} \frac{\sharp \big \{x \in {\mathbb {P}}^n({\mathbb {F}}_{p}): \pi ^{-1}(x) \text{ is } \text{ non-split }\big \}}{\sharp {\mathbb {P}}^n(~{\mathbb {F}}_{p})} \\&\quad +O\left( Q \sharp \Upsilon \left( B+\frac{B^n}{Q^n} (\log B)^{[1/n]} \right) \right) . \end{aligned}$$

One has \(\sharp \Upsilon =\sharp {\mathbb {P}}^n({\mathbb {Z}}/Q{\mathbb {Z}}) \prod _{p\mid Q} \sigma _p\), thus Lemmas 2.2 and 3.3 imply that \(\sharp \Upsilon \ll (2d)^{\omega (Q)} Q^{n-1}\), which is satisfactory for the upper bound in the proposition.

For the lower bound, we apply the sparsity result of [14, Thm. 2.8]. This gives a square-free homogeneous polynomial \(g \in {\mathbb {Z}}[x_0,\ldots ,x_n]\) which is coprime with f and contains the singular locus of f such that, enlarging A if necessary, the sum in the proposition is

$$\begin{aligned} \geqslant \sharp \left\{ x \in {\mathbb {P}}^n({\mathbb {Q}}): \begin{array}{l} H(x) \leqslant B, f(x) \equiv 0 \bmod p, f(x) \not \equiv 0 \bmod p^2, \\ g(x) \not \equiv 0 \bmod p, \pi ^{-1}(x \bmod p) \text{ is } \text{ non-split }, \forall p\mid Q \end{array} \right\} . \end{aligned}$$

We now apply Proposition 2.1 with

$$\begin{aligned} \Upsilon '=\left\{ x \in {\mathbb {P}}^n({\mathbb {Z}}/{Q}^2{\mathbb {Z}}): \begin{array}{l} f(x) \equiv 0 \bmod p, f(x) \not \equiv 0 \bmod p^2, \\ g(x) \not \equiv 0 \bmod p, \pi ^{-1}(x \bmod p) \text{ is } \text{ non-split }, \, \forall p \mid Q \end{array} \right\} \end{aligned}$$

to see that the sum in the proposition is

$$\begin{aligned} \geqslant \frac{c_n \sharp \Upsilon '}{\sharp {\mathbb {P}}^n({\mathbb {Z}}/Q^2{\mathbb {Z}}) }B^{n+1} +O \left( Q^2 \sharp \Upsilon ' \left( B+\frac{B^n}{Q^{2n}} (\log B)^{[1/n]} \right) \right) . \end{aligned}$$
(3.3)

As \(g(x) = 0\) contains the singular locus of f, we may apply [5, Prop. 2.3] to find that

$$\begin{aligned}&\sharp \left\{ x \in {\mathbb {P}}^n({\mathbb {Z}}/{p^2}{\mathbb {Z}}): \begin{array}{l} f(x) \equiv 0 \bmod p, f(x) \not \equiv 0 \bmod p^2, \\ g(x) \not \equiv 0 \bmod p, \pi ^{-1}(x \bmod p) \text{ is } \text{ non-split } \end{array} \right\} \\&= \sharp \left\{ x \in {\mathbb {P}}^n({\mathbb {F}}_{p}): f(x) = 0, g(x) \ne 0, \pi ^{-1}(x) \text{ is } \text{ non-split } \right\} (p^n + O(p^{n-1})) \\&= \sharp \{x \in {\mathbb {P}}^n({\mathbb {F}}_{p}): \pi ^{-1}(x) \text{ is } \text{ non-split }\}p^{n} + O(p^{2n-2}). \end{aligned}$$

Here the last line follows from the fact that if \(\pi ^{-1}(x)\) is non-split then necessarily \(f(x) = 0\) by Lemma 3.2, together with the fact that \(\sharp \{ x \in {\mathbb {P}}^n({\mathbb {F}}_p): f(x) = g(x) = 0 \} \ll p^{n-2}\) as f and g share no common factor. Recalling that \(\sharp {\mathbb {P}}^n({\mathbb {Z}}/p^2{\mathbb {Z}}) = p^n \sharp {\mathbb {P}}^n({\mathbb {F}}_p)\) (2.2), shows that

$$\begin{aligned} \prod _{p\mid Q} (\sigma _p - \alpha /p^{2}) \leqslant \frac{\sharp \Upsilon '}{\sharp {\mathbb {P}}^n({\mathbb {Z}}/Q^2{\mathbb {Z}}) } \leqslant \prod _{p\mid Q} (\sigma _p + \alpha /p^{2}) \end{aligned}$$
(3.4)

for some \(\alpha > 0\). This yields the correct main term for the lower bound. For the error term, enlarging A if necessary we have \(\alpha /p^2 < d/p\) for all \(p > A\). Thus (3.4) and Lemmas 2.2 and 3.3 give

$$\begin{aligned} \sharp \Upsilon ' \leqslant \sharp {\mathbb {P}}^n({\mathbb {Z}}/Q^2{\mathbb {Z}}) \prod _{p\mid Q} (\sigma _p + \alpha /p^{2}) \leqslant (2^{\omega (Q)}Q^{2n}) \cdot (2d)^{\omega (Q)}/Q, \end{aligned}$$

which yields the required error term in (3.3). \(\square \)

We now fix the choice of A. Note that as \(\min \{p : p \mid Q\} \rightarrow \infty \), the lower bound in Proposition 3.4 converges to the upper bound.

Lemma 3.5

We have

$$\begin{aligned} \sum _{p \leqslant B} \sharp \{ x \in {\mathbb {P}}^n({\mathbb {F}}_p) : \pi ^{-1}(x) \text{ is } \text{ non-split }\} = \Delta (\pi ) \frac{B^{n}}{\log (B^n)} + O\left( \frac{B^{n}}{(\log B)^2}\right) . \end{aligned}$$

Proof

This follows from an easy modification of the proof of [14, Prop. 3.10]. (Loc. cit. states an asymptotic formula without an error term; one obtains an error term via the version of the Chebotarev density theorem given in [22, Thm. 9.11].) \(\square \)

We will also require the following.

Proposition 3.6

There exists a constant \(\beta _\pi \) such that

$$\begin{aligned} \sum _{p\leqslant B} \sigma _p =\Delta (\pi ) (\log \log B)+ \beta _\pi +O((\log B)^{-1}) \end{aligned}$$

Proof

The proof is a simple application of Lemma 3.5 and partial summation. First, let \(a_p:=\sharp \{ x \in {\mathbb {P}}^n({\mathbb {F}}_p) : \pi ^{-1}(x) \text{ is } \text{ non-split }\}\), define \(S(B):=\sum _{2<p\leqslant x}a_p\) and let

$$\begin{aligned}R(B):=S(B) - \Delta (\pi ) \frac{B^{n}}{\log (B^n)}. \end{aligned}$$

Lemma 3.5 is equivalent to the estimate \(R(B)\ll \frac{B^{n}}{(\log B)^2}.\) By partial summation we obtain

$$\begin{aligned} \sum _{2<p \leqslant B} \frac{a_p}{p^n} =\frac{S(B)}{B^n}+ n\int _2^t \frac{\left( \Delta (\pi ) \frac{u^n}{ \log (u^n)} +R(u) \right) }{u^{n+1}} \mathrm {d}u .\end{aligned}$$

Lemma 3.5 directly gives \(S(B)/B^n\ll 1/\log B\). We furthermore have \( \int _2^\infty \frac{|R(u)|}{u^{n+1}} \mathrm {d}u <\infty \) due to \(|R(B)|\ll \frac{B^{n}}{(\log B)^2}.\) Hence, we may write

$$\begin{aligned} \int _2^t \frac{R(u)}{u^{n+1}} \mathrm {d}u&=\int _2^\infty \frac{R(u)}{u^{n+1}} \mathrm {d}u +O\left( \int _t^\infty \frac{|R(u)|}{u^{n+1}} \mathrm {d}u\right) \\&=\int _2^\infty \frac{R(u)}{u^{n+1}} \mathrm {d}u +O\left( \int _t^\infty \frac{1}{u (\log u)^2} \mathrm {d}u\right) \\&=\int _2^\infty \frac{R(u)}{u^{n+1}} \mathrm {d}u +O\left( \frac{1}{\log t}\right) . \end{aligned}$$

Recalling that \(\int _2^t (u \log u)^{-1}\mathrm {d}t=\log \log t-\log \log 2\) and letting

$$\begin{aligned} \gamma _\pi := -\Delta (\pi ) (\log \log 2) +\frac{a_2}{2^n}+ \int _2^\infty \frac{R(u)}{u^{n+1}} \mathrm {d}u \end{aligned}$$

we have proved

$$\begin{aligned} \sum _{p\leqslant B} \frac{a_p}{p^n}= \Delta (\pi )\log \log B +\gamma _p +O\left( \frac{1}{\log B}\right) . \end{aligned}$$
(3.5)

Using this in the simple form \(\sum _{p\leqslant B} \frac{a_p}{p^n} \ll \log \log B\) then by partial summation we obtain

$$\begin{aligned} \sum _{p\leqslant B} \frac{a_p}{p^{n+1}} \ll \frac{\log \log B}{B} +\int _1^B\frac{\log \log u}{u^2} \mathrm {d}u \ll 1. \end{aligned}$$

We thus obtain that \(\sum _p \frac{a_p}{p^{n+1}}\) converges and that the tail is at most

$$\begin{aligned} \sum _{p>B} \frac{a_p}{p^{n+1}} \ll \frac{\log \log B}{B}+ \int _B^\infty \frac{\log \log u}{u^2} \mathrm {d}u \ll \frac{\log \log B}{B} . \end{aligned}$$
(3.6)

Let us now define the function \(\epsilon _p\) for primes p via the equation

$$\begin{aligned} \frac{1}{\sharp {\mathbb {P}}^n({\mathbb {F}}_p)} =\frac{1}{p^n} + \frac{\epsilon _p}{p^n} .\end{aligned}$$

Recalling (3.1) and making use of (3.5), we see that this gives

$$\begin{aligned} \sum _{p\leqslant B}\sigma _p= \sum _{p\leqslant B}\frac{a_p}{p^n} + \sum _{p\leqslant B}\frac{a_p \epsilon _p}{p^n} = \Delta (\pi )\log \log B +\gamma _p +O\left( \frac{1}{\log B}\right) + \sum _{p\leqslant B}\frac{a_p \epsilon _p}{p^n} .\end{aligned}$$

At this point we use (2.2) to obtain

$$\begin{aligned} \frac{1}{\sharp {\mathbb {P}}^n({\mathbb {F}}_p)} =\frac{p-1}{p^{n+1}-1} =\frac{1}{p^n} \frac{1}{(1+\frac{1}{p}+\cdots +\frac{1}{p^n})} =\frac{1}{p^n} \left( 1+O\left( \frac{1}{p}\right) \right) , \end{aligned}$$

from which we get \(\epsilon _p\ll 1/p\). By (3.6) we see that \(\sum _{p } a_p\epsilon _p p^{-n}\) converges and that

$$\begin{aligned} \sum _{p\leqslant B} \frac{a_p\epsilon _p}{p^{n}} = \sum _{p } \frac{a_p\epsilon _p}{p^{n}} + O\left( \frac{\log \log B}{B} \right) .\end{aligned}$$

Taking \(\beta _\pi :=\gamma _\pi +\sum _p a_p\epsilon _p p^{-n} \) concludes the proof. \(\square \)

3.3 Moments of a truncated version of \(\omega _\pi \)

We assume from now on that \(\Delta (\pi ) > 0\). In what follows \(t_0,t_1:{\mathbb {R}}\rightarrow {\mathbb {R}}\) are two functions that satisfy

$$\begin{aligned} 1<t_0(B)<t_1(B)<B, \lim _{B\rightarrow \infty } t_0(B)= \lim _{B\rightarrow \infty } t_1(B)= \infty . \end{aligned}$$

Both functions \(t_0(B),t_1(B)\) will be chosen optimally at a later stage. Define the function

$$\begin{aligned} \omega _\pi ^\flat (x,B) := \sum _{t_0(B)<p \leqslant t_1(B)} (\theta _p(x)-\sigma _p), \end{aligned}$$
(3.7)

where \(\sigma _p\) is as in (3.1). We need to estimate asymptotically the moments of \(\omega _\pi (x)\); it turns out that it is easier to work with the ‘truncated’ version \(\omega _\pi ^\flat (x,B)\) of \(\omega _\pi (x)\). Introducing \(t_1(B)\) deals with the dependence on Q in the error term of Proposition 3.4, whilst \(t_0(B)\) is used to control the error \(\pm \alpha /p^{2}\) in the leading constant in Proposition 3.4.

To study the degree to which \(\omega _\pi (x)\) is affected by the primes in the interval \((t_0(B),t_1(B)]\) we begin by observing that Proposition 3.6 provides us with

$$\begin{aligned} \sum _{p\leqslant t_0(B)}\sigma _p\ll \log \log t_0(B), \qquad \sum _{t_1(B)<p\leqslant B}\sigma _p\ll \Big (\log \frac{\log B}{\ \log t_1(B)}\Big )+\frac{1}{\log t_1(B)}.\nonumber \\ \end{aligned}$$
(3.8)

We define

$$\begin{aligned} \mathcal {M}^\flat _r(\pi , B):=\sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ \pi ^{-1}(x) \text { smooth} \end{array}} \left( \frac{\omega _\pi ^\flat (x,B) }{\sqrt{\Delta (\pi )\log \log B}}\right) ^{r} ,\quad (r \in {\mathbb {Z}}_{\geqslant 0}). \end{aligned}$$
(3.9)

Note that \(\mathcal {M}^\flat _r(\pi , B)\) depends on \(t_0(B)\) and \(t_1(B)\) due to the presence of \(\omega _\pi ^\flat (x,B)\). The estimates in Proposition 3.6 and (3.8) yield

$$\begin{aligned} \sum _{t_0(B)<p\leqslant t_1(B)} \sigma _p =\Delta (\pi ) \log \log B +O\Big (\Big (\log \frac{\log B}{\ \log t_1(B)}\Big ) + \log \log t_0(B)\Big ) .\nonumber \\ \end{aligned}$$
(3.10)

Furthermore, we have \(\sigma _p-\sigma _p^2=\sigma _p+O(p^{-2})\) due to Lemma 3.3. This shows that

$$\begin{aligned} \sum _{t_0(B)<p\leqslant t_1(B)} (\sigma _p-\sigma _p^2) = \Delta (\pi ) \log \log B +O\Big ( \Big (\log \frac{\log B}{\ \log t_1(B)}\Big ) + \log \log t_0(B) \Big ) .\nonumber \\ \end{aligned}$$
(3.11)

Lemma 3.7

Let \(\psi \in \{ -1,1\}\). In the situation of Proposition 3.4 we have

$$\begin{aligned} \prod _{p \mid Q} (\sigma _{p} +\psi \alpha /p^2) = \prod _{p \mid Q} \sigma _{p} + O\left( \frac{(2\alpha d)^{\omega (Q)}}{Q \min \{p: p\mid Q\}} \right) . \end{aligned}$$

Proof

We prove the inequality for one choice of sign, namely \(\psi =1\), the other choice being similar. Denoting \(Q=p_1\cdots p_k\) with \(p_i<p_{i+1}\), we have by Lemma 3.3 that

$$\begin{aligned}&\Big (\prod _{p|Q} (\sigma _p+\alpha /p^2)\Big )-\Big (\prod _{p|Q}\sigma _p\Big ) =\sum _{S\subsetneq \{1,\ldots ,k\}} \Big (\prod _{i\in S}\sigma _{p_i}\Big )\Big (\prod _{i\notin S}\frac{\alpha }{p_i^2}\Big ) \\&\quad \leqslant \sum _{S\subsetneq \{1,\ldots ,k\}} \Big (\prod _{i\in S}\frac{d}{p_i}\Big )\Big ( \prod _{i\notin S}\frac{\alpha }{p_i^2}\Big ) \leqslant (\alpha d)^k\sum _{S\subsetneq \{1,\ldots ,k\}} \Big (\prod _{i\in S}\frac{1}{p_i}\Big )\Big ( \prod _{i\notin S}\frac{1}{p_i^2}\Big ) \\&\quad = \frac{(\alpha d)^k}{Q}\sum _{S\subsetneq \{1,\ldots ,k\}} \Big ( \prod _{i\notin S}\frac{1}{p_i}\Big ) \leqslant \frac{(2\alpha d)^k}{Qp_1} .\end{aligned}$$

\(\square \)

Before proceeding we recall [11, Prop. 3].

Lemma 3.8

(Granville–Soundararajan) Let \(\mathcal {P}\) be a finite set of primes and let \(\mathcal {A}:=\{a_1,\ldots ,a_y\}\) be a multiset of y natural numbers. For \(Q\in {\mathbb {N}}\) define

$$\begin{aligned}\mathcal {A}_Q:=\sharp \{m\leqslant y:Q \mid a_m\}.\end{aligned}$$

Let h be a real-valued, non-negative multiplicative function such that for square-free Q we have \(0\leqslant h(Q)\leqslant Q\). For any \(r\in {\mathbb {N}}\) we let

$$\begin{aligned} C_r=\Gamma (r+1)/(2^{r/2}\Gamma (1+r/2)) \ \text { and } \ \mathcal {E}_\mathcal {P}(\mathcal {A},h,r):=\sum _{\begin{array}{c} Q\in {\mathbb {N}}, \mu (Q)^2=1 \\ p\mid Q\Rightarrow p\in \mathcal {P}\\ \omega (Q)\leqslant r \end{array}} \bigg | \mathcal {A}_Q-\frac{h(Q)}{Q} y\bigg | . \end{aligned}$$

Defining

$$\begin{aligned}\mu _\mathcal {P}(h):=\sum _{p\in \mathcal {P}} \frac{h(p)}{p} \ \text { and } \ \sigma _\mathcal {P}(h):=\bigg (\sum _{p\in \mathcal {P}} \frac{h(p)}{p}\Big (1-\frac{h(p)}{p}\Big )\bigg )^{1/2}, \end{aligned}$$

we have uniformly for all \(r\leqslant \sigma _\mathcal {P}(h)^{2/3}\) that

$$\begin{aligned}&\sum _{a\in \mathcal {A}} \big (\sharp \{ p\in \mathcal {P}:p\mid a\}-\mu _\mathcal {P}(h)\big )^r \nonumber \\&=C_r y \sigma _\mathcal {P}(h)^r +O( C_r y \sigma _\mathcal {P}(h)^{r-2} r^3 + \mu _\mathcal {P}(h)^r \mathcal {E}_\mathcal {P}(\mathcal {A},h,r)) \end{aligned}$$
(3.12)

if r is even, and

$$\begin{aligned} \sum _{a\in \mathcal {A}} \big (\sharp \{ p\in \mathcal {P}:p\mid a\}-\mu _\mathcal {P}(h)\big )^r\ll C_r y \sigma _\mathcal {P}(h)^{r-1} r^{3/2}+ \mu _\mathcal {P}(h)^r \mathcal {E}_\mathcal {P}(\mathcal {A},h,r)\nonumber \\ \end{aligned}$$
(3.13)

if r is odd.

We apply this result to study the moments of \( \omega _\pi ^\flat (x,B)\).

Proposition 3.9

Fix a positive integer r and let \(t_0(B)\) and \(t_1(B)\) be given by

$$\begin{aligned} t_0(B):=(\log \log B)^{2r} \ \text { and } \ t_1(B)=B^{\frac{1}{5r(n+1)}} . \end{aligned}$$
(3.14)

Then we have

figure a

Proof

We apply Lemma 3.8 with

$$\begin{aligned} \mathcal {A}:=\Big \{a_x := \prod _{\begin{array}{c} p \text { prime }\\ \pi ^{-1}(x)({\mathbb {Q}}_p)=\emptyset \end{array}} \,\, p{:} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B, \pi ^{-1}(x) \ \text {smooth}\Big \}. \end{aligned}$$

Lemma 3.1 ensures that \(a_x\) is well-defined. The key property of \(a_x\) is that for any square-free Q we have

$$\begin{aligned} Q\mid a_x \iff (p\mid Q \Rightarrow \pi ^{-1}(x)({\mathbb {Q}}_p)=\emptyset ). \end{aligned}$$

Therefore, if we let

$$\begin{aligned}&\mathcal {P}:=\{p \in (t_0,t_1]:p \text { prime}\}, h(Q):=Q\prod _{p \mid Q} \sigma _p, \\&\quad y:=\sharp \{x \in {\mathbb {P}}^n({\mathbb {Q}}): H(x)\leqslant B, \pi ^{-1}(x)\, \text { smooth}\}, \end{aligned}$$

then

$$\begin{aligned}\mathcal {A}_Q-\frac{h(Q)}{Q} y= \Bigg (\sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}) \\ H(x)\leqslant B\\ \pi ^{-1}(x) \text { smooth} \end{array}}\prod _{p \mid Q}\theta _{p}(x)\Bigg ) -\Big (\prod _{p\mid Q} \sigma _p\Big ) y.\end{aligned}$$

Note that \(y=c_nB^{n+1}+O(B^n (\log B)^{[1/n]})\); indeed

$$\begin{aligned}&\sharp \{x \in {\mathbb {P}}^n({\mathbb {Q}}): H(x)\leqslant B, \pi ^{-1}(x) \text { singular}\}\\&\qquad \leqslant \sharp \{x \in {\mathbb {P}}^n({\mathbb {Q}}): H(x)\leqslant B, f(x) = 0\} \ll B^{n} \end{aligned}$$

by Lemma 3.2 and [21, Thm. 13.4]. To study \(\mathcal {E}_\mathcal {P}(\mathcal {A},h,r)\) we use this and Lemma 3.3 to show that if Q is square-free and is divided only by primes \(p>A\), then

$$\begin{aligned} \mathcal {A}_Q-\frac{h(Q)}{Q} y= & {} \Bigg (\sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}) \\ H(x)\leqslant B\\ \pi ^{-1}(x) \text { smooth} \end{array}} \prod _{p \mid Q}\theta _{p}(x)\Bigg )-\Big (\prod _{p\mid Q} \sigma _p\Big ) c_n B^{n+1}\\&+O\Bigg ( d^{\omega (Q)} \frac{B^n (\log B)^{[1/n]}}{Q}\Bigg ). \end{aligned}$$

We can now employ Proposition 3.4 and Lemma 3.7 to see that

$$\begin{aligned}&\sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}) \\ H(x)\leqslant B\\ \pi ^{-1}(x) \text { smooth} \end{array}}\prod _{p \mid Q}\theta _{p}(x)- \Big (\prod _{p\mid Q} \sigma _p\Big ) c_n B^{n+1} \\&\ll \frac{B^{n+1}(2\alpha d)^{\omega (Q)}}{Q \min \{p: p\mid Q\}}+(4d)^{\omega (Q)}( Q^{2n+1} B + Q B^n(\log B)^{[1/n]} ). \end{aligned}$$

Noting that \(A^{\omega (Q)}/Q\ll Q^{-0.9}\ll Q^{0.9}\ll (4d)^{\omega (Q)}Q\) we deduce that

$$\begin{aligned} \Bigg |\mathcal {A}_Q-\frac{h(Q)}{Q} y\Bigg | \ll \frac{B^{n+1}(2\alpha d)^{\omega (Q)}}{Q \min \{p: p\mid Q\}} +(4d)^{\omega (Q)}( Q^{2n+1} B + Q B^n(\log B)^{[1/n]} ). \end{aligned}$$

For any square-free Q that is divisible by at most r primes, all lying in \((t_0,t_1]\), we have \(Q\leqslant t_1^r\). Therefore, in the notation of Lemma 3.8 we have

$$\begin{aligned}&\mathcal {E}_\mathcal {P}(\mathcal {A},h,r)\ll _r B^{n+1} \left( \sum _{\begin{array}{c} Q\in {\mathbb {N}}, \mu (Q)^2=1 \\ p\mid Q\Rightarrow p\in \mathcal {P}\\ \omega (Q)\leqslant r \end{array}} \frac{1}{Q \min \{p: p\mid Q\}}\right) \\&\qquad \qquad \qquad \qquad \quad + (t_1^{r(2n+1)} B + t_1^r B^n(\log B)^{[1/n]} ) t_1^r , \end{aligned}$$

where we used the estimate

$$\begin{aligned}\sum _{\begin{array}{c} Q\in {\mathbb {N}}, \mu (Q)^2=1 \\ \omega (Q)\leqslant r, p\mid Q\Rightarrow p\in \mathcal {P} \end{array}} 1 \leqslant \sharp \{Q\in {\mathbb {N}}:Q\leqslant t_1^r\} =t_1^r. \end{aligned}$$

Writing \(Q=p_1\cdots p_r\) with \(p_i<p_{i+1}\) we have

$$\begin{aligned}&\sum _{\begin{array}{c} Q\in {\mathbb {N}}, \mu (Q)^2=1 \\ \omega (Q)\leqslant r, p\mid Q\Rightarrow p\in \mathcal {P} \end{array}} \frac{1}{Q \min \{p: p\mid Q\}}\\&\quad =\sum _{t_0<p_r\leqslant t_1}\frac{1}{p_r} \sum _{t_0<p_{r-1}<p_r}\frac{1}{p_{r-1}}\cdots \sum _{t_0<p_{2}<p_3}\frac{1}{p_{2}} \sum _{t_0<p_{1}<p_2}\frac{1}{p_{1}^2}, \end{aligned}$$

which can be seen to be \(\ll \frac{(\log \log t_1)^{r-1}}{t_0}\) due to \(\sum _{p\leqslant t_1} p^{-1}\ll \log \log t_1\) and \(\sum _{p> t_0} p^{-2}\ll t_0^{-1}\). Using assumption (3.14) we obtain

$$\begin{aligned}\mathcal {E}_\mathcal {P}(\mathcal {A},h,r)&\ll _{r} \frac{B^{n+1} (\log \log B)^{r-1} }{t_0} + (t_1^{r(2n+1)} B + t_1^r B^n(\log B)^{[1/n]} ) t_1^r \\&\ll _{r} B^{n+1} (\log \log B)^{-r-1} +B^{n+1/2} \\&\ll _{r} B^{n+1} (\log \log B)^ {-r-1} . \end{aligned}$$

Define

$$\begin{aligned} {\hat{\mu }}(B):=\sum _{t_0<p\leqslant t_1} \sigma _p \ \quad \text { and } \quad \ {\hat{\sigma }}(B):=\left( \sum _{t_0<p\leqslant t_1} (\sigma _p-\sigma _p^2)\right) ^{1/2}. \end{aligned}$$

Note that by (3.10)–(3.11) and (3.14) we have

$$\begin{aligned} {\hat{\mu }}(B)=\Delta (\pi ) \log \log B+O (\log \log \log \log B).\end{aligned}$$
(3.17)

Furthermore, Lemma 3.3 shows that \(\sum _p \sigma _p^2=O(1)\), hence

$$\begin{aligned} {\hat{\sigma }}(B)^2={\hat{\mu }}(B)+O_{r} (1). \end{aligned}$$

By (3.17) we get \({\hat{\sigma }}(B)=(\Delta (\pi ) \log \log B)^{1/2} (1+O_r((\log \log \log \log B)/\log \log B))^{1/2} \), hence using the estimate \((1+\epsilon )^{1/2}=1+O(\epsilon )\) that is valid for all \(0<\epsilon <1\), we obtain

$$\begin{aligned} {\hat{\sigma }}(B) =(\Delta (\pi ) \log \log B)^{1/2}+O_r\left( \frac{\log \log \log \log B}{(\log \log B)^{1/2}}\right) . \end{aligned}$$
(3.18)

We therefore see that the error term in (3.12) is

$$\begin{aligned}\ll _{r} B^{n+1} (\log \log B)^{r/2-1} + B^{n+1} (\log \log B)^{-1} \ll _{r} B^{n+1} (\log \log B)^{r/2-1} . \end{aligned}$$

Noting that

$$\begin{aligned}\sum _{a\in \mathcal {A}} \big (\sharp \{ p\in \mathcal {P}:p\mid a\}-\mu _\mathcal {P}(h)\big )^r=\sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ \pi ^{-1}(x) \text { smooth} \end{array}} \omega _\pi ^\flat (x,B)^{r} \end{aligned}$$

establishes

$$\begin{aligned}\frac{\mathcal {M}^\flat _r(\pi , B)}{c_n B^{n+1}}=\mu _r \frac{{\hat{\sigma }}(B)^r}{(\Delta (\pi )\log \log B)^{r/2}} +O_{r} \Big ( \frac{1}{\log \log B}\Big ) . \end{aligned}$$

The proof of (3.15) can now be concluded by using (3.18) to verify

$$\begin{aligned} \frac{{\hat{\sigma }}(B)^r}{(\Delta (\pi )\log \log B)^{r/2}}&=\Bigg (1+O_r \Bigg (\frac{\log \log \log \log B}{\log \log B}\Bigg )\Bigg )^{r/2} \\&=1+O_r \Bigg (\frac{\log \log \log \log B}{\log \log B}\Bigg ) .\end{aligned}$$

The proof of (3.16) can be performed in an entirely analogous manner by using (3.13). \(\square \)

3.4 Proof of Theorem 1.3

We first require the following preparatory lemma.

Lemma 3.10

Let y(B), z(B) be two functions satisfying

$$\begin{aligned} z(B)>1, \lim _{B\rightarrow \infty } y(B)= \infty \ \quad \text {and}\quad \ \lim _{B\rightarrow \infty } \frac{\log y(B)}{\log B}=0 .\end{aligned}$$

Let \(m\in {\mathbb {Z}}_{\geqslant 0}\) and let \(F\in {\mathbb {Z}}[x_0,\ldots ,x_n]\) be a primitive homogeneous polynomial. Then

$$\begin{aligned} \sum _{\begin{array}{c} x\in {\mathbb {P}}^n({\mathbb {Q}})\\ H(x)\leqslant B\\ F(x)\ne 0 \end{array}} \Big (z(B)+\sum _{\begin{array}{c} p\mid F(x)\\ p\leqslant y(B) \end{array}}1\Big )^m \ll _{F,m} B^{n+1}(z(B)+\log \log y(B))^m .\end{aligned}$$

Proof

It suffices to show that for every \(r\in {\mathbb {Z}}\cap [0,m]\) we have

$$\begin{aligned} \sum _{\begin{array}{c} x\in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B \\ F(x)\ne 0 \end{array}} \left( \sum _{\begin{array}{c} p\mid F(x)\\ p\leqslant y(B) \end{array}}1\right) ^r \ll _{F,r} B^{n+1}(\log \log y(B))^r , \end{aligned}$$
(3.19)

as the result will then easily follow from the binomial theorem. We have

$$\begin{aligned} \sum _{\begin{array}{c} x\in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B \\ F(x)\ne 0 \end{array}} \left( \sum _{\begin{array}{c} p\mid F(x)\\ p\leqslant y(B) \end{array}}1\right) ^r \leqslant \sum _{p_1,\ldots ,p_r\leqslant y(B)} \sum _{\begin{array}{c} x\in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B \\ 1\leqslant i \leqslant r \Rightarrow p_i \mid F(x) \end{array}} 1 . \end{aligned}$$

Letting Q be the least common multiple of the primes \(p_1,\ldots ,p_r\) we see that \(\omega (Q)\leqslant r\) and \(\mu (Q)^2=1\). Furthermore, for every \(Q\in {\mathbb {N}}\) having these two properties there are at most \(r^r\) vectors \((p_1,\ldots ,p_r)\) with every prime \(p_i\) satisfying \(p_i\leqslant y(B)\) and with Q being the least common multiple of the \(p_i\). This is because for each \(1\leqslant i \leqslant r\) the prime \(p_i\) must divide Q, so the number of available \(p_i\) is at most \(\omega (Q)\leqslant r\). This shows that

$$\begin{aligned} \sum _{p_1,\ldots ,p_r\leqslant y(B)} \sum _{\begin{array}{c} x\in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B \\ 1\leqslant i \leqslant r \Rightarrow p_i \mid F(x) \end{array}} 1\ll _r \sum _{\begin{array}{c} Q\in {\mathbb {N}}\\ \omega (Q)\leqslant r \end{array}} \mu (Q)^2 \sum _{\begin{array}{c} x\in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B \\ Q \mid F(x) \\ p\mid Q \Rightarrow p\leqslant y(B) \end{array}} 1 . \end{aligned}$$

Letting

$$\begin{aligned} \Upsilon = \{x \in {\mathbb {P}}^n({\mathbb {Z}}/Q{\mathbb {Z}}): F(x)\equiv 0 \bmod Q\} \end{aligned}$$

we may obtain the following via Lemma 2.2 and following similar steps as in the proof of Lemma 3.3,

$$\begin{aligned}&\sharp \Upsilon =\prod _{p\mid Q} \sharp \{x \in {\mathbb {P}}^n({\mathbb {F}}_p): F(x)= 0 \} \leqslant \prod _{p\mid Q} ( \deg F \cdot \sharp {\mathbb {P}}^{n-1}({\mathbb {F}}_p) ) \\&\quad \leqslant Q^{n-1} (2\deg F)^{\omega (Q)} \ll _r Q^{n-1} . \end{aligned}$$

Noting that the assumption \(\log y(B)=o(\log B)\) shows that \(y(B)\ll _\epsilon B^\epsilon \) for every \(\epsilon >0\). Hence, we have \(Q\leqslant y(B)^r\ll _\epsilon B^\epsilon \) and invoking Proposition 2.1 with (2.2) we obtain

$$\begin{aligned}&\sum _{\begin{array}{c} x\in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B \\ Q \mid F(x) \end{array}} 1\ll _{\epsilon ,r} \frac{Q^{n-1} }{\sharp {\mathbb {P}}^n({\mathbb {Z}}/Q{\mathbb {Z}})} B^{n+1} + Q^n \left( B+\frac{B^n}{Q^{n}} (\log B)^{[1/n]} \right) \\&\qquad \qquad \qquad \qquad \quad \ll _{\epsilon ,r} \frac{1 }{Q} B^{n+1} +B^{n+\frac{1}{10}} , \end{aligned}$$

thus

$$\begin{aligned}&\sum _{\begin{array}{c} Q\in {\mathbb {N}}, \omega (Q)\leqslant r\\ p\mid Q \Rightarrow p\leqslant y(B) \end{array}} \mu (Q)^2 \sum _{\begin{array}{c} x\in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B \\ Q \mid F(x) \end{array}} 1\\&\qquad \ll _{\epsilon ,r} B^{n+1} \left( \sum _{\begin{array}{c} Q\in {\mathbb {N}}, \omega (Q)\leqslant r\\ p\mid Q \Rightarrow p\leqslant y(B) \end{array}} \frac{\mu (Q)^2}{Q}\right) +B^{n+\frac{1}{10}}\left( \sum _{\begin{array}{c} Q\in {\mathbb {N}}, \omega (Q)\leqslant r\\ p\mid Q \Rightarrow p\leqslant y(B) \end{array}} \mu (Q)^2\right) . \end{aligned}$$

The last sum over Q is at most \(y(B)^r \ll _\epsilon B^\epsilon \), while the previous satisfies

$$\begin{aligned} \sum _{\begin{array}{c} Q\in {\mathbb {N}}, \omega (Q)\leqslant r\\ p\mid Q \Rightarrow p\leqslant y(B) \end{array}} \frac{\mu (Q)^2}{Q} \leqslant \left( \sum _{p\leqslant y(B)}\frac{1}{p}\right) ^r \ll _r (\log \log y(B))^r.\end{aligned}$$

This verifies (3.19) and thus concludes the proof. \(\square \)

We begin the proof of Theorem 1.3 by noting that

$$\begin{aligned} \mathcal {M}_r(\pi , B)= \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ f(x)\ne 0 \end{array}} \left( \frac{ \omega _\pi (x) - \Delta (\pi )\log \log B }{\sqrt{\Delta (\pi )\log \log B}} \right) ^{r} +O_r(B^{n}(\log B)^r) .\nonumber \\ \end{aligned}$$
(3.20)

This is because by Lemma 3.1 we have

$$\begin{aligned} \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ \pi ^{-1}(x) \text { smooth} \\ f(x)=0 \end{array}} \left( \frac{ \omega _\pi (x) - \Delta (\pi )\log \log B }{\sqrt{\Delta (\pi )\log \log B}} \right) ^{r} \ll _r \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}) \\ H(x)\leqslant B \\ f(x) = 0 \end{array}} (\log B)^r \ll B^n (\log B)^r. \end{aligned}$$

We continue the proof of Theorem 1.3 by applying Proposition 3.9. For every x in the sum on the right side of (3.20), Lemma 3.1 shows that

$$\begin{aligned}&\omega _\pi (x)-\Delta (\pi ) \log \log B \\&\quad = \omega _\pi ^\flat (x,B) +\sum _{{p\leqslant t_0(B)}}\theta _p(x) +\sum _{{t_1(B)<p \ll B^D}}\theta _p(x) \\&\qquad + \Big (\Big \{ \sum _{t_0(B)<p\leqslant t_1(B)} \sigma _p \Big \} -\Delta (\pi ) \log \log B \Big ) .\end{aligned}$$

Owing to (3.17) the last term is \(\ll _{\mathcal {C},\epsilon _1} \log \log \log \log B\). Using Lemma 3.2 and the trivial bound \(0\leqslant \theta _p(x)\leqslant 1\) we see that

$$\begin{aligned} \sum _{p\leqslant t_0(B)}\theta _p(x) = \sum _{p\leqslant A}\theta _p(x) + \sum _{\begin{array}{c} p\mid f(x) \\ A<p\leqslant t_0(B) \end{array}}\theta _p(x) \ll 1+ \sum _{\begin{array}{c} p \mid f(x)\\ p\leqslant t_0(B) \end{array}} 1 . \end{aligned}$$

Observe that

$$\begin{aligned} m \in {\mathbb {Z}}{\setminus } \{0\}, z \in {\mathbb {R}}_{> 1} \Rightarrow \sharp \{p>z: p\mid m\} \leqslant \frac{\log |m|}{\log z} \end{aligned}$$
(3.21)

because \(z^{\sharp \{p>z: p\mid m\}}\leqslant \prod _{p\mid m} p\leqslant m\). Hence, whenever \(x\in {\mathbb {P}}^n({\mathbb {Q}})\) is such that \(H(x)\leqslant B\) and \(f(x)\ne 0\) we deduce by Lemma 3.2 that

$$\begin{aligned} \sum _{p>t_1(B)}\theta _p(x) = \sum _{\begin{array}{c} p|f(x)\\ p>t_1(B) \end{array}}\theta _p(x) \leqslant \sum _{\begin{array}{c} p|f(x)\\ p>t_1(B) \end{array}} 1 \leqslant \frac{\log |f(x)|}{\log t_1(B)} \ll \frac{\log B}{\ \log t_1(B)} \ll _{\epsilon _1} 1,\end{aligned}$$

where we used the fact that \(\log f(x)\ll \log H(x)\). We are thus led to the conclusion that for any x on the right side of (3.20) we have

$$\begin{aligned} \omega _\pi (x)-\Delta (\pi ) \log \log B =\omega _\pi ^\flat (x,B) +E_\pi (x,B) ,\end{aligned}$$

for some function \(E_\pi (x,B)\) satisfying

$$\begin{aligned} |E_\pi (x,B)|\ll _{\mathcal {C},\epsilon _1} \log \log \log \log B+ \sum _{\begin{array}{c} p \mid f(x), p\leqslant t_0(B) \end{array}} 1 . \end{aligned}$$
(3.22)

Therefore, we obtain for \(r\ne 0\) that

$$\begin{aligned} (\omega _\pi (x)-\Delta (\pi ) \log \log B)^r =\omega _\pi ^\flat (x,B)^r +\sum _{k=0}^{r-1} {r \atopwithdelims ()k} \omega _\pi ^\flat (x,B)^k E_\pi (x,B)^{r-k} . \end{aligned}$$

This allows the comparison with the “truncated moment” (3.9), to find via (3.20) that

$$\begin{aligned}&\big |\mathcal {M}_r(\pi , B)-\mathcal {M}_r^\flat (\pi , B)\big |\\ {}&\quad \ll _{r}\frac{B^n}{(\log B)^{-r}}+\sum _{k=0}^{r-1}\sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ f(x)\ne 0 \end{array}}\frac{\omega _\pi ^\flat (x,B)^k E_\pi (x,B)^{r-k} }{(\log \log B)^{r/2}}. \end{aligned}$$

By Cauchy’s inequality we see that the last sum is

$$\begin{aligned}&\ll _{r} \frac{1}{{(\log \log B)^{r/2}}} \sum _{k=0}^{r-1} \left( \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ f(x)\ne 0 \end{array}} \omega _\pi ^\flat (x,B)^{2k} \right) ^{1/2} \\&\qquad \times \left( \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B \\ f(x)\ne 0 \end{array}} E_\pi (x,B)^{2(r-k)} \right) ^{1/2}. \end{aligned}$$

We apply Proposition 3.9 with \(r=2k\) to obtain

$$\begin{aligned}&\big | \mathcal {M}_r(\pi , B)- \mathcal {M}_r^\flat (\pi , B) \big | \\&\quad \ll _r\frac{B^n}{(\log B)^{-r}}+\sum _{k=0}^{r-1}\frac{B^{(n+1)/2}}{(\log \log B)^{(r-k)/2}} \Big (\sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}})\\ H(x)\leqslant B\\ f(x)\ne 0 \end{array}}E_\pi (x,B)^{2(r-k)}\Big )^{1/2}. \end{aligned}$$

Recalling (3.22) and applying Lemma 3.10 with

$$\begin{aligned} m=2(r-k), \ z(B):=\log \log \log \log B \ \text { and } \ y(B):=t_0(B), \end{aligned}$$

we see that, in light of \(z(B)+\log \log y(B)\ll _r \log \log \log \log B \), one has

$$\begin{aligned} \frac{ \mathcal {M}_r(\pi , B)- \mathcal {M}_r^\flat (\pi , B) }{B^{n+1} } \ll _r \frac{(\log B)^r}{B}+\frac{\log \log \log \log B }{(\log \log B)^{1/2}} .\end{aligned}$$

We conclude that

$$\begin{aligned} \mathcal {M}_r(\pi , B)= \mathcal {M}_r^\flat (\pi , B)+ O_r \Big (B^{n+1} \frac{\log \log \log \log B }{(\log \log B)^{1/2}}\Big ) .\end{aligned}$$

An application of Proposition 3.9 completes the proof of Theorem 1.3. \(\square \)

3.5 Proof of Theorem 1.2

Lemma 3.11

There exists a set \(\mathcal {S} \subset \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\}\) with

$$\begin{aligned} \sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B, x\notin \mathcal {S}\}=O\Big (\frac{B^{n+1}}{(\log \log \log B)^2}\Big )\end{aligned}$$
(3.23)

and such that for all \(x\in \mathcal {S}\) we have

$$\begin{aligned} \frac{\omega _\pi (x)-\Delta (\pi ) \log \log B}{\sqrt{\Delta (\pi ) \log \log B}} = \frac{\omega _\pi (x)-\Delta (\pi ) \log \log H(x)}{\sqrt{\Delta (\pi ) \log \log H(x)}} +O\Big (\frac{1}{\sqrt{\log B}}\Big ) .\qquad \end{aligned}$$
(3.24)

Proof

Denote \(\Xi (B)=\log \log \log B\) and define

$$\begin{aligned} \mathcal {S}:= & {} \left\{ \begin{array}{cc} &{} x\in {\mathbb {P}}^n({\mathbb {Q}}): \begin{array}{l}\frac{B}{\log B}<H(x)\leqslant B, \pi ^{-1}(x) \text { smooth},\\ \Bigg |\frac{\omega _\pi (x)-\Delta (\pi ) \log \log B}{\sqrt{\Delta (\pi ) \log \log B}}\Bigg | \leqslant \Xi (B)\end{array} \end{array}\right\} .\end{aligned}$$

The cardinality of those \(x\in {\mathbb {P}}^n({\mathbb {Q}})\) with \(H(x)\leqslant B, \pi ^{-1}(x)\) smooth and

$$\begin{aligned} \Bigg |\frac{\omega _\pi (x)-\Delta (\pi ) \log \log B}{\sqrt{\Delta (\pi ) \log \log B}}\Bigg |>\Xi (B) \end{aligned}$$

is at most

$$\begin{aligned}\sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ \pi ^{-1}(x) \text { smooth} \end{array}} \left( \frac{ \omega _\pi (x) - \Delta (\pi )\log \log B }{\Xi (B)\sqrt{\Delta (\pi )\log \log B}} \right) ^{2} =\frac{c_n B^{n+1}}{\Xi (B)^2}(1+o(1))\ll \frac{B^{n+1}}{\Xi (B)^2}, \end{aligned}$$

where the case \(r=2\) of Theorem 1.3 has been used. This provides us with

$$\begin{aligned}\sharp \mathcal {S}=c_n B^{n+1}+O\Big (\frac{B^{n+1}}{\Xi (B)^2}\Big ).\end{aligned}$$

Now note that for all \(x\in {\mathbb {P}}^n({\mathbb {Q}})\) with \(B/\log B<H(x)\leqslant B\) we have

$$\begin{aligned} \log \log H(x)= \log \log B+O\Big (\frac{\log \log B}{\log B}\Big ) ,\end{aligned}$$

therefore \((\log \log H(x)/\log \log B)^{1/2}=1+O(1/\log B)\). Thus, for each such x we get

$$\begin{aligned} \frac{\omega _\pi (x)-\Delta (\pi ) \log \log B}{\sqrt{\Delta (\pi ) \log \log B}}= & {} \frac{\omega _\pi (x)-\Delta (\pi ) \log \log B}{\sqrt{\Delta (\pi ) \log \log H(x)}} \\&+ O\Bigg ( \frac{|\omega _\pi (x)-\Delta (\pi ) \log \log B|}{\log B\sqrt{\log \log B}} \Bigg ) . \end{aligned}$$

We deduce that if \(x\in \mathcal {S}\) then this is

$$\begin{aligned} \frac{\omega _\pi (x)-\Delta (\pi ) \log \log B}{\sqrt{\Delta (\pi ) \log \log H(x)}} + O\bigg ( \frac{\Xi (B)}{\log B} \bigg )&=\frac{\omega _\pi (x)-\Delta (\pi ) \log \log H(x)}{\sqrt{\Delta (\pi ) \log \log H(x)}} \\&\quad + O\bigg ( \frac{\sqrt{\log \log B}}{\log B}+\frac{\Xi (B)}{\log B} \bigg ),\end{aligned}$$

which is sufficient for our lemma. \(\square \)

We are now in place to prove Theorem 1.2. For \(z\in {\mathbb {R}}\) we denote the distribution function of the standard normal distribution by

$$\begin{aligned}\Phi (z):=\frac{1}{\sqrt{2\pi }} \int _{-\infty }^z \mathrm {e}^{-\frac{t^2}{\!2}} \mathrm {d}t .\end{aligned}$$

Recall the definition of the probability measure \(\nu _B\) in (1.4) and note that the set \({\mathbb {P}}^n({\mathbb {Q}})\) becomes a probability space once equipped with the measure \(\nu _B\). (The measure \(\nu _B\) is supported on the rational points of height at most B.) For any \(B\in {\mathbb {R}}_{\geqslant 3}\) we consider the random variable \( \texttt {X}_B\) defined on \({\mathbb {P}}^n({\mathbb {Q}})\) as follows,

$$\begin{aligned} \texttt {X}_B(x):={\left\{ \begin{array}{ll} \frac{\omega _\pi (x)-\Delta (\pi ) \log \log B}{\sqrt{\Delta (\pi ) \log \log B}}, &{} \pi ^{-1}(x) \text { smooth}, \\ 0, &{} \text {otherwise.} \end{array}\right. }\end{aligned}$$

For \(r\in {\mathbb {Z}}_{\geqslant 0}\) the r-th moment of \( \texttt {X}_B\) is by definition equal to

$$\begin{aligned}\int _{-\infty }^{+\infty } \texttt {X}_B^r \mathrm {d}\nu _B= \sum _{\begin{array}{c} x\in {\mathbb {P}}^n({\mathbb {Q}})\\ \pi ^{-1}(x) \text { smooth} \end{array}} \Big (\frac{\omega _\pi (x)-\Delta (\pi ) \log \log B}{\sqrt{\Delta (\pi ) \log \log B}}\Big )^r \frac{\nu _B(\{x\})}{\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\}} \end{aligned}$$

and recalling (1.5) we see that this coincides with \( \mathcal {M}_r(\pi ,B) / \sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\}\). Theorem 1.3 shows that

$$\begin{aligned} \lim _{B\rightarrow +\infty } \int _{-\infty }^{+\infty } \texttt {X}_B^r \mathrm {d}\nu _B \end{aligned}$$

exists and is equal to the r-th moment of the standard normal distribution. By [4, Th. 30.2] we get that \(\texttt {X}_B\) converges in law to the standard normal distribution, i.e. for every \(y \in {\mathbb {R}}\) we have

$$\begin{aligned} \lim _{B\rightarrow +\infty } \nu _B \left( \left\{ x \in {\mathbb {P}}^n({\mathbb {Q}}): \texttt {X}_B \leqslant y \right\} \right) =\Phi (y) .\end{aligned}$$
(3.25)

Next, for every fixed \(\epsilon >0,z\in {\mathbb {R}}\) and all sufficiently large B we see that the error term in (3.24) has modulus at most \(\epsilon \), therefore (3.24) gives

$$\begin{aligned} \nu _B \left( \left\{ x \in \mathcal {S}: \texttt {X}_B(x) \leqslant z-\epsilon \right\} \right) \leqslant \nu _B \left( \left\{ x \in \mathcal {S}: \frac{\omega _\pi (x)-\Delta (\pi ) \log \log H(x)}{\sqrt{\Delta (\pi ) \log \log H(x)}} \leqslant z \right\} \right) \nonumber \\ \end{aligned}$$
(3.26)

and

$$\begin{aligned} \nu _B \left( \left\{ x \in \mathcal {S}: \texttt {X}_B(x) \leqslant z+\epsilon \right\} \right) \geqslant \nu _B \left( \left\{ x \in \mathcal {S}: \frac{\omega _\pi (x)-\Delta (\pi ) \log \log H(x)}{\sqrt{\Delta (\pi ) \log \log H(x)}} \leqslant z\right\} \right) \nonumber \\ \end{aligned}$$
(3.27)

for all sufficiently large B. Observe that the set \(\mathcal {S}\) in Lemma 3.11 satisfies the following as \(B\rightarrow +\infty \) due to (3.23),

$$\begin{aligned} \nu _B(\mathcal {S})=1+O\Big (\frac{1}{(\log \log \log B)^2}\Big )=1+o(1) .\end{aligned}$$
(3.28)

In light of (3.25) this means that \( \lim _{B\rightarrow +\infty } \nu _B\left( \left\{ x \in \mathcal {S}: \texttt {X}_B \leqslant y\right\} \right) =\Phi (y),\) which, when applied to \(y=z-\epsilon \) and \(y=z+\epsilon \) and combined with (3.26) and (3.27), yields

$$\begin{aligned} \liminf _{B\rightarrow +\infty }\nu _B \left( \left\{ x \in \mathcal {S}: \frac{\omega _\pi (x)-\Delta (\pi ) \log \log H(x)}{\sqrt{\Delta (\pi ) \log \log H(x)}} \leqslant z \right\} \right) \geqslant \Phi (z-\epsilon ) \end{aligned}$$

and

$$\begin{aligned}\limsup _{B\rightarrow +\infty }\nu _B \left( \left\{ x \in \mathcal {S}: \frac{\omega _\pi (x)-\Delta (\pi ) \log \log H(x)}{\sqrt{\Delta (\pi ) \log \log H(x)}} \leqslant z \right\} \right) \leqslant \Phi (z+\epsilon ) . \end{aligned}$$

Letting \(\epsilon \rightarrow 0\) and using the fact that \(\Phi \) is continuous we obtain

$$\begin{aligned}\lim _{B\rightarrow +\infty }\nu _B \left( \left\{ x \in \mathcal {S}: \frac{\omega _\pi (x)-\Delta (\pi ) \log \log H(x)}{\sqrt{\Delta (\pi ) \log \log H(x)}} \leqslant z \right\} \right) = \Phi (z) , \end{aligned}$$

which, by (3.28) implies that

$$\begin{aligned}\lim _{B\rightarrow +\infty }\nu _B \left( \left\{ x \in {\mathbb {P}}^n({\mathbb {Q}}): \frac{\omega _\pi (x)-\Delta (\pi ) \log \log H(x)}{\sqrt{\Delta (\pi ) \log \log H(x)}} \leqslant z \right\} \right) = \Phi (z) .\end{aligned}$$

Since this holds for every fixed \(z\in {\mathbb {R}}\) it gives Theorem 1.2 as an immediate consequence. \(\square \)

4 The pseudo-split case

4.1 Proof of Theorem 1.7

We let \(\pi :V \rightarrow {\mathbb {P}}^n\) be as in Theorem 1.7 and choose a model for \(\pi \) as in Sect. 3.1.

4.1.1 Existence of the limit

We first prove the existence of (1.8) using the versions of the sieve of Ekedahl given in [14, §4.1], [2, §3] and [3, §3]. We begin with a strengthening of Lemma 3.2. (Here it is crucial that \(\Delta (\pi ) = 0\).)

Lemma 4.1

There exists a closed subset \(Z \subset {\mathbb {P}}_{\mathbb {Z}}^n\) of codimension at least 2 and a constant \(A > 0\) with the following property. Let \(p > A\) be a prime and \(x \in {\mathbb {P}}^n({\mathbb {Z}}_p)\) such that \(\pi ^{-1}(x)({\mathbb {Z}}_p) = \emptyset \). Then \(x \bmod p \in Z({\mathbb {F}}_p)\).

Proof

This is a special case of [14, Prop. 4.1]. \(\square \)

Lemma 4.2

Let A be as in Lemma 4.1 Then for every \(B,M> 1\) we have

$$\begin{aligned} \sharp \left\{ x\in {\mathbb {P}}^n({\mathbb {Q}}): \begin{array}{l} H(x)\leqslant B, \pi ^{-1}(x) \text { smooth}, \\ \exists p>M \text { s.t. } \pi ^{-1}(x)({\mathbb {Q}}_p)= \emptyset \end{array} \right\} \ll \frac{B^{n+1}}{M \log M} + B^n ,\end{aligned}$$

where the implied constant depends at most on A and \(\pi \).

Proof

This follows immediately from Lemma 4.1 and Bhargava’s effective version of the Ekedahl sieve [3, Thm. 3.3]. \(\square \)

We now prove a strengthening of Proposition 3.4 in the case \(\Delta (\pi ) = 0\). The crucial point about the next proposition is that it gives an asymptotic formula for a counting problem which has local conditions imposed at every place v, whereas Proposition 3.4 only imposes conditions at finitely many primes. In what follows we use the measures \(\vartheta _v\) from Sect. 2.2.

Proposition 4.3

Let S be a finite set of places of \({\mathbb {Q}}\). Then

$$\begin{aligned}&\lim _{B \rightarrow \infty } \frac{ \sharp \left\{ x\in {\mathbb {P}}^n({\mathbb {Q}}): \begin{array}{l} H(x)\leqslant B, \pi ^{-1}(x) \text { smooth}, \\ v \in S \!\Leftrightarrow \! \pi ^{-1}(x)({\mathbb {Q}}_v)= \emptyset \end{array} \right\} }{\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\}} \\&\quad = \begin{array}{l} \prod _{v \in S} \vartheta _v({\mathbb {P}}^n({\mathbb {Q}}_v){\setminus }\pi (V({\mathbb {Q}}_v)) \prod _{v \notin S}\vartheta _v(\pi (V({\mathbb {Q}}_v)), \end{array} \end{aligned}$$

where the right hand side is a convergent Euler product.

Moreover, let \(Q \in {\mathbb {N}}\) be square-free. Then there exists \(K_{0}>0\) such that

$$\begin{aligned}&\sharp \left\{ x\in {\mathbb {P}}^n({\mathbb {Q}}): \begin{array}{l} H(x)\leqslant B, \pi ^{-1}(x) \text { smooth},\\ \pi ^{-1}(x)({\mathbb {Q}}_p)= \emptyset \, \forall \,p \mid Q \end{array} \right\} \nonumber \\&\qquad \ll K_0^{\omega (Q)} \left( \frac{B^{n+1}}{Q^{2}} + BQ^{n-1} + \frac{B^n \log B}{Q} \right) . \end{aligned}$$
(4.1)

Proof

The asymptotic formula is proved using an adaptation of [2, Thm. 3.8], via the version of the sieve of Ekedahl given in [2, Prop. 3.4]. That the condition (3.5) from [2, Prop 3.4] is satisfied follows from Lemma 4.1 and [2, Lem. 3.5]. If \(\pi (V({\mathbb {Q}}_v)) \ne \emptyset \) then [2, Lem. 3.9] implies that \(\pi (V({\mathbb {Q}}_v))\) is measurable, has positive measure and has boundary of measure 0. Moreover \(\pi (V({\mathbb {Q}}_v)) \subset {\mathbb {P}}^n({\mathbb {Q}}_v)\) is closed as \(\pi \) is proper. It follows that \({\mathbb {P}}^n({\mathbb {Q}}_v){\setminus }\pi (V({\mathbb {Q}}_v))\) is measurable, has boundary of measure 0, and has positive measure if non-empty. Therefore the measurability hypotheses in [2, Prop. 3.4] are all satisfied. Applying [2, Prop. 3.4] gives the asymptotic formula. (Note that [2, Lem. 4.8] works with the Haar measure on \({\mathbb {Q}}_v^{n+1}\), whereas in the statement we use the measure \(\vartheta _v\). One easily obtains our statement using Lemma 2.3.)

Next, by the Lang–Weil estimates there exists \(K_{0}>0\) such that \( \sharp Z({\mathbb {F}}_p)\leqslant ~K_{0}~p^{n-2} \) for all p. Therefore we have \( \sharp Z({\mathbb {Z}}/Q{\mathbb {Z}}) \leqslant K_{0}^{\omega (Q)} Q^{n-2} .\) Lemma 4.1 and Proposition 2.1 now show that the left side of (4.1) is

$$\begin{aligned}&\ll \sharp \left\{ x\in {\mathbb {P}}^n({\mathbb {Q}}): \begin{array}{l} H(x)\leqslant B, \pi ^{-1}(x) \text { smooth}, \\ p \mid Q \Rightarrow x \bmod p \in Z({\mathbb {F}}_p) \end{array} \right\} \\&\ll \frac{\sharp Z({\mathbb {Z}}/Q{\mathbb {Z}})}{\sharp {\mathbb {P}}^n({\mathbb {Z}}/Q{\mathbb {Z}})} B^{n+1} + Q\sharp Z({\mathbb {Z}}/Q{\mathbb {Z}})\left( B+ \frac{B^n}{Q^{n}} \log B\right) \\&\ll K_0^{\omega (Q)}Q^{-2} B^{n+1} + K_0^{\omega (Q)} Q^{n-1}B + K_0^{\omega (Q)}Q^{-1} B^n \log B. \end{aligned}$$

\(\square \)

We now show the existence of the limit (1.8). In fact, we prove the following explicit formula. (Recall the definition of \(\tau _\pi (B,j)\) from (1.7).)

Proposition 4.4

We have

$$\begin{aligned}&\tau _\pi (j) : =\lim _{B\rightarrow \infty } \tau _\pi (B,j) \\&\quad = \sum _{p_1<p_2<\cdots <p_j} \prod _{p\mid p_1\cdots p_j} \vartheta _p({\mathbb {P}}^n({\mathbb {Q}}_{p}) {\setminus } \pi (V({\mathbb {Q}}_{p})) \prod _{p\not \mid p_1\cdots p_j} \vartheta _p(\pi (V({\mathbb {Q}}_p)), \end{aligned}$$

where the sum and products are convergent.

Proof

If \(Q\in [1,B^{1/3})\) is a square-free integer then one can immediately see from (4.1) that

$$\begin{aligned} \sharp \left\{ x\in {\mathbb {P}}^n({\mathbb {Q}}): \begin{array}{l} H(x)\leqslant B, \pi ^{-1}(x) \text { smooth}, \\ p \mid Q \Rightarrow \pi ^{-1}(x)({\mathbb {Q}}_p)= \emptyset \end{array} \right\} \ll \frac{K_{0}^{\omega (Q)}}{Q^2} B^{n+1} . \end{aligned}$$
(4.2)

Combining the upper bound and the asymptotic provided by Proposition 4.3 one sees that for every square-free \(Q\ne 0\) we have

$$\begin{aligned} \prod _{p \mid Q} \vartheta _p({\mathbb {P}}^n({\mathbb {Q}}_p) \setminus \pi (V({\mathbb {Q}}_p)) \prod _{p \not \mid Q}\vartheta _p(\pi (V({\mathbb {Q}}_p)) \ll \frac{K_{0}^{\omega (Q)}}{Q^2} , \end{aligned}$$
(4.3)

with an implied constant independent of Q. Fix any \(M>1\). By Lemma 4.2 we see that

$$\begin{aligned} \tau _\pi (B,j)= & {} \frac{ \sharp \left\{ x\in {\mathbb {P}}^n({\mathbb {Q}}): \begin{array}{l} H(x)\leqslant B, \pi ^{-1}(x) \text { smooth}, \omega _\pi (x)=j,\\ \pi ^{-1}(x)({\mathbb {Q}}_p)= \emptyset \Rightarrow p\leqslant M \end{array} \right\} }{\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\}} \\&+O\left( \frac{1}{M \log M} + \frac{1}{B}\right) , \end{aligned}$$

with an implied constant that is independent of jM and B. We infer that \(\tau _\pi (B,j)\) equals

$$\begin{aligned}&\sum _{p_1<p_2<\cdots <p_j\leqslant M} \frac{ \sharp \left\{ x\in {\mathbb {P}}^n({\mathbb {Q}}): \begin{array}{l} H(x)\leqslant B, \pi ^{-1}(x) \text { smooth}, \\ \pi ^{-1}(x)({\mathbb {Q}}_p)= \emptyset \!\Leftrightarrow \! p\mid p_1\cdots p_j \end{array} \right\} }{\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\}} \\&\qquad + O\left( \frac{1}{M \log M} + \frac{1}{B}\right) . \end{aligned}$$

Fixing the value of M and taking the limit as \(B\rightarrow \infty \), we see from Proposition 4.3 that

$$\begin{aligned} \limsup _{B\rightarrow \infty } \Bigg | \tau _\pi (B,j) -\sum _{p_1<\cdots <p_j\leqslant M} \prod _{p\mid p_1\cdots p_j}\vartheta _p({\mathbb {P}}^n({\mathbb {Q}}_{p}){\setminus }\pi (V({\mathbb {Q}}_{p})) \prod _{p\not \mid p_1\cdots p_j} \vartheta _p(\pi (V({\mathbb {Q}}_p)) \Bigg | \ll \frac{1}{M} .\nonumber \\ \end{aligned}$$
(4.4)

Note that the infinite series

$$\begin{aligned}&\sum _{p_1<p_2<\cdots <p_j}\prod _{p\mid p_1\cdots p_j}\vartheta _p({\mathbb {P}}^n({\mathbb {Q}}_{p}) {\setminus }\pi (V({\mathbb {Q}}_{p})) \prod _{p\not \mid p_1\cdots p_j} \vartheta _p(\pi (V({\mathbb {Q}}_p)) \end{aligned}$$

converges owing to the bound

$$\begin{aligned}&\prod _{p\mid p_1\cdots p_j}\vartheta _p({\mathbb {P}}^n({\mathbb {Q}}_{p}) \setminus \pi (V({\mathbb {Q}}_{p})) \prod _{p\not \mid p_1\cdots p_j} \vartheta _p(\pi (V({\mathbb {Q}}_p)) \nonumber \\&\quad \ll \frac{K_{0}^j}{(p_1\cdots p_j)^2} , \end{aligned}$$
(4.5)

that follows from (4.3). Taking M to be arbitrarily large in (4.4) proves the result. \(\square \)

4.1.2 Probability measure

We now show that (1.8) indeed defines a probability measure on \({\mathbb {Z}}\). To do so, it suffices to show that

$$\begin{aligned} \sum _{j \in {\mathbb {Z}}} \tau _\pi (j) = 1. \end{aligned}$$
(4.6)

Partitioning all possible values for \(\omega _\pi (x)\) we have

$$\begin{aligned}&\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B, \pi ^{-1}(x) \text { smooth}\}\\&\qquad =\sum _{j=0}^\infty \sharp \left\{ x\in {\mathbb {P}}^n({\mathbb {Q}}): \begin{array}{l} H(x)\leqslant B, \omega _\pi (x)=j, \\ \pi ^{-1}(x) \text { smooth} \end{array} \right\} .\end{aligned}$$

Fix \(j_0 \in {\mathbb {N}}\) and note that if \(\omega _\pi (x)>j_0\) then the largest prime p such that \(\pi ^{-1}(x)({\mathbb {Q}}_p)=\emptyset \) exceeds the \(j_0\)-th largest prime, therefore it is at least \(j_0\). This shows that

$$\begin{aligned} \sum _{j> j_0}&\sharp \left\{ x\in {\mathbb {P}}^n({\mathbb {Q}}): \begin{array}{l} H(x)\leqslant B, \omega _\pi (x)=j, \\ \pi ^{-1}(x) \text { smooth} \end{array} \right\} \\ \leqslant&\sharp \left\{ x\in {\mathbb {P}}^n({\mathbb {Q}}): \begin{array}{l} H(x)\leqslant B, \pi ^{-1}(x) \text { smooth}, \\ \exists p>j_0 \text { s.t. } \pi ^{-1}(x)({\mathbb {Q}}_p)= \emptyset \end{array} \right\} \end{aligned}$$

which is \(O(B^{n+1} j_0^{-1} + B^n)\) by Lemma 4.2. Dividing by \(\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\}\) gives

$$\begin{aligned} \frac{\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B, \pi ^{-1}(x) \text { smooth}\}}{\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\}} =\sum _{0\leqslant j \leqslant j_0} \tau _\pi (B,j) +O\left( \frac{1}{j_0} + \frac{1}{B}\right) ,\end{aligned}$$

with an implied constant that is independent of \(j_0\). Letting \(B\rightarrow \infty \) we obtain

$$\begin{aligned}\sum _{0\leqslant j \leqslant j_0} \tau _\pi (j) = 1 +O\left( \frac{1}{j_0}\right) .\end{aligned}$$

Letting \(j_0\rightarrow \infty \) we infer that the sum over j converges to 1, thus verifying (4.6).

4.1.3 Upper bounds

We now prove (1.9). Combining (4.5) and Proposition 4.4 shows that

$$\begin{aligned} \tau _\pi (j) = \lim _{B\rightarrow \infty } \tau _\pi (j,B) \ll _\pi K_{0}^j \sum _{p_1<\ldots <p_j} \frac{1}{p_1^{2} \cdots p_j^{2}} .\end{aligned}$$

Let us denote the primes in ascending order as \(q_1=2,q_2=3,\) etc. Writing

$$\begin{aligned} K_{0}^j \sum _{p_1<\ldots <p_j} \frac{1}{p_1^{2} \cdots p_j^{2}} = \sum _{p_1\geqslant 2} \frac{K_{0}}{p_1^{2}} \sum _{p_2>p_1} \frac{K_{0}}{p_2^{2}} \cdots \sum _{p_j>p_{j-1}} \frac{K_{0}}{p_j^{2}} , \end{aligned}$$

we observe that the sum over \(p_2\) contains all primes \(p\geqslant q_2\), the sum over \(p_3\) contains all primes \(p\geqslant q_3\) and so on. Therefore, one has

$$\begin{aligned} \tau _\pi (j) \ll \prod _{i=1}^j \left( \sum _{p\geqslant q_i} \frac{K_{0}}{p^2} \right) . \end{aligned}$$

By the prime number theorem and partial summation we see that \( \sum _{p\geqslant z}p^{-2} \leqslant c_0/(z\log z) \) for some absolute \(c_0>1\), thus \(\tau _\pi (j) \prod _{i=1}^j (q_i \log q_i) \ll (c_0 K_{0})^j \). Using \(q_i\sim i \log i\) and the prime number theorem with partial summation we obtain

$$\begin{aligned} \log \left( \prod _{i=1}^j q_i \log q_i \right)&= \sum _{p\leqslant q_j} \log p + \sum _{p\leqslant q_j} \log \log p \\&=q_j +O\left( \frac{q_j }{\log q_j}\right) + \frac{q_j \log \log q_j}{\log q_j} +O\left( \frac{q_j \log \log q_j}{(\log q_j)^2}\right) \\&= j \log j+ j \log \log j+ o(j \log \log j ) \\&\geqslant j \log j +\frac{3}{4} j \log \log j, \end{aligned}$$

for all sufficiently large j. We deduce that for all large j one has

$$\begin{aligned}\tau _\pi (j) \leqslant (c_0 K_{0})^j \prod _{i=1}^j \frac{1}{q_i \log q_i} \leqslant \frac{(c_0 K_0 )^j}{ j^j (\log j)^{\frac{3j}{4}}} \leqslant \frac{1}{j^j(\log j)^{j/2}} , \end{aligned}$$

from which (1.9) follows. This completes the proof of Theorem 1.7. \(\square \)

4.2 The family of diagonal cubic surfaces

We now return to Example 1.9, and prove the claim that there exists an absolute constant \(c>0\) such that \(\tau _\pi (j) > c (1+j)^{-3j}\).

Let \(y = (y_0:y_1:y_2:y_3) \in {\mathbb {P}}^3({\mathbb {Z}}_p)\) where \((y_0,\dots ,y_3)\) is primitive. By the criterion in [7, p.28], if a prime \(p\equiv 1\bmod {3}\) satisfies \(p\not \mid y_0y_1\), \(p\Vert y_2\), \(p \Vert y_3\) and neither \(-y_1/y_0\) nor \(-y_3/y_2\) are cubes, then \(\pi ^{-1}(y)\) has no p-adic point. It is easy to see that there exists an absolute constant \(K_1>0\) such that the measure of this with respect to \(\vartheta _p\) is at least \(K_1p^{-2}\). Hence, denoting by \(q_i\) the i-th largest prime being \(1\bmod {3}\), Proposition 4.4 gives

$$\begin{aligned} \tau _\pi (j) \geqslant K_2\prod _{i=1}^j \frac{K_1}{q_i^{2}}, \end{aligned}$$

for some constant \(K_2>0\) (the product in Proposition 4.4 being convergent). By the prime number theorem for arithmetic progressions we have \(q_i \sim 2 i \log i \), hence

$$\begin{aligned} \log \tau _\pi (j)^{-1} \leqslant -\log K_2 -j (\log K_1)+2 \sum _{\begin{array}{c} p\leqslant (2 j \log j)(1+o(1))\\ p\equiv 1 \bmod 3 \end{array}} \log p =(2 j \log j)(1+o(1)) \leqslant 3j \log j \end{aligned}$$

for all sufficiently large j. This proves the claim. \(\square \)

4.3 Proof of Theorem 1.10

The implication \(\Leftarrow \) is clear. For the other, assume that \(V({\mathbb {Q}}_p) \rightarrow {\mathbb {P}}^n({\mathbb {Q}}_p)\) is not surjective for infinitely many primes p. Let S be a finite set of such primes and let \(x_p \in {\mathbb {P}}^n({\mathbb {Q}}_p){\setminus }\pi (V({\mathbb {Q}}_p))\) for \(p \in S\). By Proposition 2.1, a positive proportion of \(x \in {\mathbb {P}}^n({\mathbb {Q}}_p)\) are arbitrarily close to the \(x_p\) for all \(p \in S\). Moreover, as \(\pi \) is proper the set \(\pi (V({\mathbb {Q}}_p))\) is closed with respect to the p-adic topology. It follows that provided the x are sufficiently close to the \(x_p\) we have \(\pi ^{-1}(x)({\mathbb {Q}}_p) = \emptyset \) for all \(p \in S\). Hence for such x we have \(\omega _\pi (x) \geqslant \sharp S\). As S can be chosen sufficiently large, the result follows. \(\square \)

4.4 Proof of Theorem 1.11

As shown in the proof of Proposition 4.3, the sets \(\pi (V({\mathbb {Q}}_v))\) and \({\mathbb {P}}^n({\mathbb {Q}}_v){\setminus }\pi (V({\mathbb {Q}}_v))\) are measurable with respect to \(\vartheta _v\), and have positive measure if non-empty. The result now follows as the Euler product in Proposition 4.3 is convergent. \(\square \)

4.5 Proof of Theorem 1.12

Let \(\mathcal {N}_{r}(\pi ,B)\) be as in (1.10). We begin with the following.

Lemma 4.5

For every \(r\in {\mathbb {Z}}_{\geqslant 0}\) we have \( \mathcal {N}_{r}(\pi ,B) \ll _{r} B^{n+1} .\)

Proof

Recall f and A from Lemma 3.2. By Lemma 3.1 we have

$$\begin{aligned} \mathcal {N}_{r}(\pi ,B) = \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ f(x) \ne 0 \end{array}} \omega _\pi (x)^{r} + O\left( B^n(\log B)^r\right) , \end{aligned}$$

where we have used the evident bound \(\sharp \{ x \in {\mathbb {P}}^n({\mathbb {Q}}): H(x) \leqslant B, f(x) = 0\} \ll B^{n}\). For any \(\epsilon >0\) and any x with \(f(x) \ne 0\) we have via (3.21) that

$$\begin{aligned} \sharp \{p>B^\epsilon : \pi ^{-1}(x)({\mathbb {Q}}_p)=\emptyset \} \leqslant \sharp \{p>B^\epsilon :p \text { divides } f(x)\}\leqslant \frac{\log |f(x)| }{\log (B^\epsilon ) } . \end{aligned}$$

As \(H(x)\leqslant B\) implies \(|f(x)|\ll B^{\deg (f)}\), we thus find that

$$\begin{aligned} \omega _\pi (x)= O_\epsilon (1) +\sum _{A<p\leqslant B^\epsilon }\theta _p(x) .\end{aligned}$$

Let us now define \( \epsilon (r) :=(3r)^{-1} \). Then

$$\begin{aligned} \mathcal {N}_{r}(\pi ,B)&= \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ f(x) \ne 0 \end{array}} \left( O_{r}(1) + \sum _{A<p\leqslant B^{\epsilon (r)} }\theta _p(x) \right) ^r \\&\ll _{r} \sum _{m=0}^r \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ f(x) \ne 0 \end{array}} \left( \sum _{A<p\leqslant B^{\epsilon (r)}} \theta _p(x)\right) ^m . \end{aligned}$$

To prove the lemma it therefore suffices to show that

$$\begin{aligned} \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ f(x) \ne 0 \end{array}} \left( \sum _{A<p\leqslant B^{\epsilon (r)}}\theta _p(x)\right) ^m \ll _{m} B^{n+1} .\end{aligned}$$

Using the multinomial theorem the sum over x above equals

$$\begin{aligned} \sum _{ \begin{array}{c} (m_p)_{p\in (A,B^{\epsilon (r)}]} \\ \sum _{p\in (A,B^{\epsilon (r)}]}m_p=m \end{array}} \frac{m!}{\prod _{p\in (A,B^{\epsilon (r)}]}m_p! } \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ f(x) \ne 0 \end{array}} \prod _{\begin{array}{c} p\in (A,B^{\epsilon (r)}]\\ m_p\ne 0 \end{array}}\theta _p(x) . \end{aligned}$$

Letting k be the number of \(p\in (A,B^{\epsilon (r)}]\) with \(m_p\ne 0\), shows that the last quantity is

$$\begin{aligned} \ll _m \sum _{k=1}^m \sum _{A<p_1<p_2<\cdots <p_k\leqslant B^{\epsilon (r)}} \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ f(x) \ne 0 \end{array}} \prod _{i=1}^k \theta _{p_i}(x) . \end{aligned}$$

By (4.2) and the fact that \(k\leqslant m\leqslant r\) and \(\epsilon (r)\leqslant (3m)^{-1}\) we see that the inner sum over x is \( \ll B^{n+1} \prod _{i=1}^k (K_0 p_i^{-2}) \). We obtain that

$$\begin{aligned}&\sum _{A<p_1<p_2<\cdots<p_k\leqslant B^{\epsilon (r)}} \sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ f(x) \ne 0 \end{array}} \prod _{i=1}^k \theta _{p_i}(x) \\&\quad \ll B^{n+1} \sum _{A<p_1<p_2<\cdots <p_k\leqslant B^{\epsilon (r)}} \prod _{i=1}^k (K_0 p_i^{-2}) \ll B^{n+1} , \end{aligned}$$

thus concluding our proof. \(\square \)

Now observe that

$$\begin{aligned} \frac{\mathcal {N}_r(\pi , B)}{\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\}} =\sum _{j=0}^\infty j^r \tau _\pi (B,j). \end{aligned}$$
(4.7)

However, for any \(M>1\) we may use the inequality \( {\mathbf {1}}_{\{\omega _\pi (x)>M\}}(x) \leqslant \omega _\pi (x)/M\) to find that

$$\begin{aligned} \sum _{j>M} j^r \tau _\pi (B,j) = \frac{\sum _{\begin{array}{c} x \in {\mathbb {P}}^n({\mathbb {Q}}), H(x)\leqslant B\\ \pi ^{-1}(x) \text { smooth} \end{array}} \omega _\pi (x)^{r} {\mathbf {1}}_{\{\omega _\pi (x)>M\}}(x)}{\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\}} \ll \frac{\mathcal {N}_{r+1}(\pi ,B)}{M B^{n+1}}.\nonumber \\ \end{aligned}$$
(4.8)

We now infer from (4.7), (4.8) and Lemma 4.5 that

$$\begin{aligned} \left| \frac{\mathcal {N}_r(\pi , B)}{\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\}} -\sum _{0\leqslant j \leqslant M} j^r \tau _\pi (B,j) \right| \ll _{r} \frac{1}{M} , \end{aligned}$$
(4.9)

where the implied constant is independent of B and M. Fixing M and taking \(B\rightarrow \infty \) we are led to the conclusion that

$$\begin{aligned} \limsup _{B\rightarrow \infty } \left| \frac{\mathcal {N}_r(\pi , B)}{\sharp \{x\in {\mathbb {P}}^n({\mathbb {Q}}):H(x)\leqslant B\}} -\sum _{0\leqslant j \leqslant M} j^r \tau _\pi (j) \right| \ll \frac{1}{M} . \end{aligned}$$

By (1.9) the sum over j is convergent as \(M\rightarrow \infty \), which completes the proof. \(\square \)

4.6 Generalisations

One can consider variants of the function \(\omega _\pi \) from (1.2), by considering real solubility or by dropping conditions at finitely many primes. Namely, let S be a finite set of places of \({\mathbb {Q}}\). Then we define

$$\begin{aligned} \omega _{\pi ,S}(x) :=\sharp \big \{\text {places } v \notin S:\pi ^{-1}(x)({\mathbb {Q}}_v)=\emptyset \big \}. \end{aligned}$$

We have considered the case \(\omega _\pi = \omega _{\pi ,\infty }(x)\) for simplicity of exposition, but a minor variant of our arguments yields the following generalisation of Theorem 1.7 (the important point being that the asymptotic in Proposition 4.3 applies to arbitrary S).

Theorem 4.6

Let V be a smooth projective variety over \({\mathbb {Q}}\) equipped with a dominant morphism \(\pi : V \rightarrow {\mathbb {P}}^n\) with geometrically integral generic fibre and \(\Delta (\pi ) = 0\). Let S be a finite set of places of \({\mathbb {Q}}\) and \(j \in {\mathbb {Z}}\). Then the limit

$$\begin{aligned} \lim _{B\rightarrow \infty } \frac{\sharp \{ x\in {\mathbb {P}}^n({\mathbb {Q}}): H(x)\leqslant B, \pi ^{-1}(x) \text { smooth}, \omega _{\pi ,S}(x)=j \}}{\sharp \{ x\in {\mathbb {P}}^n({\mathbb {Q}}): H(x)\leqslant B \}} \end{aligned}$$

exists and defines a probability measure on \({\mathbb {Z}}\).

The analogues of the other results from Sect. 1.2 also hold for the modified \(\omega _{\pi ,S}\). Also of course the analogue of Theorem 1.2 and the other results in Sect. 1.1 trivially hold with \(\omega _{\pi }\) replaced by \(\omega _{\pi ,S}\), since \(\omega _{\pi ,S} = \omega _{\pi } + O(1)\).