Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Erdős Problem 707: Embedding Sidon Sets in Perfect Difference Sets

Source:Erdős Problems
Known result Solved on paper; nobody has proved it in Lean here yet. First verified proof: +10 points.
Statement:reviewed
Statement:

Erdős Problem 707: It is false that any finite Sidon set can be embedded in a perfect different set modulo some nn.

As described in [arxiv/2510.19804], a counterexample is provided in [Ha47], see below. The proof of this has been formalized.

This was formalized in Lean by Alexeev using ChatGPT.

Subjects:Combinatorics (math.CO); Number Theory (math.NT)
MSC classes:05, 11
Tags:formal_proof
Cite as:NS.02944 [math.CO] · NS.02944v1 for this version
Declaration:Erdos707.erdos_707
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60
Statement hash:4443271dc1cb3de5c50f761ec81b97ef5925542704b2d49824990c8adc7b2910
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/ErdosProblems/707.lean

Formal statement

theorem erdos_707 : (∀ (A : Set ℕ) (h : A.Finite), IsSidon A →
    ∃ᵉ (B : Set ℕ) (n > 0), A ⊆ B ∧ IsPerfectDifferenceSet B n) ↔ False
Show the full Challenge.lean (227 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Erdős Problem 707: Embedding Sidon Sets in Perfect Difference Sets

*References:*
- [erdosproblems.com/707](https://www.erdosproblems.com/707)
- [arxiv/2510.19804](https://arxiv.org/abs/2510.19804) Boris Alexeev and Dustin G. Mixon, Forbidden
  Sidon subsets of perfect difference sets, featuring a human-assisted proof (2025)
- [Ha47] Marshall Hall, Jr., Cyclic projective planes, Duke Math. J. 14 (1947), 1079–1090.

Let `A ⊆ ℕ` be a finite Sidon set. Is there some set `B` with `A ⊆ B` which is a perfect
difference set modulo `p^2 + p + 1` for some prime power `p`?

This problem is related to Erdős Problem 329 about the maximum density of Sidon sets.
If this conjecture is true, it would imply that the maximum density of Sidon sets is 1.
-/

@[expose] public section

open Function Set

namespace Erdos707


set_option linter.style.formal_proof_palomar false in
/--
**Erdős Problem 707**: It is false that any finite Sidon set can be embedded in a perfect
different set modulo some $n$.

As described in [arxiv/2510.19804], a counterexample is provided in [Ha47], see below.
The proof of this has been formalized.

This was formalized in Lean by Alexeev using ChatGPT.
-/
@[category research solved, AMS 5 11, formal_proof using lean4 at "https://github.com/plby/lean-proofs/blob/main/src/v4.24.0/ErdosProblems/Erdos707.lean"]
theorem erdos_707 : (∀ (A : Set ℕ) (h : A.Finite), IsSidon A →
    ∃ᵉ (B : Set ℕ) (n > 0), A ⊆ B ∧ IsPerfectDifferenceSet B n) ↔ False := by
  sorry


/--
It is false that any finite Sidon set can be embedded in a perfect
difference set modulo `p^2 + p + 1` for some prime power `p`.

As described in [arxiv/2510.19804], a counterexample is provided in [Ha47], see below.
The proof of this has been formalized.
--/
@[category research solved, AMS 5 11]
theorem erdos_707.variants.prime_power : (∀ (A : Set ℕ) (h : A.Finite), IsSidon A →
    ∃ (B : Set ℕ) (p : ℕ), IsPrimePow p ∧ A ⊆ B ∧
    IsPerfectDifferenceSet B (p^2 + p + 1)) ↔ False := by
  simp
  sorry

/--
It is false that any finite Sidon set can be embedded in a perfect
difference set modulo `p^2 + p + 1` for some prime `p`.

As described in [arxiv/2510.19804], a counterexample is provided in [Ha47], see below.
The proof of this has been formalized.
-/
@[category research solved, AMS 5 11]
theorem erdos_707.variants.prime : (∀ (A : Set ℕ) (h : A.Finite), IsSidon A →
    ∃ᵉ (B : Set ℕ) (p : ℕ), p.Prime ∧ A ⊆ B ∧ IsPerfectDifferenceSet B (p^2 + p + 1)) ↔ False := by
  sorry


/--
Alexeev and Mixon [arxiv/2510.19804] have disproved this conjecture, proving that $\{1,2,4,8\}$
cannot be extended to a perfect difference set modulo $p^2+p+1$
for any prime $p$.
-/
@[category research solved, AMS 5 11]
theorem erdos_707.variants.counterexample_prime (A : Set ℕ) (hA : A = {1, 2, 4, 8}) :
   Finite A ∧ IsSidon A ∧
   ∀ (B : Set ℕ) (p : ℕ),
    Prime p → A ⊆ B → ¬IsPerfectDifferenceSet B (p ^ 2 + p + 1) := by
  sorry


/--
Alexeev and Mixon [arxiv/2510.19804] have disproved this conjecture,
showing that $\{1, 2, 4, 8, 13\}$ cannot be extended to any perfect difference set modulo a
positive integer. The modulus `0` is excluded, as in `erdos_707`: `IsPerfectDifferenceSet B 0`
describes an infinite perfect difference set in `ℤ`, and every finite Sidon set extends to one.
-/
@[category research solved, AMS 5 11]
theorem erdos_707.variants.counterexample_mian_chowla (A : Set ℕ) (hA : A = {1, 2, 4, 8, 13}) :
   Finite A ∧ IsSidon A ∧
   ∀ (B : Set ℕ) (n : ℕ), 0 < n → A ⊆ B → ¬IsPerfectDifferenceSet B n := by
  sorry

/--
This conjecture was actually first disproved by Hall in 1947 [Ha47], long before Erdős asked
this question.
A counterexample for any modulus from from [Ha47] in the paragraph following Theorem 4.3, where it
was given as $\{-8, -6, 0, 1, 4\}$, but this can be shifted to natural numbers
as pointed out in [arxiv/2510.19804].
-/
@[category research solved, AMS 5 11]
theorem erdos_707.variants.counterexample_hall (A : Set ℕ) (hA : A = {1, 3, 9, 10, 13}) :
   Finite A ∧ IsSidon A ∧
   ∀ (B : Set ℕ) (n : ℕ), 0 < n → A ⊆ B → ¬IsPerfectDifferenceSet B n := by
  sorry


/-  ## Perfect difference sets and their properties -/

/--
A perfect difference set modulo `n` must have size `≤ √n + 1`.
-/
@[category textbook, AMS 5 11]
theorem erdos_707.variants.perfect_difference_set_size_bound (B : Set ℕ) (n : ℕ)
    (hB : IsPerfectDifferenceSet B n) : B.ncard ≤ n.sqrt + 1 := by
  by_cases hfin : B.Finite
  by_cases hn : n = 0
  subst hn; simp
  by_contra! h_abs
  exact ((hfin.offDiag.image _).subset hB.surjOn).not_infinite (by
    rw [show (0 : ZMod 0) = (0 : ℤ) from rfl]; exact (Set.finite_singleton (0 : ℤ)).infinite_compl)
  have : NeZero n := ⟨hn⟩
  suffices h : (B.ncard - 1) ^ 2 ≤ n by have := Nat.le_sqrt'.mpr h; omega
  lift B to Finset ℕ using hfin; simp
  have h_target : {x : ZMod n | x ≠ 0}.ncard ≤ n :=
    le_trans (Set.ncard_le_ncard (Set.subset_univ _) (Set.toFinite _))
    (by simp [Set.ncard_univ, Nat.card_eq_fintype_card, ZMod.card])
  have h_off_ncard_le : (↑B : Set ℕ).offDiag.ncard ≤ n := by
    have := hB.injOn.ncard_image
    rw [hB.image_eq] at this
    linarith [this, h_target]
  have h_off_le : B.offDiag.card ≤ n := by
    rwa [← Finset.coe_offDiag, ncard_coe_finset] at h_off_ncard_le
  have h_mul_eq : B.card * (B.card - 1) = B.offDiag.card := by
    rw [Finset.offDiag_card]; rcases B.card with _ | k <;> simp [Nat.succ_mul,
      Nat.mul_succ]
  have h_sq_le : (B.card - 1) ^ 2 ≤ B.card * (B.card - 1) := by
    rw [sq]; exact Nat.mul_le_mul_right _ (Nat.sub_le _ _)
  linarith [h_sq_le, h_mul_eq, h_off_le]
  have := Set.Infinite.ncard hfin; omega

/--
The Singer construction gives perfect difference sets for `n = p^2 + p + 1` where `p` is a
prime power.
-/
@[category textbook, AMS 5 11]
theorem erdos_707.variants.singer_construction (p : ℕ) (hp : IsPrimePow p) :
    ∃ (B : Set ℕ), IsPerfectDifferenceSet B (p^2 + p + 1) ∧ B.ncard = p + 1 := by
  sorry

/-  ## Examples and special cases -/

/--
The set `{1, 2, 4}` is a Sidon set.
-/
@[category textbook, AMS 5 11]
theorem erdos_707.variants.example_sidon_set : IsSidon ({1, 2, 4} : Set ℕ) := by
  intro i₁ hi₁ j₁ hj₁ i₂ hi₂ j₂ hj₂ hsum
  simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hi₁ hj₁ hi₂ hj₂
  rcases hi₁ with rfl | rfl | rfl <;>
  rcases hj₁ with rfl | rfl | rfl <;>
  rcases hi₂ with rfl | rfl | rfl <;>
  rcases hj₂ with rfl | rfl | rfl <;>
  simp_all

/--
The set `{1, 2, 4}` can be embedded in a perfect difference set modulo 7.
-/
@[category textbook, AMS 5 11]
theorem erdos_707.variants.example_embedding : ∃ (B : Set ℕ), {1, 2, 4} ⊆ B ∧
    IsPerfectDifferenceSet B 7 := by
  refine ⟨{1, 2, 4}, Set.Subset.refl _, ?_⟩
  unfold IsPerfectDifferenceSet
  refine ⟨?mapsTo, ?injOn, ?surjOn⟩
  · intro ⟨a, b⟩ hab; simp only [Set.mem_offDiag, Set.mem_insert_iff, Set.mem_singleton_iff] at hab
    obtain ⟨ha, hb, hne⟩ := hab
    simp only [Set.mem_ofPred]
    rcases ha with rfl | rfl | rfl <;>
    rcases hb with rfl | rfl | rfl <;>
    simp_all <;> decide
  · intro ⟨a₁, b₁⟩ h1 ⟨a₂, b₂⟩ h2 heq
    simp only [Set.mem_offDiag, Set.mem_insert_iff, Set.mem_singleton_iff] at h1 h2
    obtain ⟨ha1, hb1, hne1⟩ := h1; obtain ⟨ha2, hb2, hne2⟩ := h2
    rcases ha1 with rfl | rfl | rfl <;>
    rcases hb1 with rfl | rfl | rfl <;>
    rcases ha2 with rfl | rfl | rfl <;>
    rcases hb2 with rfl | rfl | rfl <;>
    simp_all (config := { decide := true })
  · intro x hx
    simp only [Set.mem_ofPred] at hx
    fin_cases x
    · exact absurd rfl hx
    · refine ⟨(2, 1), by simp [Set.mem_offDiag, Set.mem_insert_iff], by rfl⟩
    · refine ⟨(4, 2), by simp [Set.mem_offDiag, Set.mem_insert_iff], by rfl⟩
    · refine ⟨(4, 1), by simp [Set.mem_offDiag, Set.mem_insert_iff], by rfl⟩
    · refine ⟨(1, 4), by simp [Set.mem_offDiag, Set.mem_insert_iff], by rfl⟩
    · refine ⟨(2, 4), by simp [Set.mem_offDiag, Set.mem_insert_iff], by rfl⟩
    · refine ⟨(1, 2), by simp [Set.mem_offDiag, Set.mem_insert_iff], by rfl⟩

/--
For small Sidon sets, we can check the conjecture directly.
-/
@[category textbook, AMS 5 11]
theorem erdos_707.variants.small_sidon_sets (A : Set ℕ) (hA : A.Finite) (h : A.ncard ≤ 3)
    (hSidon : IsSidon A) : ∃ (B : Set ℕ) (p : ℕ), IsPrimePow p ∧ A ⊆ B ∧
    IsPerfectDifferenceSet B (p^2 + p + 1) := by
  sorry

end Erdos707

To prove it: keep every definition of Challenge.lean unchanged and prove Erdos707.erdos_707 with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_erdos_707 : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry fetch erdos-707
nosorry submit erdos-707 nosorry/erdos-707/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.