Dirichlet's theorem on primes in arithmetic progressions
ProvedFamousTheorems.dirichlet_primes_in_APmathlibnumber-theory
Every admissible arithmetic progression contains infinitely many primes.
For there are infinitely many primes .
The coprimality hypothesis is necessary: if then every term of the progression is divisible by , so at most one is prime. The theorem says this is the only obstruction — primes are distributed across all admissible residue classes.
Proved by Dirichlet in 1837, and the founding work of analytic number theory. He introduced characters mod and their -functions precisely to isolate a single residue class by orthogonality, and the crux is that for every non-principal — without which the primes could conspire to avoid a class. No elementary proof of the general case is known.
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
theorem dirichlet_primes_in_AP : ∀ {q : ℕ} [NeZero q] {a : ZMod q}, IsUnit a →
{p : ℕ | p.Prime ∧ (p : ZMod q) = a}.Infinite := by sorry
end FamousTheoremsSource
One of Freek Wiedijk's "100 theorems"; formalized in Mathlib. Proof here reduces to the corresponding Mathlib result.