Public Mathlib landmark · existing upstream theorem · read-only

Number theory · existing Mathlib theorem

Infinitely Many Primes

Choose any natural number n. There is always a prime number p with p at least n, so no finite threshold contains all primes.

Four separate status axes

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

These states distinguish upstream identity, local reproduction, review, and Atlas acceptance. This page is part of the public, read-only Mathlib landmark collection.

Formal orientation

Statement map

Statement map for Infinitely Many PrimesFor every natural-number threshold, there is a prime at or above it. The pinned upstream declaration is Nat.exists_infinite_primes. The exact checked statement is Nat.exists_infinite_primes (n : ℕ) : ∃ p, n ≤ p ∧ Nat.Prime p.Mathematical readingFor every natural-numberthreshold, there is aprime at or above it.Pinned declarationmathlib ·Nat.exists_infinite_primesExact checked formNat.exists_infinite_primes(n : ℕ) : ∃ p, n ≤ p ∧Nat.Prime pStatement map for Infinitely Many PrimesFor every natural-number threshold, there is a prime at or above it. The pinned upstream declaration is Nat.exists_infinite_primes. The exact checked statement is Nat.exists_infinite_primes (n : ℕ) : ∃ p, n ≤ p ∧ Nat.Prime p.Mathematical readingFor every natural-numberthreshold, there is aprime at or above it.Pinned declarationmathlib ·Nat.exists_infinite_primesExact checked formNat.exists_infinite_primes(n : ℕ) : ∃ p, n ≤ p ∧Nat.Prime p

This deterministic map orients the reader from the mathematical summary to the pinned declaration and exact checked form. The HTML statement below is authoritative.

The theorem at a glance

Infinitely Many Primes at a glance

A source-bound editorial overview of the exact Mathlib formulation. The image is explanatory; the statement map, formal type, and pinned source remain authoritative.

Every threshold has a prime at or above it; the poster presents unboundedness without implying a prime-gap or counting estimate. Generated explanation only; the exact HTML statement and pinned source are authoritative.
Detailed visual description

A blue threshold gate labeled n opens onto a gold path toward a green prime beacon p and a repeating horizon. The formal threshold-existence statement sits above, while lower panels explain the three reading steps and explicitly exclude prime-gap and prime-count estimates.

Beyond any chosen threshold, another prime can be found. Generated explanation only; the exact HTML statement and pinned source are authoritative.
Detailed visual description

An engraved road crosses a foreground gate and climbs through a forest-green landscape. Gold beacons continue after the gate toward a luminous open horizon, while irregular stone clusters sit away from the path.

Complementary intuition

A mathematical landmark

Euclid's theorem is the archetypal infinitude argument in number theory. This threshold formulation states unboundedness of the prime numbers directly.

The low-text schematic gives the theorem a visual identity; it does not replace the source-bound poster or exact statement.

Authoritative formal type

Exact Mathlib statement

Nat.exists_infinite_primes (n : ℕ) : ∃ p, n ≤ p ∧ Nat.Prime p
Selected evidence declaration text
theorem Nat.exists_infinite_primes (n : ℕ) : ∃ p, n ≤ p ∧ Nat.Prime p

Proof architecture

A least-prime-factor route beyond every threshold

3 curated stages

Mathlib chooses p as the least prime factor of n! + 1, proves p prime, and rules out p below the arbitrary threshold because such a p would divide both n! and n! + 1 and therefore divide one. The result is unboundedness of primes, not a next-prime or prime-gap theorem.

These source-anchored stages explain the retained Mathlib proof route. They are generated explanations, not proof evidence or an extracted Lean proof-term dependency graph.

  1. Select the least prime factor of the factorial successor

    From the factorial successor, select its least prime factor; the source proves that this selected factor is prime.

    p := minFac (n! + 1) and Nat.Prime p

    The source defines p to be minFac (n! + 1). Factorial positivity shows n! + 1 is not one, so minFac_prime proves that this specifically selected least factor p is prime.

  2. A factor at or below the threshold would divide one

    If the selected prime factor lay at or below the threshold, it would divide both the factorial and its successor, hence divide one—impossible for a prime.

    p ∣ n! and p ∣ n! + 1 imply p ∣ 1, contradicting Nat.Prime p

    Assume contrariwise that p lies at or below n. Positivity of p and dvd_factorial then give p ∣ n!, while minFac_dvd gives p ∣ n! + 1; the addition divisibility lemma forces p ∣ 1, contradicting the fact that p is prime.

  3. A prime exists at or above every threshold

    The contradiction places the selected prime at or above the arbitrary threshold, establishing that primes are unbounded.

    ∃ p, n ≤ p ∧ Nat.Prime p

    The divisibility contradiction proves n ≤ p. Pairing that bound with the already established primality of p yields the witness ⟨p, np, pp⟩ for the arbitrary threshold n, which is exactly the theorem's unbounded-primes conclusion.

Claim boundary

No new theorem is claimed

This is the exact threshold-existence form in Mathlib. It proves a prime exists at or above every natural-number bound; it does not give a quantitative prime-gap estimate or a count of primes below a bound.

Provenance

Origin and evidence stay separate

Existing declaration
Nat.exists_infinite_primes in mathlib
Relationship
The checked artifact is the upstream declaration itself
Preferred checked artifact
artifact.library.mathlib.infinitely-many-primes.v001
Source handling
Verified upstream reference; no mirrored source package