Problems / erdos-1094 / erdos-1094--h3--h1--h2--h1
Residue form, k and n odd, 3 | k
erdos-1094--h3--h1--h2--h1
open
Hole h_odd_k3 of erdos-1094--h3--h1--h2 (split by 20261014T112100Z-t1014-z-partial.lean).
$\displaystyle \exists K_1\ \forall n,k\in\mathbb{N}:\quad K_1<k,\ \ 2k\le n<k^2,\ \ k \text{ odd},\ \ n \text{ odd},\ \ 3\mid k \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$
For all large odd $k$ divisible by $3$, every odd $n$ with $2k\le n<k^2$ has a prime $p\le k$ whose residue of $n$ is smaller than its residue of $k$. Lean writes oddness as k % 2 = 1 and n % 2 = 1, $3\mid k$ as k % 3 = 0, and $k^2$ as k * k. n % p is the least non-negative residue, so the condition reads $n \bmod p < k \bmod p$, a carry at the last base-$p$ digit when $k$ is subtracted from $n$ (hence $p \mid \binom{n}{k}$ by Kummer's theorem, though the statement names no binomial coefficient).
Lean
theorem erdos_1094__h3__h1__h2__h1 : ∃ (K₁ : ℕ),
∀ (n k : ℕ),
K₁ < k →
(2 : ℕ) * k ≤ n →
n < k * k →
k % (2 : ℕ) = (1 : ℕ) →
n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by
sorryWhy does it end in 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 →
How it is being proved
Open. A direct proof, or proofs of its holes, close it.
Proved from these holes by 20261015T145000Z-t1015c-a10-partial.lean (merged in 67fb53f7bf44, attestation 000547).
h_k15→ erdos-1094--h3--h1--h2--h1--h1 (open)$\displaystyle \exists K_1\ \forall n,k\in\mathbb{N}:\quad K_1<k,\ \ 2k\le n<k^2,\ \ k \text{ odd},\ \ n \text{ odd},\ \ 3\mid k,\ \ 5\mid k \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$
h_k3_rest5→ erdos-1094--h3--h1--h2--h1--h2 (open)$\displaystyle \exists K_2\ \forall n,k\in\mathbb{N}:\quad K_2<k,\ \ 2k\le n<k^2,\ \ k \text{ odd},\ \ n \text{ odd},\ \ 3\mid k,\ \ 5\nmid k,\ \ k \bmod 5 \le n \bmod 5 \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$
Read the partial proof (Lean)
theorem erdos_1094__h3__h1__h2__h1 : ∃ (K₁ : ℕ),
∀ (n k : ℕ),
K₁ < k →
(2 : ℕ) * k ≤ n →
n < k * k →
k % (2 : ℕ) = (1 : ℕ) →
n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by
have hall : (∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 →
k % 3 = 0 → k % 5 = 0 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) ∧
(∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 →
k % 3 = 0 → 0 < k % 5 → k % 5 ≤ n % 5 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) := by
refine ⟨?_, ?_⟩
· have h_k15 : ∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 →
n % 2 = 1 → k % 3 = 0 → k % 5 = 0 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
exact h_k15
· have h_k3_rest5 : ∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 →
n % 2 = 1 → k % 3 = 0 → 0 < k % 5 → k % 5 ≤ n % 5 →
∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
exact h_k3_rest5
obtain ⟨K₁, h₁⟩ := hall.1
obtain ⟨K₂, h₂⟩ := hall.2
refine ⟨max K₁ (max K₂ 5), fun n k hk h2k hnk hk2 hn2 hk3 => ?_⟩
have hK₁ : K₁ < k := lt_of_le_of_lt (le_max_left _ _) hk
have hK₂ : K₂ < k := lt_of_le_of_lt (le_trans (le_max_left _ _) (le_max_right _ _)) hk
have hk5 : 5 ≤ k := le_of_lt (lt_of_le_of_lt (le_trans (le_max_right K₂ 5) (le_max_right _ _)) hk)
by_cases h0 : k % 5 = 0
· exact h₁ n k hK₁ h2k hnk hk2 hn2 hk3 h0
· by_cases hlt : n % 5 < k % 5
· exact ⟨5, by norm_num, hk5, hlt⟩
· exact h₂ n k hK₂ h2k hnk hk2 hn2 hk3 (Nat.pos_of_ne_zero h0) (Nat.le_of_not_lt hlt)The gate replayed this file at its merge, each hole a sorry (D-12 #5); the whole file: targets/erdos-1094/nodes/erdos-1094--h3--h1--h2--h1/attempts/20261015T145000Z-t1015c-a10-partial.lean
Closing it through its holes
Closable through its holes: once they are proved, a proof of this statement may name their theorems, which its Context already carries. A direct proof is accepted at any time.
What is known
Work on it
How to contribute → · Pull requests in flight ↗ · See it in the problem’s graph →
Record
Statement: the Lean file and its words (1 version)
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.
import Mathlib
import Nodes.«erdos-1094--h3--h1--h2--h1».Context
open scoped Nat
/-! Hole `h_odd_k3` of a merged partial proof, as a node (D-12 #5, D-29).
Statement generated by the gate from the assembly; immutable (D-3). -/
theorem erdos_1094__h3__h1__h2__h1 : ∃ (K₁ : ℕ),
∀ (n k : ℕ),
K₁ < k →
(2 : ℕ) * k ≤ n →
n < k * k →
k % (2 : ℕ) = (1 : ℕ) →
n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by
sorryA 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 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 \exists K_1\ \forall n,k\in\mathbb{N}:\quad K_1<k,\ \ 2k\le n<k^2,\ \ k \text{ odd},\ \ n \text{ odd},\ \ 3\mid k \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$
For all large odd $k$ divisible by $3$, every odd $n$ with $2k\le n<k^2$ has a prime $p\le k$ whose residue of $n$ is smaller than its residue of $k$. Lean writes oddness as k % 2 = 1 and n % 2 = 1, $3\mid k$ as k % 3 = 0, and $k^2$ as k * k. n % p is the least non-negative residue, so the condition reads $n \bmod p < k \bmod p$, a carry at the last base-$p$ digit when $k$ is subtracted from $n$ (hence $p \mid \binom{n}{k}$ by Kummer's theorem, though the statement names no binomial coefficient).
Rendered from gloss/3cb68a593d5b….md · Improve these words →
Rendered from targets/erdos-1094/nodes/erdos-1094--h3--h1--h2--h1/Statement.lean. Origin: compiler-derived.
Depends on (2), each in words
Depends on, each in words where someone has written them:
- erdos-1094--h3--h1--h2--h1--h1: $\exists K_1\ \forall n,k\in\mathbb{N}:\quad K_1<k,\ \ 2k\le n<k^2,\ \ k \text{ odd},\ \ n \text{ odd},\ \ 3\mid k,\ \ 5\mid k \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$
- erdos-1094--h3--h1--h2--h1--h2: $\exists K_2\ \forall n,k\in\mathbb{N}:\quad K_2<k,\ \ 2k\le n<k^2,\ \ k \text{ odd},\ \ n \text{ odd},\ \ 3\mid k,\ \ 5\nmid k,\ \ k \bmod 5 \le n \bmod 5 \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$
Attestation: none of a proof
No proof of this statement has been merged. A partial assembly merged under attestations/000547.json: it records an attempt, not a proof (see Attempts below).
Witness
Not checked — no run on this page records step 7 passing for it.
1aa8a1c1b9f3.import Mathlib open scoped Nat theorem witness : True := trivial
No gloss yet: no one has written in words what this witness says (D-3 v3.30); the Lean above is the witness. How to write one →
Attempts (2)
2 recorded. Routes refuted: none. Failure classes: missing-library 1.
Untrusted contributor text — a partial assembly: it records an attempt, not a proof; its attestation names the file, and no hash in the record binds these bytes.
Untrusted: partial assembly (D-12 #5), by t1015c-a10; merged in 67fb53f7bf44 under attestations/000547.json, whose step 2 took this file as a partial. A partial records an attempt, not a proof: the gate replayed it with its holes left as sorry. Rendered from targets/erdos-1094/nodes/erdos-1094--h3--h1--h2--h1/attempts/20261015T145000Z-t1015c-a10-partial.lean.
Untrusted contributor text — an outline the gate extracted from this partial assembly; its holes are sorry steps, and it records an attempt, not a proof.
Outline of 20261015T145000Z-t1015c-a10-partial.lean, extracted by the gate at fa0a13ba270d from 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.
hallhave(∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → k % (5 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) ∧ ∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → (0 : ℕ) < k % (5 : ℕ) → k % (5 : ℕ) ≤ n % (5 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % pLeaves
∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, withhall : (∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → k % (5 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) ∧ ∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → (0 : ℕ) < k % (5 : ℕ) → k % (5 : ℕ) ≤ n % (5 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.Uses library
Nat.PrimeNat.Prime pmeans thatpis a prime number, that is, a natural number at least 2 whose only divisors arepand1. ,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. .Lean, lines 16–27
have hall : (∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 → k % 3 = 0 → k % 5 = 0 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) ∧ (∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 → k % 3 = 0 → 0 < k % 5 → k % 5 ≤ n % 5 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) := by refine ⟨?_, ?_⟩ · have h_k15 : ∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 → k % 3 = 0 → k % 5 = 0 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry exact h_k15 · have h_k3_rest5 : ∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 → k % 3 = 0 → 0 < k % 5 → k % 5 ≤ n % 5 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry exact h_k3_rest5hall.s1caseLeaves
∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → k % (5 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.Lean, lines 21–23
· have h_k15 : ∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 → k % 3 = 0 → k % 5 = 0 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry exact h_k15hall.s1.h_k15hole∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → k % (5 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % pholeLeaves
∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → k % (5 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, withh_k15 : ∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → k % (5 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.Uses library
Nat.PrimeNat.Prime pmeans thatpis a prime number, that is, a natural number at least 2 whose only divisors arepand1. .Left open as a hole; its statement is erdos-1094--h3--h1--h2--h1--h1 (open).
Lean, lines 21–22
· have h_k15 : ∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 → k % 3 = 0 → k % 5 = 0 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
hall.s2caseLeaves
∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → (0 : ℕ) < k % (5 : ℕ) → k % (5 : ℕ) ≤ n % (5 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.Lean, lines 24–27
· have h_k3_rest5 : ∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 → k % 3 = 0 → 0 < k % 5 → k % 5 ≤ n % 5 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry exact h_k3_rest5hall.s2.h_k3_rest5hole∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → (0 : ℕ) < k % (5 : ℕ) → k % (5 : ℕ) ≤ n % (5 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % pholeLeaves
∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → (0 : ℕ) < k % (5 : ℕ) → k % (5 : ℕ) ≤ n % (5 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, withh_k3_rest5 : ∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → (0 : ℕ) < k % (5 : ℕ) → k % (5 : ℕ) ≤ n % (5 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.Uses library
Nat.PrimeNat.Prime pmeans thatpis a prime number, that is, a natural number at least 2 whose only divisors arepand1. .Left open as a hole; its statement is erdos-1094--h3--h1--h2--h1--h2 (open).
Lean, lines 24–26
· have h_k3_rest5 : ∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 → k % 3 = 0 → 0 < k % 5 → k % 5 ≤ n % 5 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
s2obtain∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → k % (5 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % pLeaves
∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, withK₁ : ℕ,h₁ : ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → k % (5 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.Lean, line 28
obtain ⟨K₁, h₁⟩ := hall.1
s3obtain∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → (0 : ℕ) < k % (5 : ℕ) → k % (5 : ℕ) ≤ n % (5 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % pLeaves
∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, withK₂ : ℕ,h₂ : ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → (0 : ℕ) < k % (5 : ℕ) → k % (5 : ℕ) ≤ n % (5 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.Lean, line 29
obtain ⟨K₂, h₂⟩ := hall.2
hK1haveK₁ < kLeaves
∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, withhK₁ : K₁ < k.Uses library
lt_of_le_of_lt,le_max_left.Lean, line 31
have hK₁ : K₁ < k := lt_of_le_of_lt (le_max_left _ _) hk
hK2haveK₂ < kLeaves
∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, withhK₂ : K₂ < k.Uses library
lt_of_le_of_lt,le_transThe relation≤on a preorder is transitive. ,le_max_left,le_max_right.Lean, line 32
have hK₂ : K₂ < k := lt_of_le_of_lt (le_trans (le_max_left _ _) (le_max_right _ _)) hk
hk5have(5 : ℕ) ≤ kLeaves
∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, withhk5 : (5 : ℕ) ≤ k.Uses library
le_of_lt,lt_of_le_of_lt,le_transThe relation≤on a preorder is transitive. ,le_max_right.Lean, line 33
have hk5 : 5 ≤ k := le_of_lt (lt_of_le_of_lt (le_trans (le_max_right K₂ 5) (le_max_right _ _)) hk)
s7caseLeaves
∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, withh0 : k % (5 : ℕ) = (0 : ℕ).Lean, line 35
· exact h₁ n k hK₁ h2k hnk hk2 hn2 hk3 h0
s8caseLeaves
∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, withh0 : ¬k % (5 : ℕ) = (0 : ℕ).Lean, lines 36–38
· by_cases hlt : n % 5 < k % 5 · exact ⟨5, by norm_num, hk5, hlt⟩ · exact h₂ n k hK₂ h2k hnk hk2 hn2 hk3 (Nat.pos_of_ne_zero h0) (Nat.le_of_not_lt hlt)s8.s1caseLeaves
∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, withhlt : n % (5 : ℕ) < k % (5 : ℕ).Uses library
Exists.introExistential introduction. .Lean, line 37
· exact ⟨5, by norm_num, hk5, hlt⟩
s8.s2caseLeaves
∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, withhlt : ¬n % (5 : ℕ) < k % (5 : ℕ).Uses library
Nat.pos_of_ne_zero,Nat.le_of_not_lt.Lean, line 38
· exact h₂ n k hK₂ h2k hnk hk2 hn2 hk3 (Nat.pos_of_ne_zero h0) (Nat.le_of_not_lt hlt)
import Mathlib
import Nodes.«erdos-1094--h3--h1--h2--h1».Context
open scoped Nat
/-! Hole `h_odd_k3` of a merged partial proof, as a node (D-12 #5, D-29).
Statement generated by the gate from the assembly; immutable (D-3). -/
theorem erdos_1094__h3__h1__h2__h1 : ∃ (K₁ : ℕ),
∀ (n k : ℕ),
K₁ < k →
(2 : ℕ) * k ≤ n →
n < k * k →
k % (2 : ℕ) = (1 : ℕ) →
n % (2 : ℕ) = (1 : ℕ) → k % (3 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by
have hall : (∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 →
k % 3 = 0 → k % 5 = 0 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) ∧
(∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 →
k % 3 = 0 → 0 < k % 5 → k % 5 ≤ n % 5 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) := by
refine ⟨?_, ?_⟩
· have h_k15 : ∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 →
n % 2 = 1 → k % 3 = 0 → k % 5 = 0 → ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
exact h_k15
· have h_k3_rest5 : ∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 →
n % 2 = 1 → k % 3 = 0 → 0 < k % 5 → k % 5 ≤ n % 5 →
∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
exact h_k3_rest5
obtain ⟨K₁, h₁⟩ := hall.1
obtain ⟨K₂, h₂⟩ := hall.2
refine ⟨max K₁ (max K₂ 5), fun n k hk h2k hnk hk2 hn2 hk3 => ?_⟩
have hK₁ : K₁ < k := lt_of_le_of_lt (le_max_left _ _) hk
have hK₂ : K₂ < k := lt_of_le_of_lt (le_trans (le_max_left _ _) (le_max_right _ _)) hk
have hk5 : 5 ≤ k := le_of_lt (lt_of_le_of_lt (le_trans (le_max_right K₂ 5) (le_max_right _ _)) hk)
by_cases h0 : k % 5 = 0
· exact h₁ n k hK₁ h2k hnk hk2 hn2 hk3 h0
· by_cases hlt : n % 5 < k % 5
· exact ⟨5, by norm_num, hk5, hlt⟩
· exact h₂ n k hK₂ h2k hnk hk2 hn2 hk3 (Nat.pos_of_ne_zero h0) (Nat.le_of_not_lt hlt)How to read this page
No explainer yet. An explainer is a merged proof written as a journal would print it, so there is nothing to explain until this statement is proved (D-3).