Skip to content

Conversation

@Krishn1412
Copy link

Proposed formal conjecture for Erdos problem 43.

Closes Issue 221

Proposed formal conjecture for Erdos problem 43.
@google-cla
Copy link

google-cla bot commented Jul 4, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Collaborator

@mo271 mo271 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

Copy link
Collaborator

@callesonne callesonne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! Here are some comments :)

@Krishn1412
Copy link
Author

Hey @mo271, could you help me out on why this is failing? Any pointers would be great, TIA!

Copy link
Member

@Paul-Lez Paul-Lez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment - I'll try to diagnose the build issue once I'm back in front of a computer:)

@mo271
Copy link
Collaborator

mo271 commented Jul 26, 2025

Hey @mo271, could you help me out on why this is failing? Any pointers would be great, TIA!

seems like there were some problems in ForMathlib/Combinatorics/Basic.lean, starting with a failing import.
Should be something like this:

import FormalConjectures.ForMathlib.Combinatorics.AP.Basic
import Mathlib.Combinatorics.Enumerative.Bell
import Mathlib.Combinatorics.SimpleGraph.Finite

open Function Set

variable {α : Type*} [AddCommMonoid α]

/-- A Sidon set is a set such that all pairwise sums of elements are distinct,
apart from coincidences forced by commutativity. -/
def IsSidon (A : Set α) : Prop := ∀ᵉ (i₁ ∈ A) (j₁ ∈ A) (i₂ ∈ A) (j₂ ∈ A),
  i₁ + i₂ = j₁ + j₂ → (i₁ = j₁ ∧ i₂ = j₂) ∨ (i₁ = j₂ ∧ i₂ = j₁)

lemma IsSidon.avoids_isAPOfLength_three {α : Type*} [AddCommMonoid α] (A : Set ℕ) (hA : IsSidon A) :
    (∀ Y, IsAPOfLength Y 3 → (A ∩ Y).ncard ≤ 2) := by
  sorry

noncomputable instance IsSidon.decide [AddCommMonoid α] (s : Set α): Decidable (IsSidon s) := by
  exact Classical.propDecidable _

/-- The subsets of `{0, ..., n - 1}` which are Sidon sets. -/
noncomputable def SidonSubsets (n : ℕ) : Finset (Finset ℕ) :=
  (Finset.range n).powerset.filter fun s => IsSidon (s : Set ℕ)

/-- The sizes of Sidon subsets of `{0, ..., n - 1}`. -/
noncomputable def SidonSubsetsSizes (n : ℕ) : Finset ℕ :=
  (SidonSubsets n).image Finset.card

lemma SidonSubsetsSizesNonempty (n : ℕ) : (SidonSubsetsSizes n).Nonempty := by
  use 0
  simp only [SidonSubsetsSizes, Finset.mem_image]
  use ∅
  simp [SidonSubsets, IsSidon, Set.Pairwise, Finset.mem_filter, Finset.mem_powerset, Finset.card_empty]

/-- The maximum size of a Sidon subset of `{0, ..., n - 1}`. -/
noncomputable def maxSidonSetSize (n : ℕ) : ℕ :=
  (SidonSubsetsSizes n).max' (SidonSubsetsSizesNonempty n)

@mo271
Copy link
Collaborator

mo271 commented Jul 27, 2025

@Krishn1412 Thanks for reacting to the comments and updating the pr! It would make the review easier if you resolved the comments that are already addressed.

@Krishn1412
Copy link
Author

Sure @mo271

@mo271 mo271 added the Awaiting author A reviewer has asked the author a question or requested changes. label Aug 19, 2025
@mo271
Copy link
Collaborator

mo271 commented Sep 5, 2025

@Krishn1412 in the meantime some definitions around Sidon have changed. Would you be able to integrate the pull request into the new FormalConjectures/ForMathlib/Combinatorics/Basic.lean or shall I?

@Krishn1412
Copy link
Author

Sure, I will update the PR. I was wondering if you found the issue causing the build failure.

noncomputable def SidonSubsetsSizes (n : ℕ) : Finset ℕ :=
(SidonSubsets n).image Finset.card

lemma SidonSubsetsSizesNonempty (n : ℕ) : (SidonSubsetsSizes n).Nonempty := by
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lemma SidonSubsetsSizesNonempty (n : ℕ) : (SidonSubsetsSizes n).Nonempty := by
lemma SidonSubsetsSizes_nonempty (n : ℕ) : (SidonSubsetsSizes n).Nonempty := by

I think since this is a lemma we would use small caps here?

B ⊆ Finset.Icc 1 N →
IsSidon A.toSet →
IsSidon B.toSet →
(A - A) ∩ (B - B) = ∅ →
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(A - A) ∩ (B - B) =
(A - A) ∩ (B - B) = {0}

In both A - A and B-B, there will always be 0, if both sets are nonempty.

Comment on lines +29 to +30
If `A` and `B` are Sidon sets in `{1, ..., N}` with disjoint difference sets,
is the sum of unordered pair counts bounded by that of an optimal Sidon set up to `O(1)`?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If `A` and `B` are Sidon sets in `{1, ..., N}` with disjoint difference sets,
is the sum of unordered pair counts bounded by that of an optimal Sidon set up to `O(1)`?
If `A` and `B` are Sidon sets in `{1, ..., N}` with disjoint difference sets such that $(A-A)\cap(B-B)=\{0\}$
then is it true that
$$\binom{\lvert A\rvert}{2}+\binom{\lvert B\rvert}{2}\leq\binom{f(N)}{2}+O(1),$$
where $f(N)$ is the maximum possible size of a Sidon set in \{1,\ldots,N\}?

Better to stick to the original formulation.

is the sum of unordered pair counts bounded by that of an optimal Sidon set up to `O(1)`?
-/
@[category research open, AMS 11 05]
theorem erdos_43 :
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is phrased as a questions, we should wrap the entire statement in parenthesis and write ↔ answer(sorry)

Comment on lines +44 to +57
If `A` and `B` are equal-sized Sidon sets with disjoint difference sets,
can the sum of pair counts be bounded by a strict fraction of the optimum?
-/
@[category research open, AMS 11 05]
theorem erdos_43_equal_size :
∃ᵉ (c > 0), ∀ (N : ℕ) (A B : Finset ℕ),
A ⊆ Finset.Icc 1 N →
B ⊆ Finset.Icc 1 N →
IsSidon A.toSet →
IsSidon B.toSet →
A.card = B.card →
(A - A) ∩ (B - B) = ∅ →
A.card.choose 2 + B.card.choose 2 ≤ (1 - c) *(maxSidonSetSize N).choose 2 := by
sorry
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comments as to the first theorem apply here.

@mo271
Copy link
Collaborator

mo271 commented Sep 7, 2025

Sure, I will update the PR. I was wondering if you found the issue causing the build failure.

@Krishn1412 I updated the PR and fixed the issue causing the build failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting author A reviewer has asked the author a question or requested changes. Erdős Problems

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Erdős Problem 43

4 participants