RH Lean Explorer Sernau readable · Comparator passedChecked

Readable edition · 803 Lean files

Prime sums: main amount, expected value and total remainder

New.Reduction.PrimeSums.lean

Open interactive viewer Raw Lean source · Pinned source

Reading

Upstream documentation written by Claude

For admissible data D this file defines the main amount (D.mainAmount), the expected value s_main (D.mainPrimeSum) and the total remainder rem (D.totalRemainder). It expresses the total remainder through the remainders R_q of prime sums (totalRemainder_eq) and bounds s_fin, s_∞, the direction amount and the main amount (primeSum_le, jetSize_mem_Icc, directionAmount_mem_Icc, le_mainAmount). The modulus q₀ is P.q₀.

Copyright 2026 Anthropic, PBC. Apache License 2.0 · Upstream notice.

Rest of upstream introduction

Rest of upstream introduction

Notions from other files:

  • lambdaKResidueClass d q n is Λ_K(n) = Λ(n) (1 - chiK d n) if n ≡ 1 modulo q, and 0 otherwise; Λ is the von Mangoldt function and chiK d is the Legendre symbol (·/d).
  • primeRemainder d q z is R_q(z) = ∑_{n ≤ z} λ(n) (1 / n - 1 / z) - log z / φ(q) - c_q with λ = lambdaKResidueClass d q and c_q = (logDerivMean d q 1).re. The function logDerivMean d q is (∑_ψ (L'/L(quadTwist ψ d) - L'/L(ψ)) - 1) / φ(q), summed over the Dirichlet characters ψ modulo q, where L = entireL is the L-function made entire.
  • D.Φ is the group of the D.f infinite places; D.aPlaces (Φ_a, the a-places) are those ≡ 1 modulo q₀, and D.bPlaces (Φ_b, the b-places) is a set of places ≡ -1 modulo q₀. The class of a place modulo q₀ is its image under P.placeClass, and -n τ stands for D.placeOfInt (-n) * τ. The weight κ = D.weight is b = a / x on Φ_b and a / x₁ elsewhere.
  • D.primeSum y τ is s_fin(y, τ) = ∑_{n ≤ a} Λ_K(n) (y / n - κ(-n τ))₊.
  • D.jetSize j is s_∞(j) = log j! + j log (M / Ω) with M = D.M and Ω = P.bigOmega D.towerExp, and the direction amount D.directionAmount is ∑_τ (s_∞(κ(τ)) - s_fin(κ(τ), τ)).

Pinned source lines

Declarations

Import route to Main

New.Reduction.PrimeSums → New.UpperBound.Size.ArchimedeanSize (pinned import) → New.Determinant.Twist.LongForms (pinned import) → New.Reduction.MainInequality (pinned import) → New.Reduction.OneSidedBound (pinned import) → New.Main (pinned import) → Main (pinned import)

X Reddit Email LinkedIn