{
  "id": "604",
  "ident": "NS.00604",
  "slug": "erdos-1084",
  "title": "Erdős Problem 1084",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "It is easy to check that $f_1(n) = n - 1$.",
  "subjects": [
    "math.MG",
    "msc:52"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos1084.erdos_1084.variants.upper_d1",
  "statement_lean": "theorem erdos_1084.variants.upper_d1 : f 1 n = n - 1",
  "challenge_source": "/-\nCopyright 2025 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 1084\n\n*References:*\n- [erdosproblems.com/1084](https://www.erdosproblems.com/1084)\n- [Ha74b] Harborth, Heiko, Lösung zu Problem 664A. Elem. Math. (1974), 14--15.\n\nLet `f_2(n)` be the maximum number of pairs of points at distance exactly `1`\namong any set of `n` points in `ℝ²`, under the condition that all pairwise\ndistances are at least `1`.\n\nEstimate the growth of `f_2(n)`.\n\nStatus: open.\n-/\n\n@[expose] public section\n\nopen Finset Filter Metric Real\nopen scoped EuclideanGeometry\n\nnamespace Erdos1084\nvariable {n : ℕ}\n\n/-- The maximal number of pairs of points which are distance 1 apart that a set of `n` 1-separated\npoints in `ℝ^d` make. -/\nnoncomputable def f (d n : ℕ) : ℕ :=\n  ⨆ (s : Finset (ℝ^ d)) (_ : s.card = n) (_ : IsSeparated' 1 (s : Set (ℝ^ d))), unitDistNum s\n\n-- TODO: Add erdos_1084.\n\nset_option linter.style.formal_proof_palomar false in\n/-- It is easy to check that $f_1(n) = n - 1$. -/\n@[category research solved, AMS 52, formal_proof using formal_conjectures at \"https://github.com/Sanexxxx777/formal-conjectures/blob/9e4f3845be122a8fa3190d38543ebdd0a6f25605/FormalConjectures/ErdosProblems/1084.lean#L232\"]\ntheorem erdos_1084.variants.upper_d1 : f 1 n = n - 1 := by\n  sorry\n\n/-- It is easy to check that $f_2(n) < 3n$. -/\n@[category research solved, AMS 52]\ntheorem erdos_1084.variants.easy_upper_d2 (hn : n ≠ 0) : f 2 n < 3 * n := by\n  sorry\n\n/-- Erdős showed that there is some constant $c > 0$ such that $f_2(n) < 3n - c n^{1/2}$. -/\n@[category research solved, AMS 52]\ntheorem erdos_1084.variants.upper_d2 : ∃ c > (0 : ℝ), ∀ n > 0, f 2 n < 3 * n - c * sqrt n := by\n  sorry\n\n/-- Erdős conjectured that the triangular lattice is best possible in 2D, in particular that\n$f_2(3n^2 + 3n + 1) = 9n^2 + 3n$. Harborth [Ha74b] proved this, and more generally\n$f_2(n) = \\lfloor 3n - \\sqrt{12n - 3} \\rfloor$ for all $n \\geq 2$.\n\nNote: in [Er75f] is read $9n^2 + 6n$, but this seems to be a typo.\n-/\n@[category research solved, AMS 52]\ntheorem erdos_1084.variants.triangular_optimal_d2 : f 2 (3 * n ^ 2 + 3 * n + 1) = 9 * n ^ 2 + 3 * n := by\n  sorry\n\n/-- Erdős claims the existence of two constants $c_1, c_2 > 0$\nsuch that $6n - c_1 n^{2/3} ≤ f_3(n) \\le 6n - c_2 n^{2/3}$. -/\n@[category research solved, AMS 52]\ntheorem erdos_1084.variants.upper_lower_d3 :\n    ∃ c₁ : ℝ, ∃ c₂ > (0 : ℝ), ∀ᶠ n in atTop,\n      6 * n - c₁ * n ^ (2 / 3 : ℝ) ≤ f 3 n ∧ f 3 n ≤ 6 * n - c₂ * n ^ (2 / 3 : ℝ) := by\n  sorry\n\nend Erdos1084\n",
  "statement_hash": "5027703f8b47ba9dbe6f04e2063a4df2e748a93cbfdf017acf46417b0fca17ac",
  "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."
}