Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 6.1 — a tree's two colour classes are the only maximizers of a nonnegative integer weighting

Proved
ChvatalPolytopes.Neighbors.tree_bicoloration_inequality

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

graph-theoryp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1stable-set-polytopetrees

Let T=(V,E)T=(V,E)T=(V,E) be a tree with a bicoloration V=B∪RV=B\cup RV=B∪R, and let S(T)S(T)S(T) be the set of incidence vectors of the stable sets of TTT. Then there are nonnegative integers cuc_ucu​ (u∈Vu\in Vu∈V) and mmm such that

∑u∈Vcuxu≤mfor all x=(xu:u∈V)∈S(T),\sum_{u\in V}c_ux_u\le m\qquad\text{for all } x=(x_u:u\in V)\in S(T),u∈V∑​cu​xu​≤mfor all x=(xu​:u∈V)∈S(T),

with equality if and only if xxx is the incidence vector of BBB or the incidence vector of RRR:

xu={1u∈B0u∈Rorxu={1u∈R0u∈B.x_u=\begin{cases}1 & u\in B\\ 0 & u\in R\end{cases}\qquad\text{or}\qquad x_u=\begin{cases}1 & u\in R\\ 0 & u\in B.\end{cases}xu​={10​u∈Bu∈R​orxu​={10​u∈Ru∈B.​

The lemma supplies, for a spanning tree of the symmetric difference of two stable sets, the weights that make exactly those two stable sets optimal; it is the key step of the "if" part of Theorem 6.2.

Formalization Note The tree is Mathlib's SimpleGraph.IsTree on a finite type, which includes connectedness and hence a nonempty vertex set. The integers cuc_ucu​ and mmm are natural numbers, cast to R\mathbb RR.

Preamble
import Mathlib
import Definitions.Def_ChvatalPolytopes_Neighbors_StablePolytope
import Definitions.Def_ChvatalPolytopes_Neighbors_IsBicoloration
Formal statement
namespace ChvatalPolytopes.Neighbors

/-- **Lemma 6.1** (Chvátal 1975, p. 149). Let `T = (V, E)` be a tree with a bicoloration
`V = B ∪ R`. Then there are nonnegative integers `c_u` (`u ∈ V`) and `m` such that
`Σ (c_u x_u : u ∈ V) ≤ m` for all `(x_u : u ∈ V) ∈ S(T)`, with equality if and only if `x` is
the incidence vector of `B` or the incidence vector of `R`. -/
theorem tree_bicoloration_inequality {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) (hT : T.IsTree) (B R : Finset V) (hBR : IsBicoloration T B R) :
    ∃ (c : V → ℕ) (m : ℕ), ∀ x ∈ stableVectors T,
      (∑ u, (c u : ℝ) * x u ≤ (m : ℝ)) ∧
      (∑ u, (c u : ℝ) * x u = (m : ℝ) ↔ x = incidenceVector B ∨ x = incidenceVector R) := by sorry

end ChvatalPolytopes.Neighbors
Source
Chvátal, On certain polytopes associated with graphs, J. Combin. Theory Ser. B 18 (1975), p. 149, Lemma 6.1
Read-back

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

Setting. Let VVV be a finite type with decidable equality. Let TTT be a simple graph on VVV that is a tree: connected and without cycles. In this formal notion of connectedness, the vertex type is required to be nonempty. Let B,R⊆VB, R \subseteq VB,R⊆V be finite sets forming a bicoloration of TTT, meaning:

  • B∩R=∅B \cap R = \emptysetB∩R=∅ and B∪R=VB \cup R = VB∪R=V;
  • every edge of TTT has one endpoint in BBB and the other in RRR.

Claim. There exist nonnegative integers cuc_ucu​ for u∈Vu \in Vu∈V and a nonnegative integer mmm such that every x∈S(T)x \in S(T)x∈S(T) satisfies both

∑u∈Vcu xu≤m\sum_{u \in V} c_u\, x_u \le mu∈V∑​cu​xu​≤m

and

∑u∈Vcu xu=m  ⟺  (x=1B  or  x=1R).\sum_{u \in V} c_u\, x_u = m \iff \bigl(x = \mathbf{1}_B \ \text{ or } \ x = \mathbf{1}_R\bigr).u∈V∑​cu​xu​=m⟺(x=1B​  or  x=1R​).

Here S(T)S(T)S(T) is the set of incidence vectors 1s∈RV\mathbf{1}_s \in \mathbb{R}^V1s​∈RV of independent sets sss of TTT, where (1s)u=1(\mathbf{1}_s)_u = 1(1s​)u​=1 if u∈su \in su∈s and 000 otherwise. The inequality and the equivalence are asserted only for vectors in S(T)S(T)S(T). The theorem does not separately assert that 1B\mathbf{1}_B1B​ and 1R\mathbf{1}_R1R​ belong to S(T)S(T)S(T). It does assert that any member of S(T)S(T)S(T) equal to one of them attains equality.

Degenerate cases:

  • Empty vertex type. VVV cannot be empty, because a tree is required to be connected and hence nonempty.
  • Single vertex. If VVV is a single vertex vvv, then TTT has no edges. One of B,RB, RB,R is {v}\{v\}{v} and the other is ∅\emptyset∅. S(T)S(T)S(T) consists of the zero vector and 1{v}\mathbf{1}_{\{v\}}1{v}​, and both are among 1B,1R\mathbf{1}_B, \mathbf{1}_R1B​,1R​. So the claim requires both to attain equality, that is, 0=m0 = m0=m and cv=mc_v = mcv​=m. This forces m=0m = 0m=0 and cv=0c_v = 0cv​=0.
  • Two or more vertices. When VVV has at least two vertices, the tree has an edge, so both BBB and RRR are nonempty.
  • No division or subtraction. The statement uses neither, so no junk values arise.
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