Section 10.10 of A. Plascencia's field guide sets log Omega = gamma_E + log(pi/v) - ell and proves the cancellation identity P - A Q_count + m A g0 = M + A E_count, with M = sumj,t at (log at − 1 - gamma_E + ell - (1/f) sum_r log w_jr). This is the Lean lemma key_identity5 (via key_identity), whose terms logOm, SDiv, Lam5 and Main are exactly the prose's log Omega, P, Q_count and M. 100,000 random instances agree to 1.7e-13.
The field guide's cancellation identity is exactly the Lean lemma key_identity5, term by term.
Outcome: match. Section 10.10 of Alexis Plascencia's Riemann: a field guide (technical edition), "Cancel the large terms before estimating the error", makes three claims:
- The period constant. log Ω = γ_E + log(π/v) − ℓ, with v = rd(E)/2. It arises from the CM-period value γ_E + log(2π/√d) − ℓ plus the scale change log(√d/rd(E)).
- The two large terms. P = m Σ_t a_t(log a_t − 1 − log Ω) and Q_count = Σ_j (1/f) Σ_r log(w_jr v/π) + m g₀ − E_count.
- The identity. P − A Q_count + m A g₀ = 𝓜 + A E_count, where 𝓜 = Σ_{j,t} a_t(log a_t − 1 − γ_E + ℓ − (1/f) Σ_r log w_jr) and A = Σ_t a_t.
This is the archive's key_identity5 (LevelOfCongruence.lean line 105, the section's link). It reduces by linear_combination to key_identity (WeightedMeanData.lean line 170). The definitions of logOm, SDiv, Lam5 and Main are the prose's log Ω, P, Q_count and 𝓜.
Sources used.
- The page technical.html, section 10.10, 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: Formalism/SizeWindowBrackets/ChainSlopeWindows/LevelOfCongruence.lean;Formalism/RankGapBounds/RankGapProofs/WeightedMeanData.lean;Formalism/RankGapBounds/MeanBoundSecondForm.lean.
Prose (section 10.10):
The normalized period constant is log Ω = γ_E + log(π/v) − ℓ. The CM-period theorem first supplies γ_E + log(2π/√d) − ℓ; transferring to the host scale adds log(√d/rd(E)). … P = m Σ_t a_t(log a_t − 1 − log Ω), Q_count = Σ_{j=1}^m (1/f) Σ_{r=1}^f log(w_jr v/π) + m g₀ − E_count. … P − A Q_count + m A g₀ = 𝓜 + A E_count, 𝓜 = Σ_{j,t} a_t(log a_t − 1 − γ_E + ℓ − (1/f) Σ_r log w_jr). The g₀ terms cancel directly. The m A log(π/v) terms cancel because the period and count use the same host normalization.
Lean.
- log Ω.
logOm = gam + log(π/v) − LpL(MeanBoundSecondForm.lean line 88). The fields are γ_E =gam, ℓ =LpLand v =v. - P.
SDiv = Σ_t m(ph(a_t) − a_t · logOm)withph y = y log y − y(WeightedMeanData.lean line 129; MeanBoundSecondForm.lean line 9). That is m Σ_t a_t(log a_t − 1 − log Ω). - Q_count.
Lam5 = Σ_j (1/f) Σ_ρ log(w_jρ v/π) + m·lg − cCount(La + m² La/k)(LevelOfCongruence.lean lines 17–19). So g₀ =lgand E_count = cCount(La + m²La/k). - 𝓜.
Main = Σ_j Σ_t a_t(log a_t − 1 − gam + LpL − (1/f) Σ_ρ log w_jρ)(MeanBoundSecondForm.lean lines 107–109). - The identity.
key_identity5states SDiv − sumA·Lam5 + m·sumA·lg = Main + sumA·(cCount(La + m²La/k)), with sumA = Σ_t a_t = A. That is P − A Q_count + m A g₀ = 𝓜 + A E_count. - It assumes v > 0, f > 0 and w > 0.
- The proof of
key_identitysplits log(π/v) = log π − log v and log(w v/π) = log w + log v − log π (itshpiandh1). That is the prose's "the m A log(π/v) terms cancel". Ga_bound5uses it (hid := key_identity5 …) to bound the prime-sum error by Main plus explicit terms.
My check (search/review/plascencia/main_cancellation_check.py).
- The identity. I evaluated both sides on 100,000 random instances:
- m ≤ 6, f ≤ 5, up to 6 top places;
- a_t, w_jr and v positive over e^{±4} to e^{±5};
- ℓ, g₀ and the count constants random.
The largest relative difference was 1.7·10⁻¹³.
- The scale change. (γ + log(2π/√d) − ℓ) + log(√d/rd) = γ + log(π/v) − ℓ with v = rd/2 held to 4·10⁻¹⁵.
The file UniformMeanTopLine.lean contains a sample instance D0 with gam := 0, LpL := 0. It is a consistency example and plays no part in the final route.
Not checked.
- The CM-period theorem that supplies γ_E + log(2π/√d) − ℓ.
- The finite Fourier inversion that identifies the prime contribution of 𝓜.
- The remaining terms of
Ga_bound5.
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.
References
- A. Plascencia, Riemann: a field guide (technical), section 10.10
- TomasOrtega/RH a6ac91a, LevelOfCongruence.lean L105-L112
- TomasOrtega/RH a6ac91a, LevelOfCongruence.lean L17-L19
- TomasOrtega/RH a6ac91a, WeightedMeanData.lean L129
- TomasOrtega/RH a6ac91a, WeightedMeanData.lean L170-L216
- TomasOrtega/RH a6ac91a, MeanBoundSecondForm.lean L86-L109
- L. Alpöge, Lean archive lean.tar.gz, part 1 of 14