{
  "id": "3206",
  "ident": "NS.03206",
  "slug": "erdos-789",
  "title": "Erdős Problem 789",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $h(n)$ be maximal such that if $A\\subseteq \\mathbb{Z}$ with $\\lvert A\\rvert=n$\nthen there is $B\\subseteq A$ with $\\lvert B\\rvert \\geq h(n)$ such that if\n$a_1+\\cdots+a_r=b_1+\\cdots+b_s$ with $a_i,b_i\\in B$ then $r=s$.\n\nEstimate $h(n)$.",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos789.erdos_789",
  "statement_lean": "theorem erdos_789 :\n    (fun n ↦ (subsetSumThreshold n : ℝ)) =Θ[atTop] erdos_789.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 789\n\nIn this problem, a function $h : \\mathbb{N} \\to\\mathbb{N}$ is defined maximally by\nsome counting property.\n\nThe problem asks to estimate $h(n)$. This has been interpreted here as asking for $\\Theta(h(n))$.\nThe principal version includes the unknown function `erdos_789.answer`.\n\nStraus [Str66] proved that $h(n) \\ll \\sqrt{n}$. Erdős [Er62c] and Choi [Ch74b] proved that\n$(n\\log(n))^{1/3} \\ll h(n)$. Korsky [Ko26] improved this to $h(n) \\gg \\sqrt{n\\log\\log n/\\log n}$.\nThe variants record these bounds and the open question whether $h(n) = \\Theta(\\sqrt{n})$. The file\nproves Korsky's bound, following [Ko26], and derives from it the Erdős–Choi bound and\n$h(n) \\neq O((n\\log(n))^{1/3})$.\n\n*References:*\n- [erdosproblems.com/789](https://www.erdosproblems.com/789)\n- [Str66] Straus, E. G., _On a problem in combinatorial number theory_. J. Math. Sci. (1966), 77--80.\n- [Er62c] Erdős, Pál, _Some remarks on number theory_. {III}. Mat. Lapok (1962), 28--38.\n- [Ch74b] Choi, S. L. G., _On an extremal problem in number theory_. J. Number Theory (1974), 105--111.\n- [Ko26] Korsky, S., _A near-square-root bound for an additive problem of Erdős and Straus_ (2026).\n  [Proof claim](https://www.erdosproblems.com/forum/thread/789/proof-claims).\n-/\n\n@[expose] public section\n\nopen Filter\n\nopen scoped Asymptotics Finset\n\nnamespace Erdos789\n\n/-- Given a non-negative integer $n$, we say $m$ is a separating cardinality of\nsubset sums if, for any set $A$ of $n$ integers, there is some $B\\subseteq A$ of\nsize $\\geq m$ such that subset sums of $B$ can only ever coincide when the\nsubsets have the same cardinality. -/\ndef IsSubsetSumSeparatingCard (n m : ℕ) : Prop :=\n  ∀ A : Finset ℤ, #A = n → ∃ B : Finset ℤ, B ⊆ A ∧ m ≤ #B ∧\n    (∀ᵉ (T ⊆ B) (S ⊆ B), S.Nonempty → T.Nonempty → ∑ a ∈ T, a = ∑ b ∈ S, b → #T = #S)\n\n/-- The subset sum threshold $h(n)$, for each positive $n$, is the maximal separating\ncardinality of subset sums for $n$. -/\nnoncomputable def subsetSumThreshold (n : ℕ): ℕ :=\n  sSup { m | IsSubsetSumSeparatingCard n m }\n\ndef erdos_789.answer : ℕ → ℝ := sorry\n\n/--\nLet $h(n)$ be maximal such that if $A\\subseteq \\mathbb{Z}$ with $\\lvert A\\rvert=n$\nthen there is $B\\subseteq A$ with $\\lvert B\\rvert \\geq h(n)$ such that if\n$a_1+\\cdots+a_r=b_1+\\cdots+b_s$ with $a_i,b_i\\in B$ then $r=s$.\n\nEstimate $h(n)$.\n-/\n@[category research open, question value, AMS 5]\ntheorem erdos_789 :\n    (fun n ↦ (subsetSumThreshold n : ℝ)) =Θ[atTop] erdos_789.answer := by\n  sorry\n\n/--\nLet $h(n)$ be maximal such that if $A\\subseteq \\mathbb{Z}$ with $\\lvert A\\rvert=n$\nthen there is $B\\subseteq A$ with $\\lvert B\\rvert \\geq h(n)$ such that if\n$a_1+\\cdots+a_r=b_1+\\cdots+b_s$ with $a_i,b_i\\in B$ then $r=s$.\n\nIs $h(n) = \\Theta(\\sqrt{n})$?\n-/\n@[category research open, AMS 5]\ntheorem erdos_789.variants.sq :\n    (fun n ↦ (subsetSumThreshold n : ℝ)) =Θ[atTop] fun n ↦ √n := by\n  sorry\n\n/-- Straus [Str66] proved that $h(n) \\ll \\sqrt{n}$. -/\n@[category research solved, AMS 5]\ntheorem erdos_789.variants.isBigO_sq :\n    (fun n ↦ (subsetSumThreshold n : ℝ)) =O[atTop] fun n ↦ √n := by\n  sorry\n\n/-- By the solved variant `erdos_789.variants.isBigO_sq`, in order to prove\n`erdos_789.variants.sq` it suffices to show $\\sqrt{n}=O(h(n))$. -/\n@[category research open, AMS 5]\ntheorem erdos_789.variants.sq_isBigO :\n    (fun n : ℕ ↦ √n) =O[atTop] fun n ↦ (subsetSumThreshold n : ℝ) := by\n  sorry\n\n\nset_option linter.style.formal_proof_palomar false in\n/-- Korsky [Ko26] proved that $h(n) \\gg \\sqrt{n\\log\\log n/\\log n}$. -/\n@[category research solved, AMS 5, formal_proof using formal_conjectures at\n\"https://github.com/mo271/formal-conjectures/blob/57a0dc60e2cc245b69870647d122fb851f72d8e4/FormalConjectures/ErdosProblems/789.lean#L907\"]\ntheorem erdos_789.variants.sqrt_loglog_div_log_isBigO :\n    (fun n : ℕ ↦ √(n * Real.log (Real.log n) / Real.log n)) =O[atTop]\n      fun n ↦ (subsetSumThreshold n : ℝ) := by\n  sorry\n\n\nset_option linter.style.formal_proof_palomar false in\n/-- Erdős [Er62c] and Choi [Ch74b] proved that $(n\\log(n))^{1/3}\\ll h(n)$. This also follows from\n`erdos_789.variants.sqrt_loglog_div_log_isBigO`. -/\n@[category research solved, AMS 5, formal_proof using formal_conjectures at\n\"https://github.com/mo271/formal-conjectures/blob/57a0dc60e2cc245b69870647d122fb851f72d8e4/FormalConjectures/ErdosProblems/789.lean#L973\"]\ntheorem erdos_789.variants.cube_root_linearithmic_isBigO :\n    (fun n : ℕ ↦ (n * Real.log n) ^ ((1 : ℝ) / 3)) =O[atTop]\n      fun n ↦ (subsetSumThreshold n : ℝ) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/-- It is not true that $h(n) = O((n\\log(n))^{1/3})$. This follows from\n`erdos_789.variants.sqrt_loglog_div_log_isBigO` [Ko26]. -/\n@[category research solved, AMS 5, formal_proof using formal_conjectures at\n\"https://github.com/mo271/formal-conjectures/blob/57a0dc60e2cc245b69870647d122fb851f72d8e4/FormalConjectures/ErdosProblems/789.lean#L981\"]\ntheorem erdos_789.variants.isBigO_cube_root_linearithmic :\n    ¬ (fun n ↦ (subsetSumThreshold n : ℝ)) =O[atTop]\n      fun n ↦ (n * Real.log n) ^ ((1 : ℝ) / 3) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/-- It is not true that $h(n) = \\Theta((n\\log(n))^{1/3})$. This follows from\n`erdos_789.variants.isBigO_cube_root_linearithmic`. -/\n@[category research solved, AMS 5, formal_proof using formal_conjectures at\n\"https://github.com/mo271/formal-conjectures/blob/57a0dc60e2cc245b69870647d122fb851f72d8e4/FormalConjectures/ErdosProblems/789.lean#L994\"]\ntheorem erdos_789.variants.cube_root_linearithmic :\n    ¬ (fun n ↦ (subsetSumThreshold n : ℝ)) =Θ[atTop]\n      fun n ↦ (n * Real.log n) ^ ((1 : ℝ) / 3) := by\n  sorry\n\nend Erdos789\n",
  "statement_hash": "832e0544610a12a63e3b03a724a42bca6e3fcc0f3073f20af99d686abf15eda8",
  "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."
}