Mathematics / Formalization Note / Number Theory

Fixed-Pattern Prime Densities via the Prime Ideal Theorem: The Density Step of Elliott's Theorem (Erdős Problem 980) in Lean 4

A single-file Lean 4 proof of the complete-splitting density 1/[K:Q] for the splitting field K of any monic f ∈ Z[X], from which R1.H1 follows by subtracting consecutive patterns. It assembles the prime ideal theorem for K from a Dedekind zeta continuation, the prime-ideal Euler product, nonvanishing on Re(s) = 1 and Wiener–Ikehara. Adapted machinery, as the file header records: the Wiener–Ikehara Tauberian theorem from PrimeNumberTheoremAnd (Kontorovich, Tao and contributors) via @marcusbuffett's Open Math Agents port; the prime-ideal Euler product, lattice-point ideal counting and the log-derivative prime-power expansion from Chris Birkbeck's AINTLIB; the ideal-count summation from Mathlib (Xavier Roblot); boundary nonvanishing from Mathlib (Michael Stoll, David Loeffler); and the consecutive-pattern subtraction from @Ciphore's reduction. The header names no outside source for the unramified-splitting bridge (complete splitting mod p ⇔ all primes above p have norm p) or for the assembly.

Author
Ali Uyar
DOI
10.5281/zenodo.24765145
Scope
Modular suite
Status
Merged on Left to Solve
Original theorem
P. D. T. A. Elliott (Acta Arith. 13, 1967): for every k ≥ 2 there is c_k > 0 with Σ_{p<x, p≡1 (mod k)} n_k(p) ~ c_k x/log x, where n_k(p) is the least k-th power nonresidue mod p. This answers a 1965 question of Erdős (Erdős Problem 980).
Statement source
Left to Solve (FormalConjectures / OMA statements)
Source
github.com/aliuyar1234/lean4-landmark-formalizations/tree/main/17-erdos-980-elliott-nonresidues

Machine-checked in Lean 4 ✓ Accepted and merged on Left to Solve.

Summary

A Lean 4 proof that a monic integer polynomial splits completely modulo a set of primes of density 1/[K:Q], K its splitting field, obtained from the prime ideal theorem for K: a Dedekind zeta continuation to Re(s) > 1 − 1/[K:Q], the prime-ideal Euler product, nonvanishing on Re(s) = 1 and the Wiener–Ikehara theorem. Applied to the pattern polynomials Φ_k(X)·Π_{j<i}(X^k − q_j), it proves step R1.H1 of the Left to Solve reduction of Elliott's 1967 theorem (Erdős Problem 980): for every k ≥ 2, the primes p ≡ 1 (mod k) with a fixed least k-th power nonresidue have a density relative to x/log x, positive for the value 2. With LordMike's reduction and mattdorman's tail step R1.H2, the merge of this 7,893-line file (PR #45676) closed the root. Large parts are adapted from PrimeNumberTheoremAnd, AINTLIB and Mathlib; an independent Lean proof of Elliott's theorem already existed in plby/lean-proofs.

Context

It combines existing Lean libraries (PrimeNumberTheoremAnd, Chris Birkbeck's AINTLIB, Mathlib) into a working prime ideal theorem and complete-splitting density for arbitrary polynomial splitting fields: the complete-splitting case of Chebotarev, which is the density input of Elliott's argument.

Root problems on Left to Solve

  • LTS Erdos980.erdos_980 closed; credited to @LordMike, with aliuyar1234 as contributor

Credits

Theorem: P. D. T. A. Elliott (1967); question: P. Erdős (1965). Left to Solve: reduction R1 by LordMike (root solution credited to LordMike, contributors aliuyar1234 and mattdorman); tail step R1.H2 by mattdorman (PR #33126); sub-reduction R1.H1.R1 by Ciphore (PR #19449). Adapted Lean code (Apache-2.0, per the file header): Wiener–Ikehara from Alex Kontorovich, Terence Tao and the PrimeNumberTheoremAnd contributors (commit 55270df807), via the Open Math Agents port credited to @marcusbuffett (based on the merged Erdős 981 port, incl. Trunc981.count_of_theta); prime-ideal Euler product, LatticePointCount, NormLeOneLipschitz, IdealCongruenceCount and DedekindResidue.ExplicitFormula.PrimeSide from Chris Birkbeck's AINTLIB (and contributors); ideal-count summation from Mathlib DedekindZeta (Xavier Roblot); log Euler product and nonvanishing from Mathlib LSeries.Nonvanishing (Michael Stoll, David Loeffler); consecutive-pattern subtraction from @Ciphore. Lean proof produced with AI coding agents operated by the author (PR body: t3-code, model gpt-6.2-astra). Prior independent Lean proof of Elliott's theorem: plby/lean-proofs (Erdos980, August 2026).

Pull request ledger (1)

  • #45676 Erdos980.erdos_980.R1.H1 merged

Cite

@misc{uyar2026_erdos_980_elliott_nonresidues_lean4,
  author    = {Uyar, Ali},
  title     = {Fixed-Pattern Prime Densities via the Prime Ideal Theorem: The Density Step of Elliott's Theorem (Erdős Problem 980) in Lean 4},
  year      = {2026},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.24765145},
  url       = {https://doi.org/10.5281/zenodo.24765145},
  note      = {Lean 4 formalization technical note (P. D. T. A. Elliott (Acta Arith. 13, 1967): for every k ≥ 2 there is c_k > 0 with Σ_{p<x, p≡1 (mod k)} n_k(p) ~ c_k x/log x, where n_k(p) is the least k-th power nonresidue mod p. This answers a 1965 question of Erdős (Erdős Problem 980).). Code: https://github.com/aliuyar1234/lean4-landmark-formalizations/tree/main/17-erdos-980-elliott-nonresidues}
}