AFTD Auto-Formalizing Theoretical Domains

rat_segments_union

def

For a list S of pairs of rational points of the plane, the subset of EuclideanSpace ℝ (Fin 2) that is the union, over the pairs (a, b) in S, of the closed line segment from the point a to the point b.

Statement

noncomputable def rat_segments_union (S : List ((ℚ × ℚ) × (ℚ × ℚ))) :
    Set (EuclideanSpace ℝ (Fin 2))
Source
Geometry, helper for the polynomial-time statement of OP-2019 (arXiv:2611.24611 (Inapproximability of Euclidean Steiner Tree), Section 6.1, after Corollary 20 (open question: is planar Euclidean Cable Steiner Tree APX-hard or does it admit a PTAS?)); a cable is a connected finite union of closed segments (Definition 5).
Verified
23 Nov 2026
Axioms
none listed
Built on 1
  • rat_plane_pointThe point of the Euclidean plane EuclideanSpace ℝ (Fin 2) with coordinates (x, y), for a pair (x, y) of rationals.
Used by 4
  • rat_segments_union_pointThe union of the single degenerate segment from p to p is the one-point set {p}.
  • cable_steiner_optFor a list I of cables in the plane, each cable given as a list of segments, a segment being a pair of endpoints each given as a pair (x,…
  • cable_steiner_opt_singletonFor a single cable c whose union is connected, the cable Steiner optimum of [c] is 0.
  • cable_steiner_opt_two_pointsFor two one-point cables p and q (degenerate segments), the cable Steiner optimum is the Euclidean distance between p and q.

Lean source view module on GitHub

/-- The union in the plane of the closed segments listed in `S` (rational endpoints). -/
noncomputable def rat_segments_union (S : List ((ℚ × ℚ) × (ℚ × ℚ))) :
    Set (EuclideanSpace ℝ (Fin 2)) :=
  ⋃ s ∈ S, segment ℝ (rat_plane_point s.1) (rat_plane_point s.2)
See it in the graphDiscuss this resultChallenge it