{
  "id": "1146",
  "ident": "NS.01146",
  "slug": "erdos-154",
  "title": "Erdős Problem 154",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $A\\subset \\{1,\\ldots,N\\}$ be a Sidon set with $\\lvert A\\rvert\\sim N^{1/2}$. Must $A+A$ be\nwell-distributed over all small moduli? In particular, must about half the elements of $A+A$ be\neven and half odd?\n\nThe answer is yes. Lindström [Li98] proved the analogous statement for $A$ itself (see\n`erdos_154.variants.lindstrom`), later strengthened by Kolountzakis [Ko99]; well-distribution of\n$A+A$ then follows using the Sidon property.\n\nWe state the question for the sumset: for any sequence of Sidon sets\n$A_k\\subseteq\\{0,\\ldots,N_k\\}$ with $N_k\\to\\infty$ and $\\lvert A_k\\rvert\\sim N_k^{1/2}$, and any\nmodulus $m\\geq 2$, the proportion of elements of $A_k+A_k$ congruent to $i\\pmod m$ (i.e. the count\ndivided by $\\lvert A_k+A_k\\rvert$) tends to $1/m$ for every residue $i<m$.",
  "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": "Erdos154.erdos_154",
  "statement_lean": "theorem erdos_154 :\n    ∀ (m : ℕ) (hm : 2 ≤ m) (N : ℕ → ℕ) (A : ℕ → Finset ℕ),\n      Tendsto (fun k => (N k : ℝ)) atTop atTop →\n      (∀ k, ∀ x ∈ A k, x ≤ N k) →\n      (∀ k, IsSidon (A k : Set ℕ)) →\n      Tendsto (fun k => ((A k).card : ℝ) / Real.sqrt (N k)) atTop (nhds 1) →\n      ∀ i < m, Tendsto\n        (fun k => (((A k + A k).filter (fun s => s % m = i)).card : ℝ) / ((A k + A k).card : ℝ))\n        atTop (nhds (1 / m))",
  "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 154\n\n*References:*\n- [erdosproblems.com/154](https://www.erdosproblems.com/154)\n- [Li98] Lindström, Bernt, *Well distribution of Sidon sets in residue classes*.\n  J. Number Theory (1998), 197-200.\n- [Ko99] Kolountzakis, Mihail N., *On the uniform distribution in residue classes of dense sets\n  of integers with distinct sums*. J. Number Theory (1999), 147-153.\n- [ESS94] Erdős, P. and Sárközy, A. and Sós, T., *On Sum Sets of Sidon Sets, I*.\n  Journal of Number Theory (1994), 329-347.\n-/\n\n@[expose] public section\n\nopen Filter Finset\n\nopen scoped Pointwise\n\nnamespace Erdos154\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $A\\subset \\{1,\\ldots,N\\}$ be a Sidon set with $\\lvert A\\rvert\\sim N^{1/2}$. Must $A+A$ be\nwell-distributed over all small moduli? In particular, must about half the elements of $A+A$ be\neven and half odd?\n\nThe answer is yes. Lindström [Li98] proved the analogous statement for $A$ itself (see\n`erdos_154.variants.lindstrom`), later strengthened by Kolountzakis [Ko99]; well-distribution of\n$A+A$ then follows using the Sidon property.\n\nWe state the question for the sumset: for any sequence of Sidon sets\n$A_k\\subseteq\\{0,\\ldots,N_k\\}$ with $N_k\\to\\infty$ and $\\lvert A_k\\rvert\\sim N_k^{1/2}$, and any\nmodulus $m\\geq 2$, the proportion of elements of $A_k+A_k$ congruent to $i\\pmod m$ (i.e. the count\ndivided by $\\lvert A_k+A_k\\rvert$) tends to $1/m$ for every residue $i<m$.\n-/\n@[category research solved, question, AMS 5 11,\n  formal_proof using lean4 at \"https://github.com/willblair0708/lean-proofs/blob/f297d710018270c66b296082766334974260bcbc/ErdosProblems/Erdos154/Sumset.lean#L555\"]\ntheorem erdos_154 :\n    ∀ (m : ℕ) (hm : 2 ≤ m) (N : ℕ → ℕ) (A : ℕ → Finset ℕ),\n      Tendsto (fun k => (N k : ℝ)) atTop atTop →\n      (∀ k, ∀ x ∈ A k, x ≤ N k) →\n      (∀ k, IsSidon (A k : Set ℕ)) →\n      Tendsto (fun k => ((A k).card : ℝ) / Real.sqrt (N k)) atTop (nhds 1) →\n      ∀ i < m, Tendsto\n        (fun k => (((A k + A k).filter (fun s => s % m = i)).card : ℝ) / ((A k + A k).card : ℝ))\n        atTop (nhds (1 / m)) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLindström's result for $A$ itself [Li98], later strengthened by Kolountzakis [Ko99]: for any\nsequence of Sidon sets $A_k\\subseteq\\{0,\\ldots,N_k\\}$ with $N_k\\to\\infty$ and\n$\\lvert A_k\\rvert\\sim N_k^{1/2}$, and any modulus $m\\geq 2$, the number of elements of $A_k$\ncongruent to $i\\pmod m$, divided by $N_k^{1/2}$, tends to $1/m$ for every residue $i<m$.\n\nWell-distribution of $A+A$ (the actual question, `erdos_154`) follows from this using the Sidon\nproperty.\n-/\n@[category research solved, AMS 5 11, formal_proof using lean4 at \"https://github.com/Woett/Lean-files/blob/main/ErdosProblem154.lean\"]\ntheorem erdos_154.variants.lindstrom :\n    ∀ (m : ℕ) (hm : 2 ≤ m) (N : ℕ → ℕ) (A : ℕ → Finset ℕ),\n      Tendsto (fun k => (N k : ℝ)) atTop atTop →\n      (∀ k, ∀ x ∈ A k, x ≤ N k) →\n      (∀ k, IsSidon (A k : Set ℕ)) →\n      Tendsto (fun k => ((A k).card : ℝ) / Real.sqrt (N k)) atTop (nhds 1) →\n      ∀ i < m, Tendsto\n        (fun k => (((A k).filter (fun a => a % m = i)).card : ℝ) / Real.sqrt (N k))\n        atTop (nhds (1 / m)) := by\n  sorry\n\nend Erdos154\n",
  "statement_hash": "6633c50ae75bf6f60c9033f3eb5d4b8422f7cde203af378ef570ade777cf1232",
  "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."
}