AFTD Auto-Formalizing Theoretical Domains

segment_crossing_graph

def

The crossing graph G(L) of a finite family of line segments L is the simple graph with vertex set L and edges between segments whose relative interiors intersect.

Statement

def segment_crossing_graph (L : Finset (Sym2 (ℝ × ℝ))) : SimpleGraph L
Defined in
arXiv:2610.23130 Sec. 1
Verified
20 Oct 2026
Axioms
none listed
Built on 1
  • segment_crossingTwo line segments in the plane, represented as unordered pairs of endpoints in Sym2 (ℝ × ℝ), cross if the intersection of their relative…
Used by 10

Read back from the Lean

Given a finite set L of unordered pairs of points in ℝ × ℝ (elements of Sym2 (ℝ × ℝ)), segment_crossing_graph L is the SimpleGraph on the vertex set L (the subtype of elements belonging to L) constructed via SimpleGraph.fromRel with the relation fun e₁ e₂ => segment_crossing e₁.1 e₂.1. Two vertices e₁, e₂ : L are adjacent if and only if e₁ ≠ e₂ and the open segment spanned by the endpoints of e₁ has a nonempty intersection with the open segment spanned by the endpoints of e₂.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The crossing graph of a finite family of segments in ℝ². -/
def segment_crossing_graph (L : Finset (Sym2 (ℝ × ℝ))) : SimpleGraph L := SimpleGraph.fromRel (fun e₁ e₂ => segment_crossing e₁.1 e₂.1)
See it in the graphDiscuss this resultChallenge it