Existing in Mathlib · Number theory
Dirichlet's Theorem on Primes in Arithmetic Progressions
Fix a positive modulus q and an invertible residue a modulo q. Infinitely many natural-number primes leave residue a when divided by q.
- Dirichlet's theorem
- primes in arithmetic progressions
- invertible residue classes
- Dirichlet characters
- L-series
- von Mangoldt function
Exact theorem
Exact Mathlib statement
theorem Nat.infinite_setOf_prime_and_eq_mod {q : ℕ} [NeZero q] {a : ZMod q} (ha : IsUnit a) : {p : ℕ | p.Prime ∧ (p : ZMod q) = a}.InfiniteThe theorem at a glance
Dirichlet's Theorem — infinitely many primes in every unit residue class
A visual guide to the theorem's hypotheses, structure, and conclusion; the exact statement gives the formal detail.
Dirichlet's Theorem — infinitely many primes in every unit residue class

Detailed visual description
The exact infinitude statement leads into the source's analytic route: isolate the residue class with the von Mangoldt function, decompose it using Dirichlet characters, identify the L-series, cancel the pole at one, use nonvanishing for continuity, remove the summable nonprime contribution, and conclude that primes in the class cannot be finite.
Statement structure
Statement and scope
Read the exact Mathlib declaration
This map summarizes the statement's structure; the exact Mathlib declaration remains authoritative.
One invertible residue class receives infinitely many primes

Detailed visual description
A modular wheel isolates one invertible residue class while an unbounded, irregular prime procession returns to it. Character waves and an analytic pole-cancellation motif recall the checked L-series route without suggesting equal spacing or a density theorem.
Why it matters
A mathematical landmark
Dirichlet's theorem is a foundational bridge between prime-number distribution, harmonic analysis on residue classes, and complex analytic L-functions. The Mathlib file retains a substantial source-visible route from character orthogonality and nonvanishing to the exact infinitude conclusion.
ProofAtlas record
What has been checked
Mathlib is the source of the theorem; the local Lean replay and page review are separate.
Claim boundary
No new theorem is claimed
This target indexes Mathlib's infinitude theorem for primes in one invertible residue class modulo a nonzero natural modulus. It asserts infinitely many such primes; it does not give their density, an asymptotic counting formula, a least-prime bound, or a new proof.
- The selected declaration proves infinitude, not equidistribution or a prime-counting asymptotic.
- The residue class must be a unit modulo the nonzero modulus.
- The theorem gives no explicit bound for the least or next prime in the class.
- ProofAtlas is indexing an existing Mathlib theorem, not claiming new mathematics.
Source and local evidence
Where the theorem comes from
- Existing declaration
Nat.infinite_setOf_prime_and_eq_modin mathlib- Relationship
- The checked artifact is the upstream declaration itself
- Local Lean evidence
artifact.library.mathlib.dirichlet-primes-arithmetic-progressions.v001