A level-supported upper sieve for the q¹ count #
This file keeps the level restriction in the finite object that is estimated:
we first majorize each corrected candidate fibre by a Selberg square, and only
then expand it into reduced-residue progressions. Thus the distribution input
below is a cutoff-supported signed aggregate, not the obsolete full positive
sum q1ErrorTermSum.
The analytic shape is the one used in Liu 2022, th-mvt, lines 137--151, with
the Bombieri--Vinogradov input in lines 81--86: a level-supported Selberg
square is expanded before a signed reduced-residue mean-value estimate is
applied. The producer contract at the end deliberately separates the sieve
fundamental lemma from the ∀ A ∃ B(A) weighted Pan/BV theorem; the
non-reduced correction and the floor-safe admissible level are proved
unconditionally in this file.
The q¹ progression discrepancy with a genuine logarithmic integral.
The parameter κ records the additive normalization left implicit by Liu's
notation.
Equations
Instances For
The new discrepancy is literally the a = 1 prime-progression error with
the genuine li main term.
The natural distribution cutoff
⌊N^(1/2) / log(N)^B⌋. Keeping this as a natural number makes every later
modulus restriction a finite predicate.
Equations
Instances For
The selected fixed q¹ Selberg level. Taking the natural square root after dividing the Pan cutoff by the switching range makes the cutoff inequality floor-safe at the level of natural numbers.
Equations
Instances For
Divisors of the corrected sifting product which survive the explicit
Selberg level L.
Equations
Instances For
Membership in the finite level carrier exposes both its sieve support and its numerical level.
The reciprocal-totient bounding sieve on the corrected Chen sifting product. Unlike Liu's source sieve, its prime support is exactly the corrected product used by the q¹ candidate condition.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelBoundingSieve N = { support := ∅, prodPrimes := MathlibNt.SieveTheory.SwitchingPrinciple.correctedChenSiftingProduct N, prodPrimes_squarefree := ⋯, weights := fun (x : ℕ) => 0, weights_nonneg := MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelBoundingSieve._proof_2, totalMass := 0, nu := MathlibNt.SieveTheory.LiuWeight.liuSelbergReciprocalTotient, nu_mult := MathlibNt.SieveTheory.LiuWeight.liuSelbergReciprocalTotient_isMultiplicative, nu_pos_of_prime := ⋯, nu_lt_one_of_prime := ⋯ }
Instances For
The lcm of two level divisors remains below the square level.
A raw Selberg weight supported on q1LevelCarrier. The upper-sieve
majorization itself is supplied below as an analytic input; this structure
records precisely its finite support, normalization, and boundedness.
- support (d : ℕ) : self.lambda d ≠ 0 → d ∈ q1LevelCarrier N L
Instances For
The cutoff-parameterized optimal Selberg weight on the corrected Chen sifting product.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelOptimalSelbergWeight N L hL = { lambda := MathlibNt.SieveTheory.LiuWeight.truncatedSelbergOptimalLambda (MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelBoundingSieve N) L, lambda_one := ⋯, support := ⋯, abs_le_one := ⋯ }
Instances For
The exact denominator attached to the corrected q¹ level.
Equations
Instances For
Once the cutoff lies below the corrected prime threshold, the q¹ denominator is exactly the established squarefree-coprime arithmetic sum. This is the bridge to the uniform convolution and Euler-error estimates.
Uniform denominator reduction at the corrected q¹ level. The main term retains the genuine Liu singular series; conversion to the finite truncated normalization is intentionally deferred.
The finite divisor sum whose square is the upper-sieve majorant.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelDivisorSum N L W n = ∑ d ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelCarrier N L, if d ∣ n then W.lambda d else 0
Instances For
The pre-sieving fibre for one switching modulus. It contains all base primes, before the corrected small-prime sieve is imposed.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.q1PreSieveFibre N q = {p ∈ Finset.range N | Nat.Prime p ∧ 2 ≤ N - p ∧ q ∣ N - p}
Instances For
The Selberg square over the complete pre-sieving q-fibre.
Equations
Instances For
The double-sum expansion of q1LevelSquareMajorant. The following
theorem proves that this is the literal finite expansion, with no asymptotic
or discarded terms.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelSquareExpanded N L W q = ∑ d1 ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelCarrier N L, ∑ d2 ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelCarrier N L, W.lambda d1 * W.lambda d2 * ↑(MathlibNt.SieveTheory.SwitchingPrinciple.q1APBaseCount N (q.lcm (d1.lcm d2)))
Instances For
Each corrected candidate in a switching fibre contributes one to the level-supported Selberg square, while all other pre-sieving points contribute a nonnegative square.
The finite level-supported square expansion.
Reduced switching moduli whose full Selberg square remains inside the explicit Pan/Bombieri--Vinogradov cutoff.
Equations
Instances For
The non-reduced switching moduli. They are separated rather than assigned a fictitious reduced-residue Pan error.
Equations
Instances For
Reduced switching moduli for which the selected level would exceed the distribution cutoff.
Equations
Instances For
Every switching modulus is cutoff-safe at the canonical Selberg level. This exact natural-number inequality needs no asymptotic threshold.
The canonical level retains a genuine Selberg scale: for each fixed Pan
exponent it eventually dominates ⌊N^(1/13)⌋. The exponent 1/13 is chosen
strictly below the limiting 1/12 supplied by cutoff / Y.
The cutoff-failure carrier is identically empty at the canonical level.
The three switching carriers form an exact finite partition.
The three finite switching carriers are pairwise disjoint.
Every progression modulus in the good square lies below the explicit cutoff.
Every good progression has the reduced residue N mod m required by the
Pan distribution error.
Good switching moduli are exactly the moduli to which the reduced-residue cutoff-supported Pan aggregate applies.
Every nonzero term in the divisor-weighted Pan majorant has a reduced residue and final modulus below the advertised cutoff.
The good portion of the q¹ count is bounded by the corresponding level-supported squares.
Equations
Instances For
The signed reduced-residue Pan aggregate. Absolute value is intentionally outside the complete weighted aggregate in the analytic input below.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelSignedPanAggregate κ N B L W = ∑ q ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelGoodSwitchingPrimes N B L, ∑ d1 ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelCarrier N L, ∑ d2 ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelCarrier N L, W.lambda d1 * W.lambda d2 * MathlibNt.SieveTheory.SwitchingPrinciple.q1TrueLiAPError κ N (q.lcm (d1.lcm d2))
Instances For
The source-shaped weighted Pan/BV majorant: absolute values are taken after the complete lambda-pair sum for each switching prime, and only then summed. In particular, the analytic input cannot use cancellation between distinct switching fibres.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelWeightedPanMajorant κ N B L W = ∑ q ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelGoodSwitchingPrimes N B L, |∑ d1 ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelCarrier N L, ∑ d2 ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelCarrier N L, W.lambda d1 * W.lambda d2 * MathlibNt.SieveTheory.SwitchingPrinciple.q1TrueLiAPError κ N (q.lcm (d1.lcm d2))|
Instances For
The source-shaped majorant controls the absolute value of the total signed Pan contribution without assuming cancellation between switching primes.
The cutoff-supported divisor-weighted Pan majorant. The factor
3 ^ ω(m) is exactly the lcm-fibre multiplicity for two divisors of the
squarefree sifting product. This is the standard weighted form supplied by
Pan's weighted mean-value theorem; unlike the old
diagnostic sum, every final modulus is level-supported.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelReducedResiduePanMajorant κ N B L = ∑ q ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelGoodSwitchingPrimes N B L, ∑ m ∈ (MathlibNt.SieveTheory.SwitchingPrinciple.correctedChenSiftingProduct N).divisors, 3 ^ m.primeFactors.card * if m ≤ L ^ 2 then |MathlibNt.SieveTheory.SwitchingPrinciple.q1TrueLiAPError κ N (q.lcm m)| else 0
Instances For
Bounded level weights reduce the source-shaped lambda-pair error to the
canonical 3 ^ ω(m) divisor-weighted Pan majorant.
The genuine li(N-2)/φ(m) main term paired with the good
level-supported square.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelMainAggregate κ N B L W = ∑ q ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelGoodSwitchingPrimes N B L, ∑ d1 ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelCarrier N L, ∑ d2 ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelCarrier N L, W.lambda d1 * W.lambda d2 * (MathlibNt.SieveTheory.LiuWeight.liuLogarithmicIntegral κ (↑N - 2) / ↑(q.lcm (d1.lcm d2)).totient)
Instances For
The level-truncated Selberg quadratic form occurring after the switching prime is split from the Euler totient.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelSelbergQuadratic N L W = ∑ d1 ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelCarrier N L, ∑ d2 ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelCarrier N L, W.lambda d1 * W.lambda d2 / ↑(d1.lcm d2).totient
Instances For
The q¹ quadratic is exactly the abstract Selberg main sum, with no change of carrier or local normalization.
The corrected-product optimal weight attains the reciprocal of the exact truncated denominator.
The exact reciprocal switching-prime factor in the q¹ main term.
Equations
Instances For
Exact main-factor algebra. No asymptotic replacement is made: the genuine
li_kappa(N - 2), the finite switching-prime reciprocal sum, and the truncated
Selberg quadratic remain separate factors.
For the explicit corrected-product optimizer, the q¹ main aggregate is the exact switching-prime factor divided by the truncated Selberg denominator.
The good square is exactly its li(N-2)/φ(m) aggregate plus the signed
Pan aggregate.
The non-reduced residual is a sum of the actual candidate AP counts, not a
truncation obtained by deleting terms from q1ErrorTermSum.
Equations
Instances For
A non-reduced switching fibre contains at most the single prime p = q:
from q ∣ N and q ∣ N - p one gets q ∣ p, and both are prime.
The complete non-reduced residual is bounded by the number of non-reduced switching primes. This records the exact elementary correction before any asymptotic estimate of that cardinality.
The non-reduced residual is already power-saving: it has at most as many
terms as the switching range, and Y ≤ 2 N^(1/3).
The cutoff-failure residual is likewise an actual q¹ candidate count.
Equations
Instances For
The corrected q¹ count is bounded by the good Selberg square plus the two honest residual count sums.
The exact final-margin budget for the q¹ Selberg main coefficient after the
printed 3.94033 / 2 contribution and the two half-unit residual allowances are
reserved.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.q1FinalSelbergMainCoefficientBudget = 20 / 3 - 3.94033 / 2 - 1
Instances For
A concrete sharp coefficient strictly inside the final numerical budget.
Instances For
The coefficient forced by the fixed Pan level after normalizing by the
truncated singular series. Indeed, log (q1PanSelbergLevel B N) / log N
tends to 1 / 12, while the switching-prime reciprocal sum tends to
log (10 / 3); the exact optimal denominator therefore contributes their
ratio.
Equations
Instances For
The coefficient forced by the fixed Pan level is already larger than the
entire final main-term budget. Consequently the 3.69 target cannot be
proved for q1PanSelbergLevel; a different level or switching architecture is
required.
In particular, the explicit sharp target is smaller than the coefficient forced by the fixed Pan level.
The sole scalar estimate still required after the explicit optimal weight
construction. It keeps li_kappa, the exact finite reciprocal prime sum, the
corrected denominator, and the truncated singular-series normalization in their
native forms.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.Q1SharpLevelSelbergMainBound κ B level cMain = ∃ (N₀ : ℕ), ∀ (N : ℕ), N₀ ≤ N → Even N → ∃ (_ : 1 ≤ level N), MathlibNt.SieveTheory.LiuWeight.liuLogarithmicIntegral κ (↑N - 2) * MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelSwitchingReciprocalSum N B (level N) / MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelSelbergDenominator N (level N) ≤ cMain * AnalyticNumberTheory.Sieve.singularSeriesTruncated N (MathlibNt.SieveTheory.SwitchingPrinciple.correctedChenZ N - 1) * ↑N / Real.log ↑N ^ 2
Instances For
The finite upper-sieve input: after selecting a level-supported Selberg weight, its main aggregate has the expected q¹-scale upper bound. The theorem above shows that only the named scalar estimate remains; weight existence and finite minimization are unconditional.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.Q1LevelSupportedUpperSieveInput κ B level = ∃ (C : ℝ), 0 < C ∧ ∃ (N₀ : ℕ), ∀ (N : ℕ), N₀ ≤ N → Even N → ∃ (W : MathlibNt.SieveTheory.SwitchingPrinciple.Q1LevelSupportedSelbergWeight N (level N)), MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelMainAggregate κ N B (level N) W ≤ C * AnalyticNumberTheory.Sieve.singularSeriesTruncated N (MathlibNt.SieveTheory.SwitchingPrinciple.correctedChenZ N - 1) * ↑N / Real.log ↑N ^ 2
Instances For
The scalar sharp bound supplies the original upper-sieve producer with the canonical corrected-product optimizer and the same named coefficient.
The sole published distributional input in this reduction: the
a = 1 specialization of Pan's 3 ^ ω mean-value theorem, with reduced
residues and cutoff-supported final moduli. Its quantifiers have the published
order ∀ A > 0, ∃ B = B(A) (Liu 2022, th-mvt, lines 137--151). The finite
theorem above proves that this is exactly the weight needed for the Selberg
lambda-pair expansion; no unrestricted positive error sum is truncated.
Equations
Instances For
The separate non-reduced correction required because a switching prime may
divide N; it is deliberately not set to zero in the Pan aggregate.
Equations
Instances For
The non-reduced input is unconditional, uniformly in the chosen level:
the elementary N^(1/3) bound is smaller than every N / log(N)^A scale.
A valid level selection keeps every reduced switching fibre inside the distribution range. Thus the cutoff-failure residual is eventually empty, rather than assumed small after discarding whole fibres.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.Q1CutoffAdmissibleLevel B level = ∃ (N₀ : ℕ), ∀ (N : ℕ), N₀ ≤ N → Even N → ∀ q ∈ MathlibNt.SieveTheory.SwitchingPrinciple.q1SwitchingPrimes N, ¬q ∣ N → q * level N ^ 2 ≤ MathlibNt.SieveTheory.SwitchingPrinciple.q1LevelModulusCutoff N B
Instances For
The selected fixed q¹ Selberg level is Pan-admissible for every exponent B.
An admissible level makes the actual cutoff-failure count vanish.
The level-supported weighted q¹ aggregate theorem contains exactly the two genuine analytic inputs. The explicit level is cutoff-admissible and its non-reduced residual is power-saving by the unconditional theorems above.
Equations
- MathlibNt.SieveTheory.SwitchingPrinciple.Q1WeightedAggregateTheorem = ∃ (κ : ℝ), (∀ (B : ℕ), MathlibNt.SieveTheory.SwitchingPrinciple.Q1LevelSupportedUpperSieveInput κ B (MathlibNt.SieveTheory.SwitchingPrinciple.q1PanSelbergLevel B)) ∧ MathlibNt.SieveTheory.SwitchingPrinciple.Q1ReducedResidueWeightedPanInput κ
Instances For
Package the two genuine analytic producer inputs.
The source-faithful producer contract implies exactly the q¹ count estimate
used downstream. The proof uses the finite square expansion, the
∀ A ∃ B(A) reduced-residue majorant, the exact non-reduced count, and an
eventually empty cutoff-failure carrier.
The strongest honest downstream consumer.
A designated q¹ constant extracted from the level-supported route.
Equations
Instances For
Positivity and the eventual q¹ estimate for the designated constant.