Problems / erdos-402 / variant-d865c9c6
Graham's bound for |A| = 2
variant-d865c9c6
proved
A partial route to the problem.
$\displaystyle \forall A \subset \mathbb{N}\ \text{finite}:\ 0 \notin A,\ |A| = 2 \Rightarrow \exists\, a, b \in A:\ \gcd(a,b) \le \frac{a}{|A|}$
Every set A of exactly two positive integers has a, b ∈ A (possibly equal) with gcd(a, b) ≤ a/|A|. The division is in ℚ.
Lean
theorem Opn.erdos_402_card_two :
∀ (A : Finset ℕ), 0 ∉ A → A.card = 2 → ∃ 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, 000145, records the gate’s run.
The proof step by step (outline)
Checked by the kernel — an outline of the attested proof below: attestations/000145.json, merge commit 64f963463674.
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.
s1obtain printed form did not read back: shown as its Lean lines onlyobtain ⟨x, y, hxy, rfl⟩ := Finset.card_eq_two.mp hc
targets/erdos-402/nodes/variant-d865c9c6/Proof.lean, line 10 at
64f963463674↗hx0have printed form did not read back: shown as its Lean lines onlyhave hx0 : x ≠ 0 := by intro h; apply hA; simp [h]targets/erdos-402/nodes/variant-d865c9c6/Proof.lean, lines 11–12 at
64f963463674↗hy0have printed form did not read back: shown as its Lean lines onlyhave hy0 : y ≠ 0 := by intro h; apply hA; simp [h]targets/erdos-402/nodes/variant-d865c9c6/Proof.lean, lines 13–14 at
64f963463674↗keyhave printed form did not read back: shown as its Lean lines onlyhave key : ∀ p q : ℕ, p ≠ 0 → q ≠ 0 → p < q → ((q.gcd p : ℕ) : ℚ) ≤ (q : ℚ) / 2 := by intro p q hp hq hpq obtain ⟨k, hk⟩ := Nat.gcd_dvd_left q p have hgle : q.gcd p ≤ p := Nat.le_of_dvd (Nat.pos_of_ne_zero hp) (Nat.gcd_dvd_right q p) have hk2 : 2 ≤ k := by by_contra hlt push_neg at hlt interval_cases k · exact hq (by rw [hk, mul_zero]) · rw [mul_one] at hk omega have h2 : 2 * q.gcd p ≤ q := by calc 2 * q.gcd p = q.gcd p * 2 := by ring _ ≤ q.gcd p * k := Nat.mul_le_mul_left _ hk2 _ = q := hk.symm rw [le_div_iff₀ (by norm_num : (0:ℚ) < 2)] have : ((2 * q.gcd p : ℕ) : ℚ) ≤ (q : ℚ) := by exact_mod_cast h2 push_cast at this linarithtargets/erdos-402/nodes/variant-d865c9c6/Proof.lean, lines 15–33 at
64f963463674↗key.s1obtainq.gcd p ∣ qLeaves
(↑(q.gcd p) : ℚ) ≤ (↑q : ℚ) / (2 : ℚ), withk : ℕ,hk : q = q.gcd p * k.Uses library
Nat.gcd_dvd_left.Lean, line 17
obtain ⟨k, hk⟩ := Nat.gcd_dvd_left q p
targets/erdos-402/nodes/variant-d865c9c6/Proof.lean, line 17 at
64f963463674↗key.hglehaveq.gcd p ≤ pLeaves
(↑(q.gcd p) : ℚ) ≤ (↑q : ℚ) / (2 : ℚ), withhgle : q.gcd p ≤ p.Uses library
Nat.le_of_dvd,Nat.pos_of_ne_zero,Nat.gcd_dvd_right.Lean, line 18
have hgle : q.gcd p ≤ p := Nat.le_of_dvd (Nat.pos_of_ne_zero hp) (Nat.gcd_dvd_right q p)
targets/erdos-402/nodes/variant-d865c9c6/Proof.lean, line 18 at
64f963463674↗key.hk2have(2 : ℕ) ≤ kLeaves
(↑(q.gcd p) : ℚ) ≤ (↑q : ℚ) / (2 : ℚ), withhk2 : (2 : ℕ) ≤ k.Lean, lines 19–25
have hk2 : 2 ≤ k := by by_contra hlt push_neg at hlt interval_cases k · exact hq (by rw [hk, mul_zero]) · rw [mul_one] at hk omegatargets/erdos-402/nodes/variant-d865c9c6/Proof.lean, lines 19–25 at
64f963463674↗key.hk2.s1caseLeaves
False.Uses library
MulZeroClass.mul_zeroZero is a right absorbing element for multiplication .Lean, line 23
· exact hq (by rw [hk, mul_zero])
targets/erdos-402/nodes/variant-d865c9c6/Proof.lean, line 23 at
64f963463674↗key.hk2.s2caseLeaves
False.Uses library
mul_one.Lean, lines 24–25
· rw [mul_one] at hk omegatargets/erdos-402/nodes/variant-d865c9c6/Proof.lean, lines 24–25 at
64f963463674↗
key.h2have(2 : ℕ) * q.gcd p ≤ qLeaves
(↑(q.gcd p) : ℚ) ≤ (↑q : ℚ) / (2 : ℚ), withh2 : (2 : ℕ) * q.gcd p ≤ q.Lean, lines 26–29
have h2 : 2 * q.gcd p ≤ q := by calc 2 * q.gcd p = q.gcd p * 2 := by ring _ ≤ q.gcd p * k := Nat.mul_le_mul_left _ hk2 _ = q := hk.symmtargets/erdos-402/nodes/variant-d865c9c6/Proof.lean, lines 26–29 at
64f963463674↗key.h2.s1calc(2 : ℕ) * q.gcd p = q.gcd p * (2 : ℕ)routine: ringCloses the goal.
Lean, line 27
calc 2 * q.gcd p = q.gcd p * 2 := by ring
targets/erdos-402/nodes/variant-d865c9c6/Proof.lean, line 27 at
64f963463674↗key.h2.s2calcq.gcd p * (2 : ℕ) ≤ q.gcd p * kCloses the goal.
Uses library
Nat.mul_le_mul_left.Lean, line 28
_ ≤ q.gcd p * k := Nat.mul_le_mul_left _ hk2
targets/erdos-402/nodes/variant-d865c9c6/Proof.lean, line 28 at
64f963463674↗key.h2.s3calcq.gcd p * k = qCloses the goal.
Lean, line 29
_ = q := hk.symm
targets/erdos-402/nodes/variant-d865c9c6/Proof.lean, line 29 at
64f963463674↗
key.thishave(↑((2 : ℕ) * q.gcd p) : ℚ) ≤ (↑q : ℚ)Leaves
(↑(q.gcd p) : ℚ) * (2 : ℚ) ≤ (↑q : ℚ), withthis : (↑((2 : ℕ) * q.gcd p) : ℚ) ≤ (↑q : ℚ).Lean, line 31
have : ((2 * q.gcd p : ℕ) : ℚ) ≤ (q : ℚ) := by exact_mod_cast h2
targets/erdos-402/nodes/variant-d865c9c6/Proof.lean, line 31 at
64f963463674↗
s5case printed form did not read back: shown as its Lean lines only· exact ⟨y, by simp, x, by simp, by exact_mod_cast key x y hx0 hy0 h⟩
targets/erdos-402/nodes/variant-d865c9c6/Proof.lean, line 36 at
64f963463674↗s6case printed form did not read back: shown as its Lean lines only· exact ⟨x, by simp, y, by simp, by exact_mod_cast key y x hy0 hx0 h⟩
targets/erdos-402/nodes/variant-d865c9c6/Proof.lean, line 37 at
64f963463674↗
The proof in Lean (Proof.lean)
Checked by the kernel — these bytes are the ones its attestation names: attestations/000145.json, merge commit 64f963463674.
artifact_hash of the attestation below, so these are the bytes the gate checked. Rendered from targets/erdos-402/nodes/variant-d865c9c6/Proof.lean, sha256 bbec2e7770a6.import Mathlib
import Nodes.«variant-d865c9c6».Context
/-! Graham's gcd conjecture (Erdős problem 402) for two-element sets: the larger element's
gcd with the smaller is a proper divisor of it, so it is at most half of it. -/
theorem Opn.erdos_402_card_two :
∀ (A : Finset ℕ), 0 ∉ A → A.card = 2 → ∃ a ∈ A, ∃ b ∈ A, a.gcd b ≤ (a / A.card : ℚ) := by
intro A hA hc
obtain ⟨x, y, hxy, rfl⟩ := Finset.card_eq_two.mp hc
have hx0 : x ≠ 0 := by
intro h; apply hA; simp [h]
have hy0 : y ≠ 0 := by
intro h; apply hA; simp [h]
have key : ∀ p q : ℕ, p ≠ 0 → q ≠ 0 → p < q → ((q.gcd p : ℕ) : ℚ) ≤ (q : ℚ) / 2 := by
intro p q hp hq hpq
obtain ⟨k, hk⟩ := Nat.gcd_dvd_left q p
have hgle : q.gcd p ≤ p := Nat.le_of_dvd (Nat.pos_of_ne_zero hp) (Nat.gcd_dvd_right q p)
have hk2 : 2 ≤ k := by
by_contra hlt
push_neg at hlt
interval_cases k
· exact hq (by rw [hk, mul_zero])
· rw [mul_one] at hk
omega
have h2 : 2 * q.gcd p ≤ q := by
calc 2 * q.gcd p = q.gcd p * 2 := by ring
_ ≤ q.gcd p * k := Nat.mul_le_mul_left _ hk2
_ = q := hk.symm
rw [le_div_iff₀ (by norm_num : (0:ℚ) < 2)]
have : ((2 * q.gcd p : ℕ) : ℚ) ≤ (q : ℚ) := by exact_mod_cast h2
push_cast at this
linarith
rw [hc]
rcases lt_or_gt_of_ne hxy with h | h
· exact ⟨y, by simp, x, by simp, by exact_mod_cast key x y hx0 hy0 h⟩
· exact ⟨x, by simp, y, by simp, by exact_mod_cast key y x hy0 hx0 h⟩What 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-d865c9c6».Context
/-! Graham's gcd conjecture (Erdős problem 402) for two-element sets: the larger element's
gcd with the smaller is a proper divisor of it, so it is at most half of it. -/
theorem Opn.erdos_402_card_two :
∀ (A : Finset ℕ), 0 ∉ A → A.card = 2 → ∃ 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| = 2 \Rightarrow \exists\, a, b \in A:\ \gcd(a,b) \le \frac{a}{|A|}$
Every set A of exactly two positive integers has a, b ∈ A (possibly equal) with gcd(a, b) ≤ a/|A|. The division is in ℚ.
Rendered from gloss/862f9e22b542….md · Improve these words →
Rendered from targets/erdos-402/nodes/variant-d865c9c6/Statement.lean. Origin: variant (partial).
Attestation: pass, 7 of 7 checks
Checked by the kernel — the gate’s record of the run: attestations/000145.json, merge commit 64f963463674.
Verdict pass, from attestations/000145.json.
- Submitter
tester-402-e514- 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/000145.json, merge commit 64f963463674.
cf6b095d95ee.import Mathlib
theorem witness : ∃ A : Finset ℕ, 0 ∉ A ∧ A.card = 2 :=
⟨{1, 2}, by decide, by decide⟩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.
a4f9ca76b459.-- 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 = 2 → ∃ a ∈ A, ∃ b ∈ A, a.gcd b ≤ (a / A.card : ℚ)) := by
intro h A hA hc
exact 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
A.card = 2 is a hypothesis, so the rational division is by 2.