This repository contains a premise-free, kernel-checked Lean 4 proof that the
answer to Erdős Problem #520 is no.
Its public theorems use no assumptions beyond Lean's standard foundations
(propext, Classical.choice, and Quot.sound), as verified by
#print axioms. For the squarefree Rademacher random multiplicative function,
Erdős's proposed law-of-the-iterated-logarithm normalization is too large: the
normalized partial sums converge almost surely to zero.
Independently assign a fair sign f(p) ∈ {−1, 1} to every prime p. Extend
these signs multiplicatively to squarefree integers and set f(n) = 0 when
n is not squarefree. Writing
M_f(N) = Σ_{n ≤ N} f(n),
Erdős asked whether there is a constant c > 0 such that, almost surely,
limsup_{N → ∞} M_f(N) / sqrt(N log log N) = c.
Lean proves the stronger quantitative upper bound: for every η > 0, almost
surely there is a constant C ≥ 0 such that, for all sufficiently large N,
|M_f(N)| ≤ C sqrt(N) (log log N)^(1/4 + η).
This is the theorem
criticalUpperBound_unconditional.
Taking, for example, η = 1/8 makes the exponent 3/8 < 1/2. Dividing by
Erdős's scale therefore gives
|M_f(N)| / sqrt(N log log N) → 0
almost surely. In particular, the signed limsup is zero and cannot equal a positive constant.
The public zero-premise endpoints are:
theorem criticalUpperBound_unconditional :
CriticalUpperBound μ partialSum
theorem erdos520Disproof_unconditional :
Erdos520Disproof
theorem erdos520NoPositiveConstant_unconditional :
Erdos520NoPositiveConstantThus the answer to Problem #520 is no. This result does not determine whether
the exact candidate scale sqrt(N) (log log N)^(1/4) has a finite positive
limsup, nor does it prove a matching lower bound. The sharp almost-sure
envelope at that scale remains open.
Release v1.1.0 includes a public note describing the mathematical route,
model conventions, formal endpoint statements, axiom audit, and exact
prose-to-Lean correspondence:
The theorem and file links embedded in the PDF are pinned to the v1.1.0
release tag.
A proof checker verifies formal statements, so the definitions are deliberately easy to locate:
Model.leanconstructs the product probability space, proves independence of the fair signs, defines the squarefree-supported multiplicative functionf, and definespartialSum.Basic.leandefines the1/4 + ηcritical scale, Erdős's LIL scale,CriticalUpperBound,ZeroLIL, andNoPositiveLILConstant. It also proves deterministically that the critical upper bound implies the zero-LIL conclusion.Final.leanidentifies the problem-specific propositionsErdos520DisproofandErdos520NoPositiveConstantwith those probability-theoretic statements.Unconditional.leancloses every remaining input and exposes the three public theorems above without premises.
The formal partial sum is exactly
partialSum omega N = ∑ k ∈ Finset.range N, f omega (k + 1)so it runs from 1 through N, matching the stated problem.
The three public endpoints depend only on Lean's standard foundations:
propext, Classical.choice, Quot.sound
There is no sorry, admit, project-specific axiom, assumed published-theorem
hypothesis, or external oracle in their dependency chain. The analytic inputs
used by the endpoint are proved in Lean, either in this development, in
Mathlib, or in the vendored kernel-checked source closures described below.
A literal text search finds axiom qc and axiom hqc inside a documentation
example in the vendored AdditiveCombination.lean tactic. They occur inside a
block comment, are not Lean declarations, and do not appear in any axiom audit.
To reproduce the audit, elaborate the endpoint file:
lake env lean Erdos/Problem520/Unconditional.leanThe file ends with targeted #print axioms commands for all three public
theorems.
The project is pinned to Lean and Mathlib v4.30.0-rc2; all resolved package
revisions are fixed in lake-manifest.json. After installing the tools listed
in REQUIREMENTS.md, run:
lake exe cache get
lake build
lake env lean Erdos/Problem520/Unconditional.leanGitHub Actions performs the same full build and axiom audit on every commit and pull request. Its axiom report is retained as a downloadable workflow artifact. Linter warnings do not affect kernel checking; the build must finish successfully and the final command must report exactly the three standard axioms listed above.
The formal proof closes the full chain from the random model to the all-integer almost-sure bound:
- Harper low moment. Euler-product normalization, tilted product laws,
Gaussian and ballot comparison, central and moving-height barriers,
Parseval, tail control, and local-to-global assembly prove the required
low
2/3moment estimate. - Prime inputs. Kernel-checked prime-number-theorem and Selberg-sieve developments supply the scheduled prime-block asymptotics and the uniform Brun–Titchmarsh estimate.
- Caich reduction. Largest-prime decomposition, smoothing, residual
estimates, finite test unions, concentration, and Borel–Cantelli yield the
1/4 + ηbound on the selected test mesh. - Lau–Tenenbaum–Wu interpolation. A formal fourth-moment mesh argument passes from the test points to every integer.
- Deterministic endpoint. The
1/4 + ηestimate implies convergence to zero at Erdős'ssqrt(N log log N)scale.
The names describe the mathematical ancestry of the route. No theorem from the literature is inserted as an unproved premise of the public result.
The active endpoint proves the aligned Caich-style block and residual
estimates directly in Lean. The historical conditional thin-block interfaces
in Final.lean are retained for comparison, but the unconditional theorem
does not use them.
The central input is itself a premise-free public theorem:
theorem harperRademacherInitialMomentStatement_unconditional :
HarperRademacherInitialMomentStatementIt proves that there are absolute constants C > 0 and Y ≥ 2 such that,
for every y ≥ Y,
E[(2π smoothEnergy(y) / log y)^(2/3)]
≤ C / (1 + log log y)^(1/3).
This closes in the kernel the Harper low-moment input consumed by the
Caich/Lau–Tenenbaum–Wu part of the argument. Its proof includes the Euler
product, tilted law, Gaussian/barrier comparison, central and noncentral
moment iterations, Parseval identity, tail estimate, and final weighted
assembly. It can be audited independently in
HarperUnconditionalInitialMoment.lean.
The repository contains 228 Lean modules covering the complete proof chain, the pinned Lean toolchain and dependency lock, third-party provenance and licenses, citation metadata, the expository proof note, and detailed verification notes.
Machine-readable citation metadata for this formalization is provided in
CITATION.cff. The original development is released under the
Apache License 2.0; vendored sources retain the upstream notices and
licenses recorded in THIRD_PARTY_NOTICES.md.
The fixed v1.0.0 archive is identified by
10.5281/zenodo.21782017; the
concept DOI always resolves to the
latest archived release.
Unconditional.lean: premise-free public conclusions and axiom auditsHarperUnconditionalInitialMoment.lean: final Harper local-to-global assemblyHarperCentralEconomicalAssembly.lean: shrinking central bands and terminal coreHarperUnconditionalFinalAssembly.lean: moving-height noncentral shells and Parseval assemblylean_status.md: proof and trust-audit summaryharper_kernel_route.md: detailed Harper proof route
Minimal vendored import closures for the prime-number and sieve results live
under Erdos/Problem520/External/. Their
upstream commits, copyright notices, licenses, and compatibility changes are
recorded there and in THIRD_PARTY_NOTICES.md.