MathlibNt.SieveTheory.MertensTheorem #
Mertens' theorems #
Mertens' theorems provide the basis for estimates of the sieve product V(z) and its relation to the singular series π(N) in Chen's theorem.
Mertens' second theorem: there is a constant Bβ such that Ξ£_{p β€ x} 1/p = log log x + Bβ + O(1/log x).
Mertens' product formula: Ξ _{p β€ x} (1 - 1/p) ~ e^(-Ξ³) / log x, where Ξ³ is the Euler-Mascheroni constant.
Applications to Chen's theorem:
- V(z) = Ξ _{p < z, p β€ N} (1 - Ξ½(p)/p) β π(N) Β· e^(-Ξ³) / log z in the classical notation for the sieve density;
- the convergent product Ξ _{p > 2} (1 - 1/(p-1)Β²), the twin-prime constant, controls the odd-prime factors not dividing N. This does not give an absolute upper bound on π(N) uniform in N.
The exact finite identity below uses singularSeriesTruncated N (z - 1);
both its main term and its error term retain this factor.
References:
- Chen, J.R. (1973), Sci. Sinica 16, 157-176
- Liu, Z. (2022), arXiv:2203.07871, Lemma 1
- Nathanson, "Additive Number Theory", GTM 164
1. Mertens' second theorem #
The sum of prime reciprocals: Ξ£_{p β€ x} 1/p.
Equations
- MathlibNt.SieveTheory.MertensTheorem.primeReciprocalSum x = β p β Finset.range (x + 1) with Nat.Prime p, 1 / βp
Instances For
The Chen-local reciprocal sum is definitionally the reusable ANT object.
Mertens' second theorem: there is a constant Bβ such that Ξ£_{p β€ x} 1/p = log log x + Bβ + O(1/log x)
This underlies Lemma 1 in the proof of Chen's theorem. One possible proof uses the prime number theorem and Abel summation, but the PNT is not necessary: Mertens' theorem also has elementary proofs.
Smooth weights on logarithmic prime intervals #
The floor of the real power used as an exact natural cutoff.
Equations
Instances For
The reciprocal-prime sum with a test function on logarithmic scale.
The Ioc endpoints are literal floors of the real powers. Thus, when N β₯ 1,
membership is exactly N ^ a < p β§ p β€ N ^ b; no endpoint error is hidden in
the definition.
Equations
- MathlibNt.SieveTheory.MertensTheorem.weightedPrimeReciprocalLogSum f N a b = β p β Finset.Ioc (MathlibNt.SieveTheory.MertensTheorem.rpowFloor N a) (MathlibNt.SieveTheory.MertensTheorem.rpowFloor N b) with Nat.Prime p, f (Real.log βp / Real.log βN) / βp
Instances For
Finite Abel summation for a logarithmically rescaled smooth test function. This is an exact identity, including both floored real-power endpoints.
For a constant test function, the exact real-power prime interval has the expected logarithmic limit. This is the base case for finite-step approximations of general continuous test functions.
A fixed finite linear combination of constant logarithmic cells converges to the same linear combination of logarithmic masses.
A continuously differentiable test function on a fixed positive logarithmic
interval has the expected Mertens-weighted prime-sum limit. The sum uses the
literal floored cutoffs βN ^ aβ and βN ^ bβ.
A continuous test function on a fixed positive logarithmic interval has the expected reciprocal-prime limit.
2. Mertens' product formula #
The prime product: Ξ _{p β€ x} (1 - 1/p).
Equations
- MathlibNt.SieveTheory.MertensTheorem.primeProduct x = β p β Finset.range (x + 1) with Nat.Prime p, (1 - 1 / βp)
Instances For
The Chen-local Euler product is definitionally the reusable ANT object.
Mertens' product formula: Ξ _{p β€ x} (1 - 1/p) ~ e^(-Ξ³) / log x.
The quantitative form here gives a constant C such that |Ξ _{p β€ x} (1 - 1/p) - e^(-Ξ³) / log x| β€ C / (log x)Β².
This is a central tool for estimating V(z).
Order form of Mertens' product formula: primeProduct x = Ξ(1/log x); there are positive constants cβ, cβ such that cβ/log x β€ Ξ _{p β€ x}(1 - 1/p) β€ cβ/log x.
This weaker version of mertens_product_formula, which has the exact constant
e^{-Ξ³}, follows directly from Mertens' second theorem via
-log Ξ = Ξ£ 1/p + O(1). It does not require the Euler-Mascheroni constant identity.
Proof outline:
- log Ξ = Ξ£ log(1 - 1/p), and |log(1 - 1/p) + 1/p| β€ 2/pΒ².
- Thus -log Ξ = Ξ£ 1/p + E(x), with |E(x)| β€ Ξ£ 2/pΒ² β€ 2Β·Ξ£_{nβ₯1} 1/nΒ² < β.
- Mertens' second theorem gives Ξ£ 1/p = log log x + Bβ + O(1/log x).
- Hence Ξ = exp(-Bβ - Ξ΄ - E)/log x, where |Ξ΄| and |E| are bounded, so Ξ = Ξ(1/log x).
3. Application: bounded prime-reciprocal sums (Lemma 1) #
Mertens product lower bound: there is cpp > 0 such that, for every m β₯ 3,
cpp / log m β€ primeProduct m.
This follows directly from primeProduct_asymptotic_order, which gives
cβ/log x β€ primeProduct x for every x β₯ 2. It is one of the two standard
inputs to the main-term lower bound CorrectedChenMainTermLower.
Existentially named form of primeProduct_lower_bound, for clients that
choose a fixed lower-bound constant.
Lemma 1 (Liu 2022): for fixed 0 < Ξ± < Ξ², the sum Ξ£_{x^Ξ± < p β€ x^Ξ²} 1/p is bounded.
By Mertens' second theorem, Ξ£_{x^Ξ± < p β€ x^Ξ²} 1/p = (log log x^Ξ² + Bβ + O(1/log x)) - (log log x^Ξ± + Bβ + O(1/log x)) = log(Ξ²/Ξ±) + O(1/log x)
Thus the sum is bounded, as is the further truncation to p β€ x used here.
4. Application: an asymptotic formula for the sieve product V(z) #
Goldbach sieve product V(z, N) = Ξ _{p < z, p β€ N} (1 - 1/(p-1)).
Equations
- MathlibNt.SieveTheory.MertensTheorem.goldbachSieveProduct N z = β p β Finset.range z with Nat.Prime p β§ Β¬p β£ N, (1 - 1 / (βp - 1))
Instances For
Sieve-product lower bound: there is cβ > 0 such that, for every even N β₯ 4 and z β₯ 2, cβ / log z β€ V(z, N) = Ξ _{p < z, p β€ N}(1 - 1/(p-1)).
Proof outline:
- Evenness of N excludes p = 2 from the sieve product. Omitting factors with p | N can only increase the product, so V β₯ W(z) := Ξ _{p < z, p > 2}(1 - 1/(p-1)).
- Use the local correction |log(1 - 1/(p-1)) + 1/(p-1)| β€ 2/(p-1)Β².
- By Mertens' second theorem, -log W = Ξ£_{p<z,p>2} 1/(p-1) + O(1) β€ log log z + O(1).
- Exponentiating gives W = exp(log W) β₯ e^{-C}/log z.
This supplies the lower-bound scale in V β π(N)Β·e^{-Ξ³}/log z, as needed for the Jurkat-Richert main term.
Sieve-product upper bound: V(z, N) β€ 1, since every factor lies in [0, 1]. The factor at p = 2 can be zero when N is odd.
Sieve-product identity: V(z,N) = Ξ _{p<z}(1-1/p) Β· π(N,z-1).
For odd primes, factor (1-1/(p-1)) = (1-1/p)(1-1/(p-1)Β²). Then:
- if p β€ N (which excludes p = 2 for even N), (1-1/p)Β·localFactor(p,N) = 1-1/(p-1);
- if p | N (including p = 2, since N is even), (1-1/p)Β·localFactor(p,N) = 1. Thus Ξ _{p<z}(1-1/p)Β·π(N,z-1) = Ξ _{p<z}[(1-1/p)Β·localFactor(p,N)] = V.
This is the exact identity underlying V β π(N)Β·e^{-Ξ³}/log z.
Order of the sieve product: there are cβ, cβ > 0 such that, for every even N β₯ 4 and z β₯ 3, cβΒ·π(N,z-1)/log z β€ V(z,N) β€ cβΒ·π(N,z-1)/log z.
This follows directly from V = Ξ _{p<z}(1-1/p)Β·π(N,z-1) and
primeProduct_asymptotic_order, which gives Ξ _{p<z}(1-1/p) = Ξ(1/log z).
4.5 Sums of 1/(p-1) over primes (for Selberg Lemma 2) #
Ξ£_{p β€ y} 1/(p-1) β€ log(log y) + C for y β₯ 3, by Mertens' second theorem and a decomposition of each summand.
Sieve-product asymptotic formula: V(z, N) β π(N, z-1) Β· e^(-Ξ³) / log(z-1).
Here π(N, z) = Ξ _{p β€ z, p.Prime} localFactor(p, N) is the truncated
singular series (SingularSeries.singularSeriesTruncated).
The singular-series factor cannot be omitted: N with many small odd prime factors contribute local corrections p/(p-1) that are not uniformly bounded. The asymptotic V β π(N)Β·e^{-Ξ³}/log z follows from (1 - 1/(p-1)) = (1 - 1/p)Β·(1 - 1/(p-1)Β²) at odd primes and Mertens' product formula. It underlies the calculation of the Jurkat-Richert main term X Β· V(z).
The error must also be multiplied by the truncated singular series to obtain
a consequence of Mertens' product formula uniform in N. The cutoff z - 1
corresponds exactly to the range p < z in goldbachSieveProduct.
5. Auxiliary lemmas: the prime-counting function #
Prime-counting function Ο(x) = |{p β€ x : p prime}|.
Equations
Instances For
The project's finite prime count agrees definitionally with mathlib's
Nat.primeCounting. This is the normalization needed when importing a PNT
stated using mathlib's standard counting function.
A prime-counting PNT in the normal form exported by PNTAnd's pi_alt.
This is kept as a separate interface: adapting an external proof to the project toolchain only has to establish this proposition.
Equations
Instances For
The pi_alt normal form implies the epsilon formulation used by the
project's PNT declaration.
Ο(x) β₯ 1 for x β₯ 2, since the prime 2 is counted.
Prime number theorem (PNT): Ο(x) ~ x / log x.
That is, |Ο(x) - x/log x| / (x/log x) β 0 as x β β. The PNT provides one possible route to Mertens' theorems, though elementary proofs are also available.
6. The twin-prime constant and a finite truncation #
Legacy finite truncation of the twin-prime Euler product.
This is a working finite product, not the canonical infinite twin-prime constant, and it is not used to justify the canonical Chen endpoint.
Equations
- MathlibNt.SieveTheory.MertensTheorem.twinPrimeConstant = β p β Finset.range 100 with Nat.Prime p β§ 2 < p, (1 - 1 / (βp - 1) ^ 2)
Instances For
The legacy finite twin-prime product is positive because each factor is positive.
The finite twin-prime product is less than 1: every factor is in (0, 1), and the factor at p = 3 is 3/4 < 1.
6.5 Local interval factors #
A quantitative interval form of Mertens' second theorem for inverse Goldbach local factors. The error has the sharp inverse-logarithmic shape needed by the dimension-one sieve hypothesis.
The inverse Goldbach local factors on an arbitrary real interval satisfy the standard dimension-one product bound.