Cubic graphs
Lax881656.Cubic · concepts/Lax881656/Cubic.lean · lax-881656
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
A finite simple graph is cubic, or 3-regular, when every vertex has exactly three neighbors.
Concept map
Lean source view on GitHub
| 1 | import Mathlib.Combinatorics.SimpleGraph.Finite |
| 2 | import Mathlib.Data.Set.Card |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Cubic graphs |
| 7 | type: definition |
| 8 | --- |
| 9 | A finite simple graph is cubic, or 3-regular, when every vertex has exactly |
| 10 | three neighbors. |
| 11 | |
| 12 | # Formalization notes |
| 13 | |
| 14 | The degree of a vertex is expressed as the cardinality of its neighbor set. |
| 15 | The ambient vertex type is finite, so these cardinalities are ordinary natural |
| 16 | numbers. No regularity data is carried beyond the pointwise condition. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | |
| 21 | namespace Lax881656.Cubic |
| 22 | |
| 23 | /-- A finite simple graph is cubic when every vertex has degree three. -/ |
| 24 | def IsCubic {V : Type*} [Fintype V] (G : SimpleGraph V) : Prop := |
| 25 | ∀ v : V, (G.neighborSet v).ncard = 3 |
| 26 | |
| 27 | end Lax881656.Cubic |
| 28 |
Formalization notes
The degree of a vertex is expressed as the cardinality of its neighbor set. The ambient vertex type is finite, so these cardinalities are ordinary natural numbers. No regularity data is carried beyond the pointwise condition.
Builds on
none
Used by
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments