Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Polygonal arcs, polygons and regions in R2\mathbb R^2R2 (Diestel §4.1)

Definition
DiestelGraphTheory_PolygonalArc

by tiago duque marques · Nov 18, 2026 · Mathlib 0df444a (Lean v4.33.1)

graph-theoryplanar-graphstopology

Topological prerequisites for plane graphs, following Diestel, Section 4.1. The plane R2\mathbb R^2R2 carries its Euclidean topology, and every subset carries the subspace topology.

  1. A straight line segment is a set {p+λ(q−p):0≤λ≤1}\{p+\lambda(q-p) : 0\le\lambda\le1\}{p+λ(q−p):0≤λ≤1} for two distinct points p≠qp\ne qp=q of R2\mathbb R^2R2.
  2. A polygon is a subset of R2\mathbb R^2R2 that is the union of finitely many straight line segments and is homeomorphic to the unit circle S1={z∈R2:z12+z22=1}S^1=\{z\in\mathbb R^2 : z_1^2+z_2^2=1\}S1={z∈R2:z12​+z22​=1}.
  3. A (polygonal) arc between xxx and yyy is a subset P⊆R2P\subseteq\mathbb R^2P⊆R2 that is the union of finitely many straight line segments and admits a homeomorphism φ:[0,1]→P\varphi:[0,1]\to Pφ:[0,1]→P with φ(0)=x\varphi(0)=xφ(0)=x and φ(1)=y\varphi(1)=yφ(1)=y; the points x,yx,yx,y are its endpoints.
  4. For O⊆R2O\subseteq\mathbb R^2O⊆R2, two points a,ba,ba,b are linked by an arc in OOO if a=ba=ba=b or some arc between aaa and bbb is contained in OOO.
  5. The regions of OOO are the classes {b∈O:b linked to a in O}\{b\in O : b \text{ linked to } a \text{ in } O\}{b∈O:b linked to a in O} for a∈Oa\in Oa∈O. For open OOO (the only case used) these are the equivalence classes of the linking relation.

These notions underlie the definition of plane graphs and their faces, and the Jordan Curve Theorem for polygons.

Formalization Note R2\mathbb R^2R2 is ℝ × ℝ, whose product topology is the Euclidean one; because Mathlib's metric on ℝ × ℝ is the sup metric, the unit circle is written by its Euclidean equation. A homeomorphism [0,1]≅P[0,1]\cong P[0,1]≅P is encoded as a topological embedding of unitInterval with range PPP.

Definition code
import Mathlib

/-!
Topological prerequisites for plane graphs, following
R. Diestel, *Graph Theory*, 6th ed. (Springer GTM 173, 2025), Section 4.1.

The Euclidean plane `ℝ²` is modelled as `ℝ × ℝ` with its product topology
(which is the Euclidean topology). Every subset carries the subspace topology.
-/

namespace DiestelGraphTheory

open Set

/-- A *straight line segment*: a set of the form `{p + λ (q - p) | 0 ≤ λ ≤ 1}`
for two distinct points `p ≠ q` of the plane (Diestel, §4.1). -/
def IsStraightSegment (S : Set (ℝ × ℝ)) : Prop :=
  ∃ p q : ℝ × ℝ, p ≠ q ∧
    S = {z : ℝ × ℝ | ∃ t : ℝ, 0 ≤ t ∧ t ≤ 1 ∧ z = p + t • (q - p)}

/-- `P` is the union of finitely many straight line segments. -/
def IsFiniteUnionOfSegments (P : Set (ℝ × ℝ)) : Prop :=
  ∃ (k : ℕ) (S : Fin k → Set (ℝ × ℝ)), (∀ i, IsStraightSegment (S i)) ∧ P = ⋃ i, S i

/-- The unit circle `S¹ = {z ∈ ℝ² | ‖z‖₂ = 1}` (Euclidean norm, not the sup norm
that `ℝ × ℝ` carries in Mathlib). -/
def unitCircle : Set (ℝ × ℝ) := {z : ℝ × ℝ | z.1 ^ 2 + z.2 ^ 2 = 1}

/-- A *polygon*: a finite union of straight line segments homeomorphic to the
unit circle `S¹` (Diestel, §4.1). -/
def IsPolygon (P : Set (ℝ × ℝ)) : Prop :=
  IsFiniteUnionOfSegments P ∧ Nonempty (P ≃ₜ unitCircle)

/-- `P` is a *(polygonal) arc between `x` and `y`*: a finite union of straight line
segments that is homeomorphic to `[0,1]` via a homeomorphism sending `0 ↦ x` and
`1 ↦ y` (Diestel, §4.1). A topological embedding `[0,1] → ℝ²` with range `P` is
exactly a homeomorphism `[0,1] ≅ P`. -/
def IsArcBetween (P : Set (ℝ × ℝ)) (x y : ℝ × ℝ) : Prop :=
  IsFiniteUnionOfSegments P ∧
    ∃ φ : unitInterval → ℝ × ℝ,
      Topology.IsEmbedding φ ∧ range φ = P ∧ φ 0 = x ∧ φ 1 = y

/-- Two points `a, b` of an open set `O` are *linked by an arc in `O`*: they are
equal, or some arc between `a` and `b` lies inside `O` (Diestel, §4.1). -/
def LinkedIn (O : Set (ℝ × ℝ)) (a b : ℝ × ℝ) : Prop :=
  a = b ∨ ∃ P : Set (ℝ × ℝ), IsArcBetween P a b ∧ P ⊆ O

/-- The *regions* of `O ⊆ ℝ²`: the equivalence classes of points of `O` under
"being linked by an arc in `O`" (Diestel, §4.1). -/
def regions (O : Set (ℝ × ℝ)) : Set (Set (ℝ × ℝ)) :=
  {R | ∃ a ∈ O, R = {b : ℝ × ℝ | b ∈ O ∧ LinkedIn O a b}}

end DiestelGraphTheory
Source
R. Diestel, Graph Theory, 6th ed., Springer GTM 173 (2025), https://diestel-graph-theory.com/basic.html (free preview of Ch. 4-5). Section 4.1, p. 94 (definitions of straight line segment, polygon, polygonal arc, regions).
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

This file introduces six notions about subsets of the plane, where the plane is R×R\mathbb{R}\times\mathbb{R}R×R with the product topology (which coincides with the Euclidean topology; Mathlib's default metric on the product is the sup metric, but only the topology and the vector operations are used here). Every subset carries the subspace topology.

Straight segment. A set S⊆R2S\subseteq\mathbb{R}^2S⊆R2 is a straight segment if there are points p≠qp\neq qp=q with

S={ p+t(q−p)  :  0≤t≤1 },S=\{\,p+t(q-p)\;:\;0\le t\le 1\,\},S={p+t(q−p):0≤t≤1},

i.e. a closed, non-degenerate line segment (a single point is excluded).

Finite union of segments. PPP is a finite union of segments if there exist k∈Nk\in\mathbb{N}k∈N and straight segments S0,…,Sk−1S_0,\dots,S_{k-1}S0​,…,Sk−1​ with P=⋃i<kSiP=\bigcup_{i<k}S_iP=⋃i<k​Si​. Here k=0k=0k=0 is allowed, so the empty set qualifies.

Unit circle. S1={(x,y):x2+y2=1}S^1=\{(x,y): x^2+y^2=1\}S1={(x,y):x2+y2=1} (Euclidean circle, written by its equation, not the unit sphere of the sup norm), with the subspace topology.

Polygon. PPP is a polygon if it is a finite union of segments and there exists a homeomorphism P≅S1P\cong S^1P≅S1 (both with subspace topologies).

Arc between xxx and yyy. PPP is an arc between xxx and yyy if PPP is a finite union of segments and there is a map φ:[0,1]→R2\varphi:[0,1]\to\mathbb{R}^2φ:[0,1]→R2 that is a topological embedding (continuous, injective, and a homeomorphism onto its image), with image exactly PPP, φ(0)=x\varphi(0)=xφ(0)=x and φ(1)=y\varphi(1)=yφ(1)=y. Since φ\varphiφ is injective, this forces x≠yx\neq yx=y; PPP is non-empty and compact. The order matters only formally (reversing φ\varphiφ shows "arc between x,yx,yx,y" is equivalent to "arc between y,xy,xy,x").

Linked in OOO. For O⊆R2O\subseteq\mathbb{R}^2O⊆R2 and points a,ba,ba,b: aaa and bbb are linked in OOO if either a=ba=ba=b (with no requirement that a∈Oa\in Oa∈O), or there is a set PPP that is an arc between aaa and bbb with P⊆OP\subseteq OP⊆O.

Regions. For O⊆R2O\subseteq\mathbb{R}^2O⊆R2, the regions of OOO form the set of subsets

regions⁡(O)={ Ra:a∈O },Ra={ b∈O:a and b are linked in O }.\operatorname{regions}(O)=\bigl\{\,R_a : a\in O\,\bigr\},\qquad R_a=\{\,b\in O : a \text{ and } b \text{ are linked in } O\,\}.regions(O)={Ra​:a∈O},Ra​={b∈O:a and b are linked in O}.

It is a set of sets, so base points giving the same RaR_aRa​ yield one element. No openness of OOO is required by the definition, and the definition itself does not assert that "linked in OOO" is an equivalence relation (for arbitrary OOO the sets RaR_aRa​ need not partition OOO). If O=∅O=\emptysetO=∅ there are no regions.

Human review
  • Endorsed by Shuze Chen · Nov 18, 2026

    Confirmed by the moderator at approval.

  • Endorsed by tiago duque marques · Nov 18, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me