Straight-line graph drawings
Lax68.StraightLineDrawings · concepts/Lax68/StraightLineDrawings.lean · lax-68
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
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.
Concept map
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 | |
| 11 |  |
| 12 | |
| 13 | A straight-line drawing assigns distinct points of the real plane to the |
| 14 | vertices of a simple graph and draws every edge as the segment between its |
| 15 | endpoints. No vertex lies inside an edge and disjoint edges do not meet. |
| 16 | This is the geometric drawing certificate used by the planar-graph concept. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | |
| 21 | namespace Lax68.StraightLineDrawings |
| 22 | |
| 23 | abbrev Point := ℝ × ℝ |
| 24 | |
| 25 | structure StraightLineDrawing {V : Type*} (G : SimpleGraph V) where |
| 26 | point : V → Point |
| 27 | injective : Function.Injective point |
| 28 | noVertexOnEdge : |
| 29 | ∀ {a b c : V}, |
| 30 | G.Adj a b → |
| 31 | c ≠ a → |
| 32 | c ≠ b → |
| 33 | point c ∉ segment ℝ (point a) (point b) |
| 34 | disjointEdges : |
| 35 | ∀ {a b c d : V}, |
| 36 | G.Adj a b → |
| 37 | G.Adj c d → |
| 38 | Disjoint ({a, b} : Set V) ({c, d} : Set V) → |
| 39 | Disjoint |
| 40 | (segment ℝ (point a) (point b)) |
| 41 | (segment ℝ (point c) (point d)) |
| 42 | |
| 43 | def HasStraightLineDrawing {V : Type*} (G : SimpleGraph V) : Prop := |
| 44 | Nonempty (StraightLineDrawing G) |
| 45 | |
| 46 | end Lax68.StraightLineDrawings |
| 47 |
Builds on
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments