This repository contains Rishikesh Gajjala's Lean 4 formalization of the corrected second-order form of Erdős Problem 796.
For a finite set
where Erdos796/Core.lean.
The formal development also proves
The versions are pinned to Lean 4.30.0, Mathlib v4.30.0, and
PrimeNumberTheoremAnd v4.30.0. With elan installed, run:
lake exe cache get
lake build Erdos796.FullProof
./scripts/audit.shThe first build may take some time while Lake downloads dependencies. The
audit rebuilds the complete dependency closure, invokes Lean with --trust=0,
and checks the axioms of all public release theorems.
| Declaration | Meaning |
|---|---|
Erdos796.erdosProblem796 |
The corrected existential form of Problem 796 |
Erdos796.hasSecondOrderConstant |
The constant is |
Erdos796.Gamma_bounds |
|
Erdos796.mertensM_lt_933_div_1000 |
Kernel-checked bound |
Erdos796.secondOrderConstant_lt_fifteen |
All five are assembled in
Erdos796/FullProof.lean. The exact Lean
formulation of the asymptotic is in
Erdos796/Statement.lean: it is convergence of
the normalized second-order error.
Erdos796/contains the 75 Lean modules in the proof closure.docs/PROOF_MAP.mdexplains how the modules fit together.AUDIT.mdrecords the trust boundary, hashes, and release audit.Audit.leanprints the axioms of the final declarations.paper/main.texand the compiled manuscript give the accompanying human-readable proof.docs/REFERENCES.mdrecords mathematical provenance and links to the sources that inspired specific parts of the argument.
The Lean modules remain in their verified flat namespace. The thematic map in
docs/PROOF_MAP.md provides navigation without rewriting the audited import
graph.
There are no sorry, admit, custom axiom, unsafe, native_decide, or
interval_decide declarations in the project source. Each audited final
theorem depends only on Lean's standard
propext, Classical.choice, and Quot.sound axioms. See
AUDIT.md for the exact scope and commands.
The estimate
The mathematical strategy refines Erdős's factor-size decomposition for the
leading-order problem and uses standard Kővári--Sós--Turán, semiprime, and
Abel-summation/Mertens arguments. The imported Mertens development explicitly
credits Leo Goldmakher's A quick proof of Mertens' theorem. Full citations
and links are in docs/REFERENCES.md.
The initial proofs were generated and formalized in Lean using OpenAI's GPT 5.6 Sol; the authors then verified and rewrote the proofs to improve readability and provide additional context. The formal claims are checked by Lean's kernel and by the reproducible audit above.
Rishikesh Gajjala, NYU Abu Dhabi.
The repository is released under the Apache License 2.0. Citation
metadata is available in CITATION.cff.