{
  "id": "3478",
  "ident": "NS.03478",
  "slug": "erdos-877",
  "title": "Erdős Problem 877",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $f_m(n)$ count the number of maximal sum-free subsets $A\\subseteq\\{1,\\ldots,n\\}$ - that is,\nthere are no solutions to $a=b+c$ in $A$ and $A$ is maximal with this property. Estimate $f(n)$\n- is it true that $f_m(n)=o(2^{n/2})$?\n\nA problem of Cameron and Erdős. Łuczak and Schoen [LuSc01] proved that there exists a constant\n$c<1/2$ such that $f_m(n)<2^{cn}$, resolving this question. Balogh, Liu, Sharifzadeh, and\nTreglown [BLST15] proved that $f_m(n)=2^{(\\frac{1}{4}+o(1))n}$.\n\nSee [748](https://www.erdosproblems.com/748) for the non-maximal case.",
  "subjects": [
    "math.CO",
    "math.NT",
    "msc:05",
    "msc:11"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos877.erdos_877",
  "statement_lean": "theorem erdos_877 :\n    (fun n : ℕ ↦ (fm n : ℝ)) =o[atTop] fun n : ℕ ↦ (2 : ℝ) ^ ((n : ℝ) / 2)",
  "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 877\n\n*References:*\n- [erdosproblems.com/877](https://www.erdosproblems.com/877)\n- [CaEr90] Cameron, P. J. and Erdős, P., _On the number of sets of integers with various\n  properties_. (1990), 61-79.\n- [Er98] Erdős, Paul, _Some of my new and almost new problems and results in combinatorial number\n  theory_. Number theory (Eger, 1996) (1998), 169-180.\n- [LuSc01] Łuczak, Tomasz and Schoen, Tomasz, _On the number of maximal sum-free sets_. Proc.\n  Amer. Math. Soc. (2001), 2205--2207.\n- [BLST15] Balogh, József and Liu, Hong and Sharifzadeh, Maryam and Treglown, Andrew, _The\n  number of maximal sum-free subsets of integers_. Proc. Amer. Math. Soc. (2015), 4713--4721.\n- [BLST18] Balogh, József and Liu, Hong and Sharifzadeh, Maryam and Treglown, Andrew, _Sharp\n  bound on the number of maximal sum-free subsets of integers_. J. Eur. Math. Soc. (JEMS) (2018),\n  1885--1911.\n-/\n\n@[expose] public section\n\nopen Filter Asymptotics Real\n\nnamespace Erdos877\n\n/-- `A` is a maximal sum-free subset of `{1, …, n}`. -/\ndef IsMaximalSumFree (n : ℕ) (A : Finset ℕ) : Prop :=\n  A ⊆ Finset.Icc 1 n ∧ IsSumFree (A : Set ℕ) ∧\n    ∀ B ⊆ Finset.Icc 1 n, IsSumFree (B : Set ℕ) → A ⊆ B → A = B\n\nopen scoped Classical in\n/-- `fm n` counts the number of maximal sum-free subsets $A\\subseteq\\{1,\\ldots,n\\}$. -/\nnoncomputable def fm (n : ℕ) : ℕ :=\n  ((Finset.Icc 1 n).powerset.filter fun A : Finset ℕ ↦ IsMaximalSumFree n A).card\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $f_m(n)$ count the number of maximal sum-free subsets $A\\subseteq\\{1,\\ldots,n\\}$ - that is,\nthere are no solutions to $a=b+c$ in $A$ and $A$ is maximal with this property. Estimate $f(n)$\n- is it true that $f_m(n)=o(2^{n/2})$?\n\nA problem of Cameron and Erdős. Łuczak and Schoen [LuSc01] proved that there exists a constant\n$c<1/2$ such that $f_m(n)<2^{cn}$, resolving this question. Balogh, Liu, Sharifzadeh, and\nTreglown [BLST15] proved that $f_m(n)=2^{(\\frac{1}{4}+o(1))n}$.\n\nSee [748](https://www.erdosproblems.com/748) for the non-maximal case.\n-/\n@[category research solved, question, AMS 5 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos877.lean#L170\"]\ntheorem erdos_877 :\n    (fun n : ℕ ↦ (fm n : ℝ)) =o[atTop] fun n : ℕ ↦ (2 : ℝ) ^ ((n : ℝ) / 2) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/-- Łuczak and Schoen [LuSc01] proved that there exists a constant $c<1/2$ such that\n$f_m(n)<2^{cn}$ for all large $n$. -/\n@[category research solved, AMS 5 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos877.lean#L127\"]\ntheorem erdos_877.variants.luczak_schoen :\n    ∃ c : ℝ, c < 1 / 2 ∧ ∀ᶠ n : ℕ in atTop, (fm n : ℝ) ≤ 2 ^ (c * n) := by\n  sorry\n\n/-- Cameron and Erdős [CaEr90] proved that $f_m(n)>2^{n/4}$. -/\n@[category research solved, AMS 5 11]\ntheorem erdos_877.variants.cameron_erdos :\n    ∀ᶠ n : ℕ in atTop, (2 : ℝ) ^ ((n : ℝ) / 4) < fm n := by\n  sorry\n\n/-- Balogh, Liu, Sharifzadeh, and Treglown [BLST15] proved that\n$f_m(n)=2^{(\\frac{1}{4}+o(1))n}$. -/\n@[category research solved, AMS 5 11]\ntheorem erdos_877.variants.balogh_liu_sharifzadeh_treglown :\n    Tendsto (fun n : ℕ ↦ logb 2 (fm n) / n) atTop (nhds (1 / 4)) := by\n  sorry\n\nend Erdos877\n",
  "statement_hash": "3148a62cb6830af65e3703e9afe0226811ffb669125dcc6f1496d5edba95deb4",
  "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."
}