Work

Machine-Certified Lean 4 Formalization of the General Divisor Theorem: Exact Density Correction under Residue Conditioning

Year: 2026
Type: preprint
Abstract: We present an exhaustive, machine-certified formalization of the General Divisor Theorem (GDT) in the Lean 4 interactive theorem prover. Developed originally as a discrete analytic framework by thinkthoughts (2026), the General Divisor Theorem provides exact density corrections for arithmetic coprime residue sets S(N, L, m, a) = {1 ≤ n ≤ L : n ≡ a (mod m), gcd(n, N) = 1} under conditions where the modulus m and constraint N share prime factors. While naive independent-density heuristics dramatically overestimate or double-count restrictions, GDT isolates the shared-prime radical d = rad(gcd(m, N)) and unshared component R = rad(N)/d. We formally construct the exact arithmetic dichotomy in Lean 4: the empty set condition for inadmissible residues (gcd(a, d) > 1), and the exact minimal periodicity T_min = lcm(m, rad(N)) possessing exactly φ(R) admissible solutions per period with invariant Euler correction factor C(N, m) = d / φ(d) = ∏_{p|gcd(m,N)} [p/(p-1)]. All core definitions, factorization lemmas, and specializations (unitary divisors, squarefree primorials) are proven without unadmitted goals (0 sorry). The formal library is complemented by an exhaustive automated Python verification sweep across 2,287 parameter combinations with a 100% pass rate. Key Highlights Target: Lean 4 (v4.21.0) & Mathlib-native foundations Axioms: Standard Lean 4 core [propext, Classical.choice, Quot.sound] Concrete Benchmarks Verified: C(6) = 3.00, C(10) = 2.50, C(30) = 3.75 via norm_num Boundary Cases: Minimal period distinction N=18, m=2 → T_min=6 (≠ 18); Sharp admissibility N=5, m=6, a=2 → d=1 → Admissible Empirical Validation: 2,287 / 2,287 automated parameter checks PASS (100%)
Language: English
Open Access status: green
OpenAlex ID: W7221519059
Cites: 1
Cited by: 1
Related to: