{
  "id": "3224",
  "ident": "NS.03224",
  "slug": "erdos-792",
  "title": "Erdős Problem 792",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $f(n)$ be maximal such that in any $A\\subset \\mathbb{Z}$ with $\\lvert A\\rvert=n$ there exists\nsome sum-free subset $B\\subseteq A$ with $\\lvert B\\rvert \\geq f(n)$, so that there are no\nsolutions to\n$$a+b=c$$\nwith $a,b,c\\in B$, allowing $a=b$. Estimate $f(n)$.\n\nSince $f(n) = n/3 + o(n)$ is known, we interpret \"estimate\" as\ndetermining the order of magnitude of the excess $f(n) - n/3$.",
  "subjects": [
    "math.CO",
    "math.NT",
    "msc:05",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos792.erdos_792",
  "statement_lean": "theorem erdos_792 :\n    (fun n : ℕ => (f n : ℝ) - n / 3) =Θ[atTop] erdos_792.answer",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Erdős Problem 792\n\n*References:*\n- [erdosproblems.com/792](https://www.erdosproblems.com/792)\n- [Ben Green's Open Problem 1](https://people.maths.ox.ac.uk/greenbj/papers/open-problems.pdf#section.1):\n  a related question for sets of positive integers; see `Green1.green_1` in\n  `FormalConjectures.GreensOpenProblems.«1»`.\n- [AlKl90] Alon, N. and Kleitman, D. J., *Sum-free subsets*. A tribute to Paul Erdős (1990),\n  13-26.\n  [PDF](https://web.math.princeton.edu/~nalon/PDFS/Publications2/Sum-free%20subsets.pdf)\n- [Be25b] Bedert, B., *Large sum-free subsets of sets of integers via $L^1$-estimates for\n  trigonometric series*. [arXiv:2502.08624](https://arxiv.org/abs/2502.08624) (2025).\n- [Bo97] Bourgain, Jean, *Estimates related to sumfree subsets of sets of integers*. Israel J.\n  Math. 97 (1997), 71-92.\n  [DOI](https://doi.org/10.1007/BF02774027)\n- [EGM14] Eberhard, Sean and Green, Ben and Manners, Freddie, *Sets of integers with no large\n  sum-free subset*. Ann. of Math. (2) 180 (2014), 621-652.\n- [Er65] Erdős, P., *Extremal problems in number theory*. Proc. Sympos. Pure Math., Vol. VIII\n  (1965), 181-189. [PDF](https://www.renyi.hu/~p_erdos/1965-02.pdf)\n- [Er73] Erdős, P., *Problems and results on combinatorial number theory*. A survey of\n  combinatorial theory (Proc. Internat. Sympos., Colorado State Univ., Fort Collins, Colo.,\n  1971) (1973), 117-138. [PDF](https://www.renyi.hu/~p_erdos/1973-21.pdf)\n-/\n\n@[expose] public section\n\nopen Filter Asymptotics\n\nnamespace Erdos792\n\n/--\nThe largest size we can guarantee for a sum-free subset of any set of `n` integers.\n\nZero is allowed, as in the problem's wording. This gives `f 1 = 0`.\nThe same number can be used twice in a sum, so `a + a = c` is forbidden too.\n-/\nnoncomputable def f (n : ℕ) : ℕ :=\n  sSup {m : ℕ |\n    ∀ A : Finset ℤ, A.card = n →\n      ∃ B : Finset ℤ,\n        B ⊆ A ∧ IsSumFree (B : Set ℤ) ∧ m ≤ B.card}\n\n/-- The set `{0}` has no nonempty sum-free subset, so `f 1 = 0`. -/\n@[category test, AMS 5 11]\ntheorem f_one : f 1 = 0 := by\n  apply Nat.eq_zero_of_le_zero\n  unfold f\n  apply csSup_le\n  · -- The empty subset shows that zero is a valid guarantee.\n    refine ⟨0, ?_⟩\n    intro A _\n    refine ⟨∅, ?_, ?_, ?_⟩\n    · exact Finset.empty_subset A\n    · simp [IsSumFree]\n    · simp\n  · -- Apply the guarantee to {0}, whose only sum-free subset is empty.\n    intro m h_guarantee\n    obtain ⟨B, h_subset, h_sum_free, h_size⟩ := h_guarantee {0} (by simp)\n    have h_cases : B = ∅ ∨ B = {0} :=\n      Finset.subset_singleton_iff.mp h_subset\n    rcases h_cases with h_empty | h_zero\n    · rw [h_empty] at h_size\n      simpa using h_size\n    · -- But {0} is not sum-free: 0 + 0 = 0.\n      rw [h_zero] at h_sum_free\n      simp [isSumFree_iff] at h_sum_free\n\n/-- The set `{1, 2}` is not sum-free because `1 + 1 = 2`. -/\n@[category test, AMS 5 11]\ntheorem not_isSumFree_one_two : ¬ IsSumFree ({1, 2} : Set ℤ) := by\n  rw [isSumFree_iff]\n  norm_num\n\n/-- The set `{1, 3}` is sum-free, even when we use the same number twice. -/\n@[category test, AMS 5 11]\ntheorem isSumFree_one_three : IsSumFree ({1, 3} : Set ℤ) := by\n  rw [isSumFree_iff]\n  norm_num\n\ndef erdos_792.answer : ℕ → ℝ := by\n  sorry\n\n/--\nLet $f(n)$ be maximal such that in any $A\\subset \\mathbb{Z}$ with $\\lvert A\\rvert=n$ there exists\nsome sum-free subset $B\\subseteq A$ with $\\lvert B\\rvert \\geq f(n)$, so that there are no\nsolutions to\n$$a+b=c$$\nwith $a,b,c\\in B$, allowing $a=b$. Estimate $f(n)$.\n\nSince $f(n) = n/3 + o(n)$ is known, we interpret \"estimate\" as\ndetermining the order of magnitude of the excess $f(n) - n/3$.\n-/\n@[category research open, question value, AMS 5 11]\ntheorem erdos_792 :\n    (fun n : ℕ => (f n : ℝ) - n / 3) =Θ[atTop] erdos_792.answer := by\n  sorry\n\n/--\nAlon and Kleitman [AlKl90, Proposition 1.1] improved the lower bound to $(n+1)/3$.\nHere we restrict to sets of $n \\geq 3$ positive integers, to match Bourgain's bound below.\n-/\n@[category research solved, AMS 5 11]\ntheorem erdos_792.variants.alon_kleitman (A : Finset ℤ)\n    (h_positive : ∀ a ∈ A, 0 < a) (h_card : 3 ≤ A.card) :\n    ∃ B ⊆ A, IsSumFree (B : Set ℤ) ∧ A.card + 1 ≤ 3 * B.card := by\n  sorry\n\n/--\nBourgain [Bo97, Proposition 1.3] further improved the lower bound to $(n+2)/3$\nfor sets of $n \\geq 3$ positive integers. The size restriction appears in the proof on p. 76;\nthe set $\\{1,2\\}$ shows why it cannot be omitted.\n-/\n@[category research solved, AMS 5 11]\ntheorem erdos_792.variants.bourgain (A : Finset ℤ)\n    (h_positive : ∀ a ∈ A, 0 < a) (h_card : 3 ≤ A.card) :\n    ∃ B ⊆ A, IsSumFree (B : Set ℤ) ∧ A.card + 2 ≤ 3 * B.card := by\n  sorry\n\n/-- Bourgain's bound [Bo97] implies Alon and Kleitman's bound [AlKl90] on this domain. -/\n@[category test, AMS 5 11]\ntheorem erdos_792.variants.bourgain_implies_alon_kleitman :\n    type_of% erdos_792.variants.bourgain →\n    type_of% erdos_792.variants.alon_kleitman := by\n  intro h A h_positive h_card\n  obtain ⟨B, h_subset, h_sum_free, h_size⟩ := h A h_positive h_card\n  refine ⟨B, h_subset, h_sum_free, ?_⟩\n  omega\n\nend Erdos792\n",
  "statement_hash": "918f121cd4ea9465b74c10418c0805566b568123ffbc8ac34c0ec84871e781b5",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}