Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Dirac: a series-parallel network has two vertices of degree at most two

Proved
ChvatalPolytopes.SeriesParallel.dirac_two_vertices_degree_le_two

by mikedeng1 · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

graph-theoryp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1series-parallel

Let G=(V,E)G=(V,E)G=(V,E) be a series-parallel network, i.e. a finite graph containing no homeomorph of K4K_4K4​, with at least two vertices. Then there are two distinct vertices a≠ba\ne ba=b with

d(a)≤2andd(b)≤2.d(a)\le 2\qquad\text{and}\qquad d(b)\le 2 .d(a)≤2andd(b)≤2.

This result of Dirac is what lets the proof of Theorem 7.1 pick a vertex of degree at most two and reduce the graph.

Formalization Note The hypothesis ∣V∣≥2|V|\ge2∣V∣≥2 is made explicit: as printed ("every series-parallel network includes at least two vertices of degree at most two") the statement fails for the one-vertex graph and the empty graph. Degrees are Mathlib's SimpleGraph.degree.

Preamble
import Mathlib
import Definitions.Def_ChvatalPolytopes_SeriesParallel_IsSeriesParallel
Formal statement
namespace ChvatalPolytopes.SeriesParallel

/-- Dirac's theorem (cited in Chvátal 1975, p. 150, as [6, Satz 5]): every series-parallel network
includes at least two vertices of degree at most two.

The hypothesis `2 ≤ |V|` is made explicit: as printed the statement fails for the graph with one
vertex (and for the empty graph), which has fewer than two vertices at all. -/
theorem dirac_two_vertices_degree_le_two {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (hG : IsSeriesParallel G)
    (hV : 2 ≤ Fintype.card V) :
    ∃ a b : V, a ≠ b ∧ G.degree a ≤ 2 ∧ G.degree b ≤ 2 := by sorry

end ChvatalPolytopes.SeriesParallel
Source
Chvátal, On certain polytopes associated with graphs, J. Combin. Theory Ser. B 18 (1975), p. 150, §7 (Dirac [6, Satz 5])
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Let VVV be a finite vertex set and GGG a simple graph on VVV.

The hypotheses are:

  1. GGG is series-parallel. This means there are no four distinct vertices b0,…,b3b_0,\dots,b_3b0​,…,b3​ together with paths pijp_{ij}pij​ in GGG from bib_ibi​ to bjb_jbj​, for all six pairs i<ji<ji<j, such that:

    • each pijp_{ij}pij​ repeats no vertex;
    • each pijp_{ij}pij​ contains no bkb_kbk​ other than bib_ibi​ and bjb_jbj​;
    • two paths for different pairs have only branch vertices bkb_kbk​ in common.

    Walks pijp_{ij}pij​ for i≥ji \ge ji≥j are also formally required to exist but face no conditions. The six paths need not form an induced subgraph, and a copy of K4K_4K4​ itself counts as such a structure.

  2. ∣V∣≥2|V| \ge 2∣V∣≥2.

The conclusion is that there exist two distinct vertices a≠ba \ne ba=b with

deg⁡G(a)≤2anddeg⁡G(b)≤2.\deg_G(a) \le 2 \quad\text{and}\quad \deg_G(b) \le 2 .degG​(a)≤2anddegG​(b)≤2.

Here deg⁡G\deg_GdegG​ is the number of neighbours in GGG.

Degenerate cases. Graphs with ∣V∣≤1|V| \le 1∣V∣≤1 are excluded by hypothesis. When ∣V∣∈{2,3}|V| \in \{2, 3\}∣V∣∈{2,3}, every graph is automatically series-parallel, because four distinct vertices do not exist. Every vertex then has degree at most ∣V∣−1≤2|V|-1 \le 2∣V∣−1≤2, so the conclusion holds for any pair of distinct vertices. Infinite vertex sets are not covered.

Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me