AnalyticNumberTheory.Sieve.BombieriVinogradov #
Bombieri--Vinogradov theorem and pointwise remainder interfaces #
The Bombieri--Vinogradov theorem (1965) is a central source of distribution conditions in Chen's theorem. It controls the average error in the distribution of primes in arithmetic progressions, replacing the role of the generalized Riemann hypothesis (GRH) in these mean estimates.
Classical Bombieri--Vinogradov theorem: for each fixed A > 0,
there exists B = B(A) such that
Σ_{q ≤ x^(1/2) log^(-B) x} max_{y ≤ x} max_{(l,q)=1} |π(y; q, l) - li(y)/φ(q)| ≪ x / log^A x.
Here li denotes the genuine logarithmic integral. The existing API
name logarithmicIntegral below instead denotes the proxy x / log x;
it is not the logarithmic integral. The name is retained for compatibility.
Applications in Chen's theorem:
- The sieve distribution condition
|{a ∈ A : d | a}| = ν(d)/d · X + R_d. - Distribution level
D = N^(1/2 - ε)from Bombieri--Vinogradov. - The distribution input required for Jurkat--Richert and Selberg sieves.
This module proves fixed-parameter remainder interfaces, not the classical uniform averaged theorem.
References:
- Bombieri, E. (1965), Math. Ann. 157, 220-260
- Vinogradov, A.I. (1965), Izv. Akad. Nauk SSSR Ser. Mat. 29, 903-934
- Liu, Z. (2022), arXiv:2203.07871, Theorem 1
- Halberstam & Richert, "Sieve Methods" (1974), Ch. 9
1. Counting primes in arithmetic progressions #
π(x; q, l) = |{p ≤ x : p is prime, p ≡ l (mod q)}|.
For a positive modulus with (l,q) = 1, Dirichlet's theorem guarantees
infinitely many such primes.
Equations
- AnalyticNumberTheory.Sieve.primesInAP x q l = {p ∈ Finset.range (x + 1) | Nat.Prime p ∧ p ≡ l [MOD q]}.card
Instances For
Inspect dependencies
AnalyticNumberTheory.Sieve.primesInAP · compiled type and proof/definition references.
Compatibility proxy x / log x for the prime-counting main term.
Despite its historical name, this is not the paper's logarithmic integral
li(x) = ∫₂ˣ dt / log t. The name and definition are retained to preserve the
existing API; source-faithful consumers must keep the main-term model abstract.
Equations
Instances For
Inspect dependencies
AnalyticNumberTheory.Sieve.logarithmicIntegral · compiled type and proof/definition references.
Proxy error π(x; q, l) - (x / log x) / φ(q).
This is not definitionally the classical π(x; q, l) - li(x) / φ(q).
Equations
Instances For
Inspect dependencies
AnalyticNumberTheory.Sieve.distributionError · compiled type and proof/definition references.
2. Bombieri--Vinogradov-shaped remainder interfaces #
Fixed-parameter interface for a Bombieri--Vinogradov-shaped error. The classical averaged estimate is
Σ_{q ≤ x^(1/2) log^(-B) x} max_{y ≤ x} max_{(l,q)=1} |π(y; q, l) - li(y)/φ(q)| ≪ x / log^A x.
In Chen's theorem this supplies a distribution level
D = N^(1/2 - ε) for arbitrarily small ε > 0, with
Σ |R_d| ≪ N / log^A N.
The genuine theorem controls an average over q with a constant
uniform for all sufficiently large x. The interface below has no such
sum and does not assert a uniform per-modulus bound with an extra
1/φ(q) factor; that stronger assertion is neither standard BV nor
a consequence of these definitions and the available mathlib results.
It only gives a multiplicative remainder constant after fixing
x,q,y,l. The uniform averaged theorem requires the large sieve and
Vaughan's identity.
Inspect dependencies
AnalyticNumberTheory.Sieve.bombieri_vinogradov · compiled type and proof/definition references.
A simplified wrapper for the fixed-parameter interface, explicitly
recording the scale D = x^(1/2) / log^B x.
The corresponding classical target has the shape
Σ_{q ≤ D} max_{(l,q)=1} |π(x; q, l) - li(x)/φ(q)| ≪ x / log^A x;
this wrapper does not assert that uniform average.
Inspect dependencies
AnalyticNumberTheory.Sieve.bombieri_vinogradov_simple · compiled type and proof/definition references.
3. Distribution expressions for Chen's theorem #
The prime indices for the Chen sieve set
A = {N - p : p is prime, N^(1/10) < p < N}.
The definition stores the primes p, rather than their translates N-p.
Equations
- AnalyticNumberTheory.Sieve.chenSieveSet N = {p ∈ Finset.range N | Nat.Prime p ∧ ↑N ^ (1 / 10) < ↑p ∧ ↑p < ↑N}
Instances For
Inspect dependencies
AnalyticNumberTheory.Sieve.chenSieveSet · compiled type and proof/definition references.
The prime-counting main-term approximation X = N / log N
used in Chen's theorem.
Equations
- AnalyticNumberTheory.Sieve.chenX N = ↑N / Real.log ↑N
Instances For
Inspect dependencies
AnalyticNumberTheory.Sieve.chenX · compiled type and proof/definition references.
The Goldbach-type density product ν(d) = Π_{p|d} (p-1)⁻¹
used in Chen's theorem.
Equations
- AnalyticNumberTheory.Sieve.chenNu d = ∏ p ∈ d.primeFactors, 1 / (↑p - 1)
Instances For
Inspect dependencies
AnalyticNumberTheory.Sieve.chenNu · compiled type and proof/definition references.
The distribution level D = N^(1/2 - ε) used in Chen's theorem.
Equations
- AnalyticNumberTheory.Sieve.chenDistributionLevel N ε = ↑N ^ (1 / 2 - ε)
Instances For
Inspect dependencies
AnalyticNumberTheory.Sieve.chenDistributionLevel · compiled type and proof/definition references.
Fixed-N distribution remainder bound. The classical
Bombieri--Vinogradov application in Chen's theorem has the form
|{a ∈ A : d | a}| = ν(d)/d · X + R_d for
d ≤ D = N^(1/2 - ε), with errors controlled on the scale
N / log^A N for A > 0.
Here C is chosen after fixing N, so the conclusion is only a bound
uniform over a finite set of moduli at that N. A genuine
Bombieri--Vinogradov conclusion requires the same C for all
sufficiently large N, together with the averaged error estimate.
Inspect dependencies
AnalyticNumberTheory.Sieve.chen_distribution_condition · compiled type and proof/definition references.
4. Pan-shaped remainder interface #
Fixed-parameter remainder interface of Pan type. The classical weighted target is
Σ_{q ≤ x^(1/2) log^(-B) x} μ²(q) · 3^ω(q) · max_{y ≤ x} max_{(l,q)=1} |Σ_{(a,q)=1} f(a) · Δ(y; a, q, l)| ≪ x / log^A x,
where f(a) is the characteristic function used in Chen's theorem and
Δ(y; a, q, l) = π(y; a, q, l) - li(y/a)/φ(q).
Pan's theorem is a weighted extension of Bombieri--Vinogradov, used
to estimate the remainder R in the upper bound for Ω.
In the current definition, distributionError y q l, summed over
range x, does not depend on a, so it is not the weighted
distribution error in the literature. The conclusion below only
provides a multiplicative remainder constant for fixed parameters;
it does not place C before all x,q,y,l. The genuine Pan theorem
requires an error depending on a and a single constant uniform for
all sufficiently large x.
Inspect dependencies
AnalyticNumberTheory.Sieve.pan_mean_value_theorem · compiled type and proof/definition references.
5. Parameter choices in Chen's theorem #
The Chen sifting level z = N^(1/10).
Equations
- AnalyticNumberTheory.Sieve.chenSieveLevel N = ↑N ^ (1 / 10)
Instances For
Inspect dependencies
AnalyticNumberTheory.Sieve.chenSieveLevel · compiled type and proof/definition references.
The Chen switching parameter y = N^(1/3).
Equations
- AnalyticNumberTheory.Sieve.chenSwitchLevel N = ↑N ^ (1 / 3)
Instances For
Inspect dependencies
AnalyticNumberTheory.Sieve.chenSwitchLevel · compiled type and proof/definition references.
The Chen Selberg sifting level z' = N^(1/4 - ε/2).
Equations
- AnalyticNumberTheory.Sieve.chenSelbergLevel N ε = ↑N ^ (1 / 4 - ε / 2)
Instances For
Inspect dependencies
AnalyticNumberTheory.Sieve.chenSelbergLevel · compiled type and proof/definition references.
Sieve ratio s = log(D)/log(z) = (1/2 - ε)/(1/10) = 5 - 10ε.
Equations
- AnalyticNumberTheory.Sieve.chenSieveRatio _N ε = (1 / 2 - ε) / (1 / 10)
Instances For
Inspect dependencies
AnalyticNumberTheory.Sieve.chenSieveRatio · compiled type and proof/definition references.
For sufficiently small positive ε, the sieve ratio is close to 5.
Inspect dependencies
AnalyticNumberTheory.Sieve.chenSieveRatio_approx · compiled type and proof/definition references.