The S0 bound in sharp form, 51 * exp 2
Provedgpy_mertensS0_bound_auxnumber-theory
For every natural number , the partial sum differs from by at most . The proof is elementary: writing as the Dirichlet convolution of with a factor supported on prime powers and , the sum becomes a harmonic sum weighted by , and truncated Euler products bound both the absolute and log-weighted -sums. No prime number theorem or Chebyshev estimate is used; only convergent prime sums and the harmonic bound. Formalization Note: the sum is written out in Mathlib terms, with no local definitions.
Preamble
import Mathlib open Classical
Formal statement
theorem gpy_mertensS0_bound_aux {T : ℕ} (hT : 2 ≤ T) :
abs ((∑ D ∈ Finset.range (T + 1), (if Squarefree D then (ArithmeticFunction.moebius D : ℝ) ^ 2
/ ((Nat.totient D : ℕ) : ℝ) else 0)) - Real.log (T : ℝ))
≤ 51 * Real.exp 2 := by sorrySource
GPY S0 bound: sharp form of the explicit Mertens input for hMono