Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The certificate prime table agrees with the sequence of primes

Proved
TaoFivePrimes.tao_totient_cert_nth_prime_eq

by andreaskapfer · Sep 17, 2026 · Mathlib 0df444a (Lean v4.33.1)

certificatenumber-theoryprime-numberstao-five-primes

Let p1<p2<⋯p_1 < p_2 < \cdotsp1​<p2​<⋯ denote the primes in increasing order, so that pi+1p_{i+1}pi+1​ is Mathlib's zero-indexed prime sequence Nat.nth Nat.Prime i. The certificate table ptab lists the first 66 primes: ptab(0)=2\mathrm{ptab}(0)=2ptab(0)=2, ptab(1)=3\mathrm{ptab}(1)=3ptab(1)=3, …\ldots…, ptab(65)=317\mathrm{ptab}(65)=317ptab(65)=317.

The theorem states that the table agrees with the prime sequence:

ptab(i)  =  pi+1(0≤i<66).\mathrm{ptab}(i) \;=\; p_{i+1} \qquad (0 \le i < 66).ptab(i)=pi+1​(0≤i<66).

This identification lets the finite verification of the Rosser--Schoenfeld totient bound substitute the explicit numerical table ptab for the abstract sequence pi+1p_{i+1}pi+1​ whenever the first 66 primes occur, which is what makes the numerical inequalities checkable by computation.

Formalization note. In Lean the statement is Nat.nth Nat.Prime i = ptab i for i < 66; the bound hi : i < 66 is what removes the default value of the table outside its range.

Preamble
import Mathlib.Data.Nat.Prime.Nth
import Definitions.Def_TaoFivePrimes_totient_cert_tables
Formal statement
namespace TaoFivePrimes

theorem tao_totient_cert_nth_prime_eq (i : ℕ) (hi : i < 66) :
    Nat.nth Nat.Prime i = ptab i := by sorry

end TaoFivePrimes
Source
Input data for the finite Rosser--Schoenfeld (1962) totient verification formalized in this project. The values are the primes below 320, as tabulated in J. B. Rosser and L. Schoenfeld, *Approximate formulas for some functions of prime numbers*, Illinois J. Math. 6 (1962), 64--94, Section 5.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, licensed under Apache 2.0.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTermsJoin SlackJoin Zulip© 2026 Prove2Me