Problems / erdos-402 / variant-b89de5c4
Graham's bound for |A| = 18
variant-b89de5c4
proved
A partial route to the problem.
$\displaystyle \forall A \subset \mathbb{N}\ \text{finite}:\ 0 \notin A,\ |A| = 18 \Rightarrow \exists\, a, b \in A:\ \gcd(a,b) \le \frac{a}{|A|}$
Every set A of exactly eighteen positive integers has a, b ∈ A (possibly equal) with gcd(a, b) ≤ a/|A|. The division is in ℚ.
Lean
theorem Opn.erdos_402_card_eighteen :
∀ (A : Finset ℕ), 0 ∉ A → A.card = 18 → ∃ a ∈ A, ∃ b ∈ A, a.gcd b ≤ (a / A.card : ℚ) := 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 was proved
Proved by Proof.lean, checked by the kernel. Its attestation, 000279, records the gate’s run.
The proof step by step (outline)
Checked by the kernel — an outline of the attested proof below: attestations/000279.json, merge commit 423883f8a194.
Outline of Proof.lean, extracted by the gate at 82834c4684b8 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.
redhave∀ (n L : ℕ) (S : Finset ℕ) (c : ℕ → ℕ), (2 : ℕ) ≤ n → (0 : ℕ) < L → (∀ k ∈ Finset.range n, ∀ j ∈ Finset.range k, (0 : ℕ) < j → k ∣ L * j ∧ L * j / k ∈ S) → (∀ a ∈ S, c a + (2 : ℕ) < n) → (∀ a ∈ S, ∀ b ∈ S, a ≠ b → c a = c b → n * a.gcd b ≤ a ∨ n * a.gcd b ≤ b) → ∀ (A : Finset ℕ), (0 : ℕ) ∉ A → A.card = n → ∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ)Leaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withred : ∀ (n L : ℕ) (S : Finset ℕ) (c : ℕ → ℕ), (2 : ℕ) ≤ n → (0 : ℕ) < L → (∀ k ∈ Finset.range n, ∀ j ∈ Finset.range k, (0 : ℕ) < j → k ∣ L * j ∧ L * j / k ∈ S) → (∀ a ∈ S, c a + (2 : ℕ) < n) → (∀ a ∈ S, ∀ b ∈ S, a ≠ b → c a = c b → n * a.gcd b ≤ a ∨ n * a.gcd b ≤ b) → ∀ (A : Finset ℕ), (0 : ℕ) ∉ A → A.card = n → ∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ).Uses library
FinsetFinset αis the type of finite sets of elements ofα. ,Finset.rangerange nis the set of natural numbers less thann. ,Nat.mul_div_cancel.Lean, lines 13–111
have red : ∀ (n L : ℕ) (S : Finset ℕ) (c : ℕ → ℕ), 2 ≤ n → 0 < L → (∀ k ∈ Finset.range n, ∀ j ∈ Finset.range k, 0 < j → k ∣ L * j ∧ L * j / k ∈ S) → (∀ a ∈ S, c a + 2 < n) → (∀ a ∈ S, ∀ b ∈ S, a ≠ b → c a = c b → n * a.gcd b ≤ a ∨ n * a.gcd b ≤ b) → ∀ A : Finset ℕ, 0 ∉ A → A.card = n → ∃ a ∈ A, ∃ b ∈ A, a.gcd b ≤ (a / A.card : ℚ) := by intro n L S c hn hL hS hc hgood A hA hcard have hpos : 0 < A.card := by omega have hne : A.Nonempty := Finset.card_pos.mp hpos have key : ∀ a b : ℕ, a.gcd b * A.card ≤ a → (a.gcd b : ℚ) ≤ (a / A.card : ℚ) := by intro a b h rw [le_div_iff₀ (by exact_mod_cast hpos)] exact_mod_cast h have hM : A.max' hne ∈ A := Finset.max'_mem A hne have hMpos : 0 < A.max' hne := Nat.pos_of_ne_zero (fun h => hA (h ▸ hM)) by_cases hw : ∃ x ∈ A, (A.max' hne).gcd x * n ≤ A.max' hne · obtain ⟨x, hx, h⟩ := hw exact ⟨_, hM, x, hx, key _ x (by rw [hcard]; exact h)⟩ push_neg at hw have forms : ∀ x ∈ A.erase (A.max' hne), ∃ a ∈ S, L * x = a * A.max' hne := by intro x hx rw [Finset.mem_erase] at hx obtain ⟨hxM, hxA⟩ := hx have hxpos : 0 < x := Nat.pos_of_ne_zero (fun h => hA (h ▸ hxA)) have hlt : x < A.max' hne := lt_of_le_of_ne (Finset.le_max' A x hxA) hxM have hg := hw x hxA have hgpos : 0 < (A.max' hne).gcd x := Nat.gcd_pos_of_pos_right _ hxpos obtain ⟨k, hk⟩ := Nat.gcd_dvd_left (A.max' hne) x obtain ⟨j, hj⟩ := Nat.gcd_dvd_right (A.max' hne) x have hj1 : 0 < j := by rcases Nat.eq_zero_or_pos j with h | h · rw [h, Nat.mul_zero] at hj omega · exact h have hjk : j < k := by have h1 : (A.max' hne).gcd x * j < (A.max' hne).gcd x * k := by rw [← hj, ← hk] exact hlt exact Nat.lt_of_mul_lt_mul_left h1 have hkn : k < n := by have h1 : (A.max' hne).gcd x * k < (A.max' hne).gcd x * n := by rw [← hk] exact hg exact Nat.lt_of_mul_lt_mul_left h1 have hkx : k * x = j * A.max' hne := by calc k * x = k * ((A.max' hne).gcd x * j) := by rw [← hj] _ = j * ((A.max' hne).gcd x * k) := by ring _ = j * A.max' hne := by rw [← hk] have hkpos : 0 < k := by omega obtain ⟨hdvd, hmem⟩ := hS k (Finset.mem_range.2 hkn) j (Finset.mem_range.2 hjk) hj1 obtain ⟨q, hq⟩ := hdvd refine ⟨L * j / k, hmem, ?_⟩ rw [hq, Nat.mul_div_cancel_left q hkpos] apply Nat.eq_of_mul_eq_mul_left hkpos calc k * (L * x) = L * (k * x) := by ring _ = L * (j * A.max' hne) := by rw [hkx] _ = (L * j) * A.max' hne := by ring _ = (k * q) * A.max' hne := by rw [hq] _ = k * (q * A.max' hne) := by ring have hmaps : ∀ x ∈ A.erase (A.max' hne), c (L * x / A.max' hne) ∈ Finset.range (n - 2) := by intro x hx obtain ⟨a, ha, hax⟩ := forms x hx rw [Finset.mem_range, hax, Nat.mul_div_cancel _ hMpos] have := hc a ha omega have hcardE : (A.erase (A.max' hne)).card = n - 1 := by rw [Finset.card_erase_of_mem hM, hcard] obtain ⟨x, hx, y, hy, hxy, hcol⟩ := Finset.exists_ne_map_eq_of_card_lt_of_maps_to (by rw [hcardE, Finset.card_range]; omega) hmaps obtain ⟨a, ha, hax⟩ := forms x hx obtain ⟨b, hb, hby⟩ := forms y hy rw [hax, hby, Nat.mul_div_cancel _ hMpos, Nat.mul_div_cancel _ hMpos] at hcol have hab : a ≠ b := by intro h apply hxy apply Nat.eq_of_mul_eq_mul_left hL rw [hax, hby, h] have hgcd : a.gcd b * A.max' hne = L * x.gcd y := by have h1 : Nat.gcd (L * x) (L * y) = L * x.gcd y := Nat.gcd_mul_left L x y rw [hax, hby, Nat.gcd_mul_right] at h1 exact h1 have hxA := (Finset.mem_erase.mp hx).2 have hyA := (Finset.mem_erase.mp hy).2 rcases hgood a ha b hb hab hcol with h | h · refine ⟨x, hxA, y, hyA, key x y ?_⟩ rw [hcard] have h2 : L * (x.gcd y * n) ≤ L * x := by calc L * (x.gcd y * n) = n * (a.gcd b * A.max' hne) := by rw [hgcd]; ring _ ≤ a * A.max' hne := Nat.mul_le_mul_right _ h |>.trans_eq' (by ring) _ = L * x := hax.symm exact Nat.le_of_mul_le_mul_left h2 hL · refine ⟨y, hyA, x, hxA, key y x ?_⟩ rw [hcard, Nat.gcd_comm] have h2 : L * (x.gcd y * n) ≤ L * y := by calc L * (x.gcd y * n) = n * (a.gcd b * A.max' hne) := by rw [hgcd]; ring _ ≤ b * A.max' hne := Nat.mul_le_mul_right _ h |>.trans_eq' (by ring) _ = L * y := hby.symm exact Nat.le_of_mul_le_mul_left h2 hLtargets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 13–111 at
423883f8a194↗red.hposhave(0 : ℕ) < A.cardroutine: omegaLeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withhpos : (0 : ℕ) < A.card.Lean, line 20
have hpos : 0 < A.card := by omega
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 20 at
423883f8a194↗red.hnehaveA.NonemptyLeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withhne : A.Nonempty.Uses library
Finset.card_pos.Lean, line 21
have hne : A.Nonempty := Finset.card_pos.mp hpos
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 21 at
423883f8a194↗red.keyhave∀ (a b : ℕ), a.gcd b * A.card ≤ a → (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ)Leaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withkey : ∀ (a b : ℕ), a.gcd b * A.card ≤ a → (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ).Uses library
le_div_iff₀Seele_div_iff₀'for a version with multiplication on the other side. .Lean, lines 22–25
have key : ∀ a b : ℕ, a.gcd b * A.card ≤ a → (a.gcd b : ℚ) ≤ (a / A.card : ℚ) := by intro a b h rw [le_div_iff₀ (by exact_mod_cast hpos)] exact_mod_cast htargets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 22–25 at
423883f8a194↗red.hMhaveA.max' hne ∈ ALeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withhM : A.max' hne ∈ A.Uses library
Finset.max'_mem.Lean, line 26
have hM : A.max' hne ∈ A := Finset.max'_mem A hne
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 26 at
423883f8a194↗red.hMposhave(0 : ℕ) < A.max' hneLeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withhMpos : (0 : ℕ) < A.max' hne.Uses library
Nat.pos_of_ne_zero.Lean, line 27
have hMpos : 0 < A.max' hne := Nat.pos_of_ne_zero (fun h => hA (h ▸ hM))
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 27 at
423883f8a194↗red.s6caseLeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ).Uses library
Exists.introExistential introduction. .Lean, lines 29–30
· obtain ⟨x, hx, h⟩ := hw exact ⟨_, hM, x, hx, key _ x (by rw [hcard]; exact h)⟩targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 29–30 at
423883f8a194↗red.s6.s1obtain∃ x ∈ A, (A.max' hne).gcd x * n ≤ A.max' hneLeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withx : ℕ,hx : x ∈ A,h : (A.max' hne).gcd x * n ≤ A.max' hne.Lean, line 29
· obtain ⟨x, hx, h⟩ := hw
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 29 at
423883f8a194↗
red.formshave∀ x ∈ A.erase (A.max' hne), ∃ a ∈ S, L * x = a * A.max' hneLeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withforms : ∀ x ∈ A.erase (A.max' hne), ∃ a ∈ S, L * x = a * A.max' hne.Uses library
Finset.mem_erase,Exists.introExistential introduction. ,Nat.mul_div_cancel_left,Nat.eq_of_mul_eq_mul_left.Lean, lines 32–71
have forms : ∀ x ∈ A.erase (A.max' hne), ∃ a ∈ S, L * x = a * A.max' hne := by intro x hx rw [Finset.mem_erase] at hx obtain ⟨hxM, hxA⟩ := hx have hxpos : 0 < x := Nat.pos_of_ne_zero (fun h => hA (h ▸ hxA)) have hlt : x < A.max' hne := lt_of_le_of_ne (Finset.le_max' A x hxA) hxM have hg := hw x hxA have hgpos : 0 < (A.max' hne).gcd x := Nat.gcd_pos_of_pos_right _ hxpos obtain ⟨k, hk⟩ := Nat.gcd_dvd_left (A.max' hne) x obtain ⟨j, hj⟩ := Nat.gcd_dvd_right (A.max' hne) x have hj1 : 0 < j := by rcases Nat.eq_zero_or_pos j with h | h · rw [h, Nat.mul_zero] at hj omega · exact h have hjk : j < k := by have h1 : (A.max' hne).gcd x * j < (A.max' hne).gcd x * k := by rw [← hj, ← hk] exact hlt exact Nat.lt_of_mul_lt_mul_left h1 have hkn : k < n := by have h1 : (A.max' hne).gcd x * k < (A.max' hne).gcd x * n := by rw [← hk] exact hg exact Nat.lt_of_mul_lt_mul_left h1 have hkx : k * x = j * A.max' hne := by calc k * x = k * ((A.max' hne).gcd x * j) := by rw [← hj] _ = j * ((A.max' hne).gcd x * k) := by ring _ = j * A.max' hne := by rw [← hk] have hkpos : 0 < k := by omega obtain ⟨hdvd, hmem⟩ := hS k (Finset.mem_range.2 hkn) j (Finset.mem_range.2 hjk) hj1 obtain ⟨q, hq⟩ := hdvd refine ⟨L * j / k, hmem, ?_⟩ rw [hq, Nat.mul_div_cancel_left q hkpos] apply Nat.eq_of_mul_eq_mul_left hkpos calc k * (L * x) = L * (k * x) := by ring _ = L * (j * A.max' hne) := by rw [hkx] _ = (L * j) * A.max' hne := by ring _ = (k * q) * A.max' hne := by rw [hq] _ = k * (q * A.max' hne) := by ringtargets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 32–71 at
423883f8a194↗red.forms.s1obtainx ≠ A.max' hne ∧ x ∈ ALeaves
∃ a ∈ S, L * x = a * A.max' hne, withhxM : x ≠ A.max' hne,hxA : x ∈ A.Lean, line 35
obtain ⟨hxM, hxA⟩ := hx
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 35 at
423883f8a194↗red.forms.hxposhave(0 : ℕ) < xLeaves
∃ a ∈ S, L * x = a * A.max' hne, withhxpos : (0 : ℕ) < x.Uses library
Nat.pos_of_ne_zero.Lean, line 36
have hxpos : 0 < x := Nat.pos_of_ne_zero (fun h => hA (h ▸ hxA))
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 36 at
423883f8a194↗red.forms.hlthavex < A.max' hneLeaves
∃ a ∈ S, L * x = a * A.max' hne, withhlt : x < A.max' hne.Uses library
lt_of_le_of_ne,Finset.le_max'.Lean, line 37
have hlt : x < A.max' hne := lt_of_le_of_ne (Finset.le_max' A x hxA) hxM
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 37 at
423883f8a194↗red.forms.hghaveA.max' hne < (A.max' hne).gcd x * nLeaves
∃ a ∈ S, L * x = a * A.max' hne, withhg : A.max' hne < (A.max' hne).gcd x * n.Lean, line 38
have hg := hw x hxA
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 38 at
423883f8a194↗red.forms.hgposhave(0 : ℕ) < (A.max' hne).gcd xLeaves
∃ a ∈ S, L * x = a * A.max' hne, withhgpos : (0 : ℕ) < (A.max' hne).gcd x.Uses library
Nat.gcd_pos_of_pos_right.Lean, line 39
have hgpos : 0 < (A.max' hne).gcd x := Nat.gcd_pos_of_pos_right _ hxpos
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 39 at
423883f8a194↗red.forms.s6obtain(A.max' hne).gcd x ∣ A.max' hneLeaves
∃ a ∈ S, L * x = a * A.max' hne, withk : ℕ,hk : A.max' hne = (A.max' hne).gcd x * k.Uses library
Nat.gcd_dvd_left.Lean, line 40
obtain ⟨k, hk⟩ := Nat.gcd_dvd_left (A.max' hne) x
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 40 at
423883f8a194↗red.forms.s7obtain(A.max' hne).gcd x ∣ xLeaves
∃ a ∈ S, L * x = a * A.max' hne, withj : ℕ,hj : x = (A.max' hne).gcd x * j.Uses library
Nat.gcd_dvd_right.Lean, line 41
obtain ⟨j, hj⟩ := Nat.gcd_dvd_right (A.max' hne) x
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 41 at
423883f8a194↗red.forms.hj1have(0 : ℕ) < jLeaves
∃ a ∈ S, L * x = a * A.max' hne, withhj1 : (0 : ℕ) < j.Uses library
Nat.eq_zero_or_pos.Lean, lines 42–46
have hj1 : 0 < j := by rcases Nat.eq_zero_or_pos j with h | h · rw [h, Nat.mul_zero] at hj omega · exact htargets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 42–46 at
423883f8a194↗red.forms.hj1.s1caseLeaves
(0 : ℕ) < j.Uses library
Nat.mul_zero.Lean, lines 44–45
· rw [h, Nat.mul_zero] at hj omegatargets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 44–45 at
423883f8a194↗red.forms.hj1.s2caseLeaves
(0 : ℕ) < j.Lean, line 46
· exact h
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 46 at
423883f8a194↗
red.forms.hjkhavej < kLeaves
∃ a ∈ S, L * x = a * A.max' hne, withhjk : j < k.Uses library
Nat.lt_of_mul_lt_mul_left.Lean, lines 47–51
have hjk : j < k := by have h1 : (A.max' hne).gcd x * j < (A.max' hne).gcd x * k := by rw [← hj, ← hk] exact hlt exact Nat.lt_of_mul_lt_mul_left h1targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 47–51 at
423883f8a194↗red.forms.hjk.h1have(A.max' hne).gcd x * j < (A.max' hne).gcd x * kLeaves
j < k, withh1 : (A.max' hne).gcd x * j < (A.max' hne).gcd x * k.Lean, lines 48–50
have h1 : (A.max' hne).gcd x * j < (A.max' hne).gcd x * k := by rw [← hj, ← hk] exact hlttargets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 48–50 at
423883f8a194↗
red.forms.hknhavek < nLeaves
∃ a ∈ S, L * x = a * A.max' hne, withhkn : k < n.Uses library
Nat.lt_of_mul_lt_mul_left.Lean, lines 52–56
have hkn : k < n := by have h1 : (A.max' hne).gcd x * k < (A.max' hne).gcd x * n := by rw [← hk] exact hg exact Nat.lt_of_mul_lt_mul_left h1targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 52–56 at
423883f8a194↗red.forms.hkn.h1have(A.max' hne).gcd x * k < (A.max' hne).gcd x * nLeaves
k < n, withh1 : (A.max' hne).gcd x * k < (A.max' hne).gcd x * n.Lean, lines 53–55
have h1 : (A.max' hne).gcd x * k < (A.max' hne).gcd x * n := by rw [← hk] exact hgtargets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 53–55 at
423883f8a194↗
red.forms.hkxhavek * x = j * A.max' hneLeaves
∃ a ∈ S, L * x = a * A.max' hne, withhkx : k * x = j * A.max' hne.Lean, lines 57–60
have hkx : k * x = j * A.max' hne := by calc k * x = k * ((A.max' hne).gcd x * j) := by rw [← hj] _ = j * ((A.max' hne).gcd x * k) := by ring _ = j * A.max' hne := by rw [← hk]targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 57–60 at
423883f8a194↗red.forms.hkx.s1calck * x = k * ((A.max' hne).gcd x * j)Closes the goal.
Lean, line 58
calc k * x = k * ((A.max' hne).gcd x * j) := by rw [← hj]
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 58 at
423883f8a194↗red.forms.hkx.s2calc routine: ringCloses the goal.
Lean, line 59
_ = j * ((A.max' hne).gcd x * k) := by ring
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 59 at
423883f8a194↗red.forms.hkx.s3calcCloses the goal.
Lean, line 60
_ = j * A.max' hne := by rw [← hk]
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 60 at
423883f8a194↗
red.forms.hkposhave(0 : ℕ) < kroutine: omegaLeaves
∃ a ∈ S, L * x = a * A.max' hne, withhkpos : (0 : ℕ) < k.Lean, line 61
have hkpos : 0 < k := by omega
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 61 at
423883f8a194↗red.forms.s13obtaink ∣ L * j ∧ L * j / k ∈ SLeaves
∃ a ∈ S, L * x = a * A.max' hne, withhdvd : k ∣ L * j,hmem : L * j / k ∈ S.Uses library
Finset.mem_range.Lean, line 62
obtain ⟨hdvd, hmem⟩ := hS k (Finset.mem_range.2 hkn) j (Finset.mem_range.2 hjk) hj1
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 62 at
423883f8a194↗red.forms.s14obtaink ∣ L * jLeaves
∃ a ∈ S, L * x = a * A.max' hne, withq : ℕ,hq : L * j = k * q.Lean, line 63
obtain ⟨q, hq⟩ := hdvd
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 63 at
423883f8a194↗red.forms.s15calck * (L * x) = L * (k * x)routine: ringCloses the goal.
Lean, line 67
calc k * (L * x) = L * (k * x) := by ring
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 67 at
423883f8a194↗red.forms.s16calcCloses the goal.
Lean, line 68
_ = L * (j * A.max' hne) := by rw [hkx]
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 68 at
423883f8a194↗red.forms.s17calc routine: ringCloses the goal.
Lean, line 69
_ = (L * j) * A.max' hne := by ring
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 69 at
423883f8a194↗red.forms.s18calcCloses the goal.
Lean, line 70
_ = (k * q) * A.max' hne := by rw [hq]
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 70 at
423883f8a194↗red.forms.s19calc routine: ringCloses the goal.
Lean, line 71
_ = k * (q * A.max' hne) := by ring
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 71 at
423883f8a194↗
red.hmapshave∀ x ∈ A.erase (A.max' hne), c (L * x / A.max' hne) ∈ Finset.range (n - (2 : ℕ))Leaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withhmaps : ∀ x ∈ A.erase (A.max' hne), c (L * x / A.max' hne) ∈ Finset.range (n - (2 : ℕ)).Uses library
Finset.rangerange nis the set of natural numbers less thann. ,Finset.mem_range,Nat.mul_div_cancel.Lean, lines 72–77
have hmaps : ∀ x ∈ A.erase (A.max' hne), c (L * x / A.max' hne) ∈ Finset.range (n - 2) := by intro x hx obtain ⟨a, ha, hax⟩ := forms x hx rw [Finset.mem_range, hax, Nat.mul_div_cancel _ hMpos] have := hc a ha omegatargets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 72–77 at
423883f8a194↗red.hmaps.s1obtain∃ a ∈ S, L * x = a * A.max' hneLeaves
c (L * x / A.max' hne) ∈ Finset.range (n - (2 : ℕ)), witha : ℕ,ha : a ∈ S,hax : L * x = a * A.max' hne.Lean, line 74
obtain ⟨a, ha, hax⟩ := forms x hx
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 74 at
423883f8a194↗red.hmaps.thishavec a + (2 : ℕ) < nLeaves
c a < n - (2 : ℕ), withthis : c a + (2 : ℕ) < n.Lean, line 76
have := hc a ha
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 76 at
423883f8a194↗
red.hcardEhave(A.erase (A.max' hne)).card = n - (1 : ℕ)Leaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withhcardE : (A.erase (A.max' hne)).card = n - (1 : ℕ).Uses library
Finset.card_erase_of_mem$\#(s \setminus \{a\}) = \#s - 1$ if $a \in s$. .Lean, lines 78–79
have hcardE : (A.erase (A.max' hne)).card = n - 1 := by rw [Finset.card_erase_of_mem hM, hcard]targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 78–79 at
423883f8a194↗red.s10obtain∃ x ∈ A.erase (A.max' hne), ∃ y ∈ A.erase (A.max' hne), x ≠ y ∧ c (L * x / A.max' hne) = c (L * y / A.max' hne)Leaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withx : ℕ,hx : x ∈ A.erase (A.max' hne),y : ℕ,hy : y ∈ A.erase (A.max' hne),hxy : x ≠ y,hcol : c (L * x / A.max' hne) = c (L * y / A.max' hne).Uses library
Finset.exists_ne_map_eq_of_card_lt_of_maps_toIf there are more pigeons than pigeonholes, then there are two pigeons in the same pigeonhole. ,Finset.card_range.Lean, lines 80–82
obtain ⟨x, hx, y, hy, hxy, hcol⟩ := Finset.exists_ne_map_eq_of_card_lt_of_maps_to (by rw [hcardE, Finset.card_range]; omega) hmapstargets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 80–82 at
423883f8a194↗red.s11obtain∃ a ∈ S, L * x = a * A.max' hneLeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), witha : ℕ,ha : a ∈ S,hax : L * x = a * A.max' hne.Lean, line 83
obtain ⟨a, ha, hax⟩ := forms x hx
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 83 at
423883f8a194↗red.s12obtain∃ a ∈ S, L * y = a * A.max' hneLeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withb : ℕ,hb : b ∈ S,hby : L * y = b * A.max' hne.Lean, line 84
obtain ⟨b, hb, hby⟩ := forms y hy
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 84 at
423883f8a194↗red.habhavea ≠ bLeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withhab : a ≠ b.Uses library
Nat.eq_of_mul_eq_mul_left.Lean, lines 86–90
have hab : a ≠ b := by intro h apply hxy apply Nat.eq_of_mul_eq_mul_left hL rw [hax, hby, h]targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 86–90 at
423883f8a194↗red.hgcdhavea.gcd b * A.max' hne = L * x.gcd yLeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withhgcd : a.gcd b * A.max' hne = L * x.gcd y.Uses library
Nat.gcd_mul_right.Lean, lines 91–94
have hgcd : a.gcd b * A.max' hne = L * x.gcd y := by have h1 : Nat.gcd (L * x) (L * y) = L * x.gcd y := Nat.gcd_mul_left L x y rw [hax, hby, Nat.gcd_mul_right] at h1 exact h1targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 91–94 at
423883f8a194↗red.hgcd.h1have(L * x).gcd (L * y) = L * x.gcd yLeaves
a.gcd b * A.max' hne = L * x.gcd y, withh1 : (L * x).gcd (L * y) = L * x.gcd y.Uses library
Nat.gcdComputes the greatest common divisor of two natural numbers. ,Nat.gcd_mul_left.Lean, line 92
have h1 : Nat.gcd (L * x) (L * y) = L * x.gcd y := Nat.gcd_mul_left L x y
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 92 at
423883f8a194↗
red.hxAhavex ∈ ALeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withhxA : x ∈ A.Uses library
Finset.mem_erase.Lean, line 95
have hxA := (Finset.mem_erase.mp hx).2
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 95 at
423883f8a194↗red.hyAhavey ∈ ALeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ), withhyA : y ∈ A.Uses library
Finset.mem_erase.Lean, line 96
have hyA := (Finset.mem_erase.mp hy).2
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 96 at
423883f8a194↗red.s17caseLeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ).Uses library
Exists.introExistential introduction. ,Nat.le_of_mul_le_mul_left.Lean, lines 98–104
· refine ⟨x, hxA, y, hyA, key x y ?_⟩ rw [hcard] have h2 : L * (x.gcd y * n) ≤ L * x := by calc L * (x.gcd y * n) = n * (a.gcd b * A.max' hne) := by rw [hgcd]; ring _ ≤ a * A.max' hne := Nat.mul_le_mul_right _ h |>.trans_eq' (by ring) _ = L * x := hax.symm exact Nat.le_of_mul_le_mul_left h2 hLtargets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 98–104 at
423883f8a194↗red.s17.h2haveL * (x.gcd y * n) ≤ L * xLeaves
x.gcd y * n ≤ x, withh2 : L * (x.gcd y * n) ≤ L * x.Lean, lines 100–103
have h2 : L * (x.gcd y * n) ≤ L * x := by calc L * (x.gcd y * n) = n * (a.gcd b * A.max' hne) := by rw [hgcd]; ring _ ≤ a * A.max' hne := Nat.mul_le_mul_right _ h |>.trans_eq' (by ring) _ = L * x := hax.symmtargets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 100–103 at
423883f8a194↗red.s17.h2.s1calcL * (x.gcd y * n) = n * (a.gcd b * A.max' hne)Closes the goal.
Lean, line 101
calc L * (x.gcd y * n) = n * (a.gcd b * A.max' hne) := by rw [hgcd]; ring
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 101 at
423883f8a194↗red.s17.h2.s2calcn * (a.gcd b * A.max' hne) ≤ a * A.max' hneCloses the goal.
Uses library
Nat.mul_le_mul_right.Lean, line 102
_ ≤ a * A.max' hne := Nat.mul_le_mul_right _ h |>.trans_eq' (by ring)
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 102 at
423883f8a194↗red.s17.h2.s3calca * A.max' hne = L * xCloses the goal.
Lean, line 103
_ = L * x := hax.symm
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 103 at
423883f8a194↗
red.s18caseLeaves
∃ a ∈ A, ∃ b ∈ A, (↑(a.gcd b) : ℚ) ≤ (↑a : ℚ) / (↑A.card : ℚ).Uses library
Exists.introExistential introduction. ,Nat.gcd_comm,Nat.le_of_mul_le_mul_left.Lean, lines 105–111
· refine ⟨y, hyA, x, hxA, key y x ?_⟩ rw [hcard, Nat.gcd_comm] have h2 : L * (x.gcd y * n) ≤ L * y := by calc L * (x.gcd y * n) = n * (a.gcd b * A.max' hne) := by rw [hgcd]; ring _ ≤ b * A.max' hne := Nat.mul_le_mul_right _ h |>.trans_eq' (by ring) _ = L * y := hby.symm exact Nat.le_of_mul_le_mul_left h2 hLtargets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 105–111 at
423883f8a194↗red.s18.h2haveL * (x.gcd y * n) ≤ L * yLeaves
x.gcd y * n ≤ y, withh2 : L * (x.gcd y * n) ≤ L * y.Lean, lines 107–110
have h2 : L * (x.gcd y * n) ≤ L * y := by calc L * (x.gcd y * n) = n * (a.gcd b * A.max' hne) := by rw [hgcd]; ring _ ≤ b * A.max' hne := Nat.mul_le_mul_right _ h |>.trans_eq' (by ring) _ = L * y := hby.symmtargets/erdos-402/nodes/variant-b89de5c4/Proof.lean, lines 107–110 at
423883f8a194↗red.s18.h2.s1calcL * (x.gcd y * n) = n * (a.gcd b * A.max' hne)Closes the goal.
Lean, line 108
calc L * (x.gcd y * n) = n * (a.gcd b * A.max' hne) := by rw [hgcd]; ring
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 108 at
423883f8a194↗red.s18.h2.s2calcn * (a.gcd b * A.max' hne) ≤ b * A.max' hneCloses the goal.
Uses library
Nat.mul_le_mul_right.Lean, line 109
_ ≤ b * A.max' hne := Nat.mul_le_mul_right _ h |>.trans_eq' (by ring)
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 109 at
423883f8a194↗red.s18.h2.s3calcb * A.max' hne = L * yCloses the goal.
Lean, line 110
_ = L * y := hby.symm
targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, line 110 at
423883f8a194↗
The proof in Lean (Proof.lean)
Checked by the kernel — these bytes are the ones its attestation names: attestations/000279.json, merge commit 423883f8a194.
artifact_hash of the attestation below, so these are the bytes the gate checked. Rendered from targets/erdos-402/nodes/variant-b89de5c4/Proof.lean, sha256 3f0cf8cdfa55.import Mathlib
import Nodes.«variant-b89de5c4».Context
/-! Graham's gcd conjecture (Erdős problem 402) for eighteen-element sets. With M the largest
element, if gcd(M, x) > M/18 for every x then every other x is (j/k)M with j < k ≤ 17, so
L·x/M (L = lcm(1..17) = 12252240) lies in a fixed set S of 95 values. S splits into 16 classes in
each of which any two distinct values c, d have 18·gcd(c, d) ≤ c or ≤ d; by pigeonhole two of
the 17 other elements share a class, and gcd(x, y)·L = gcd(c, d)·M transfers the bound. -/
theorem Opn.erdos_402_card_eighteen :
∀ (A : Finset ℕ), 0 ∉ A → A.card = 18 → ∃ a ∈ A, ∃ b ∈ A, a.gcd b ≤ (a / A.card : ℚ) := by
intro A hA hn
have red :
∀ (n L : ℕ) (S : Finset ℕ) (c : ℕ → ℕ), 2 ≤ n → 0 < L →
(∀ k ∈ Finset.range n, ∀ j ∈ Finset.range k, 0 < j → k ∣ L * j ∧ L * j / k ∈ S) →
(∀ a ∈ S, c a + 2 < n) →
(∀ a ∈ S, ∀ b ∈ S, a ≠ b → c a = c b → n * a.gcd b ≤ a ∨ n * a.gcd b ≤ b) →
∀ A : Finset ℕ, 0 ∉ A → A.card = n → ∃ a ∈ A, ∃ b ∈ A, a.gcd b ≤ (a / A.card : ℚ) := by
intro n L S c hn hL hS hc hgood A hA hcard
have hpos : 0 < A.card := by omega
have hne : A.Nonempty := Finset.card_pos.mp hpos
have key : ∀ a b : ℕ, a.gcd b * A.card ≤ a → (a.gcd b : ℚ) ≤ (a / A.card : ℚ) := by
intro a b h
rw [le_div_iff₀ (by exact_mod_cast hpos)]
exact_mod_cast h
have hM : A.max' hne ∈ A := Finset.max'_mem A hne
have hMpos : 0 < A.max' hne := Nat.pos_of_ne_zero (fun h => hA (h ▸ hM))
by_cases hw : ∃ x ∈ A, (A.max' hne).gcd x * n ≤ A.max' hne
· obtain ⟨x, hx, h⟩ := hw
exact ⟨_, hM, x, hx, key _ x (by rw [hcard]; exact h)⟩
push_neg at hw
have forms : ∀ x ∈ A.erase (A.max' hne), ∃ a ∈ S, L * x = a * A.max' hne := by
intro x hx
rw [Finset.mem_erase] at hx
obtain ⟨hxM, hxA⟩ := hx
have hxpos : 0 < x := Nat.pos_of_ne_zero (fun h => hA (h ▸ hxA))
have hlt : x < A.max' hne := lt_of_le_of_ne (Finset.le_max' A x hxA) hxM
have hg := hw x hxA
have hgpos : 0 < (A.max' hne).gcd x := Nat.gcd_pos_of_pos_right _ hxpos
obtain ⟨k, hk⟩ := Nat.gcd_dvd_left (A.max' hne) x
obtain ⟨j, hj⟩ := Nat.gcd_dvd_right (A.max' hne) x
have hj1 : 0 < j := by
rcases Nat.eq_zero_or_pos j with h | h
· rw [h, Nat.mul_zero] at hj
omega
· exact h
have hjk : j < k := by
have h1 : (A.max' hne).gcd x * j < (A.max' hne).gcd x * k := by
rw [← hj, ← hk]
exact hlt
exact Nat.lt_of_mul_lt_mul_left h1
have hkn : k < n := by
have h1 : (A.max' hne).gcd x * k < (A.max' hne).gcd x * n := by
rw [← hk]
exact hg
exact Nat.lt_of_mul_lt_mul_left h1
have hkx : k * x = j * A.max' hne := by
calc k * x = k * ((A.max' hne).gcd x * j) := by rw [← hj]
_ = j * ((A.max' hne).gcd x * k) := by ring
_ = j * A.max' hne := by rw [← hk]
have hkpos : 0 < k := by omega
obtain ⟨hdvd, hmem⟩ := hS k (Finset.mem_range.2 hkn) j (Finset.mem_range.2 hjk) hj1
obtain ⟨q, hq⟩ := hdvd
refine ⟨L * j / k, hmem, ?_⟩
rw [hq, Nat.mul_div_cancel_left q hkpos]
apply Nat.eq_of_mul_eq_mul_left hkpos
calc k * (L * x) = L * (k * x) := by ring
_ = L * (j * A.max' hne) := by rw [hkx]
_ = (L * j) * A.max' hne := by ring
_ = (k * q) * A.max' hne := by rw [hq]
_ = k * (q * A.max' hne) := by ring
have hmaps : ∀ x ∈ A.erase (A.max' hne), c (L * x / A.max' hne) ∈ Finset.range (n - 2) := by
intro x hx
obtain ⟨a, ha, hax⟩ := forms x hx
rw [Finset.mem_range, hax, Nat.mul_div_cancel _ hMpos]
have := hc a ha
omega
have hcardE : (A.erase (A.max' hne)).card = n - 1 := by
rw [Finset.card_erase_of_mem hM, hcard]
obtain ⟨x, hx, y, hy, hxy, hcol⟩ :=
Finset.exists_ne_map_eq_of_card_lt_of_maps_to
(by rw [hcardE, Finset.card_range]; omega) hmaps
obtain ⟨a, ha, hax⟩ := forms x hx
obtain ⟨b, hb, hby⟩ := forms y hy
rw [hax, hby, Nat.mul_div_cancel _ hMpos, Nat.mul_div_cancel _ hMpos] at hcol
have hab : a ≠ b := by
intro h
apply hxy
apply Nat.eq_of_mul_eq_mul_left hL
rw [hax, hby, h]
have hgcd : a.gcd b * A.max' hne = L * x.gcd y := by
have h1 : Nat.gcd (L * x) (L * y) = L * x.gcd y := Nat.gcd_mul_left L x y
rw [hax, hby, Nat.gcd_mul_right] at h1
exact h1
have hxA := (Finset.mem_erase.mp hx).2
have hyA := (Finset.mem_erase.mp hy).2
rcases hgood a ha b hb hab hcol with h | h
· refine ⟨x, hxA, y, hyA, key x y ?_⟩
rw [hcard]
have h2 : L * (x.gcd y * n) ≤ L * x := by
calc L * (x.gcd y * n) = n * (a.gcd b * A.max' hne) := by rw [hgcd]; ring
_ ≤ a * A.max' hne := Nat.mul_le_mul_right _ h |>.trans_eq' (by ring)
_ = L * x := hax.symm
exact Nat.le_of_mul_le_mul_left h2 hL
· refine ⟨y, hyA, x, hxA, key y x ?_⟩
rw [hcard, Nat.gcd_comm]
have h2 : L * (x.gcd y * n) ≤ L * y := by
calc L * (x.gcd y * n) = n * (a.gcd b * A.max' hne) := by rw [hgcd]; ring
_ ≤ b * A.max' hne := Nat.mul_le_mul_right _ h |>.trans_eq' (by ring)
_ = L * y := hby.symm
exact Nat.le_of_mul_le_mul_left h2 hL
exact red 18 12252240 {720720, 765765, 816816, 875160, 942480, 1021020, 1113840, 1225224, 1361360, 1441440, 1531530, 1633632, 1750320, 1884960, 2042040, 2162160, 2227680, 2297295, 2450448, 2625480, 2722720, 2827440, 2882880, 3063060, 3267264, 3341520, 3500640, 3603600, 3675672, 3769920, 3828825, 4084080, 4324320, 4375800, 4455360, 4594590, 4712400, 4900896, 5045040, 5105100, 5250960, 5360355, 5445440, 5569200, 5654880, 5717712, 5765760, 6126120, 6486480, 6534528, 6597360, 6683040, 6806800, 6891885, 7001280, 7147140, 7207200, 7351344, 7539840, 7657650, 7796880, 7876440, 7927920, 8168160, 8423415, 8482320, 8576568, 8648640, 8751600, 8910720, 8984976, 9189180, 9369360, 9424800, 9529520, 9626760, 9801792, 9954945, 10024560, 10090080, 10210200, 10367280, 10501920, 10618608, 10720710, 10810800, 10890880, 11027016, 11138400, 11231220, 11309760, 11377080, 11435424, 11486475, 11531520}
(fun a : ℕ => if a = 720720 then 12 else if a = 765765 then 10 else if a = 816816 then 13 else if a = 875160 then 14 else if a = 942480 then 4 else if a = 1021020 then 7 else if a = 1113840 then 9 else if a = 1225224 then 3 else if a = 1361360 then 15 else if a = 1441440 then 13 else if a = 1531530 then 8 else if a = 1633632 then 4 else if a = 1750320 then 11 else if a = 1884960 then 14 else if a = 2042040 then 5 else if a = 2162160 then 3 else if a = 2227680 then 12 else if a = 2297295 then 11 else if a = 2450448 then 6 else if a = 2625480 then 7 else if a = 2722720 then 9 else if a = 2827440 then 12 else if a = 2882880 then 11 else if a = 3063060 then 2 else if a = 3267264 then 8 else if a = 3341520 then 13 else if a = 3500640 then 10 else if a = 3603600 then 4 else if a = 3675672 then 10 else if a = 3769920 then 5 else if a = 3828825 then 3 else if a = 4084080 then 1 else if a = 4324320 then 2 else if a = 4375800 then 9 else if a = 4455360 then 14 else if a = 4594590 then 9 else if a = 4712400 then 7 else if a = 4900896 then 7 else if a = 5045040 then 7 else if a = 5105100 then 10 else if a = 5250960 then 8 else if a = 5360355 then 12 else if a = 5445440 then 6 else if a = 5569200 then 5 else if a = 5654880 then 10 else if a = 5717712 then 2 else if a = 5765760 then 5 else if a = 6126120 then 0 else if a = 6486480 then 6 else if a = 6534528 then 11 else if a = 6597360 then 6 else if a = 6683040 then 6 else if a = 6806800 then 11 else if a = 6891885 then 7 else if a = 7001280 then 4 else if a = 7147140 then 11 else if a = 7207200 then 1 else if a = 7351344 then 5 else if a = 7539840 then 1 else if a = 7657650 then 6 else if a = 7796880 then 3 else if a = 7876440 then 3 else if a = 7927920 then 0 else if a = 8168160 then 3 else if a = 8423415 then 13 else if a = 8482320 then 8 else if a = 8576568 then 1 else if a = 8648640 then 8 else if a = 8751600 then 2 else if a = 8910720 then 2 else if a = 8984976 then 10 else if a = 9189180 then 4 else if a = 9369360 then 10 else if a = 9424800 then 0 else if a = 9529520 then 4 else if a = 9626760 then 6 else if a = 9801792 then 9 else if a = 9954945 then 1 else if a = 10024560 then 0 else if a = 10090080 then 14 else if a = 10210200 then 8 else if a = 10367280 then 2 else if a = 10501920 then 1 else if a = 10618608 then 12 else if a = 10720710 then 5 else if a = 10810800 then 9 else if a = 10890880 then 7 else if a = 11027016 then 2 else if a = 11138400 then 4 else if a = 11231220 then 9 else if a = 11309760 then 3 else if a = 11377080 then 5 else if a = 11435424 then 0 else if a = 11486475 then 14 else if a = 11531520 then 15 else 0)
(by norm_num) (by norm_num) (by decide +kernel) (by decide +kernel) (by decide +kernel) A hA hnWhat is known
Work on it
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).
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.«variant-b89de5c4».Context
/-! Graham's gcd conjecture (Erdős problem 402) for eighteen-element sets. With M the largest
element, if gcd(M, x) > M/18 for every x then every other x is (j/k)M with j < k ≤ 17, so
L·x/M (L = lcm(1..17) = 12252240) lies in a fixed set S of 95 values. S splits into 16 classes in
each of which any two distinct values c, d have 18·gcd(c, d) ≤ c or ≤ d; by pigeonhole two of
the 17 other elements share a class, and gcd(x, y)·L = gcd(c, d)·M transfers the bound. -/
theorem Opn.erdos_402_card_eighteen :
∀ (A : Finset ℕ), 0 ∉ A → A.card = 18 → ∃ a ∈ A, ∃ b ∈ A, a.gcd b ≤ (a / A.card : ℚ) := 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 \forall A \subset \mathbb{N}\ \text{finite}:\ 0 \notin A,\ |A| = 18 \Rightarrow \exists\, a, b \in A:\ \gcd(a,b) \le \frac{a}{|A|}$
Every set A of exactly eighteen positive integers has a, b ∈ A (possibly equal) with gcd(a, b) ≤ a/|A|. The division is in ℚ.
Rendered from gloss/3bca86bd5924….md · Improve these words →
Rendered from targets/erdos-402/nodes/variant-b89de5c4/Statement.lean. Origin: variant (partial).
Attestation: pass, 7 of 7 checks
Checked by the kernel — the gate’s record of the run: attestations/000279.json, merge commit 423883f8a194.
Verdict pass, from attestations/000279.json.
- Submitter
t0929-6- Toolchain
- leanprover/lean4:v4.33.1 (hash
f54d0bc916bf76a7fae460ce9d078ccd1f74aeb4fd12c4b6546bca28b6aa1c63) - Mathlib
- 0df444a360eaa60ab8c11dca51a86af692955474
- Reviewer
- none needed (calibration)
| Step | Check | Result |
|---|---|---|
| 1 | toolchain | pass |
| 2 | paths | pass |
| 4 | kernel-replay | pass |
| 5 | axioms | pass |
| 6 | hazards | pass |
| 7 | witness | pass |
| 8 | deps | pass |
Witness
Checked by the kernel — step 7 passed in the run its attestation records: attestations/000279.json, merge commit 423883f8a194.
45dd897aff78.import Mathlib theorem witness : ∃ A : Finset ℕ, 0 ∉ A ∧ A.card = 18 := ⟨Finset.Icc 1 18, by simp, by simp⟩
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 →
Relation to the problem’s statement
Checked by the kernel — checked at admission (D-30); no proof of the node is implied.
d4da5e5f9ee5.-- relation: partial
import Mathlib
theorem relation :
(∀ (A : Finset ℕ), 0 ∉ A → A.Nonempty → ∃ᵉ (a ∈ A) (b ∈ A), a.gcd b ≤ (a / A.card : ℚ)) →
(∀ (A : Finset ℕ), 0 ∉ A → A.card = 18 → ∃ a ∈ A, ∃ b ∈ A, a.gcd b ≤ (a / A.card : ℚ)) :=
fun h A hA hn => h A hA (Finset.card_pos.mp (by omega))No gloss yet: no one has written in words what this relation says (D-3 v3.30); the Lean above is the relation. How to write one →
Acknowledged findings (1)
Untrusted contributor text — the prover’s justification for a finding.
Untrusted: acknowledgment of a div-zero finding at ↑a / ↑A.card
The hypothesis A.card = 18 makes A.card positive, so the rational division is never by zero.