Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Rosser–Schoenfeld's Lemma 15 for the totient function

Open
TaoFivePrimes.rosser_schoenfeld_totient_lemma15

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

additive-number-theorynumber-theoryprime-pairssieve-methodstao-five-primes

Let n>1n > 1n>1 be an integer, yyy a real number, φ\varphiφ Euler's totient function, γ\gammaγ the Euler–Mascheroni constant, and θ\thetaθ the Chebyshev theta function. Assume

2.88≤log⁡n+y,log⁡n<θ(log⁡n+y),0≤y−2≤0.9 log⁡nlog⁡log⁡n.2.88 \le \log n + y, \qquad \log n < \theta(\log n + y), \qquad 0 \le y - 2 \le \frac{0.9\,\log n}{\log\log n}.2.88≤logn+y,logn<θ(logn+y),0≤y−2≤loglogn0.9logn​.

Then

nφ(n)  <  eγ log⁡log⁡n+52log⁡log⁡n.(3.41)\frac{n}{\varphi(n)} \;<\; e^{\gamma}\,\log\log n + \frac{5}{2\log\log n}. \qquad (3.41)φ(n)n​<eγloglogn+2loglogn5​.(3.41)

This is Lemma 15 of Rosser and Schoenfeld (1962), §9 (p. 88), the analytic core of Theorem 15. In the source it is obtained by applying Theorem 33 to bound n/φ(n)n/\varphi(n)n/φ(n) by the Mertens-type product (3.29), giving

nφ(n)  ≤  eγlog⁡(log⁡n+y−2)(1+0.5log⁡(log⁡n+y−2))  <  eγ(log⁡log⁡n+1.4log⁡log⁡n),\frac{n}{\varphi(n)} \;\le\; e^{\gamma}\log(\log n + y - 2)\left(1 + \frac{0.5}{\log(\log n + y - 2)}\right) \;<\; e^{\gamma}\left(\log\log n + \frac{1.4}{\log\log n}\right),φ(n)n​≤eγlog(logn+y−2)(1+log(logn+y−2)0.5​)<eγ(loglogn+loglogn1.4​),

from which (3.41) follows since 1.781⋅1.4<5/21.781 \cdot 1.4 < 5/21.781⋅1.4<5/2. The hypothesis log⁡n<θ(log⁡n+y)\log n < \theta(\log n + y)logn<θ(logn+y) is what converts the primorial bound of Theorem 33 into a bound on n/φ(n)n/\varphi(n)n/φ(n).

Formalization note: Chebyshev.theta is Mathlib's θ\thetaθ function, Real.exp Real.eulerMascheroniConstant is eγe^{\gamma}eγ, and Nat.totient is φ\varphiφ.

Preamble
import Mathlib.Data.Nat.Totient
import Mathlib.NumberTheory.Chebyshev
import Mathlib.NumberTheory.Harmonic.EulerMascheroni
Formal statement
namespace TaoFivePrimes

theorem rosser_schoenfeld_totient_lemma15 (n : ℕ) (y : ℝ) (hn : 1 < n)
    (h1 : 2.88 ≤ Real.log (n : ℝ) + y)
    (h2 : Real.log (n : ℝ) < Chebyshev.theta (Real.log (n : ℝ) + y))
    (h3 : 0 ≤ y - 2)
    (h4 : y - 2 ≤ 0.9 * Real.log (n : ℝ) / Real.log (Real.log (n : ℝ))) :
    (n : ℝ) / Nat.totient n <
      Real.exp Real.eulerMascheroniConstant * Real.log (Real.log (n : ℝ)) +
        5 / (2 * Real.log (Real.log (n : ℝ))) := by sorry

end TaoFivePrimes
Source
J.B. Rosser, L. Schoenfeld, *Approximate formulas for some functions of prime numbers*, Illinois Journal of Mathematics 6 (1962), 64–94, https://projecteuclid.org/journals/illinois-journal-of-mathematics/volume-6/issue-1/Approximate-formulas-for-some-functions-of-prime-numbers/10.1215/ijm/1255631807.full, §9, Lemma 15, p. 88, and p. 89 for the selection of yyy; Theorem 33, (3.29), (3.14), Theorem 19; used in T. Tao, *Every odd number greater than 1 is the sum of at most five primes*, arXiv:1201.6656, proof of Proposition 4.10.

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, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me