Erdős #30 in Lean (starter): h 6 = 3 and h 7 = 4, plus the difference-count bound and the exact table h 0 … h 12.
What changed (diff against accepted head b87ce80 is one file, ErdosSwarm/Erdos30.lean, +112 lines, all inserted after h_five; no existing statement changes; Results.lean and ErdosSwarm.lean untouched). Namespace ErdosSwarm.Erdos30, h = the upstream Erdos30.h:
theorem h_six : h 6 = 3— the task's statement 1. ≤: as inh_five, each of the 15 four-element subsets ofFinset.Icc 1 6failsIsSidon(plaindecideaftersimp only [IsSidon, Finset.mem_coe]); ≥:h_monofromh_five.theorem h_seven : h 7 = 4— the task's statement 2. ≤:h_succ_le 6withh_six; ≥: the acceptedfour_le_h_seven. Beyond the task (same file, small):
sidon_card_choose_two_le (hS : IsSidon (F : Set ℕ)) (hF : F ⊆ Finset.Icc 1 N) : F.card.choose 2 ≤ N - 1(positive differences of a Sidon set are distinct and lie in [1, N−1]);h_choose_two_le N : (h N).choose 2 ≤ N - 1;h_mul_pred_le N : h N * (h N - 1) ≤ 2 * (N - 1);h_le_of_lt_choose_two (hk : N - 1 < (k + 1).choose 2) : h N ≤ k.h_eight : h 8 = 4,h_nine : h 9 = 4,h_ten : h 10 = 4,h_twelve : h 12 = 5(upper bounds from the difference count; lower fromh_seven+h_monoand the acceptedfive_le_h_twelve).h_eleven : h 11 = 4. Here the difference count does not suffice (10 ≤ 10); the upper bound is that none of the 462 five-element subsets ofFinset.Icc 1 11is Sidon, bydecide +kernel(kernel evaluation of the Decidable instance; NOT native_decide, noLean.ofReduceBool; about 15 s). If the reviewers prefer nodecide +kernel, say so and I will droph_elevenor replace it by a hand proof; the task's two statements do not depend on it. With the accepted h_zero … h_five this gives h N for N = 0, …, 12: 0,1,2,2,3,3,3,4,4,4,4,4,5, matching the brute-force table in the task body.
Status: Lean-checked, unconditional. Small values and an elementary counting bound only; nothing about the open problem (h(N) = √N + O_ε(N^ε)). No literature check (no network); these are standard facts (Golomb rulers of orders 4–5 have lengths 6 and 11).
Checks on b87ce80 + this change (2026-12-04 10:42 UTC, my clone, warm build cache):
- scripts/check.sh rc=0. Last lines: "Build completed successfully (9259 jobs)." / "6382 theorems use only propext, Classical.choice and Quot.sound; none of the 10724 constants under ErdosSwarm uses sorry".
- A scratch file after
import ErdosSwarm(lean rc=0):example : Erdos30.h 6 = 3 := ErdosSwarm.Erdos30.h_six;example : Erdos30.h 7 = 4 := ErdosSwarm.Erdos30.h_seven; every extra by exact statement;(List.range 13).map Erdos30.h = [0, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5];#print axiomson all eleven new theorems: [propext, Classical.choice, Quot.sound]. - No sorry, axiom, native_decide or set_option in ErdosSwarm/Erdos30.lean; the new code builds without warnings.