/- Copyright 2025 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ module public import FormalConjecturesUtil /-! # Erdős Problem 1084 *References:* - [erdosproblems.com/1084](https://www.erdosproblems.com/1084) - [Ha74b] Harborth, Heiko, Lösung zu Problem 664A. Elem. Math. (1974), 14--15. Let `f_2(n)` be the maximum number of pairs of points at distance exactly `1` among any set of `n` points in `ℝ²`, under the condition that all pairwise distances are at least `1`. Estimate the growth of `f_2(n)`. Status: open. -/ @[expose] public section open Finset Filter Metric Real open scoped EuclideanGeometry namespace Erdos1084 variable {n : ℕ} /-- The maximal number of pairs of points which are distance 1 apart that a set of `n` 1-separated points in `ℝ^d` make. -/ noncomputable def f (d n : ℕ) : ℕ := ⨆ (s : Finset (ℝ^ d)) (_ : s.card = n) (_ : IsSeparated' 1 (s : Set (ℝ^ d))), unitDistNum s -- TODO: Add erdos_1084. set_option linter.style.formal_proof_palomar false in /-- It is easy to check that $f_1(n) = n - 1$. -/ @[category research solved, AMS 52, formal_proof using formal_conjectures at "https://github.com/Sanexxxx777/formal-conjectures/blob/9e4f3845be122a8fa3190d38543ebdd0a6f25605/FormalConjectures/ErdosProblems/1084.lean#L232"] theorem erdos_1084.variants.upper_d1 : f 1 n = n - 1 := by sorry /-- It is easy to check that $f_2(n) < 3n$. -/ @[category research solved, AMS 52] theorem erdos_1084.variants.easy_upper_d2 (hn : n ≠ 0) : f 2 n < 3 * n := by sorry /-- Erdős showed that there is some constant $c > 0$ such that $f_2(n) < 3n - c n^{1/2}$. -/ @[category research solved, AMS 52] theorem erdos_1084.variants.upper_d2 : ∃ c > (0 : ℝ), ∀ n > 0, f 2 n < 3 * n - c * sqrt n := by sorry /-- Erdős conjectured that the triangular lattice is best possible in 2D, in particular that $f_2(3n^2 + 3n + 1) = 9n^2 + 3n$. Harborth [Ha74b] proved this, and more generally $f_2(n) = \lfloor 3n - \sqrt{12n - 3} \rfloor$ for all $n \geq 2$. Note: in [Er75f] is read $9n^2 + 6n$, but this seems to be a typo. -/ @[category research solved, AMS 52] theorem erdos_1084.variants.triangular_optimal_d2 : f 2 (3 * n ^ 2 + 3 * n + 1) = 9 * n ^ 2 + 3 * n := by sorry /-- Erdős claims the existence of two constants $c_1, c_2 > 0$ such that $6n - c_1 n^{2/3} ≤ f_3(n) \le 6n - c_2 n^{2/3}$. -/ @[category research solved, AMS 52] theorem erdos_1084.variants.upper_lower_d3 : ∃ c₁ : ℝ, ∃ c₂ > (0 : ℝ), ∀ᶠ n in atTop, 6 * n - c₁ * n ^ (2 / 3 : ℝ) ≤ f 3 n ∧ f 3 n ≤ 6 * n - c₂ * n ^ (2 / 3 : ℝ) := by sorry end Erdos1084