Partial Lean formalization of the finite-range cubic prime race
Lennart Lopin's cube-root-of-two project, IIS-Q-0001
Lean companion by Eisenquill (OpenAI Codex), November 25, 2026

Replay

Install Lean via elan. From the extracted packet run the following commands
with elan's lake on your PATH. The cache command retrieves the mathlib modules
actually imported by these files and their dependencies.

  git clone --branch v4.24.0 https://github.com/leanprover-community/mathlib4.git mathlib4
  git -C mathlib4 checkout f897ebcf72cd16f89ab4577d0c826cd14afaafc7
  (cd mathlib4 && lake exe cache get $(sed -n 's/^import \(Mathlib\..*\)$/\1/p' ../PrimeRace*.lean | sort -u))
  bash replay-cubic-lean.sh mathlib4
  python3 check_cubic_theta_coefficients.py

An existing checkout with the same commit and dependencies needs only the last
two commands. The shell script rebuilds five Lean files in a temporary directory
with warnings treated as errors, then removes its compiled objects. The printed
axiom reports make the dependencies of 25 declarations visible. The separate
Python check uses the standard library.

What the proofs establish

PrimeRace.lean defines D(X) using the actual cube roots of 2 modulo primes.
It proves absolute convergence, uniqueness of that root for p = 2 mod 3, and
the final inequality D(X) >= 0.09 sqrt(X) for every real 10^50 <= X <= 10^110
given the manuscript's lower estimate for the normalized race. The progression
calculation takes the two explicit prime estimates as hypotheses.

PrimeRaceZeroBudget.lean proves absolute convergence and an upper bound of 1/4
for the signed sum of logarithmic derivatives of the individual Euler factors
at 2. Including the conductor and gamma terms gives an expression E < 1.32.
The file proves how an identification of E with nonnegative zero weights
excludes a reflected real pair, including two copies of a central zero.

PrimeRaceLogDerivative.lean proves that the function formed from the local
factors is their convergent infinite product on Re(s) > 3/2. Its definition
uses the cube-root count mod each prime above 3. The completion multiplies it
by (sqrt(108)/(2 pi))^s Gamma(s). The theorem logDeriv_completedEuler_two
proves that the logarithmic derivative of this completion at 2 equals E.

PrimeRaceTheta.lean constructs a particular Mellin transform G from Jacobi
theta functions. It proves kernel inversion, entireness, and G(1-s) = G(s).

PrimeRaceZeroProduct.lean differentiates a paired zero product. Reflection
forces the coefficient of the linear exponential in that product to vanish.
With the zeros counted individually, including central multiplicity m,
theta_zero_sum then proves that the sum of Re(1/(2-rho)) is E, provided that
G agrees locally with the completed Euler product at 2 and has the specified
factorization, strip and summability data. The auxiliary theorem
theta_equals_euler_of_coefficients proves the local identification at any
point where one supplies absolutely convergent expansions with the same
coefficients. These two theorems retain their field-specific hypotheses.

What remains for the conductor-108 zeros

A proof that the theta and Euler coefficients agree at every index, with the
stated expansions near 2, would identify G with the completion defined from
the cubic prime data. The Python check independently computes the scaled theta
coefficients, half the difference of representation numbers of x^2 + 27y^2 and
4x^2 + 2xy + 7y^2, and the Euler coefficients. It compares indices 0 through
10,000 and checks all intervening fractional modes. This is a finite check.

The second input is a global Hadamard product for this completion, identifying
its zero entries with multiplicity and verifying the strip and convergence
conditions. A formal centered factorization theorem in a different Lean
project takes finite-order growth as an input. Applying it here would also
require proving growth and translating its divisor to the paired product:
https://github.com/AlexKontorovich/PrimeNumberTheoremAnd/blob/e9906138410f8f76ca66b9bc252d0993f3ee348c/PrimeNumberTheoremAnd/Mathlib/Analysis/Complex/HadamardFactorization/Order.lean#L253

Tollis's published zero verification and the explicit-formula estimates for
the finite-range race remain external to this Lean companion. The reviewed
paper and Python interval-arithmetic replay are in the separate reviewer ZIP.
Full Lean verification of the finite-range theorem and RH for the cubic field
remain open. The public project is https://isitsolved.com/q/1.
