Problems / euclid-primes / proof 1
Proof 1 of 4
Proof 1 · root · by euclid-root-27e3a5, merged in 2c0d9798ae82.
The statement
Statement not audited — fidelity mechanical-only; QA pass incomplete; no signer yet.
theorem Opn.infinitude_of_primes : ∀ n : Nat, ∃ p : Nat, n < p ∧ Opn.IsPrime p := by sorry
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 →
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.
Fidelity: 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 . Rendered from targets/euclid-primes/nodes/infinitude-of-primes/Statement.lean.
The proof, dependencies first
5 statements on this proof. Each statement comes before the statements whose proofs use it. A step’s outline is folded; open it for its goal, what it uses and its Lean lines. How to read a proof page →
infinitude-of-primes--h1 proved
Statement not audited — only a problem’s root statement is audited for fidelity (D-9); the kernel checks a proof against this Lean as written.
theorem infinitude_of_primes__h1 : ∀ (n k : ℕ), 0 < k → k ≤ n → Opn.Divides k n.factorial := by sorry
A statement is written
:= by sorry: thesorryholds 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 words, unverified — what this statement says; written by f21-words-check, drafted with anthropic/claude-opus-5.5 via Claude Code, 2026-10-05; read against the Lean by thisisanameforsure (2026-10-06) (F20-R8; it changes no status or grade).
Final · read against the Lean by thisisanameforsure (2026-10-06)
For all natural numbers $n$ and $k$: if $0 < k$ and $k \le n$, then $k$ divides $n!$.
Divisibility here is the problem's own definition
Opn.Divides: $k$ divides $m$ when $m = k \cdot c$ for some natural number $c$.Rendered from gloss/df65addf582c….md · Improve these words →
History: 2 versions on record
2026-10-05 · written by f21-words-check, drafted with anthropic/claude-opus-5.5 via Claude Code · signed by thisisanameforsure (2026-10-06) · gloss/df65addf582c….md · the first version of its chain
Read this version
For all natural numbers $n$ and $k$: if $0 < k$ and $k \le n$, then $k$ divides $n!$.
Divisibility here is the problem's own definition
Opn.Divides: $k$ divides $m$ when $m = k \cdot c$ for some natural number $c$.2026-10-18 · written by f29-words, drafted with Claude Fable 5.1 (claude-fable-5-1) · not signed · current · gloss/db3494256811….md · diff to its predecessor
Read this version
For all natural numbers $n$ and $k$: if $0 < k$ and $k \le n$, then $k$ divides $n!$.
Divisibility here is the problem's own definition
Opn.Divides: $k$ divides $m$ when $m = k \cdot c$ for some natural number $c$.
Diff of
db3494256811againstdf65addf582c(the words are the same)
Improve these words → Nothing is edited: a correction is a new version, and every version stays on the record (D-3 v3.30).
Checked by the kernel — an outline of the proof attested in attestations/000034.json, merge commit
a9f10904c037.Outline of
Proof.lean, extracted by the gate at82834c4684b8from the proof’s elaboration: each step is a claim the proof establishes and the goal it leaves. Open a step for what it uses and its Lean lines.s1obtaink ∣ n.factorialLeaves
Opn.Divides k n.factorial, withc : ℕ,hc : n.factorial = k * c.Uses library
Nat.dvd_factorial.Lean, line 10
obtain ⟨c, hc⟩ := Nat.dvd_factorial hk hkn
targets/euclid-primes/nodes/infinitude-of-primes--h1/Proof.lean, line 10 at
a9f10904c037↗
Proof: targets/euclid-primes/nodes/infinitude-of-primes--h1/Proof.lean, lines 1–11 at
a9f10904c037.No explainer yet. This proof written as a journal would print it, labelled unverified, is the next thing a writer could add, by pull request (D-3, D-36; the guide shows how).
infinitude-of-primes--h2 proved
Statement not audited — only a problem’s root statement is audited for fidelity (D-9); the kernel checks a proof against this Lean as written.
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
A statement is written
:= by sorry: thesorryholds 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 words, unverified — what this statement 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 theorem
infinitude_of_primes__h2asserts the following. For every natural number $n$, suppose every natural number $k$ with $0 < k$ and $k \le n$ divides $n!$, where "divides" isOpn.Divides. Under that hypothesis, for every natural number $m$ with $2 \le m$ there exists some $p$ such that $p$ is prime and $p$ divides $m$. Here "prime" isOpn.IsPrimeand "divides" is againOpn.Divides.The hypothesis about $n$ does not mention $m$ or $p$, so the conclusion does not depend on $n$. The file does not write the type of $p$; it is whatever argument type
Opn.IsPrimeandOpn.Dividestake. No gloss of either definition fromDefs.IsPrimewas provided, so their meanings are taken from their names only. The proof in the file issorry.Rendered from gloss/000e299f1638….md · Improve these words →
History: 2 versions on record
2026-10-05 · machine-drafted by anthropic/claude-opus-5.5 (opn-drafter) · not signed · gloss/000e299f1638….md · the first version of its chain
Read this version
The theorem
infinitude_of_primes__h2asserts the following. For every natural number $n$, suppose every natural number $k$ with $0 < k$ and $k \le n$ divides $n!$, where "divides" isOpn.Divides. Under that hypothesis, for every natural number $m$ with $2 \le m$ there exists some $p$ such that $p$ is prime and $p$ divides $m$. Here "prime" isOpn.IsPrimeand "divides" is againOpn.Divides.The hypothesis about $n$ does not mention $m$ or $p$, so the conclusion does not depend on $n$. The file does not write the type of $p$; it is whatever argument type
Opn.IsPrimeandOpn.Dividestake. No gloss of either definition fromDefs.IsPrimewas provided, so their meanings are taken from their names only. The proof in the file issorry.2026-10-18 · written by f29-words, drafted with Claude Fable 5.1 (claude-fable-5-1) · not signed · current · gloss/e5c72899d9e2….md · diff to its predecessor
Read this version
The theorem
infinitude_of_primes__h2asserts the following. For every natural number $n$, suppose every natural number $k$ with $0 < k$ and $k \le n$ divides $n!$, where "divides" isOpn.Divides. Under that hypothesis, for every natural number $m$ with $2 \le m$ there exists some $p$ such that $p$ is prime and $p$ divides $m$. Here "prime" isOpn.IsPrimeand "divides" is againOpn.Divides.The hypothesis about $n$ does not mention $m$ or $p$, so the conclusion does not depend on $n$. The file does not write the type of $p$; it is whatever argument type
Opn.IsPrimeandOpn.Dividestake. No gloss of either definition fromDefs.IsPrimewas provided, so their meanings are taken from their names only. The proof in the file issorry.
Diff of
e5c72899d9e2against000e299f1638(the words are the same)
Improve these words → Nothing is edited: a correction is a new version, and every version stays on the record (D-3 v3.30).
Checked by the kernel — an outline of the proof attested in attestations/000035.json, merge commit
b134abca6e5d.Outline of
Proof.lean, extracted by the gate at82834c4684b8from the proof’s elaboration: each step is a claim the proof establishes and the goal it leaves. Open a step for what it uses and its Lean lines.s1caseLeaves
(2 : ℕ) ≤ m → ∃ (p : ℕ), Opn.IsPrime p ∧ Opn.Divides p m, withm : ℕ,ih : ∀ m_1 < m, (2 : ℕ) ≤ m_1 → ∃ (p : ℕ), Opn.IsPrime p ∧ Opn.Divides p m_1.Uses definitions
Opn.IsPrime.Lean, lines 12–25
| _ m ih => intro hm by_cases hp : Opn.IsPrime m · exact ⟨m, hp, 1, (Nat.mul_one m).symm⟩ · have hnot : ¬ ∀ d : Nat, Opn.Divides d m → d = 1 ∨ d = m := fun h => hp ⟨hm, h⟩ push_neg at hnot obtain ⟨d, ⟨c, hc⟩, hd1, hdm⟩ := hnot have hd0 : d ≠ 0 := by intro h rw [h, Nat.zero_mul] at hc omega have hdle : d ≤ m := Nat.le_of_dvd (by omega) ⟨c, hc⟩ obtain ⟨p, hpp, a, ha⟩ := ih d (by omega) (by omega) exact ⟨p, hpp, a * c, by rw [hc, ha, Nat.mul_assoc]⟩targets/euclid-primes/nodes/infinitude-of-primes--h2/Proof.lean, lines 12–25 at
b134abca6e5d↗s1.s1caseLeaves
∃ (p : ℕ), Opn.IsPrime p ∧ Opn.Divides p m.Uses library
Exists.introExistential introduction. ,Nat.mul_one.Lean, line 15
· exact ⟨m, hp, 1, (Nat.mul_one m).symm⟩
targets/euclid-primes/nodes/infinitude-of-primes--h2/Proof.lean, line 15 at
b134abca6e5d↗s1.s2caseLeaves
∃ (p : ℕ), Opn.IsPrime p ∧ Opn.Divides p m.Uses library
Exists.introExistential introduction. ,Nat.mul_assoc.Lean, lines 16–25
· have hnot : ¬ ∀ d : Nat, Opn.Divides d m → d = 1 ∨ d = m := fun h => hp ⟨hm, h⟩ push_neg at hnot obtain ⟨d, ⟨c, hc⟩, hd1, hdm⟩ := hnot have hd0 : d ≠ 0 := by intro h rw [h, Nat.zero_mul] at hc omega have hdle : d ≤ m := Nat.le_of_dvd (by omega) ⟨c, hc⟩ obtain ⟨p, hpp, a, ha⟩ := ih d (by omega) (by omega) exact ⟨p, hpp, a * c, by rw [hc, ha, Nat.mul_assoc]⟩targets/euclid-primes/nodes/infinitude-of-primes--h2/Proof.lean, lines 16–25 at
b134abca6e5d↗s1.s2.hnothave¬∀ (d : ℕ), Opn.Divides d m → d = (1 : ℕ) ∨ d = mLeaves
∃ (p : ℕ), Opn.IsPrime p ∧ Opn.Divides p m, withhnot : ¬∀ (d : ℕ), Opn.Divides d m → d = (1 : ℕ) ∨ d = m.Uses definitions
Opn.Divides; libraryNatThe natural numbers, starting at zero. ,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. .Lean, line 16
· have hnot : ¬ ∀ d : Nat, Opn.Divides d m → d = 1 ∨ d = m := fun h => hp ⟨hm, h⟩
targets/euclid-primes/nodes/infinitude-of-primes--h2/Proof.lean, line 16 at
b134abca6e5d↗s1.s2.s2obtain∃ (d : ℕ), Opn.Divides d m ∧ d ≠ (1 : ℕ) ∧ d ≠ mLeaves
∃ (p : ℕ), Opn.IsPrime p ∧ Opn.Divides p m, withd : ℕ,c : ℕ,hc : m = d * c,hd1 : d ≠ (1 : ℕ),hdm : d ≠ m.Lean, line 18
obtain ⟨d, ⟨c, hc⟩, hd1, hdm⟩ := hnot
targets/euclid-primes/nodes/infinitude-of-primes--h2/Proof.lean, line 18 at
b134abca6e5d↗s1.s2.hd0haved ≠ (0 : ℕ)Leaves
∃ (p : ℕ), Opn.IsPrime p ∧ Opn.Divides p m, withhd0 : d ≠ (0 : ℕ).Uses library
Nat.zero_mul.Lean, lines 19–22
have hd0 : d ≠ 0 := by intro h rw [h, Nat.zero_mul] at hc omegatargets/euclid-primes/nodes/infinitude-of-primes--h2/Proof.lean, lines 19–22 at
b134abca6e5d↗s1.s2.hdlehaved ≤ mLeaves
∃ (p : ℕ), Opn.IsPrime p ∧ Opn.Divides p m, withhdle : d ≤ m.Uses library
Nat.le_of_dvd,Exists.introExistential introduction. .Lean, line 23
have hdle : d ≤ m := Nat.le_of_dvd (by omega) ⟨c, hc⟩
targets/euclid-primes/nodes/infinitude-of-primes--h2/Proof.lean, line 23 at
b134abca6e5d↗s1.s2.s5obtain∃ (p : ℕ), Opn.IsPrime p ∧ Opn.Divides p dLeaves
∃ (p : ℕ), Opn.IsPrime p ∧ Opn.Divides p m, withp : ℕ,hpp : Opn.IsPrime p,a : ℕ,ha : d = p * a.Lean, line 24
obtain ⟨p, hpp, a, ha⟩ := ih d (by omega) (by omega)
targets/euclid-primes/nodes/infinitude-of-primes--h2/Proof.lean, line 24 at
b134abca6e5d↗
Proof: targets/euclid-primes/nodes/infinitude-of-primes--h2/Proof.lean, lines 1–25 at
b134abca6e5d.No explainer yet. This proof written as a journal would print it, labelled unverified, is the next thing a writer could add, by pull request (D-3, D-36; the guide shows how).
infinitude-of-primes--h3 proved
Statement not audited — only a problem’s root statement is audited for fidelity (D-9); the kernel checks a proof against this Lean as written.
theorem infinitude_of_primes__h3 : ∀ (n : ℕ), (∀ (k : ℕ), 0 < k → k ≤ n → Opn.Divides k n.factorial) → (∀ (m : ℕ), 2 ≤ m → ∃ p, Opn.IsPrime p ∧ Opn.Divides p m) → ∀ (d m : ℕ), Opn.Divides d m → Opn.Divides d (m + 1) → d = 1 := by sorryA statement is written
:= by sorry: thesorryholds 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 words, unverified — what this statement says; written by f29-words, drafted with Claude Fable 5.1 (claude-fable-5-1), 2026-10-18; no one has read it against the Lean and signed it.
Draft · drafted, by the model named above
$\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$
For every natural number $n$, under the two inherited hypotheses (every $k$ with $0<k\le n$ divides $n!$, and every $m\ge 2$ has a prime divisor; the earlier holes' claims, which the conclusion does not use), any natural number $d$ dividing both $m$ and $m+1$ equals $1$. Divisibility is the problem's own
Opn.Divides($a\mid b$ when $b=a\cdot c$ for some natural $c$), prime isOpn.IsPrime, and $n!$ isNat.factorial.Rendered from gloss/d667b839178a….md · Improve these words →
Checked by the kernel — an outline of the proof attested in attestations/000036.json, merge commit
f5880e7706a4.Outline of
Proof.lean, extracted by the gate at82834c4684b8from the proof’s elaboration: each step is a claim the proof establishes and the goal it leaves. Open a step for what it uses and its Lean lines.h1haved ∣ mLeaves
d = (1 : ℕ), withh1 : d ∣ m.Lean, line 13
have h1 : d ∣ m := hdm
targets/euclid-primes/nodes/infinitude-of-primes--h3/Proof.lean, line 13 at
f5880e7706a4↗h2haved ∣ m + (1 : ℕ)Leaves
d = (1 : ℕ), withh2 : d ∣ m + (1 : ℕ).Lean, line 14
have h2 : d ∣ m + 1 := hdm1
targets/euclid-primes/nodes/infinitude-of-primes--h3/Proof.lean, line 14 at
f5880e7706a4↗
Proof: targets/euclid-primes/nodes/infinitude-of-primes--h3/Proof.lean, lines 1–15 at
f5880e7706a4.No explainer yet. This proof written as a journal would print it, labelled unverified, is the next thing a writer could add, by pull request (D-3, D-36; the guide shows how).
infinitude-of-primes--h4 proved
Statement not audited — only a problem’s root statement is audited for fidelity (D-9); the kernel checks a proof against this Lean as written.
theorem infinitude_of_primes__h4 : ∀ (n : ℕ), (∀ (k : ℕ), 0 < k → k ≤ n → Opn.Divides k n.factorial) → (∀ (m : ℕ), 2 ≤ m → ∃ p, Opn.IsPrime p ∧ Opn.Divides p m) → (∀ (d m : ℕ), Opn.Divides d m → Opn.Divides d (m + 1) → d = 1) → ∀ (k : ℕ), 0 < k.factorial := by sorryA statement is written
:= by sorry: thesorryholds 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 words, unverified — what this statement says; written by f29-words, drafted with Claude Fable 5.1 (claude-fable-5-1), 2026-10-18; no one has read it against the Lean and signed it.
Draft · drafted, by the model named above
$\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!$
For every natural number $n$, under the three inherited hypotheses (every $k$ with $0<k\le n$ divides $n!$; every $m\ge 2$ has a prime divisor; a common divisor of $m$ and $m+1$ is $1$; the earlier holes' claims, which the conclusion does not use), every factorial $k!$ is positive. Divisibility is the problem's own
Opn.Divides, prime isOpn.IsPrime, and the factorial is Mathlib'sNat.factorial.Rendered from gloss/02043faa74f9….md · Improve these words →
Checked by the kernel — an outline of the proof attested in attestations/000037.json, merge commit
7f81053778e5.Outline of
Proof.lean, extracted by the gate at82834c4684b8from the proof’s elaboration: each step is a claim the proof establishes and the goal it leaves. Open a step for what it uses and its Lean lines.Proof: targets/euclid-primes/nodes/infinitude-of-primes--h4/Proof.lean, lines 1–12 at
7f81053778e5.No explainer yet. This proof written as a journal would print it, labelled unverified, is the next thing a writer could add, by pull request (D-3, D-36; the guide shows how).
infinitude-of-primes proved
Statement not audited — fidelity mechanical-only; QA pass incomplete; no signer yet.
theorem Opn.infinitude_of_primes : ∀ n : Nat, ∃ p : Nat, n < p ∧ Opn.IsPrime p := by sorry
A statement is written
:= by sorry: thesorryholds 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 →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.
Checked by the kernel — an outline of the proof attested in attestations/000038.json, merge commit
2c0d9798ae82.Outline of
Proof.lean, extracted by the gate at82834c4684b8from the proof’s elaboration: each step is a claim the proof establishes and the goal it leaves. Open a step for what it uses and its Lean lines.dvd_facthave∀ (k : ℕ), (0 : ℕ) < k → k ≤ n → Divides k n.factorialLeaves
∃ (p : ℕ), n < p ∧ IsPrime p, withdvd_fact : ∀ (k : ℕ), (0 : ℕ) < k → k ≤ n → Divides k n.factorial.Uses statements infinitude-of-primes--h1.
Lean, line 13
have dvd_fact := infinitude_of_primes__h1 n
targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, line 13 at
2c0d9798ae82↗prime_divisorhave∀ (m : ℕ), (2 : ℕ) ≤ m → ∃ (p : ℕ), IsPrime p ∧ Divides p mLeaves
∃ (p : ℕ), n < p ∧ IsPrime p, withprime_divisor : ∀ (m : ℕ), (2 : ℕ) ≤ m → ∃ (p : ℕ), IsPrime p ∧ Divides p m.Uses statements infinitude-of-primes--h2.
Lean, line 14
have prime_divisor := infinitude_of_primes__h2 n dvd_fact
targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, line 14 at
2c0d9798ae82↗dvd_consecutivehave∀ (d m : ℕ), Divides d m → Divides d (m + (1 : ℕ)) → d = (1 : ℕ)Leaves
∃ (p : ℕ), n < p ∧ IsPrime p, withdvd_consecutive : ∀ (d m : ℕ), Divides d m → Divides d (m + (1 : ℕ)) → d = (1 : ℕ).Uses statements infinitude-of-primes--h3.
Lean, line 15
have dvd_consecutive := infinitude_of_primes__h3 n dvd_fact prime_divisor
targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, line 15 at
2c0d9798ae82↗fact_poshave∀ (k : ℕ), (0 : ℕ) < k.factorialLeaves
∃ (p : ℕ), n < p ∧ IsPrime p, withfact_pos : ∀ (k : ℕ), (0 : ℕ) < k.factorial.Uses statements infinitude-of-primes--h4.
Lean, line 16
have fact_pos := infinitude_of_primes__h4 n dvd_fact prime_divisor dvd_consecutive
targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, line 16 at
2c0d9798ae82↗two_lehave(2 : ℕ) ≤ n.factorial + (1 : ℕ)Leaves
∃ (p : ℕ), n < p ∧ IsPrime p, withtwo_le : (2 : ℕ) ≤ n.factorial + (1 : ℕ).Uses library
Nat.factorialNat.factorial nis the factorial ofn. .Lean, lines 17–19
have two_le : 2 ≤ Nat.factorial n + 1 := by have := fact_pos n omegatargets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, lines 17–19 at
2c0d9798ae82↗two_le.thishave(0 : ℕ) < n.factorialLeaves
(2 : ℕ) ≤ n.factorial + (1 : ℕ), withthis : (0 : ℕ) < n.factorial.Lean, line 18
have := fact_pos n
targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, line 18 at
2c0d9798ae82↗
s6obtain∃ (p : ℕ), IsPrime p ∧ Divides p (n.factorial + (1 : ℕ))Leaves
∃ (p : ℕ), n < p ∧ IsPrime p, withp : ℕ,hp : IsPrime p,hdiv : Divides p (n.factorial + (1 : ℕ)).Uses library
Nat.factorialNat.factorial nis the factorial ofn. .Lean, line 20
obtain ⟨p, hp, hdiv⟩ := prime_divisor (Nat.factorial n + 1) two_le
targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, line 20 at
2c0d9798ae82↗s7caseLeaves
n < p.Lean, line 23
· exact h
targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, line 23 at
2c0d9798ae82↗s8caseLeaves
n < p.Lean, lines 24–29
· 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 omegatargets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, lines 24–29 at
2c0d9798ae82↗s8.hposhave(0 : ℕ) < pLeaves
False, withhpos : (0 : ℕ) < p.Lean, line 25
have hpos : 0 < p := by have := hp.1; omega
targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, line 25 at
2c0d9798ae82↗s8.hpos.thishave(2 : ℕ) ≤ pLeaves
(0 : ℕ) < p, withthis : (2 : ℕ) ≤ p.Lean, line 25
have hpos : 0 < p := by have := hp.1; omega
targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, line 25 at
2c0d9798ae82↗
s8.h1haveDivides p n.factorialLeaves
False, withh1 : Divides p n.factorial.Uses definitions
Opn.Divides; libraryNat.factorialNat.factorial nis the factorial ofn. .Lean, line 26
have h1 : Opn.Divides p (Nat.factorial n) := dvd_fact p hpos h
targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, line 26 at
2c0d9798ae82↗s8.h2havep = (1 : ℕ)Leaves
False, withh2 : p = (1 : ℕ).Uses library
Nat.factorialNat.factorial nis the factorial ofn. .Lean, line 27
have h2 : p = 1 := dvd_consecutive p (Nat.factorial n) h1 hdiv
targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, line 27 at
2c0d9798ae82↗s8.thishave(2 : ℕ) ≤ pLeaves
False, withthis : (2 : ℕ) ≤ p.Lean, line 28
have := hp.1
targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, line 28 at
2c0d9798ae82↗
Proof: targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, lines 1–29 at
2c0d9798ae82.Informal account, unverified — unverified prose about a kernel-checked proof; shown section by section, each labelled with who drafted, wrote or verified it (D-3 v3.31).
Unverified: explainer, its words from explainer/55ac689f5b1e….md, machine-drafted by anthropic/claude-opus-5.5 (opn-drafter), 2026-10-05.
Idea and method
Draft · drafted, by the model named above
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.
Four auxiliary facts
Draft · drafted, by the model named above
Throughout these steps the goal stays the main statement, that there is $p$ with $n < p$ and $p$ prime. Each step adds one hypothesis. Each is closed by a term that draws on a separate node of the graph.
dvd_factuses nodeinfinitude-of-primes--h1. It gives: for every $k$ with $0 < k \le n$, $k$ divides $n!$.prime_divisoruses nodeinfinitude-of-primes--h2. It gives: every $m \ge 2$ has a prime divisor, that is, there is $p$ with $p$ prime and $p \mid m$.dvd_consecutiveuses nodeinfinitude-of-primes--h3. It gives: if $d \mid m$ and $d \mid m+1$, then $d = 1$.fact_posuses nodeinfinitude-of-primes--h4. It gives: $0 < k!$ for every $k$.
The number $n!+1$ is at least $2$
Draft · drafted, by the model named above
The step
two_leestablishes $2 \le n! + 1$, where $n!$ is the factorial of $n$ (Nat.factorial).Its child step proves $0 < n!$ by a term. The goal that remains is $2 \le n! + 1$, and the parent step closes it from this positivity. Once
two_leis added, the goal returns to the main existence statement.Choosing the prime
Draft · drafted, by the model named above
The proof applies the prime-divisor fact to $m = n! + 1$, which is allowed by the bound just proved. It obtains a witness:
Let $p$ be a natural number, with hypothesis
hpsaying that $p$ is prime and hypothesishdivsaying that $p \mid n! + 1$.The goal is still to exhibit a prime greater than $n$. The obtained $p$ is the candidate.
The two cases
Draft · drafted, by the model named above
The proof continues in two case steps,
s7ands8.- Case
s7leaves the goal $n < p$. It has no recorded sub-steps, and the outline records nothing further about how it is closed. - Case
s8also has the goal $n < p$. Within it the goal becomesFalse, so this case is settled by deriving a contradiction. The outline does not print the hypothesis this case introduces.
The contradiction
Draft · drafted, by the model named above
The steps of case
s8assemble the contradiction. Throughout, the goal isFalse.- Positivity of $p$ (
hpos). First $0 < p$ is established. Its child step proves $2 \le p$ by a term, andhposconcludes positivity from that bound. - $p$ divides $n!$ (
h1). Next,h1proves $p \mid n!$. Its recorded uses are the divisibility definitionOpn.Dividesand the factorial. The outline does not say which earlier hypotheses feed this term. The shape ofdvd_factwould require $0 < p$ (just shown) and $p \le n$. - $p$ equals $1$ (
h2). Since $p \mid n!$ and $p \mid n! + 1$, steph2concludes $p = 1$. This matches the consecutive-divisor fact applied with $m = n!$. - $p$ is at least $2$ (step
s8.this). Finally, $2 \le p$ is proved again by a term. Together with $p = 1$ this is impossible, which yieldsFalseand closes the case.
None of the steps is marked routine or open. The proof is complete relative to the four nodes it uses.
History: 1 version on record
2026-10-05 · machine-drafted by anthropic/claude-opus-5.5 (opn-drafter) · not signed · current · explainer/55ac689f5b1e….md · the first version of its chain
Read this version
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.
Four auxiliary facts (dvd_fact prime_divisor dvd_consecutive fact_pos)
Throughout these steps the goal stays the main statement, that there is $p$ with $n < p$ and $p$ prime. Each step adds one hypothesis. Each is closed by a term that draws on a separate node of the graph.
dvd_factuses nodeinfinitude-of-primes--h1. It gives: for every $k$ with $0 < k \le n$, $k$ divides $n!$.prime_divisoruses nodeinfinitude-of-primes--h2. It gives: every $m \ge 2$ has a prime divisor, that is, there is $p$ with $p$ prime and $p \mid m$.dvd_consecutiveuses nodeinfinitude-of-primes--h3. It gives: if $d \mid m$ and $d \mid m+1$, then $d = 1$.fact_posuses nodeinfinitude-of-primes--h4. It gives: $0 < k!$ for every $k$.
The number $n!+1$ is at least $2$ (two_le two_le.this)
The step
two_leestablishes $2 \le n! + 1$, where $n!$ is the factorial of $n$ (Nat.factorial).Its child step proves $0 < n!$ by a term. The goal that remains is $2 \le n! + 1$, and the parent step closes it from this positivity. Once
two_leis added, the goal returns to the main existence statement.Choosing the prime (s6)
The proof applies the prime-divisor fact to $m = n! + 1$, which is allowed by the bound just proved. It obtains a witness:
Let $p$ be a natural number, with hypothesis
hpsaying that $p$ is prime and hypothesishdivsaying that $p \mid n! + 1$.The goal is still to exhibit a prime greater than $n$. The obtained $p$ is the candidate.
The two cases (s7 s8)
The proof continues in two case steps,
s7ands8.- Case
s7leaves the goal $n < p$. It has no recorded sub-steps, and the outline records nothing further about how it is closed. - Case
s8also has the goal $n < p$. Within it the goal becomesFalse, so this case is settled by deriving a contradiction. The outline does not print the hypothesis this case introduces.
The contradiction (s8.hpos s8.hpos.this s8.h1 s8.h2 s8.this)
The steps of case
s8assemble the contradiction. Throughout, the goal isFalse.- Positivity of $p$ (
hpos). First $0 < p$ is established. Its child step proves $2 \le p$ by a term, andhposconcludes positivity from that bound. - $p$ divides $n!$ (
h1). Next,h1proves $p \mid n!$. Its recorded uses are the divisibility definitionOpn.Dividesand the factorial. The outline does not say which earlier hypotheses feed this term. The shape ofdvd_factwould require $0 < p$ (just shown) and $p \le n$. - $p$ equals $1$ (
h2). Since $p \mid n!$ and $p \mid n! + 1$, steph2concludes $p = 1$. This matches the consecutive-divisor fact applied with $m = n!$. - $p$ is at least $2$ (step
s8.this). Finally, $2 \le p$ is proved again by a term. Together with $p = 1$ this is impossible, which yieldsFalseand closes the case.
None of the steps is marked routine or open. The proof is complete relative to the four nodes it uses.
Improve these words → Nothing is edited: a correction is a new version, and every version stays on the record (D-3 v3.30).
Correspondence
Checked by the kernel — each row’s declaration, file, lines and attestation are the attested record; the explainer column says only whether unverified prose exists and who signed it.
| Statement | Declaration | Proof file and lines | Attestation | Explainer |
|---|---|---|---|---|
| infinitude-of-primes--h1 | infinitude_of_primes__h1 | targets/euclid-primes/nodes/infinitude-of-primes--h1/Proof.lean, lines 1–11 at a9f10904c037 | attestations/000034.json | none yet |
| infinitude-of-primes--h2 | infinitude_of_primes__h2 | targets/euclid-primes/nodes/infinitude-of-primes--h2/Proof.lean, lines 1–25 at b134abca6e5d | attestations/000035.json | none yet |
| infinitude-of-primes--h3 | infinitude_of_primes__h3 | targets/euclid-primes/nodes/infinitude-of-primes--h3/Proof.lean, lines 1–15 at f5880e7706a4 | attestations/000036.json | none yet |
| infinitude-of-primes--h4 | infinitude_of_primes__h4 | targets/euclid-primes/nodes/infinitude-of-primes--h4/Proof.lean, lines 1–12 at 7f81053778e5 | attestations/000037.json | none yet |
| infinitude-of-primes | Opn.infinitude_of_primes | targets/euclid-primes/nodes/infinitude-of-primes/Proof.lean, lines 1–29 at 2c0d9798ae82 | attestations/000038.json | unverified, 6 sections: 6 drafted |