Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 6.5 (corrected) — the enhancements B*_j avoid the paths A′_i, except the last ones

Proved
TwinWidthI.MinorFree.lemma_6_5

by mikedeng1 · Oct 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

depth-first-searchgraph-minorp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1twin-width

Let (v1,…,vn;T)(v_1,\dots,v_n;\mathcal T)(v1​,…,vn​;T) be a depth-first search of a finite graph GGG and let k≥0k\ge0k≥0. Let ai,ja_{i,j}ai,j​, bi,jb_{i,j}bi,j​ (i,j∈[k]i,j\in[k]i,j∈[k]) be vertices and B1,…,BkB_1,\dots,B_kB1​,…,Bk​ vertex sets such that:

  1. ai,jbi,ja_{i,j}b_{i,j}ai,j​bi,j​ is an edge of GGG, and bi,j∈Bjb_{i,j}\in B_jbi,j​∈Bj​;
  2. ai,j≺ai′,j′a_{i,j}\prec a_{i',j'}ai,j​≺ai′,j′​ whenever i<i′i<i'i<i′;
  3. each BjB_jBj​ is consecutive in the discovery order, and BjB_jBj​ entirely precedes Bj′B_{j'}Bj′​ when j<j′j<j'j<j′;
  4. every vertex of every Bj′B_{j'}Bj′​ comes after every ai,ja_{i,j}ai,j​.

Let Ai′A'_iAi′​ be the vertex set of the minimal subtree of T\mathcal TT containing {ai,j:j∈[k]}\{a_{i,j}:j\in[k]\}{ai,j​:j∈[k]}, and Bj∗B^*_jBj∗​ that of the minimal subtree containing BjB_jBj​ (the enhancement of BjB_jBj​). Then

Bj∗∩Ai′=∅for all i∈[k−1], j∈[k−1].B^*_j\cap A'_i=\emptyset\qquad\text{for all } i\in[k-1],\ j\in[k-1].Bj∗​∩Ai′​=∅for all i∈[k−1], j∈[k−1].

In the proof of Theorem 6.3 (k=g(t)/2k=g(t)/2k=g(t)/2) this lets each enhancement be contracted without destroying the paths Ai′A'_iAi′​.

Formalization Note The paper states the lemma for every j∈[g(t)/2]j\in[g(t)/2]j∈[g(t)/2]. For the last block it can fail: the proof's claim that every BjB_jBj​ lies in the subtree T[u]\mathcal T[u]T[u], uuu the first vertex of Ag(t)/2′A'_{g(t)/2}Ag(t)/2′​, holds for the blocks before Bg(t)/2B_{g(t)/2}Bg(t)/2​ (they are discovered between uuu and bg(t)/2,g(t)/2∈T[u]b_{g(t)/2,g(t)/2}\in\mathcal T[u]bg(t)/2,g(t)/2​∈T[u]) but not for vertices of Bg(t)/2B_{g(t)/2}Bg(t)/2​ discovered after T[u]\mathcal T[u]T[u] is exhausted. A five-vertex DFS (which is also a Lex-DFS) satisfying all hypotheses with B2∗∩A1′≠∅B^*_2\cap A'_1\neq\emptysetB2∗​∩A1′​=∅ for k=2k=2k=2 is checked in Lean in the sanity file. The statement therefore excludes the last block as well as the last Ai′A'_iAi′​; the rest of the proof of Theorem 6.3 has room to discard one more block.

Preamble
import Mathlib
import Definitions.Def_TwinWidthI_MinorFree_LexDFS
Formal statement
namespace TwinWidthI.MinorFree

/-- Lemma 6.5, p. 3:27, corrected. Context of Lemma 6.4 (a DFS, vertices `a i j` with neighbours
`b i j`, the `a i j` increasing in `i` and preceding every `b i' j'`), together with the blocks
`B j ∋ b i j`: each `B j` is consecutive in the discovery order, `B j` entirely precedes `B j'`
for `j < j'`, and every vertex of every `B j` is discovered after every `a i j`. Let
`A'_i = MinSubtree par {a i j | j}` and `B*_j = MinSubtree par (B j)`. Then `B*_j ∩ A'_i = ∅`
for every `i` and every `j` except the last ones (`i, j < k - 1`).

The page states it for every `j ∈ [g(t)/2]`; for the last block `B_{g(t)/2}` it can fail (its
vertices after `b_{g(t)/2, g(t)/2}` need not be in the subtree `𝒯[u]` the proof uses), so the
last block is excluded, like the last `A'_i`. -/
theorem lemma_6_5 {V : Type} [Fintype V] [DecidableEq V] (G : SimpleGraph V) {n : ℕ}
    (σ : V ≃ Fin n) (par : V → V) (hdfs : IsDFSOrder G σ par) {k : ℕ}
    (a b : Fin k → Fin k → V) (B : Fin k → Set V)
    (hab : ∀ i j, G.Adj (a i j) (b i j))
    (ha : ∀ i j i' j', i < i' → σ (a i j) < σ (a i' j'))
    (hbB : ∀ i j, b i j ∈ B j)
    (hBcons : ∀ j x y z, x ∈ B j → z ∈ B j → σ x ≤ σ y → σ y ≤ σ z → y ∈ B j)
    (hBord : ∀ j j' x y, j < j' → x ∈ B j → y ∈ B j' → σ x < σ y)
    (hAB : ∀ i j j' x, x ∈ B j' → σ (a i j) < σ x) :
    ∀ i j : Fin k, (i : ℕ) + 1 < k → (j : ℕ) + 1 < k →
      Disjoint (MinSubtree par (B j)) (MinSubtree par (Set.range (a i))) := by sorry

end TwinWidthI.MinorFree
Source
Bonnet, Kim, Thomassé and Watrigant, Twin-width I: Tractable FO Model Checking, J. ACM 69(1), Article 3 (2021), p. 3:27, Lemma 6.5 and the definition of B∗_j before it (context p. 3:26)
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 8, 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