{
  "id": "1360",
  "ident": "NS.01360",
  "slug": "erdos-214",
  "title": "Erdős Problem 214",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $S\\subset \\mathbb{R}^2$ be such that no two points in $S$ are distance $1$ apart. Must the\ncomplement of $S$ contain four points which form a unit square?\n\nThe answer is yes, proved by Juhász [Ju79], who proved more generally that the complement of $S$\nmust contain a congruent copy of any set of four points.",
  "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": "Erdos214.erdos_214",
  "statement_lean": "theorem erdos_214 :\n    ∀ S : Set ℝ², UnitDistanceAvoiding S →\n      ∃ p : Fin 4 → ℝ², (∀ i, p i ∈ Sᶜ) ∧ (p ≅ unitSquare)",
  "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 214\n\n*References:*\n- [erdosproblems.com/214](https://www.erdosproblems.com/214)\n- [CsTo94] Csizmadia, György and Tóth, Géza, *Note on a Ramsey-type problem in geometry*.\n  J. Combin. Theory Ser. A (1994), 302-306.\n- [EGMRSS75] Erdős, P. and Graham, R. L. and Montgomery, P. and Rothschild, B. L. and Spencer, J.\n  and Straus, E. G., *Euclidean Ramsey theorems. II*. (1975), 529-557.\n- [Ju79] Juhász, Rozália, *Ramsey type theorems in the plane*. J. Combin. Theory Ser. A (1979),\n  152-160.\n-/\n\n@[expose] public section\n\nopen scoped Congruent EuclideanGeometry\n\nnamespace Erdos214\n\n/-- The four vertices of a unit square. -/\ndef unitSquare : Fin 4 → ℝ² := ![!₂[0, 0], !₂[1, 0], !₂[1, 1], !₂[0, 1]]\n\n/-- Colouring the points of `S` blue and the points of `Sᶜ` red gives a red/blue colouring of\n$\\mathbb{R}^2$; it is unit-distance-avoiding if no two blue points are distance $1$ apart. -/\ndef UnitDistanceAvoiding (S : Set ℝ²) : Prop := ∀ x ∈ S, ∀ y ∈ S, dist x y ≠ 1\n\n/-- Any unit-distance-avoiding colouring contains a congruent red copy of every set of `n`\npoints. -/\ndef HasRedCopies (n : ℕ) : Prop :=\n  ∀ S : Set ℝ², UnitDistanceAvoiding S → ∀ K : Fin n → ℝ², Function.Injective K →\n    ∃ p : Fin n → ℝ², (∀ i, p i ∈ Sᶜ) ∧ (p ≅ K)\n\n/-- The largest integer `k` such that any unit-distance-avoiding colouring contains a congruent\nred copy of every set of `k` points. -/\nnoncomputable def k : ℕ := sSup {n | HasRedCopies n}\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $S\\subset \\mathbb{R}^2$ be such that no two points in $S$ are distance $1$ apart. Must the\ncomplement of $S$ contain four points which form a unit square?\n\nThe answer is yes, proved by Juhász [Ju79], who proved more generally that the complement of $S$\nmust contain a congruent copy of any set of four points.\n-/\n@[category research solved, question, AMS 5 52, formal_proof using lean4 at \"https://github.com/plby/lean-proofs/blob/main/src/v4.29.1/ErdosProblems/Erdos214.lean\"]\ntheorem erdos_214 :\n    ∀ S : Set ℝ², UnitDistanceAvoiding S →\n      ∃ p : Fin 4 → ℝ², (∀ i, p i ∈ Sᶜ) ∧ (p ≅ unitSquare) := by\n  sorry\n\n/--\nThe answer is yes, proved by Juhász [Ju79], who proved more generally that the complement of $S$\nmust contain a congruent copy of any set of four points.\n-/\n@[category research solved, AMS 5 52]\ntheorem erdos_214.variants.juhasz : HasRedCopies 4 := by\n  sorry\n\n/--\nErdős, Graham, Montgomery, Rothschild, Spencer, and Straus [EGMRSS75] had earlier showed that\n$3\\leq k\\leq 10^{12}$.\n-/\n@[category research solved, AMS 5 52]\ntheorem erdos_214.variants.egmrss : 3 ≤ k ∧ k ≤ 10 ^ 12 := by\n  sorry\n\n/--\nJuhász [Ju79] also improved the upper bound to $k\\leq 11$.\n-/\n@[category research solved, AMS 5 52]\ntheorem erdos_214.variants.juhasz_twelve_points : ¬ HasRedCopies 12 := by\n  sorry\n\n/--\nThe upper bound was improved further by Csizmadia and Tóth [CsTo94] to $k\\leq 7$.\n-/\n@[category research solved, AMS 5 52]\ntheorem erdos_214.variants.csizmadia_toth : ¬ HasRedCopies 8 := by\n  sorry\n\n/--\nThe best known bounds currently are\n$$4\\leq k\\leq 7.$$\n-/\n@[category research solved, AMS 5 52]\ntheorem erdos_214.variants.bounds : 4 ≤ k ∧ k ≤ 7 := by\n  sorry\n\nend Erdos214\n",
  "statement_hash": "3eff04822e7acff24a4286bdc07dd5d40980074bfefd68bf5146a0f151e23fe2",
  "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."
}