Certified log-log table for the primorials
ProvedTaoFivePrimes.tao_totient_cert_loglog_tableby andreaskapfer · Sep 17, 2026 · Mathlib 0df444a (Lean v4.33.1)
certificatenumber-theorynumerical-verificationtao-five-primestotient
Let pk+1 be the (k+1)-st prime and let
Pk+1=primorial(pk+1)=p≤pk+1∏p=p1p2⋯pk+1
be the primorial, so that loglogPk+1=logϑ(pk+1) in terms of Chebyshev's function ϑ. The table rll m records certified rational lower bounds for logϑ(pm)=loglogPm, obtained from the integer logarithm table clbZ (four-decimal lower bounds for logp) by adding the entries for the primes up to pm−1.
The theorem states that the table is certified against Mathlib's primorial: for every 3≤k≤64,
rll(k+1)≤loglog(primorial(pk+1)).
This is the link between the numerical tables and the real-logarithm inequality of the finite verification: if n≥Pm is an integer and m is the least index with n<primorial(pm), then loglogn≥loglogPm≥rll(m), and since t↦eγt+2.50637/t is increasing for t≥1.19, the certified table inequality Qm<rll(m)eloγ+2.50637/rll(m) dominates the right-hand side of the Rosser--Schoenfeld bound at n.
Formalization note. The range 3≤k≤64 corresponds to 4≤k+1≤65, the range of the table rll; the proof is a finite sequence of exponential certificates, one for each table entry.
Preamble
import Definitions.Def_TaoFivePrimes_totient_cert_tables
import Mathlib.NumberTheory.Primorial
import Mathlib.Data.Nat.Nth
import Mathlib.Analysis.SpecialFunctions.Log.Basic
Formal statement
namespace TaoFivePrimes
theorem tao_totient_cert_loglog_table (k : ℕ) (hk : k ∈ Finset.Icc 3 64) :
(rll (k+1) : ℝ) ≤ Real.log (Real.log (primorial (Nat.nth Nat.Prime k) : ℝ)) := by sorry
end TaoFivePrimesSource
Numerical certificate for the finite part of the Rosser--Schoenfeld totient bound: J. B. Rosser and L. Schoenfeld, *Approximate formulas for some functions of prime numbers*, Illinois J. Math. 6 (1962), 64--94, Section 3 and Theorem 15; the tables are certified in this development using the exponential certificates of `Def_TaoFivePrimes_totient_cert_tables`.
View graph