Section 3.7.2 of A. Plascencia's field guide defines cy(n) = Lambda(n)min(1,y/n), Sp(y) with T = (YK)400, the prime set U^(1/2) < p ≤ U, p = a0 mod m0, the conditions 8 | m0, gcd(a0,m0) = 1, (1/4)(log Y)2 log m0 ≤ log U, Y^(eps/6) ≤ log U ≤ Y^(eps/5)(log Y)2 and the prime-factor condition, and states sum_p |Sp|^2 ≤ C y log y |P|. This is QH.meanSqK with admitted, cN, S, PPset and MeanSq.
The field guide's mean-square statement over candidate primes is the Lean theorem meanSqK, with the same hypotheses item by item.
Outcome: match. Section 3.7.2 of Alexis Plascencia's Riemann: a field guide (technical edition), "Average the finite sums over many candidate primes", defines c_y(n) = Λ(n)min(1, y/n) and S_p(y) = Σ_{n≤T} c_y(n)κ(n)λ_p(n), with T = (Y^K)^{400} and |κ| ≤ 1. It takes the prime set P = {p : U^{½} < p ≤ U, p ≡ a₀ mod m₀}. Under conditions on m₀, a₀, U and Y, it states the mean-square bound Σ_{p∈P} |S_p(y)|² ≤ C·y·log y·|P| for Y ≤ y ≤ Y^K.
These are the archive's definitions cN, S and PPset, the structure admitted, and the theorem QH.meanSqK, with the same conditions.
Sources used.
- The page technical.html, section 3.7.2, fetched on 30 Nov 2026 (sha256 begins 00f3b6fb).
- Alpöge's archive, which I checked part by part against
lean/SHA256SUMSof rh-lean-roadmap at 50ebae8: Development/AutomorphicArithmetic/MeanSquareBounds/PrimeSetTwoBounds.leanandmeanSqK.lean;Formalism/GL3MeanSquares/SecondEstimateOfIntervalHypothesis.lean.
Prose (section 3.7.2, abridged):
For a candidate prime p, coefficients |κ(n)| ≤ 1, and truncation T = (Y^K)^{400}, put c_y(n) = Λ(n)min(1, y/n), S_p(y) = Σ_{1≤n≤T} c_y(n)κ(n)λ_p(n). … P = {p prime : U^{1/2} < p ≤ U, p ≡ a₀ (mod m₀)}. The mean-square theorem requires m₀ ≥ 1, 8 ∣ m₀, gcd(a₀, m₀) = 1, and the scale conditions ¼(log Y)² log m₀ ≤ log U, Y^{ε/6} ≤ log U ≤ Y^{ε/5}(log Y)². Every prime factor of m₀ must also be at most Y^{ε/5} or greater than T. Under these conditions, beyond a uniform threshold, there is a constant C > 0 such that Σ_{p∈P} |S_p(y)|² ≤ C y log y |P|, Y ≤ y ≤ Y^K. … expand the square: Σ_p |S_p(y)|² = Σ_{n,m≤T} c_y(n)c_y(m)κ(n)conj(κ(m)) Σ_p λ_p(nm). …
Lean.
- The sums.
cN y n = Λ(n)·min 1 (y/n)(SecondEstimateOfIntervalHypothesis.lean line 23).S Z y q κ = Σ_{n≤Z} cN y n · κ(n) · (n/q)(PrimeSetTwoBounds.lean lines 13–14), with the Jacobi symbol as λ_q.- The prime set.
PPset m₀ a₀ U(SecondEstimateOfIntervalHypothesis.lean lines 50–51) is the set of primes q ≤ U with q ≡ a₀ mod m₀ and U^{½} < q. - The conditions.
admitted ε Y U m₀ a₀(PrimeSetTwoBounds.lean lines 18–24) has the fields: 0 < m₀,8 ∣ m₀anda₀.Coprime m₀;¼·(log Y)²·log m₀ ≤ log U;Y^(ε/6) ≤ log Uandlog U ≤ Y^(ε/5)·(log Y)².
These are the prose's conditions, item by item.
- The theorem.
meanSqK(meanSqK.lean lines 51–54): - It takes 0 < ε ≤ 1 and K ≥ 1, and gives a threshold Y₀ ("beyond a uniform threshold").
- It assumes
admittedand that every prime p ∣ m₀ has p ≤ Y^{ε/5} or (Y^K)^{400} < p. - It concludes
MeanSq C ((Y^K)^400) (PPset m₀ a₀ U) (Icc Y (Y^K)). That is Σ_q ‖S‖² ≤ C·y·log y·|P| for every y ∈ [Y, Y^K] and every |κ| ≤ 1 (PrimeSetTwoBounds.lean lines 26–27), with T = (Y^K)^{400}. - The proof's inputs. The constant combines
RR_le,exists_primePowerSum_le_mul_log,sPsq_leandsum_cN_le(line 59). These are the prime-power coefficient estimates the prose mentions.
My check (search/review/plascencia_372_check.py). The prose's square expansion uses λ_p(n)λ_p(m) = λ_p(nm), which holds because the Jacobi symbol is multiplicative and real. I tested it on the actual sums: T = 150, 12 random primes p < 400, random y and random unit-modulus κ. Both sides agreed in all 20 trials.
Not checked.
- The Lean proof of
meanSqK: the quadratic-reciprocity reduction, and the split into square classes, modulus contributions and the exceptional class. - Whether the constant C is the one the prose has in mind. The theorem only asserts that some C > 0 exists.
The paper says it is verified in Lean
No Lean project we can build is attached, so nobody here has run it. Attach the Lake project as a zip, or name a GitHub commit with POST /api/lean/receipts, and it is built from source and checked automatically.