Euler's formula
Lax909950.EulerFormula · concepts/Lax909950/EulerFormula.lean · lax-909950
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
Let be a finite connected graph with a crossing-free straight-line drawing in the plane. The faces of the drawing are the connected components of the plane after removing all drawn points and edge segments. If the drawing has vertices, edges and faces, then
The formula is stated as in the extended natural numbers, so that it also asserts that the number of faces is finite.
Concept map
In the paper
- page 1 of this submission's paper
Lean source view on GitHub
| 1 | import Mathlib.Data.Set.Card |
| 2 | import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected |
| 3 | import Mathlib.Topology.Connected.Basic |
| 4 | import Mathlib.Topology.Instances.Real.Lemmas |
| 5 | import Lax68.StraightLineDrawings |
| 6 | |
| 7 | /-! |
| 8 | --- |
| 9 | title: Euler's formula |
| 10 | type: theorem |
| 11 | --- |
| 12 | Let be a finite connected graph with a crossing-free straight-line drawing |
| 13 | in the plane. The *faces* of the drawing are the connected components of the |
| 14 | plane after removing all drawn points and edge segments. If the drawing has |
| 15 | vertices, edges and faces, then |
| 16 | |
| 17 | |
| 18 | The formula is stated as in the extended natural numbers, so |
| 19 | that it also asserts that the number of faces is finite. |
| 20 | -/ |
| 21 | |
| 22 | set_option autoImplicit false |
| 23 | |
| 24 | namespace Lax909950.EulerFormula |
| 25 | |
| 26 | open Lax68.StraightLineDrawings |
| 27 | |
| 28 | /-- The points of the plane covered by a straight-line drawing: the points of |
| 29 | the vertices together with the segments of the edges. -/ |
| 30 | def image {V : Type*} {G : SimpleGraph V} (D : StraightLineDrawing G) : Set Point := |
| 31 | Set.range D.point ∪ ⋃ (a : V) (b : V) (_ : G.Adj a b), segment ℝ (D.point a) (D.point b) |
| 32 | |
| 33 | /-- The faces of a straight-line drawing: the connected components of the |
| 34 | complement of its image. -/ |
| 35 | def faces {V : Type*} {G : SimpleGraph V} (D : StraightLineDrawing G) : Set (Set Point) := |
| 36 | {F | ∃ x ∉ image D, F = connectedComponentIn (image D)ᶜ x} |
| 37 | |
| 38 | /-- Euler's formula: a crossing-free straight-line drawing of a finite connected |
| 39 | graph with vertices and edges has exactly faces, where |
| 40 | . -/ |
| 41 | axiom euler_formula {V : Type*} [Finite V] {G : SimpleGraph V} |
| 42 | (hG : G.Connected) (D : StraightLineDrawing G) : |
| 43 | (Nat.card V : ℕ∞) + (faces D).encard = G.edgeSet.encard + 2 |
| 44 | |
| 45 | end Lax909950.EulerFormula |
| 46 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments