Bipartite graphs
Lax881656.Bipartite · concepts/Lax881656/Bipartite.lean · lax-881656
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
A simple graph is bipartite when its vertices admit a proper coloring with two colors: adjacent vertices always receive different colors.
Concept map
Lean source view on GitHub
| 1 | import Mathlib.Combinatorics.SimpleGraph.Bipartite |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Bipartite graphs |
| 6 | type: definition |
| 7 | --- |
| 8 | A simple graph is bipartite when its vertices admit a proper coloring with two |
| 9 | colors: adjacent vertices always receive different colors. |
| 10 | |
| 11 | # Formalization notes |
| 12 | |
| 13 | The predicate is stated through the canonical graph-coloring interface. For a |
| 14 | simple graph this is equivalent to a partition of the vertices into two |
| 15 | independent sets, including in the presence of isolated vertices. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | namespace Lax881656.Bipartite |
| 21 | |
| 22 | /-- A simple graph is bipartite when it is properly colorable with two colors. -/ |
| 23 | def IsBipartite {V : Type*} (G : SimpleGraph V) : Prop := |
| 24 | G.Colorable 2 |
| 25 | |
| 26 | end Lax881656.Bipartite |
| 27 |
Formalization notes
The predicate is stated through the canonical graph-coloring interface. For a simple graph this is equivalent to a partition of the vertices into two independent sets, including in the presence of isolated vertices.
Builds on
none
Used by
From Mathlib
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments