Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 6.2 (i) — the weighting that makes two stable sets the only maximizers

Proved
ChvatalPolytopes.Neighbors.symmDiff_tree_certificate

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

graph-theoryp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1polyhedral-combinatoricsstable-set-polytope

Let G=(V,E)G=(V,E)G=(V,E) be a finite graph, Y,ZY,ZY,Z stable sets of GGG with incidence vectors y,zy,zy,z, and D=(Y−Z)∪(Z−Y)D=(Y-Z)\cup(Z-Y)D=(Y−Z)∪(Z−Y). Suppose the subgraph HHH of GGG induced by DDD is connected, and let TTT be a spanning tree of HHH. Let cu′c'_ucu′​ (u∈Du\in Du∈D) and mmm be nonnegative integers as specified by Lemma 6.1 for TTT with the bicoloration D=(Y−Z)∪(Z−Y)D=(Y-Z)\cup(Z-Y)D=(Y−Z)∪(Z−Y): ∑u∈Dcu′xu≤m\sum_{u\in D}c'_ux_u\le m∑u∈D​cu′​xu​≤m for every x∈S(T)x\in S(T)x∈S(T), with equality exactly for the incidence vectors of Y−ZY-ZY−Z and of Z−YZ-YZ−Y. Define c∈ZVc\in\mathbb Z^Vc∈ZV by

cu={cu′u∈D,1u∈Y∩Z,−1u∉Y∪Z.c_u=\begin{cases}c'_u & u\in D,\\ 1 & u\in Y\cap Z,\\ -1 & u\notin Y\cup Z.\end{cases}cu​=⎩⎨⎧​cu′​1−1​u∈D,u∈Y∩Z,u∈/Y∪Z.​

Then

∑u∈Vcuxu≤m+∣Y∩Z∣for all x∈S(G),\sum_{u\in V}c_ux_u\le m+|Y\cap Z|\qquad\text{for all } x\in S(G),u∈V∑​cu​xu​≤m+∣Y∩Z∣for all x∈S(G),

with equality if and only if x=yx=yx=y or x=zx=zx=z.

This is the certificate of the "if" part of Theorem 6.2: it exhibits the integer vector ccc for which yyy and zzz are the only maximizers over S(G)S(G)S(G).

Formalization Note The spanning tree TTT is a SimpleGraph on the subtype of DDD with T≤HT\le HT≤H (so it has all vertices of HHH) and T.IsTree. The hypothesis on c′c'c′ and mmm is the conclusion of Lemma 6.1 for TTT, B=Y−ZB=Y-ZB=Y−Z, R=Z−YR=Z-YR=Z−Y, written out. The connectedness of HHH is kept as a hypothesis, as in the text, although it follows from the existence of TTT.

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

/-- **The certificate of the "if" part of Theorem 6.2** (Chvátal 1975, p. 149, proof of
Theorem 6.2, (i)). Let `Y, Z` be stable sets of `G` with incidence vectors `y, z`, and let
`D = (Y − Z) ∪ (Z − Y)`. Suppose the subgraph `H` of `G` induced by `D` is connected, and let
`T` be a spanning tree of `H`. Let `c'_u` (`u ∈ D`) and `m` be as specified by Lemma 6.1 for `T`
with the bicoloration `D = (Y − Z) ∪ (Z − Y)`. Let `c_u = c'_u` for `u ∈ D`, `c_u = 1` if
`u ∈ Y ∩ Z` and `c_u = −1` if `u ∉ Y ∪ Z`. Then `Σ (c_u x_u : u ∈ V) ≤ m + |Y ∩ Z|` for all
`x ∈ S(G)`, with equality if and only if `x = y` or `x = z`. -/
theorem symmDiff_tree_certificate {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) (Y Z : Finset V)
    (hY : G.IsIndepSet (Y : Set V)) (hZ : G.IsIndepSet (Z : Set V))
    (hH : (G.induce (((Y \ Z) ∪ (Z \ Y) : Finset V) : Set V)).Connected)
    (T : SimpleGraph (((Y \ Z) ∪ (Z \ Y) : Finset V) : Set V))
    (hTsub : T ≤ G.induce (((Y \ Z) ∪ (Z \ Y) : Finset V) : Set V)) (hT : T.IsTree)
    (c' : (((Y \ Z) ∪ (Z \ Y) : Finset V) : Set V) → ℕ) (m : ℕ)
    (hc' : ∀ x ∈ stableVectors T,
      (∑ u, (c' u : ℝ) * x u ≤ (m : ℝ)) ∧
      (∑ u, (c' u : ℝ) * x u = (m : ℝ) ↔
        x = incidenceVector (Finset.univ.filter fun u : (((Y \ Z) ∪ (Z \ Y) : Finset V) : Set V) => u.1 ∈ Y \ Z) ∨
        x = incidenceVector (Finset.univ.filter fun u : (((Y \ Z) ∪ (Z \ Y) : Finset V) : Set V) => u.1 ∈ Z \ Y))) :
    let c : V → ℤ := fun u =>
      if h : u ∈ (Y \ Z) ∪ (Z \ Y) then (c' ⟨u, by simpa using h⟩ : ℤ)
      else if u ∈ Y ∩ Z then 1 else -1
    ∀ x ∈ stableVectors G,
      (∑ u, (c u : ℝ) * x u ≤ (m : ℝ) + ((Y ∩ Z).card : ℝ)) ∧
      (∑ u, (c u : ℝ) * x u = (m : ℝ) + ((Y ∩ Z).card : ℝ) ↔
        x = incidenceVector Y ∨ x = incidenceVector Z) := by sorry

end ChvatalPolytopes.Neighbors
Source
Chvátal, On certain polytopes associated with graphs, J. Combin. Theory Ser. B 18 (1975), p. 149, §6, proof of Theorem 6.2, (i)
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, and let GGG be a simple graph on VVV. Let Y,Z⊆VY, Z \subseteq VY,Z⊆V be finite sets that are both independent in GGG.

Write DDD for the symmetric difference of YYY and ZZZ:

D=(Y∖Z)∪(Z∖Y).D = (Y \setminus Z) \cup (Z \setminus Y).D=(Y∖Z)∪(Z∖Y).

Hypotheses.

  • Connected induced subgraph. The subgraph H=G[D]H = G[D]H=G[D] of GGG induced on DDD is connected. It is a graph whose vertex type is DDD itself, and connectedness includes D≠∅D \neq \emptysetD=∅.
  • Spanning tree. TTT is a graph on the vertex set DDD that is a subgraph of HHH (every edge of TTT is an edge of HHH) and is a tree.
  • Tree inequality. c′=(cu′)u∈Dc' = (c'_u)_{u \in D}c′=(cu′​)u∈D​ are nonnegative integers and mmm is a nonnegative integer. Every x∈S(T)⊆RDx \in S(T) \subseteq \mathbb{R}^Dx∈S(T)⊆RD satisfies both
∑u∈Dcu′ xu≤m\sum_{u \in D} c'_u\, x_u \le mu∈D∑​cu′​xu​≤m

and

∑u∈Dcu′ xu=m  ⟺  (x=1Y∖ZD  or  x=1Z∖YD).\sum_{u \in D} c'_u\, x_u = m \iff \bigl(x = \mathbf{1}^D_{Y \setminus Z} \ \text{ or } \ x = \mathbf{1}^D_{Z \setminus Y}\bigr).u∈D∑​cu′​xu​=m⟺(x=1Y∖ZD​  or  x=1Z∖YD​).

Here S(T)S(T)S(T) is the set of incidence vectors, indexed by DDD, of independent sets of the tree TTT. 1AD\mathbf{1}^D_A1AD​ is the vector on DDD that is 111 on AAA and 000 elsewhere. c′c'c′ and mmm are arbitrary data assumed to satisfy this property; they are not constructed in the statement.

Conclusion. Define an integer vector c∈ZVc \in \mathbb{Z}^Vc∈ZV by

cu={cu′u∈D,1u∈Y∩Z,−1u∉Y∪Z.c_u = \begin{cases} c'_u & u \in D,\\ 1 & u \in Y \cap Z,\\ -1 & u \notin Y \cup Z.\end{cases}cu​=⎩⎨⎧​cu′​1−1​u∈D,u∈Y∩Z,u∈/Y∪Z.​

Then every x∈S(G)x \in S(G)x∈S(G) satisfies both

∑u∈Vcu xu≤m+∣Y∩Z∣\sum_{u \in V} c_u\, x_u \le m + |Y \cap Z|u∈V∑​cu​xu​≤m+∣Y∩Z∣

and

∑u∈Vcu xu=m+∣Y∩Z∣  ⟺  (x=1Y  or  x=1Z).\sum_{u \in V} c_u\, x_u = m + |Y \cap Z| \iff \bigl(x = \mathbf{1}_Y \ \text{ or } \ x = \mathbf{1}_Z\bigr).u∈V∑​cu​xu​=m+∣Y∩Z∣⟺(x=1Y​  or  x=1Z​).

Here S(G)⊆RVS(G) \subseteq \mathbb{R}^VS(G)⊆RV is the set of incidence vectors of independent sets of GGG, and 1Y,1Z∈RV\mathbf{1}_Y, \mathbf{1}_Z \in \mathbb{R}^V1Y​,1Z​∈RV are the incidence vectors of YYY and ZZZ.

Degenerate cases:

  • Y=ZY = ZY=Z. Then D=∅D = \emptysetD=∅. A graph on an empty vertex set is not connected, so the connectedness hypothesis fails and the theorem asserts nothing. The statement has content only when Y≠ZY \neq ZY=Z and G[D]G[D]G[D] is connected. If G[D]G[D]G[D] is disconnected, the theorem is again vacuous.
  • Empty vertex type. VVV is necessarily nonempty whenever the hypotheses hold, because DDD is nonempty.
  • Empty intersection. If Y∩Z=∅Y \cap Z = \emptysetY∩Z=∅, the bound is just mmm, and no coordinate of ccc equals +1+1+1 by the middle case.
  • Y∪Z=VY \cup Z = VY∪Z=V. Then no coordinate of ccc equals −1-1−1 by the last case.
  • DDD is a single vertex. Here TTT has no edges, and one of Y∖ZY \setminus ZY∖Z, Z∖YZ \setminus YZ∖Y is that vertex while the other is empty. The tree hypothesis then forces m=0m = 0m=0 and c′c'c′ equal to 000 at that vertex.
  • No junk values. The statement contains no division, natural-number subtraction, or other operation that returns a default value. The −1-1−1 coefficients are genuine integers.
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