/- Copyright 2026 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 1071 *References:* * [erdosproblems.com/1071](https://www.erdosproblems.com/1071) * [Da85] Danzer, L., _Some combinatorial and metric problems in geometry_. Intuitive geometry (Siófok, 1985), 167-177. -/ @[expose] public section open Set Metric EuclideanGeometry Order namespace Erdos1071 /-- Two segments are disjoint if they only intersect at their endpoints (if at all). -/ def SegmentsDisjoint (seg1 seg2 : ℝ² × ℝ²) : Prop := segment ℝ seg1.1 seg1.2 ∩ segment ℝ seg2.1 seg2.2 ⊆ {seg1.1, seg1.2, seg2.1, seg2.2} set_option linter.style.formal_proof_palomar false in /-- Can a finite set of disjoint unit segments in a unit square be maximal? Solved affirmatively by [Da85], who gave an explicit construction. This was formalized in Lean by Alexeev using Aristotle and ChatGPT. -/ @[category research solved, question, AMS 52, formal_proof using lean4 at "https://github.com/plby/lean-proofs/blob/main/src/v4.24.0/ErdosProblems/Erdos1071.lean"] theorem erdos_1071.parts.i : ∃ S : Finset (ℝ² × ℝ²), Maximal (fun T : Finset (ℝ² × ℝ²) => (∀ seg ∈ T, dist seg.1 seg.2 = 1 ∧ seg.1 0 ∈ Icc 0 1 ∧ seg.1 1 ∈ Icc 0 1 ∧ seg.2 0 ∈ Icc 0 1 ∧ seg.2 1 ∈ Icc 0 1) ∧ (T : Set (ℝ² × ℝ²)).Pairwise SegmentsDisjoint) S := by sorry set_option linter.style.formal_proof_palomar false in /-- Is there a region $R$ with a maximal set of disjoint unit line segments that is countably infinite? Here a unit line segment is a rotated and translated copy of the open interval $(0,1)$, and it is required to be contained in $R$. Solved affirmatively by [Fo99], who gave an explicit construction. This was formalized in Lean by Alexeev using Aristotle and ChatGPT. -/ @[category research solved, question, AMS 52, formal_proof using lean4 at "https://github.com/plby/lean-proofs/blob/main/src/v4.24.0/ErdosProblems/Erdos1071b.lean"] theorem erdos_1071.parts.ii : ∃ (R : Set ℝ²) (S : Set (ℝ² × ℝ²)), IsOpen R ∧ IsConnected R ∧ S.Countable ∧ S.Infinite ∧ Maximal (fun T : Set (ℝ² × ℝ²) => (∀ seg ∈ T, dist seg.1 seg.2 = 1 ∧ openSegment ℝ seg.1 seg.2 ⊆ R) ∧ T.Pairwise SegmentsDisjoint) S := by sorry end Erdos1071