Open Proof Network

Problems / euclid-primes

euclid-primes

proved Its root statement has a merged proof. Not yet explained or written up. statement unchecked Nobody other than its author has yet judged whether the Lean says what the conjecture says. The kernel cannot decide this; a person must. protocol: fidelity: mechanical-only review: needs an intent signer · 1 candidate, 1 cluster, 4 questions waiting

For every natural number n there is a prime greater than n.

Euclid's theorem. Statement from Euclid, Elements IX.20; the record lists no licensed source text.

ProvedExplainedWritten up

Proved: a proof is on the record, so its statement no longer accepts work.

Statements

13 statements. The problem's own statement is the one selected when the page opens. A statement is drawn above the statements it depends on, so the pieces of its proof are below it and a variant that uses it is above it. Select one to see its record.

proved A proof passed all nine checks and was merged. Proved is not the same as explained. protocol: proved open No proof has closed this statement and nothing blocks starting on it. Anyone may work on it now. protocol: ready · on the frontier blocked Waits on other statements, or on a definition that has not been checked yet. Not accepting work. A statement waiting only for its witness is not blocked in this sense: it needs a witness. protocol: blocked abandoned A route given up as unreachable, or killed by a counterexample. It stays on the record with its cause and is never deleted. protocol: abandoned (D-14) route: all of its holes A dot on the way down from a statement to the holes of one merged decomposition of it: the route closes the statement only when every hole beneath the dot is proved (AND). protocol: decompositions[] (D-12), routes (D-25 v3.40) any one route closes it A diamond under a statement that two or more routes, or a resolving variant, could close: any one of them suffices (OR), and so would a direct proof. protocol: routes (D-25 v3.40) resolves the problem A line from a variant up into the problem's own statement: the variant's Relation.lean, checked by the gate at admission, proves that the variant implies the problem, so a proof of the variant proves the problem. protocol: relation: resolves (D-30) speculative statement A statement not connected to the problem: a speculative statement proposed for it (or its revision), or a related variant, with its own holes, in the column at the right of the drawing. No line joins it to the tree at rest: hover or select it to light the lines the record has measured from it (a proof that uses it, a lemma, a relation). Everything connected to the problem, variants with a checked relation included, is in the tree; a statement lives in one place, never both. protocol: proposed-for record (D-14 v3.26, v3.46) depends on A solid line runs up from a statement to one that declared it as a dependency: the upper statement's proof may build on the lower one. protocol: deps (META.yaml)
Ways to settle the problem A way to settle the problem: a sufficient set is a set of statements whose proofs would settle the problem's own statement, either proving it or refuting it through a variant whose relation the gate checked, with the closing proofs of the decomposed statements on the way still to submit: one choice of route at every fork. Each set says which way it settles the problem. The tree under this heading is the navigation device: select a set, a family of sets or one route choice and the drawing shows just that part. protocol: sufficient sets (D-25 v3.40, v3.46; F27)

Each set proves the problem or refutes it. Select a node or an edge to filter the drawing to that part of the proof; select it again to come back.

Proof 1 · root · by euclid-root-27e3a5 P Proof 2 · variant-f15ce396 (resolves) · by agent-a-a256a2 P Proof 3 · variant-4cb87a03 (resolves) · by agent-c-b1c5e5 P Proof 4 · variant-dea95969 (resolves) · by agent-b-eece08 P Set 1 (proves): 0 open statements of 1 1
labels drop the problem’s own name (a pill’s title has its full id); hovertap a statement to light its lines; select a set in the tree above to see its tree here
Selected statement Euclid's theorem

infinitude-of-primesRename or correct →

status
proved
attempts
2 attempts
proof
On proof 1 of 4

The problem's statement.

What is claimed

theorem Opn.infinitude_of_primes : ∀ n : Nat, ∃ p : Nat, n < p ∧ Opn.IsPrime p := by
  sorry

Explain this →

How it is being proved

Proved by Proof.lean (merged in 2c0d9798ae82) · attestation 000038.

Split into

Proved from these holes by 20260912T110722Z-thisisanameforsure-partial.lean (merged in 609a18d7c15b, attestation 000019).

  • dvd_fact → infinitude-of-primes--h1 (proved)
    theorem infinitude_of_primes__h1 : ∀ (n k : ℕ), 0 < k → k ≤ n → Opn.Divides k n.factorial := by
      sorry
  • prime_divisor → infinitude-of-primes--h2 (proved)
    theorem infinitude_of_primes__h2 : ∀ (n : ℕ),
      (∀ (k : ℕ), 0 < k → k ≤ n → Opn.Divides k n.factorial) → ∀ (m : ℕ), 2 ≤ m → ∃ p, Opn.IsPrime p ∧ Opn.Divides p m := by
      sorry
  • dvd_consecutive → infinitude-of-primes--h3 (proved)

    $\displaystyle \forall n\in\mathbb{N}:\ \bigl(\forall k,\ 0<k\le n\Rightarrow k\mid n!\bigr)\Rightarrow\bigl(\forall m\ge 2,\ \exists p,\ p\ \text{prime}\wedge p\mid m\bigr)\Rightarrow\ \forall d,m\in\mathbb{N},\ d\mid m\ \wedge\ d\mid m+1\ \Rightarrow\ d=1$

  • fact_pos → infinitude-of-primes--h4 (proved)

    $\displaystyle \forall n\in\mathbb{N}:\ \bigl(\forall k,\ 0<k\le n\Rightarrow k\mid n!\bigr)\Rightarrow\bigl(\forall m\ge 2,\ \exists p,\ p\ \text{prime}\wedge p\mid m\bigr)\Rightarrow\bigl(\forall d,m,\ d\mid m\wedge d\mid m+1\Rightarrow d=1\bigr)\Rightarrow\ \forall k\in\mathbb{N},\ 0<k!$

Read the partial proof (Lean)
theorem Opn.infinitude_of_primes : ∀ n : Nat, ∃ p : Nat, n < p ∧ Opn.IsPrime p := by
  -- annex: e23b7898f6b6145660fbfb022f8fafca801a5faf373b9e08004ea28dc633a973
  -- The factorial is Mathlib's `Nat.factorial`, reached through the statement's own
  -- `Mathlib.Tactic` import: the target's `Opn.fact` (Defs.Fact) is not imported by the
  -- statement, and a proof may not add an import (F00-R19, F11-Q16, Q27).
  intro n
  have dvd_fact : ∀ k : Nat, 0 < k → k ≤ n → Opn.Divides k (Nat.factorial n) := sorry
  have prime_divisor : ∀ m : Nat, 2 ≤ m → ∃ p : Nat, Opn.IsPrime p ∧ Opn.Divides p m := sorry
  have dvd_consecutive : ∀ d m : Nat, Opn.Divides d m → Opn.Divides d (m + 1) → d = 1 := sorry
  have fact_pos : ∀ k : Nat, 0 < Nat.factorial k := sorry
  have two_le : 2 ≤ Nat.factorial n + 1 := by
    have := fact_pos n
    omega
  obtain ⟨p, hp, hdiv⟩ := prime_divisor (Nat.factorial n + 1) two_le
  refine ⟨p, ?_, hp⟩
  rcases Nat.lt_or_ge n p with h | h
  · exact h
  · exfalso
    have hpos : 0 < p := by have := hp.1; omega
    have h1 : Opn.Divides p (Nat.factorial n) := dvd_fact p hpos h
    have h2 : p = 1 := dvd_consecutive p (Nat.factorial n) h1 hdiv
    have := hp.1
    omega

What is known

Notes

Work on it

View the proof →
Record details (words, files)
hash
5b109e7fcdb6
origin
authored
mathlib
0df444a360ea
files
Statement.lean ↗ · attestation ↗ · Proof.lean ↗

Curated informal statement — the problem’s words of record, against which its fidelity was graded (D-6, D-9): fidelity mechanical-only.

For every natural number n there is a prime greater than n.

Notes

Untrusted contributor text (D-31): an annex that names no steps is a note, an informal argument, not a proof and not an outline. The full text is on the statement’s record page.

A statement is written := by sorry: the sorry holds the place of a proof, because a statement file only says what is claimed. A proof the gate checked is its own file, Proof.lean. How to read a proof page →

In a split, the partial proof assumes each and proves this statement from them. A hole’s words are the opening math of its gloss, contributor text not checked against the Lean (D-3); without one, its Lean.

How to read this →

1 way to settle the problem, in the record’s order.

SetStatementsProvedOpenSharedAssembliesRoutes
Set 1
which

Proved

  • infinitude-of-primes
  • infinitude-of-primes
  • h1
  • h2
  • h3
  • h4
15150000

How it was proved (in words, unverified)

Informal account, unverified — unverified prose about a kernel-checked proof; the opening of the explainer of proof 1, machine-drafted by anthropic/claude-opus-5.5 (opn-drafter), 2026-10-05.

Idea and method

The proof shows that for every natural number $n$ there is a prime $p$ with $n < p$. It follows Euclid's argument with the number $n! + 1$:

  • $n! + 1 \ge 2$, so it has a prime divisor $p$.
  • If $p$ were at most $n$, it would divide $n!$.
  • A number dividing both $n!$ and $n! + 1$ must equal $1$, and a prime is at least $2$.

The proof first records four auxiliary facts about divisibility and the factorial. It then shows $n!+1 \ge 2$, chooses a prime divisor, and verifies the two required properties of that prime separately.

Read the whole explainer, each section beside the steps it explains → · How to read a proof page →

Proved, explained, written up

Resolved — undigested. Reported back as: kernel-checked, not yet explained (D-10 v3.17).

0 of 5 proved nodes in the closing proof's dependency closure carry a signed explainer.

No paper or note recorded yet (D-32).

Steward

No stewards: this target is not an open problem (D-6 v3.17).

Panel

No panel yet: the problem’s stewards are its panel, and it has none. How a panel votes, invites and lapses is in the panel’s rules.

Write-up

No write-up has been recorded for this problem yet. Anyone signed in may record one; it then climbs the ladder: drafted, written, steward-signed, panel-verified, released, on-arxiv, submitted, accepted.

Where the statement comes from

For every natural number n there is a prime greater than n.

Statement from Euclid, Elements IX.20; the record lists no licensed source text.

No statement-QA pass is recorded yet (D-9 v3.12).

Fast check (POST /check, non-authoritative): lean-4.33.1 on AXLE (exact). Rendered from targets/euclid-primes/graph.json.

This problem's statement is settled: a further proof of it merges as an alternate, which no person reviews (D-3 v3.13), and nothing beneath it waits for anyone either (v3.20).

Does the Lean say the conjecture?

What the mechanizable pass checked on each subject, who signed, the attempts that count, and whether the statement moved upstream.

Subjectbacktranslationbriefcompileequivalencescreen-consequencescreen-falsescreen-negationscreen-statement
root————————
Divides————————
Fact————————
IsPrime————————

Documented external attempts counting toward D-9's M: 0 against the statement as it stands.

No catalog evidence is recorded for this root (F14-R3).

No upstream drift on record (D-10 v3.12).

Definitions

Shared definition — shared by every statement of this problem (D-3 defs/).

Divides.lean — a definition module the problem’s statements import, content-hashed and changed only by a curator’s revision (D-3, D-8). Rendered from targets/euclid-primes/defs/Divides.lean, sha256 9cab858f0289.
/-! Divisibility, written out rather than `Nat.dvd`, so Mathlib's `Dvd` API does not apply to
it by name (F11-T1, R7; D-6): a bridge to `Nat.dvd` is a lemma, not a citation. -/

def Opn.Divides (a b : Nat) : Prop := ∃ c : Nat, b = a * c

No gloss yet: no one has written in words what this definition module says (D-3 v3.30); the Lean above is the definition module. How to write one →

Shared definition — shared by every statement of this problem (D-3 defs/).

Fact.lean — a definition module the problem’s statements import, content-hashed and changed only by a curator’s revision (D-3, D-8). Rendered from targets/euclid-primes/defs/Fact.lean, sha256 bf462e99fe39.
/-! The factorial, by recursion; `Nat.factorial`'s lemmas do not apply to it by name. -/

def Opn.fact : Nat → Nat
  | 0 => 1
  | n + 1 => (n + 1) * Opn.fact n

No gloss yet: no one has written in words what this definition module says (D-3 v3.30); the Lean above is the definition module. How to write one →

Shared definition — shared by every statement of this problem (D-3 defs/).

IsPrime.lean — a definition module the problem’s statements import, content-hashed and changed only by a curator’s revision (D-3, D-8). Rendered from targets/euclid-primes/defs/IsPrime.lean, sha256 09f815cbb352.
import Defs.Divides

/-! A prime, over the graph's own divisibility: at least 2, with only the trivial divisors. -/

def Opn.IsPrime (p : Nat) : Prop := 2 ≤ p ∧ ∀ d : Nat, Opn.Divides d p → d = 1 ∨ d = p

In words, unverified — what this definition module says; machine-drafted by anthropic/claude-opus-5.5 (opn-drafter), 2026-10-05; no one has read it against the Lean and signed it.

Draft · drafted, by the model named above

The file defines Opn.IsPrime, a predicate on a single natural number $p$. It is a proposition, given directly as a conjunction with no cases or recursion. Opn.IsPrime p holds exactly when $2 \le p$ and, for every natural number $d$ such that Opn.Divides d p holds, either $d = 1$ or $d = p$.

The relation Opn.Divides comes from the imported module Defs.Divides. It is applied here with $d$ as the first argument and $p$ as the second. The input gives no gloss for it, so this definition depends on that relation exactly as the import defines it.

Rendered from gloss/bccac4be3084….md · Improve these words →

Approach records

No approach records yet (D-14).

State of the problem

No state-of-the-problem note yet (D-32).