definition
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
Definition
A finite two-terminal series-parallel graph is built from a single terminal edge by series and parallel composition. The side conditions say that the composed graphs meet only at the intended terminals, and the final support condition excludes unused isolated vertices.
Lean source view on GitHub
| 1 | import Mathlib.Combinatorics.SimpleGraph.Basic |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Series-parallel graphs |
| 6 | type: definition |
| 7 | --- |
| 8 | A finite two-terminal series-parallel graph is built from a single terminal |
| 9 | edge by series and parallel composition. The side conditions say that the |
| 10 | composed graphs meet only at the intended terminals, and the final support |
| 11 | condition excludes unused isolated vertices. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | namespace Lax68.SeriesParallel |
| 17 | |
| 18 | def edgeGraph {V : Type*} (s t : V) : SimpleGraph V := |
| 19 | SimpleGraph.fromRel fun u v => |
| 20 | (u = s ∧ v = t) ∨ |
| 21 | (u = t ∧ v = s) |
| 22 | |
| 23 | inductive TwoTerminal {V : Type*} : SimpleGraph V → V → V → Prop |
| 24 | | edge (s t : V) (hne : s ≠ t) : |
| 25 | TwoTerminal (edgeGraph s t) s t |
| 26 | | series |
| 27 | {G H : SimpleGraph V} |
| 28 | {s m t : V} |
| 29 | (left : TwoTerminal G s m) |
| 30 | (right : TwoTerminal H m t) |
| 31 | (meet : |
| 32 | ∀ v, |
| 33 | v ∈ G.support → |
| 34 | v ∈ H.support → |
| 35 | v = m) : |
| 36 | TwoTerminal (G ⊔ H) s t |
| 37 | | parallel |
| 38 | {G H : SimpleGraph V} |
| 39 | {s t : V} |
| 40 | (left : TwoTerminal G s t) |
| 41 | (right : TwoTerminal H s t) |
| 42 | (meet : |
| 43 | ∀ v, |
| 44 | v ∈ G.support → |
| 45 | v ∈ H.support → |
| 46 | v = s ∨ v = t) : |
| 47 | TwoTerminal (G ⊔ H) s t |
| 48 | |
| 49 | def IsSeriesParallel {V : Type*} (G : SimpleGraph V) : Prop := |
| 50 | ∃ s t, |
| 51 | TwoTerminal G s t ∧ |
| 52 | G.support = Set.univ |
| 53 | |
| 54 | end Lax68.SeriesParallel |
| 55 |
Builds on
none
From Mathlib
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