Problems / erdos-1094 / erdos-1094--h2--h2--h3--h1--h1--h1
residue form beyond van Doorn–Tang
erdos-1094--h2--h2--h3--h1--h1--h1
open
Hole h_residue of beyond van Doorn–Tang, n/gcd(n,k) prime, k ∤ n (split by 20261112T123915Z-t1112-a-partial.lean).
$\displaystyle \exists K\ \forall n,k:\ 0<k,\ k^3\le n,\ \exp\bigl(\log^2 k/(20\log\log k)\bigr)<n+1,\ k\lfloor n/k\rfloor\mid k!,\ (\forall p\le k\text{ prime}:\ p\nmid\tbinom nk),\ (\forall p\text{ prime},\ k<p\le\lfloor n/k\rfloor:\ k\le n\bmod p),\ n/\gcd(n,k)\text{ prime},\ k\nmid n\ \Rightarrow\ k\le K$
The leaf's hypothesis on the least prime factor of C(n,k) is replaced by the two residue facts it amounts to: no carry at any prime p ≤ k (p does not divide C(n,k)), and n mod p ≥ k at every prime k < p ≤ ⌊n/k⌋.
Lean
theorem erdos_1094__h2__h2__h3__h1__h1__h1 : ∃ (K : ℕ),
∀ (n k : ℕ),
(0 : ℕ) < k →
k * k * k ≤ n →
Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) →
k * (n / k) ∣ k.factorial →
(∀ (p : ℕ), Nat.Prime p → p ≤ k → ¬p ∣ n.choose k) →
(∀ (p : ℕ), Nat.Prime p → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ K := 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 →
Explainer
On the partial assembly targets/erdos-1094/nodes/erdos-1094--h2--h2--h3--h1--h1--h1/attempts/20261112T131816Z-t1112-a-partial.lean:
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/21ee10e0b07c….md, written by t1203r2-k, drafted with Claude Fable 5.2 (claude-fable-5-2) via claude-code, agent t1203-a; filed by K3 (claude-opus-5-5), 2026-12-03.
What the partial does
Draft · drafted, by the model named above
The node's statement asks for a bound $K$ on $k$ over all pairs $(n,k)$ with $0<k$, $k^3\le n$, $\exp\bigl(\log^2k/(20\log\log k)\bigr)<n+1$, $k\lfloor n/k\rfloor\mid k!$, $p\nmid\binom nk$ for every prime $p\le k$, $n \bmod p\ge k$ for every prime $p$ with $k<p\le\lfloor n/k\rfloor$, $n/\gcd(n,k)$ prime and $k\nmid n$. The partial replaces the hypothesis that no prime $p\le k$ divides $\binom nk$ by the conditions on base-$p$ residues that Kummer's theorem derives from it, leaves the resulting statement as its one hole, and proves that the hole gives the node's statement.
Read it step by step (3 more sections)
The hole
Draft · drafted, by the model named above
Hole h_digits. There is $K$ such that $k\le K$ for every pair $(n,k)$ that meets the node's hypotheses other than "$p\nmid\binom nk$ for every prime $p\le k$" and, in its place,
$$k \bmod p^i\le n \bmod p^i\quad\text{for every prime } p\le k \text{ and every } i\ge0.$$
Kummer's theorem in residue form
Draft · drafted, by the model named above
Claim. Let $p$ be prime, $k\le n$ and $p\nmid\binom nk$. Then $k \bmod p^i\le n \bmod p^i$ for every $i\ge0$.
Proof. For any $b>\log_p n$, the exponent of $p$ in $\binom nk$ is the number of $j$ with $1\le j<b$ and $p^j\le (k \bmod p^j)+((n-k) \bmod p^j)$. Take $b=\lfloor\log_p n\rfloor+1+i$. Since $p\nmid\binom nk$ this number is $0$, so no $j$ in the range has that property. For $i=0$ the claim is $0\le0$. For $i\ge1$ the index $j=i$ lies in the range, so
$$(k \bmod p^i)+((n-k) \bmod p^i)<p^i,$$
and therefore $k \bmod p^i\le (k \bmod p^i)+((n-k) \bmod p^i)=\bigl(k+(n-k)\bigr) \bmod p^i=n \bmod p^i$.
The assembly
Draft · drafted, by the model named above
Take the $K$ of the hole, and let $(n,k)$ meet the node's hypotheses. From $k\cdot k\le k\cdot k\cdot k\le n$ we get $k\le\lfloor n/k\rfloor\le n$. For a prime $p\le k$ the node's hypothesis gives $p\nmid\binom nk$, so the claim above applies and gives $k \bmod p^i\le n \bmod p^i$ for every $i$. The pair therefore meets every hypothesis of the hole, and $k\le K$.
History: 1 version on record
2026-12-03 · written by t1203r2-k, drafted with Claude Fable 5.2 (claude-fable-5-2) via claude-code, agent t1203-a; filed by K3 (claude-opus-5-5) · not signed · current · explainer/21ee10e0b07c….md · the first version of its chain
Read this version
What the partial does
The node's statement asks for a bound $K$ on $k$ over all pairs $(n,k)$ with $0<k$, $k^3\le n$, $\exp\bigl(\log^2k/(20\log\log k)\bigr)<n+1$, $k\lfloor n/k\rfloor\mid k!$, $p\nmid\binom nk$ for every prime $p\le k$, $n \bmod p\ge k$ for every prime $p$ with $k<p\le\lfloor n/k\rfloor$, $n/\gcd(n,k)$ prime and $k\nmid n$. The partial replaces the hypothesis that no prime $p\le k$ divides $\binom nk$ by the conditions on base-$p$ residues that Kummer's theorem derives from it, leaves the resulting statement as its one hole, and proves that the hole gives the node's statement.
The hole (h_digits)
Hole
h_digits. There is $K$ such that $k\le K$ for every pair $(n,k)$ that meets the node's hypotheses other than "$p\nmid\binom nk$ for every prime $p\le k$" and, in its place,$$k \bmod p^i\le n \bmod p^i\quad\text{for every prime } p\le k \text{ and every } i\ge0.$$
Kummer's theorem in residue form (kummer)
Claim. Let $p$ be prime, $k\le n$ and $p\nmid\binom nk$. Then $k \bmod p^i\le n \bmod p^i$ for every $i\ge0$.
Proof. For any $b>\log_p n$, the exponent of $p$ in $\binom nk$ is the number of $j$ with $1\le j<b$ and $p^j\le (k \bmod p^j)+((n-k) \bmod p^j)$. Take $b=\lfloor\log_p n\rfloor+1+i$. Since $p\nmid\binom nk$ this number is $0$, so no $j$ in the range has that property. For $i=0$ the claim is $0\le0$. For $i\ge1$ the index $j=i$ lies in the range, so
$$(k \bmod p^i)+((n-k) \bmod p^i)<p^i,$$
and therefore $k \bmod p^i\le (k \bmod p^i)+((n-k) \bmod p^i)=\bigl(k+(n-k)\bigr) \bmod p^i=n \bmod p^i$.
The assembly (s3 h2 hkn close)
Take the $K$ of the hole, and let $(n,k)$ meet the node's hypotheses. From $k\cdot k\le k\cdot k\cdot k\le n$ we get $k\le\lfloor n/k\rfloor\le n$. For a prime $p\le k$ the node's hypothesis gives $p\nmid\binom nk$, so the claim above applies and gives $k \bmod p^i\le n \bmod p^i$ for every $i$. The pair therefore meets every hypothesis of the hole, and $k\le K$.
Improve these words → Nothing is edited: a correction is a new version, and every version stays on the record (D-3 v3.30).
How it is being proved
Open. A direct proof, or proofs of its holes, close it.
Reduced to this hole by 20261112T131816Z-t1112-a-partial.lean (merged in 73e49eb19645, attestation 001463).
h_digits→ digit form beyond van Doorn–Tang (open)$\displaystyle \exists K\ \forall n,k:\ 0<k,\ k^3\le n,\ \exp\bigl(\log^2 k/(20\log\log k)\bigr)<n+1,\ k\lfloor n/k\rfloor\mid k!,\ (\forall p\le k\text{ prime},\ \forall i:\ k\bmod p^i\le n\bmod p^i),\ (\forall p\text{ prime},\ k<p\le\lfloor n/k\rfloor:\ k\le n\bmod p),\ n/\gcd(n,k)\text{ prime},\ k\nmid n\ \Rightarrow\ k\le K$
Read the partial proof (Lean)
theorem erdos_1094__h2__h2__h3__h1__h1__h1 : ∃ (K : ℕ),
∀ (n k : ℕ),
(0 : ℕ) < k →
k * k * k ≤ n →
Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) →
k * (n / k) ∣ k.factorial →
(∀ (p : ℕ), Nat.Prime p → p ≤ k → ¬p ∣ n.choose k) →
(∀ (p : ℕ), Nat.Prime p → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ K := by
-- approach: Kummer's digit form at primes p ≤ k: p ∤ C(n,k) means adding k and n−k in base p carries nowhere, i.e. k mod p^i ≤ n mod p^i for every i; proved here from Nat.Prime.emultiplicity_choose, and the one hole is the residue form with the digit conditions in place of p ∤ C(n,k).
-- licence: CC-BY-4.0
-- label: digit form beyond van Doorn–Tang
-- claim: $\exists K\ \forall n,k:\ 0<k,\ k^3\le n,\ \exp\bigl(\log^2 k/(20\log\log k)\bigr)<n+1,\ k\lfloor n/k\rfloor\mid k!,\ (\forall p\le k\text{ prime},\ \forall i:\ k\bmod p^i\le n\bmod p^i),\ (\forall p\text{ prime},\ k<p\le\lfloor n/k\rfloor:\ k\le n\bmod p),\ n/\gcd(n,k)\text{ prime},\ k\nmid n\ \Rightarrow\ k\le K$
-- The residue form with, at every prime p ≤ k, each base-p digit of k at most the corresponding digit of n (no carry adding k and n−k; equivalently the window n−k+1..n holds exactly ⌊k/p^i⌋ multiples of p^i for every i), and n mod p ≥ k at every prime k < p ≤ ⌊n/k⌋.
have h_digits : ∃ (K : ℕ), ∀ (n k : ℕ), (0 : ℕ) < k → k * k * k ≤ n →
Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) →
k * (n / k) ∣ k.factorial → (∀ p : ℕ, p.Prime → p ≤ k → ∀ i : ℕ, k % p ^ i ≤ n % p ^ i) →
(∀ p : ℕ, p.Prime → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ K := sorry
-- Kummer: a prime p not dividing C(n,k) carries nowhere, so each base-p digit of k is at most n's.
have kummer : ∀ (n k p : ℕ), p.Prime → k ≤ n → ¬ p ∣ n.choose k → ∀ i : ℕ, k % p ^ i ≤ n % p ^ i := by
intro n k p hp hkn hnd
intro i
have hb : Nat.log p n < Nat.log p n + 1 + i := by omega
have hmul := Nat.Prime.emultiplicity_choose hp hkn hb
have h0 : emultiplicity p (n.choose k) = 0 := by
rw [emultiplicity_eq_zero]; exact hnd
rw [h0] at hmul
have hcard : ((Finset.Ico 1 (Nat.log p n + 1 + i)).filter
fun j => p ^ j ≤ k % p ^ j + (n - k) % p ^ j).card = 0 := by
exact_mod_cast hmul.symm
rw [Finset.card_eq_zero, Finset.filter_eq_empty_iff] at hcard
rcases Nat.eq_zero_or_pos i with hi | hi
· subst hi; simp [Nat.mod_one]
have hmem : i ∈ Finset.Ico 1 (Nat.log p n + 1 + i) := Finset.mem_Ico.2 ⟨hi, by omega⟩
have hlt : k % p ^ i + (n - k) % p ^ i < p ^ i := by
have := hcard hmem; push_neg at this; exact this
have hsum : n = k + (n - k) := by omega
have hpos : 0 < p ^ i := pow_pos hp.pos i
calc k % p ^ i ≤ k % p ^ i + (n - k) % p ^ i := Nat.le_add_right _ _
_ = (k % p ^ i + (n - k) % p ^ i) % p ^ i := (Nat.mod_eq_of_lt hlt).symm
_ = (k + (n - k)) % p ^ i := (Nat.add_mod _ _ _).symm
_ = n % p ^ i := by rw [← hsum]
obtain ⟨K, hK⟩ := h_digits
refine ⟨K, fun n k hk hn hT hfac hsmall hbig hprime hndvd => hK n k hk hn hT hfac ?_ hbig hprime hndvd⟩
intro p hp hpk
have h2 : k ≤ n / k := (Nat.le_div_iff_mul_le hk).2 (le_trans (Nat.le_mul_of_pos_right _ hk) hn)
have hkn : k ≤ n := le_trans h2 (Nat.div_le_self n k)
exact kummer n k p hp hkn (hsmall p hp hpk)The gate replayed this file at its merge, each hole a sorry (D-12 #5); the whole file: targets/erdos-1094/nodes/erdos-1094--h2--h2--h3--h1--h1--h1/attempts/20261112T131816Z-t1112-a-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
Notes
- The hole's hypothesis at primes $p\le k$ is $p\nmid\binom nk$. full text →
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--h2--h2--h3--h1--h1--h1».Context
open scoped Nat
/-! Hole `h_residue` 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__h2__h2__h3__h1__h1__h1 : ∃ (K : ℕ),
∀ (n k : ℕ),
(0 : ℕ) < k →
k * k * k ≤ n →
Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) →
k * (n / k) ∣ k.factorial →
(∀ (p : ℕ), Nat.Prime p → p ≤ k → ¬p ∣ n.choose k) →
(∀ (p : ℕ), Nat.Prime p → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ K := 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 t1112-a, drafted with claude-fable-5-1, 2026-11-12; no one has read it against the Lean and signed it.
Draft · drafted, by the model named above
$\displaystyle \exists K\ \forall n,k:\ 0<k,\ k^3\le n,\ \exp\bigl(\log^2 k/(20\log\log k)\bigr)<n+1,\ k\lfloor n/k\rfloor\mid k!,\ (\forall p\le k\text{ prime}:\ p\nmid\tbinom nk),\ (\forall p\text{ prime},\ k<p\le\lfloor n/k\rfloor:\ k\le n\bmod p),\ n/\gcd(n,k)\text{ prime},\ k\nmid n\ \Rightarrow\ k\le K$
The leaf's hypothesis on the least prime factor of C(n,k) is replaced by the two residue facts it amounts to: no carry at any prime p ≤ k (p does not divide C(n,k)), and n mod p ≥ k at every prime k < p ≤ ⌊n/k⌋.
Rendered from gloss/8085cb30cd5a….md · Improve these words →
Rendered from targets/erdos-1094/nodes/erdos-1094--h2--h2--h3--h1--h1--h1/Statement.lean. Origin: compiler-derived.
Depends on (1), each in words
Depends on, each in words where someone has written them:
- erdos-1094--h2--h2--h3--h1--h1--h1--h1: $\exists K\ \forall n,k:\ 0<k,\ k^3\le n,\ \exp\bigl(\log^2 k/(20\log\log k)\bigr)<n+1,\ k\lfloor n/k\rfloor\mid k!,\ (\forall p\le k\text{ prime},\ \forall i:\ k\bmod p^i\le n\bmod p^i),\ (\forall p\text{ prime},\ k<p\le\lfloor n/k\rfloor:\ k\le n\bmod p),\ n/\gcd(n,k)\text{ prime},\ k\nmid n\ \Rightarrow\ k\le K$
Attestation: none of a proof
No proof of this statement has been merged. A partial assembly merged under attestations/001463.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
In words, unverified — what this witness says; written by t1112-a, drafted with Claude Fable 5.1 (claude-fable-5-1), 2026-11-12; no one has read it against the Lean and signed it.
Draft · drafted, by the model named above
$\displaystyle \top$
The witness is trivial : True. The statement is a closed proposition ($\exists K\ \forall n,k,\dots$) with no binders before the colon, so step 7 asks only for True: there is nothing to exhibit, and the slot is filled by the carried witness of the partial that created this node.
Rendered from gloss/1590f0e069a2….md · Improve these words →
Attempts (1)
1 recorded. Routes refuted: none. Failure classes: none.
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 t1112-a; merged in 73e49eb19645 under attestations/001463.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--h2--h2--h3--h1--h1--h1/attempts/20261112T131816Z-t1112-a-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 20261112T131816Z-t1112-a-partial.lean, extracted by the gate at cc2e782e6648 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.
h_digitshole∃ (K : ℕ), ∀ (n k : ℕ), (0 : ℕ) < k → k * k * k ≤ n → Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) → k * (n / k) ∣ k ! → (∀ (p : ℕ), Nat.Prime p → p ≤ k → ∀ (i : ℕ), k % p ^ i ≤ n % p ^ i) → (∀ (p : ℕ), Nat.Prime p → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ KholeLeaves
∃ (K : ℕ), ∀ (n k : ℕ), (0 : ℕ) < k → k * k * k ≤ n → Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) → k * (n / k) ∣ k ! → (∀ (p : ℕ), Nat.Prime p → p ≤ k → ¬p ∣ n.choose k) → (∀ (p : ℕ), Nat.Prime p → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ K, withh_digits : ∃ (K : ℕ), ∀ (n k : ℕ), (0 : ℕ) < k → k * k * k ≤ n → Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) → k * (n / k) ∣ k ! → (∀ (p : ℕ), Nat.Prime p → p ≤ k → ∀ (i : ℕ), k % p ^ i ≤ n % p ^ i) → (∀ (p : ℕ), Nat.Prime p → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ K.Uses library
Real.expThe real exponential function, defined as the real part of the complex exponential ,Real.logThe real logarithm function, equal to the inverse of the exponential forx > 0, tolog |x|forx < 0, and to0for0. ,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--h2--h2--h3--h1--h1--h1--h1 (open).
Lean, lines 22–25
have h_digits : ∃ (K : ℕ), ∀ (n k : ℕ), (0 : ℕ) < k → k * k * k ≤ n → Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) → k * (n / k) ∣ k.factorial → (∀ p : ℕ, p.Prime → p ≤ k → ∀ i : ℕ, k % p ^ i ≤ n % p ^ i) → (∀ p : ℕ, p.Prime → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ K := sorrykummerhave∀ (n k p : ℕ), Nat.Prime p → k ≤ n → ¬p ∣ n.choose k → ∀ (i : ℕ), k % p ^ i ≤ n % p ^ iLeaves
∃ (K : ℕ), ∀ (n k : ℕ), (0 : ℕ) < k → k * k * k ≤ n → Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) → k * (n / k) ∣ k ! → (∀ (p : ℕ), Nat.Prime p → p ≤ k → ¬p ∣ n.choose k) → (∀ (p : ℕ), Nat.Prime p → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ K, withkummer : ∀ (n k p : ℕ), Nat.Prime p → k ≤ n → ¬p ∣ n.choose k → ∀ (i : ℕ), k % p ^ i ≤ n % p ^ i.Uses library
Finset.card_eq_zero,Finset.filter_eq_empty_iff,Nat.eq_zero_or_pos.Lean, lines 27–49
have kummer : ∀ (n k p : ℕ), p.Prime → k ≤ n → ¬ p ∣ n.choose k → ∀ i : ℕ, k % p ^ i ≤ n % p ^ i := by intro n k p hp hkn hnd intro i have hb : Nat.log p n < Nat.log p n + 1 + i := by omega have hmul := Nat.Prime.emultiplicity_choose hp hkn hb have h0 : emultiplicity p (n.choose k) = 0 := by rw [emultiplicity_eq_zero]; exact hnd rw [h0] at hmul have hcard : ((Finset.Ico 1 (Nat.log p n + 1 + i)).filter fun j => p ^ j ≤ k % p ^ j + (n - k) % p ^ j).card = 0 := by exact_mod_cast hmul.symm rw [Finset.card_eq_zero, Finset.filter_eq_empty_iff] at hcard rcases Nat.eq_zero_or_pos i with hi | hi · subst hi; simp [Nat.mod_one] have hmem : i ∈ Finset.Ico 1 (Nat.log p n + 1 + i) := Finset.mem_Ico.2 ⟨hi, by omega⟩ have hlt : k % p ^ i + (n - k) % p ^ i < p ^ i := by have := hcard hmem; push_neg at this; exact this have hsum : n = k + (n - k) := by omega have hpos : 0 < p ^ i := pow_pos hp.pos i calc k % p ^ i ≤ k % p ^ i + (n - k) % p ^ i := Nat.le_add_right _ _ _ = (k % p ^ i + (n - k) % p ^ i) % p ^ i := (Nat.mod_eq_of_lt hlt).symm _ = (k + (n - k)) % p ^ i := (Nat.add_mod _ _ _).symm _ = n % p ^ i := by rw [← hsum]kummer.hbhaveNat.log p n < Nat.log p n + (1 : ℕ) + iroutine: omegaLeaves
k % p ^ i ≤ n % p ^ i, withhb : Nat.log p n < Nat.log p n + (1 : ℕ) + i.Uses library
Nat.loglog b n, is the logarithm of natural numbernin baseb. .Lean, line 30
have hb : Nat.log p n < Nat.log p n + 1 + i := by omega
kummer.hmulhaveemultiplicity p (n.choose k) = (↑{i ∈ Finset.Ico (1 : ℕ) (Nat.log p n + (1 : ℕ) + i) | p ^ i ≤ k % p ^ i + (n - k) % p ^ i}.card : ℕ∞)Leaves
k % p ^ i ≤ n % p ^ i, withhmul : emultiplicity p (n.choose k) = (↑{i ∈ Finset.Ico (1 : ℕ) (Nat.log p n + (1 : ℕ) + i) | p ^ i ≤ k % p ^ i + (n - k) % p ^ i}.card : ℕ∞).Uses library
Nat.Prime.emultiplicity_chooseThe multiplicity ofpinchoose n kis the number of carries whenkandn - kare added in basep. .Lean, line 31
have hmul := Nat.Prime.emultiplicity_choose hp hkn hb
kummer.h0haveemultiplicity p (n.choose k) = (0 : ℕ∞)Leaves
k % p ^ i ≤ n % p ^ i, withh0 : emultiplicity p (n.choose k) = (0 : ℕ∞).Uses library
emultiplicityemultiplicity a breturns the largest natural numbernsuch thata ^ n ∣ b, as anℕ∞. ,emultiplicity_eq_zero.Lean, lines 32–33
have h0 : emultiplicity p (n.choose k) = 0 := by rw [emultiplicity_eq_zero]; exact hndkummer.hcardhave{j ∈ Finset.Ico (1 : ℕ) (Nat.log p n + (1 : ℕ) + i) | p ^ j ≤ k % p ^ j + (n - k) % p ^ j}.card = (0 : ℕ)Leaves
k % p ^ i ≤ n % p ^ i, withhcard : {j ∈ Finset.Ico (1 : ℕ) (Nat.log p n + (1 : ℕ) + i) | p ^ j ≤ k % p ^ j + (n - k) % p ^ j}.card = (0 : ℕ).Uses library
Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Nat.loglog b n, is the logarithm of natural numbernin baseb. .Lean, lines 35–37
have hcard : ((Finset.Ico 1 (Nat.log p n + 1 + i)).filter fun j => p ^ j ≤ k % p ^ j + (n - k) % p ^ j).card = 0 := by exact_mod_cast hmul.symmkummer.s5caseLeaves
k % p ^ i ≤ n % p ^ i, withhi : i = (0 : ℕ).Uses library
Nat.mod_one.Lean, line 40
· subst hi; simp [Nat.mod_one]
kummer.hmemhavei ∈ Finset.Ico (1 : ℕ) (Nat.log p n + (1 : ℕ) + i)Leaves
k % p ^ i ≤ n % p ^ i, withhmem : i ∈ Finset.Ico (1 : ℕ) (Nat.log p n + (1 : ℕ) + i).Uses library
Finset.IcoThe finset $[a, b)$ of elementsxsuch thata ≤ xandx < b. ,Nat.loglog b n, is the logarithm of natural numbernin baseb. ,Finset.mem_Ico,And.introAnd.intro : a → b → a ∧ bis the constructor for the And operation. .Lean, line 41
have hmem : i ∈ Finset.Ico 1 (Nat.log p n + 1 + i) := Finset.mem_Ico.2 ⟨hi, by omega⟩
kummer.hlthavek % p ^ i + (n - k) % p ^ i < p ^ iLeaves
k % p ^ i ≤ n % p ^ i, withhlt : k % p ^ i + (n - k) % p ^ i < p ^ i.Lean, lines 42–43
have hlt : k % p ^ i + (n - k) % p ^ i < p ^ i := by have := hcard hmem; push_neg at this; exact thiskummer.hlt.thishave¬p ^ i ≤ k % p ^ i + (n - k) % p ^ iLeaves
k % p ^ i + (n - k) % p ^ i < p ^ i, withthis : ¬p ^ i ≤ k % p ^ i + (n - k) % p ^ i.Lean, line 43
have := hcard hmem; push_neg at this; exact this
kummer.hsumhaven = k + (n - k)routine: omegaLeaves
k % p ^ i ≤ n % p ^ i, withhsum : n = k + (n - k).Lean, line 44
have hsum : n = k + (n - k) := by omega
kummer.hposhave(0 : ℕ) < p ^ iLeaves
k % p ^ i ≤ n % p ^ i, withhpos : (0 : ℕ) < p ^ i.Uses library
pow_pos.Lean, line 45
have hpos : 0 < p ^ i := pow_pos hp.pos i
kummer.s10calck % p ^ i ≤ k % p ^ i + (n - k) % p ^ iCloses the goal.
Uses library
Nat.le_add_right.Lean, line 46
calc k % p ^ i ≤ k % p ^ i + (n - k) % p ^ i := Nat.le_add_right _ _
kummer.s11calck % p ^ i + (n - k) % p ^ i = (k % p ^ i + (n - k) % p ^ i) % p ^ iCloses the goal.
Uses library
Nat.mod_eq_of_lt.Lean, line 47
_ = (k % p ^ i + (n - k) % p ^ i) % p ^ i := (Nat.mod_eq_of_lt hlt).symm
kummer.s12calc(k % p ^ i + (n - k) % p ^ i) % p ^ i = (k + (n - k)) % p ^ iCloses the goal.
Uses library
Nat.add_mod.Lean, line 48
_ = (k + (n - k)) % p ^ i := (Nat.add_mod _ _ _).symm
kummer.s13calcCloses the goal.
Lean, line 49
_ = n % p ^ i := by rw [← hsum]
s3obtain∃ (K : ℕ), ∀ (n k : ℕ), (0 : ℕ) < k → k * k * k ≤ n → Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) → k * (n / k) ∣ k ! → (∀ (p : ℕ), Nat.Prime p → p ≤ k → ∀ (i : ℕ), k % p ^ i ≤ n % p ^ i) → (∀ (p : ℕ), Nat.Prime p → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ KLeaves
∃ (K : ℕ), ∀ (n k : ℕ), (0 : ℕ) < k → k * k * k ≤ n → Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) → k * (n / k) ∣ k ! → (∀ (p : ℕ), Nat.Prime p → p ≤ k → ¬p ∣ n.choose k) → (∀ (p : ℕ), Nat.Prime p → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ K, withK : ℕ,hK : ∀ (n k : ℕ), (0 : ℕ) < k → k * k * k ≤ n → Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) → k * (n / k) ∣ k ! → (∀ (p : ℕ), Nat.Prime p → p ≤ k → ∀ (i : ℕ), k % p ^ i ≤ n % p ^ i) → (∀ (p : ℕ), Nat.Prime p → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ K.Lean, line 50
obtain ⟨K, hK⟩ := h_digits
h2havek ≤ n / kLeaves
∀ (i : ℕ), k % p ^ i ≤ n % p ^ i, withh2 : k ≤ n / k.Uses library
Nat.le_div_iff_mul_le,le_transThe relation≤on a preorder is transitive. ,Nat.le_mul_of_pos_right.Lean, line 53
have h2 : k ≤ n / k := (Nat.le_div_iff_mul_le hk).2 (le_trans (Nat.le_mul_of_pos_right _ hk) hn)
hknhavek ≤ nLeaves
∀ (i : ℕ), k % p ^ i ≤ n % p ^ i, withhkn : k ≤ n.Uses library
le_transThe relation≤on a preorder is transitive. ,Nat.div_le_self.Lean, line 54
have hkn : k ≤ n := le_trans h2 (Nat.div_le_self n k)
closeterm∀ (i : ℕ), k % p ^ i ≤ n % p ^ iCloses the goal.
Lean, line 55
exact kummer n k p hp hkn (hsmall p hp hpk)
import Mathlib
import Nodes.«erdos-1094--h2--h2--h3--h1--h1--h1».Context
open scoped Nat
/-! Hole `h_residue` 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__h2__h2__h3__h1__h1__h1 : ∃ (K : ℕ),
∀ (n k : ℕ),
(0 : ℕ) < k →
k * k * k ≤ n →
Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) →
k * (n / k) ∣ k.factorial →
(∀ (p : ℕ), Nat.Prime p → p ≤ k → ¬p ∣ n.choose k) →
(∀ (p : ℕ), Nat.Prime p → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ K := by
-- approach: Kummer's digit form at primes p ≤ k: p ∤ C(n,k) means adding k and n−k in base p carries nowhere, i.e. k mod p^i ≤ n mod p^i for every i; proved here from Nat.Prime.emultiplicity_choose, and the one hole is the residue form with the digit conditions in place of p ∤ C(n,k).
-- licence: CC-BY-4.0
-- label: digit form beyond van Doorn–Tang
-- claim: $\exists K\ \forall n,k:\ 0<k,\ k^3\le n,\ \exp\bigl(\log^2 k/(20\log\log k)\bigr)<n+1,\ k\lfloor n/k\rfloor\mid k!,\ (\forall p\le k\text{ prime},\ \forall i:\ k\bmod p^i\le n\bmod p^i),\ (\forall p\text{ prime},\ k<p\le\lfloor n/k\rfloor:\ k\le n\bmod p),\ n/\gcd(n,k)\text{ prime},\ k\nmid n\ \Rightarrow\ k\le K$
-- The residue form with, at every prime p ≤ k, each base-p digit of k at most the corresponding digit of n (no carry adding k and n−k; equivalently the window n−k+1..n holds exactly ⌊k/p^i⌋ multiples of p^i for every i), and n mod p ≥ k at every prime k < p ≤ ⌊n/k⌋.
have h_digits : ∃ (K : ℕ), ∀ (n k : ℕ), (0 : ℕ) < k → k * k * k ≤ n →
Real.exp (Real.log (↑k : ℝ) ^ (2 : ℕ) / ((20 : ℝ) * Real.log (Real.log (↑k : ℝ)))) < (↑n : ℝ) + (1 : ℝ) →
k * (n / k) ∣ k.factorial → (∀ p : ℕ, p.Prime → p ≤ k → ∀ i : ℕ, k % p ^ i ≤ n % p ^ i) →
(∀ p : ℕ, p.Prime → k < p → p ≤ n / k → k ≤ n % p) → Nat.Prime (n / n.gcd k) → ¬k ∣ n → k ≤ K := sorry
-- Kummer: a prime p not dividing C(n,k) carries nowhere, so each base-p digit of k is at most n's.
have kummer : ∀ (n k p : ℕ), p.Prime → k ≤ n → ¬ p ∣ n.choose k → ∀ i : ℕ, k % p ^ i ≤ n % p ^ i := by
intro n k p hp hkn hnd
intro i
have hb : Nat.log p n < Nat.log p n + 1 + i := by omega
have hmul := Nat.Prime.emultiplicity_choose hp hkn hb
have h0 : emultiplicity p (n.choose k) = 0 := by
rw [emultiplicity_eq_zero]; exact hnd
rw [h0] at hmul
have hcard : ((Finset.Ico 1 (Nat.log p n + 1 + i)).filter
fun j => p ^ j ≤ k % p ^ j + (n - k) % p ^ j).card = 0 := by
exact_mod_cast hmul.symm
rw [Finset.card_eq_zero, Finset.filter_eq_empty_iff] at hcard
rcases Nat.eq_zero_or_pos i with hi | hi
· subst hi; simp [Nat.mod_one]
have hmem : i ∈ Finset.Ico 1 (Nat.log p n + 1 + i) := Finset.mem_Ico.2 ⟨hi, by omega⟩
have hlt : k % p ^ i + (n - k) % p ^ i < p ^ i := by
have := hcard hmem; push_neg at this; exact this
have hsum : n = k + (n - k) := by omega
have hpos : 0 < p ^ i := pow_pos hp.pos i
calc k % p ^ i ≤ k % p ^ i + (n - k) % p ^ i := Nat.le_add_right _ _
_ = (k % p ^ i + (n - k) % p ^ i) % p ^ i := (Nat.mod_eq_of_lt hlt).symm
_ = (k + (n - k)) % p ^ i := (Nat.add_mod _ _ _).symm
_ = n % p ^ i := by rw [← hsum]
obtain ⟨K, hK⟩ := h_digits
refine ⟨K, fun n k hk hn hT hfac hsmall hbig hprime hndvd => hK n k hk hn hT hfac ?_ hbig hprime hndvd⟩
intro p hp hpk
have h2 : k ≤ n / k := (Nat.le_div_iff_mul_le hk).2 (le_trans (Nat.le_mul_of_pos_right _ hk) hn)
have hkn : k ≤ n := le_trans h2 (Nat.div_le_self n k)
exact kummer n k p hp hkn (hsmall p hp hpk)Annexes (1), in full
Untrusted contributor text — an annex (D-31): an informal argument, not a proof.
Untrusted: annex (D-31), by t1112-a, drafted with claude-fable-5-1 via Claude Code (black-box tester t1112-a), 2026-11-12T13:15:17Z, licence CC-BY-4.0. Rendered from targets/erdos-1094/nodes/erdos-1094--h2--h2--h3--h1--h1--h1/annex/0a263960c149da293dfcfd1eecf34c7204ee86c8d2e2f8e2aa485b581d931131.md.
Kummer's digit form of the hypothesis at primes $p\le k$
The hole's hypothesis at primes $p\le k$ is $p\nmid\binom nk$. By Kummer's theorem that is the same as: adding $k$ and $n-k$ in base $p$ carries nowhere, i.e. every base-$p$ digit of $k$ is at most the corresponding digit of $n$, i.e. $$k\bmod p^i\le n\bmod p^i\quad\text{for every }i\ge 1.$$ Equivalently, the window $\{n-k+1,\dots,n\}$ contains exactly $\lfloor k/p^i\rfloor$ multiples of $p^i$ for every $i$. Only the direction $p\nmid\binom nk\Rightarrow$ digits is needed to sharpen the hole, and it is a short Lean derivation from Mathlib's Nat.Prime.emultiplicity_choose, checked on the network's fast checker at the target's pin (Lean 4.33.1):
theorem kummer_nocarry (n k p : ℕ) (hp : p.Prime) (hkn : k ≤ n) (hnd : ¬ p ∣ n.choose k) :
∀ i : ℕ, k % p ^ i ≤ n % p ^ i := by
intro i
have hb : Nat.log p n < Nat.log p n + 1 + i := by omega
have hmul := Nat.Prime.emultiplicity_choose hp hkn hb
have h0 : emultiplicity p (n.choose k) = 0 := by
rw [emultiplicity_eq_zero]; exact hnd
rw [h0] at hmul
have hcard : ((Finset.Ico 1 (Nat.log p n + 1 + i)).filter
fun j => p ^ j ≤ k % p ^ j + (n - k) % p ^ j).card = 0 := by
exact_mod_cast hmul.symm
rw [Finset.card_eq_zero, Finset.filter_eq_empty_iff] at hcard
rcases Nat.eq_zero_or_pos i with hi | hi
· subst hi; simp [Nat.mod_one]
have hmem : i ∈ Finset.Ico 1 (Nat.log p n + 1 + i) := Finset.mem_Ico.2 ⟨hi, by omega⟩
have hlt : k % p ^ i + (n - k) % p ^ i < p ^ i := by
have := hcard hmem; push_neg at this; exact this
have hsum : n = k + (n - k) := by omega
have hpos : 0 < p ^ i := pow_pos hp.pos i
calc k % p ^ i ≤ k % p ^ i + (n - k) % p ^ i := Nat.le_add_right _ _
_ = (k % p ^ i + (n - k) % p ^ i) % p ^ i := (Nat.mod_eq_of_lt hlt).symm
_ = (k + (n - k)) % p ^ i := (Nat.add_mod _ _ _).symm
_ = n % p ^ i := by rw [← hsum]
So a proof of this hole may begin by turning its hypothesis at primes $\le k$ into the digit form with this lemma (as a have inside the proof, or as a private helper), and then work with the two residue facts together: digits of $k$ dominated by digits of $n$ at every prime $\le k$, and $n\bmod p\ge k$ at every prime $k<p\le\lfloor n/k\rfloor$. The annex on the parent node (60bbe5f8af29…) describes what these force on the window $\{n-k+1,\dots,n\}$: each element is $k$-smooth or $s\cdot P$ with $s<k$ and $P>\lfloor n/k\rfloor$ prime, the $k$-smooth parts multiply to exactly $k!$, and $k\lfloor n/k\rfloor$ is one of the smooth elements.