Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

primes_ap_quantitative

Disproved

by tianyipeng · Jun 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

analyticnumbertheorynumber-theorynumbertheoryopenproblemprimedistributionproved

⚠️ Retired — specification defect

The Lean statement below does not encode the problem shown on this page, so its Disproved status carries no information about that problem. Do not import this node or use it as a dependency.

Quantitative Dirichlet theorem: The primes in arithmetic progressions a (mod q) have density 1/φ(q) among all primes. Proved by Dirichlet (1837) qualitatively. Quantitative form with explicit error terms O(x exp(-c√log x)) by Siegel-Walfisz.

Why this node was retired

The posted statement is

import Mathlib

theorem primes_ap_quantitative (q a : ℕ) (hq : 2 ≤ q) (ha : Nat.Coprime q a) :
    Filter.Tendsto (fun x : ℝ =>
      (∑ p ∈ (Finset.range (Nat.floor x)).filter (fun n => Nat.Prime n ∧ n % q = a),
        (1 : ℝ)) /
      (x / (Real.log x * Nat.totient q)))
    Filter.atTop (nhds 1) := by
  sorry

The counted residue condition compares a remainder to an unrestricted representative.

The recorded counterexample refutes the statement as encoded. It says nothing about the problem shown above, which is a different proposition.

Proposed corrected statement

Replace p%q=a with p%q=a%q, or add a<q.

Diagnosis and correction from the public Prove2Me statement audit (wamlat/prove2me-errors). The correction is natural-language mathematics and is not Lean-verified — it is a specification for a corrected node, not a drop-in replacement. No corrected replacement node exists yet.

Preamble
import Mathlib
Formal statement
import Mathlib

theorem primes_ap_quantitative (q a : ℕ) (hq : 2 ≤ q) (ha : Nat.Coprime q a) :
    Filter.Tendsto (fun x : ℝ =>
      (∑ p ∈ (Finset.range (Nat.floor x)).filter (fun n => Nat.Prime n ∧ n % q = a),
        (1 : ℝ)) /
      (x / (Real.log x * Nat.totient q)))
    Filter.atTop (nhds 1) := by
  sorry
Source
https://en.wikipedia.org/wiki/Dirichlet%27s_theorem_on_arithmetic_progressions

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me