Lax68.StraightLineDrawings
Straight-line graph drawings
concepts/Lax68/StraightLineDrawings.lean · lax-68
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
Definition
A straight-line drawing assigns distinct points of the real plane to the vertices of a simple graph and draws every edge as the segment between its endpoints. No vertex lies inside an edge and disjoint edges do not meet. This is the geometric drawing certificate used by the planar-graph concept.
Lean source view on GitHub
| 1 | import Mathlib.Analysis.Convex.Segment |
| 2 | import Mathlib.Combinatorics.SimpleGraph.Basic |
| 3 | import Mathlib.Data.Real.Basic |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Straight-line graph drawings |
| 8 | type: definition |
| 9 | --- |
| 10 | A straight-line drawing assigns distinct points of the real plane to the |
| 11 | vertices of a simple graph and draws every edge as the segment between its |
| 12 | endpoints. No vertex lies inside an edge and disjoint edges do not meet. |
| 13 | This is the geometric drawing certificate used by the planar-graph concept. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | namespace Lax68.StraightLineDrawings |
| 19 | |
| 20 | abbrev Point := ℝ × ℝ |
| 21 | |
| 22 | structure StraightLineDrawing {V : Type*} (G : SimpleGraph V) where |
| 23 | point : V → Point |
| 24 | injective : Function.Injective point |
| 25 | noVertexOnEdge : |
| 26 | ∀ {a b c : V}, |
| 27 | G.Adj a b → |
| 28 | c ≠ a → |
| 29 | c ≠ b → |
| 30 | point c ∉ segment ℝ (point a) (point b) |
| 31 | disjointEdges : |
| 32 | ∀ {a b c d : V}, |
| 33 | G.Adj a b → |
| 34 | G.Adj c d → |
| 35 | Disjoint ({a, b} : Set V) ({c, d} : Set V) → |
| 36 | Disjoint |
| 37 | (segment ℝ (point a) (point b)) |
| 38 | (segment ℝ (point c) (point d)) |
| 39 | |
| 40 | def HasStraightLineDrawing {V : Type*} (G : SimpleGraph V) : Prop := |
| 41 | Nonempty (StraightLineDrawing G) |
| 42 | |
| 43 | end Lax68.StraightLineDrawings |
| 44 |
Community review
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.
0 comments