Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Explicit square-root error for squarefree coprime counting with the exact density

Proved
Helfgott.squarefree_coprime_count_square_root_error

by raresbuhai · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

goldbachminor-arcsmobiussquarefreevaughan-identity

For every positive integer qqq and nonnegative integer NNN,

∣∑1≤n≤N,(n,q)=1μ(n)2−6Nπ2∏p∣qpp+1∣≤3N∑e∣q∣μ(e)∣e.\left|\sum_{1\le n\le N,(n,q)=1}\mu(n)^2- \frac{6N}{\pi^2}\prod_{p\mid q}\frac p{p+1}\right| \le 3\sqrt N\sum_{e\mid q}\frac{|\mu(e)|}{\sqrt e}.​1≤n≤N,(n,q)=1∑​μ(n)2−π26N​p∣q∏​p+1p​​≤3N​e∣q∑​e​∣μ(e)∣​.

This unconditional estimate includes all finite endpoints. It retains the square-root divisor weights in the modulus error, as needed in the reduction of the actual Vaughan Type II Mobius energy to squarefree coprime counting.

Preamble
import Mathlib.NumberTheory.ArithmeticFunction.Moebius
import Mathlib.Data.Nat.Totient
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
open Finset Nat ArithmeticFunction
open scoped BigOperators Classical
Formal statement
namespace Helfgott

theorem squarefree_coprime_count_square_root_error  (q N : ℕ) (hq : q ≠ 0) :
    |(∑ n ∈ Finset.Icc 1 N,if Nat.Coprime n q then ((moebius n : ℤ) : ℝ)^2 else 0)-
      (N : ℝ)*(6/Real.pi^2)*(∏ p ∈ q.primeFactors,(p : ℝ)/((p : ℝ)+1))| ≤
      3*Real.sqrt (N : ℝ)*(∑ e ∈ q.divisors,|((moebius e : ℤ) : ℝ)|/Real.sqrt (e : ℝ)) := by sorry

end Helfgott
Source
H. A. Helfgott, Minor arcs for Goldbach, section 4.1.1, https://arxiv.org/abs/1205.5252. Squarefree coprime counting prerequisite for the Type II cancellation estimate. Complete original Lean proof from exact Mobius inversion, principal Dirichlet L-series, canonical Euler factors, telescoping tails and floor errors. Mathlib attributions retained. Written by Codex.

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