Mathlib theorem · Existing formal mathematics

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.

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}.Infinite

The 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.

A character decomposition and nonvanishing argument force the prime contribution in every invertible residue class to diverge, hence the class contains infinitely many primes. Explanatory diagram.
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

Statement map for Dirichlet's Theorem on Primes in Arithmetic ProgressionsEvery invertible residue class modulo a positive natural number contains infinitely many primes. Claim boundary: 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 pinned upstream declaration is Nat.infinite_setOf_prime_and_eq_mod. The complete formal statement is available in the Exact Mathlib statement section.Mathematical readingEvery invertible residueclass modulo a positivenatural number containsinfinitely many primes.Claim boundaryThis target indexesMathlib's infinitudetheorem for primes inone invertible residueclass modulo a nonzeronatural modulus. Itasserts infinitely manysuch primes; it does notgive their density, anasymptotic countingformula, a least-primebound, or a new proof.Pinned declarationmathlib ·Nat.infinite_setOf_prime_and_eq_modStatement map for Dirichlet's Theorem on Primes in Arithmetic ProgressionsEvery invertible residue class modulo a positive natural number contains infinitely many primes. Claim boundary: 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 pinned upstream declaration is Nat.infinite_setOf_prime_and_eq_mod. The complete formal statement is available in the Exact Mathlib statement section.Mathematical readingEvery invertible residueclass modulo a positivenatural number containsinfinitely many primes.Claim boundaryThis target indexesMathlib's infinitudetheorem for primes inone invertible residueclass modulo a nonzeronatural modulus. Itasserts infinitely manysuch primes; it does notgive their density, anasymptotic countingformula, a least-primebound, or a new proof.Pinned declarationmathlib ·Nat.infinite_setOf_prime_and_eq_mod

Read the exact Mathlib declaration

This map summarizes the statement's structure; the exact Mathlib declaration remains authoritative.

For every unit residue modulo a positive modulus, the primes returning to that class never run out. Explanatory diagram.
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

Upstream indexedPinned source bytes verified locally
Locally reproducedExact upstream declaration replayed
Reviewed pageCurrent public presentation reviewed
Accepted Atlas resultNot recorded for the preferred artifact

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.

Source and local evidence

Where the theorem comes from

Existing declaration
Nat.infinite_setOf_prime_and_eq_mod in mathlib
Relationship
The checked artifact is the upstream declaration itself
Local Lean evidence
artifact.library.mathlib.dirichlet-primes-arithmetic-progressions.v001
Source
Open the pinned upstream reference