{
  "id": "3765",
  "ident": "NS.03765",
  "slug": "erdos-957",
  "title": "Erdős Problem 957",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $A\\subset \\mathbb{R}^2$ be a set of size $n$ and let $\\{d_1<\\ldots<d_k\\}$ be the set of\ndistinct distances determined by $A$. Let $f(d)$ be the number of times the distance $d$ is\ndetermined. Is it true that\n$$f(d_1)f(d_k) \\leq (\\tfrac{9}{8}+o(1))n^2?$$\n\nA question of Erdős and Pach [ErPa90]. The answer is yes, proved by Dumitrescu [Du19]. Here\n$f(d)$ counts unordered pairs of points of $A$ at distance $d$ (`distanceMultiplicity`), and\n$o(1)$ is uniform over all $A$ of size $n$.",
  "subjects": [
    "math.CO",
    "math.MG",
    "msc:05",
    "msc:52"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos957.erdos_957",
  "statement_lean": "theorem erdos_957 :\n    ∀ ε > (0 : ℝ), ∀ᶠ n : ℕ in atTop, ∀ A : Finset ℝ², A.card = n →\n      ∀ d₁ dₖ : ℝ, IsLeast (distanceSet A : Set ℝ) d₁ →\n        IsGreatest (distanceSet A : Set ℝ) dₖ →\n          (distanceMultiplicity A d₁ : ℝ) * distanceMultiplicity A dₖ ≤\n            (9 / 8 + ε) * (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 957\n\n*References:*\n- [erdosproblems.com/957](https://www.erdosproblems.com/957)\n- [Du19] Dumitrescu, Adrian, *A product inequality for extreme distances*.\n  Comput. Geom. 85 (2019), 101577.\n  [PDF](https://adriandumitrescu.org/product-ineq.pdf)\n- [ErPa90] Erdős, P. and Pach, J., *Variations on the theme of repeated distances*.\n  Combinatorica 10 (1990), 261-269.\n-/\n\n@[expose] public section\n\nopen Filter\nopen scoped EuclideanGeometry\n\nnamespace Erdos957\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $A\\subset \\mathbb{R}^2$ be a set of size $n$ and let $\\{d_1<\\ldots<d_k\\}$ be the set of\ndistinct distances determined by $A$. Let $f(d)$ be the number of times the distance $d$ is\ndetermined. Is it true that\n$$f(d_1)f(d_k) \\leq (\\tfrac{9}{8}+o(1))n^2?$$\n\nA question of Erdős and Pach [ErPa90]. The answer is yes, proved by Dumitrescu [Du19]. Here\n$f(d)$ counts unordered pairs of points of $A$ at distance $d$ (`distanceMultiplicity`), and\n$o(1)$ is uniform over all $A$ of size $n$.\n-/\n@[category research solved, question, AMS 5 52, formal_proof using lean4 at\n    \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos957.lean#L57\"]\ntheorem erdos_957 :\n    ∀ ε > (0 : ℝ), ∀ᶠ n : ℕ in atTop, ∀ A : Finset ℝ², A.card = n →\n      ∀ d₁ dₖ : ℝ, IsLeast (distanceSet A : Set ℝ) d₁ →\n        IsGreatest (distanceSet A : Set ℝ) dₖ →\n          (distanceMultiplicity A d₁ : ℝ) * distanceMultiplicity A dₖ ≤\n            (9 / 8 + ε) * (n : ℝ) ^ 2 := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThe original problem was solved by Dumitrescu [Du19, Theorem 1], who proved that\n$$f(d_1)f(d_k)\\leq \\frac{9}{8}n^2+O(n).$$\nHere a single constant $C$ in the error term $Cn$ works for all finite $A \\subset \\mathbb{R}^2$.\n-/\n@[category research solved, AMS 5 52, formal_proof using lean4 at\n    \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos957.lean#L44\"]\ntheorem erdos_957.variants.dumitrescu :\n    ∃ C : ℝ, ∀ A : Finset ℝ², ∀ d₁ dₖ : ℝ, IsLeast (distanceSet A : Set ℝ) d₁ →\n      IsGreatest (distanceSet A : Set ℝ) dₖ →\n        (distanceMultiplicity A d₁ : ℝ) * distanceMultiplicity A dₖ ≤\n          9 / 8 * (A.card : ℝ) ^ 2 + C * (A.card : ℝ) := by\n  sorry\n\nend Erdos957\n",
  "statement_hash": "aa1f6d4287abe023323aec03f2a16cd980bf3ee77820f7b91d6ad16abb80b9f6",
  "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."
}