Formalizing the Prime-Field Singer Construction and Sidon Set Infrastructure in Lean 4
- D. B. Hulak ,
- A. Ramos ,
- Ruy J. G. B. de Queiroz
arXiv
ErdH{o}s Problem 30 asks for sharp asymptotics of the Sidon extremal function $h(N)$, and Singer’s construction is the classical source of lower-bound examples matching the main term. We present a Lean 4 formalization of Singer’s Sidon set construction for prime fields, together with reusable Sidon-set infrastructure for additive combinatorics. For every prime $p$, we prove the existence of a Sidon set modulo $p^2+p+1$ of cardinality $p+1$. The proof proceeds through a non-trivial algebraic chain: construction of the Galois field $mathrm{GF}(p^3)$, analysis of the trace kernel as a 2-dimensional subspace, a geometric argument via subspace intersections establishing the multiplicative Sidon property in the quotient group, and a combinatorial bridge transferring this to modular integer arithmetic. Around this central result, we develop a reusable Sidon set library for additive combinatorics. It comprises interval Sidon sets, modular Sidon sets, the extremal function $h(N)$, Lindstrom’s cross-difference inequality, a Johnson-route shift-incidence upper bound of the form $h(N) leq sqrt{N} + N^{1/4} + O(1)$, exact representation-function identities, and unconditional two-sided $h(N)=Theta(sqrt{N})$ bounds with exact floor-rounded finite statements for $N geq 5$. We further formalize a conditional reduction: subpolynomial prime gaps together with a full subpolynomial upper-error hypothesis for $h(N)$ imply the ErdH{o}s Problem 30 estimate $h(N)=sqrt{N}+O_varepsilon(N^varepsilon)$ for every $varepsilon>0$. The core Singer/Sidon and transfer development comprises 6,382 lines of Lean 4 with zero active uses of sorry. We describe the mathematical lessons learned, focusing on how formalization clarifies the precise scope of classical arguments and forces explicit treatment of the algebraic-combinatorial interface.