Twin-width I: Tractable FO Model Checking 1: Every Graph with Boolean-width k Has Twin-width at Most 2^(k+1) − 1Research Paper
Motivation
Twin-width was introduced by Bonnet, Kim, Thomassé and Watrigant (J. ACM 69(1), Article 3, 2021) as a graph parameter under which first-order model checking is fixed-parameter tractable when a contraction sequence is given. Its interest lies in the classes it covers at once: planar and, more generally, -minor-free graphs, bounded-degree grids, unit ball graphs of bounded clique number, and the classes of bounded rank-width or clique-width. These are the classical dense-graph width measures, for which FO (indeed MSO) model checking was already known to be tractable through Courcelle–Makowsky–Rotics.
This mission formalizes the link to the dense width measures, stated in the paper through boolean-width (Bui-Xuan, Telle and Vatshelle, Theor. Comput. Sci. 412(39), 2011). It is known that (Vatshelle's PhD thesis, Chapter 4), so a bound on twin-width in terms of boolean-width shows that bounded twin-width captures bounded rank-width, clique-width, module-width and boolean-width simultaneously.
Setting
Let be a finite simple graph on a vertex set .
Two vertex sets are homogeneous if either all pairs are edges or none is. For a partition of , a part has red degree equal to the number of other parts that are not homogeneous to ; is a -partition if every part has red degree at most . The graph has twin-width at most , written , if there are partitions of with the partition into singletons, having at most one part, each obtained from by merging two parts, and every a -partition. This is the paper's partition form (p. 3:32) of its definition through trigraphs and red edges (pp. 3:11–3:12).
A decomposition tree of is a rooted binary tree , every internal node having exactly two children, whose leaves are in one-to-one correspondence with . Each edge of lies above exactly one rooted subtree and induces a cut of : is the set of leaf labels of that subtree and . For disjoint write
the number of different neighbourhoods in of subsets of , the empty subset included. The boolean-width of the cut is , the boolean-width of is its maximum over the edges of , and is the minimum over all decomposition trees. In Lean, nbhdCount G A B is , and BoolWidthLE G N states that some decomposition tree has on every edge, so is BoolWidthLE G (2^k).
Formalization targets
Goal: Theorem 4.2 (p. 3:14)
Every graph with boolean-width has twin-width at most . With , the integer neighbourhood count,
Milestones (proof of Theorem 4.2, p. 3:14)
- A graph with at most vertices has .
- A rooted binary tree with more than leaves () has a rooted subtree below some edge with between and leaves.
- If and , two distinct vertices of have the same neighbourhood in .
- If partitions , , and have the same neighbourhood in , then contracting and yields a -partition.
Significance
The theorem places the classes of bounded boolean-width, and therefore of bounded clique-width and rank-width, inside the classes of bounded twin-width, with a single-exponential bound. Combined with the paper's model-checking algorithm, it recovers tractability of FO model checking on these classes once a contraction sequence is computed, and it situates twin-width as a common generalization of the dense width measures and of sparse classes such as -minor-free graphs.
No machine-checked version of twin-width or boolean-width is known to exist; neither notion is in Mathlib. The mission produces Lean definitions of twin-width in partition form, of decomposition trees and of the neighbourhood count behind boolean-width, together with the four combinatorial steps the paper's proof states explicitly. The definitions are shared, in identical form, with the other missions of this series on the same paper.
Difficulty
The first three milestones are elementary: a counting bound on contraction sequences, a walk down a binary tree, and a pigeonhole argument. The fourth is a direct count of non-homogeneous parts.
The difficulty is the iteration. After the first contraction the leaves of the updated tree are contracted vertices, so "the same neighbourhood in " must be read as homogeneity to all of for a set of vertices, and the boolean-width bound of the cuts must be re-established for sets rather than single vertices. The paper asserts the invariant that the contractions never create a red component of more than vertices without proving it. A complete proof of the goal therefore has to supply an invariant, carried through all contractions, that keeps every part's red degree below . The naive repetition of the first step does not by itself control red edges between previously contracted parts.
Formalization scope
Twin-width is the predicate TwinWidthLE G d, never a numerical infimum, so a junk value of an empty or unbounded infimum cannot make the goal trivial. A contraction sequence must merge exactly two parts at each step and start from singletons; it cannot jump to one part. Homogeneity counts all pairs between two parts, in both of its alternatives. Boolean-width is bounded on every edge of the decomposition tree, not only at the root, and the count runs over neighbourhoods of all subsets of , not only of single vertices. The bound depends only on , not on the graph.
Boolean-width is kept as the integer count ; since means that the least admissible count is , the Lean goal for this is exactly the printed theorem. Subtractions are in and exact where used. Graphs live on a Fintype vertex type with decidable equality and decidable adjacency. A graph on the empty vertex set has no decomposition tree; the goal is silent about it, and it has twin-width . No hypothesis is added to any statement relative to the page except in milestone 2, which the page has implicitly () and without which the conclusion is impossible.
The definitions needed are the setting module TwinWidthI.BoolWidth.Setting: merge steps, homogeneity, -partitions, twin-width, decomposition trees (DTree), the count and BoolWidthLE. Proofs of the milestones, a proof of the goal, and lemmas towards the iteration invariant are welcome.
Selected references
- É. Bonnet, E. J. Kim, S. Thomassé and R. Watrigant, Twin-width I: Tractable FO Model Checking, J. ACM 69(1), Article 3, 2021. https://doi.org/10.1145/3486655
- B.-M. Bui-Xuan, J. A. Telle and M. Vatshelle, Boolean-width of graphs, Theoretical Computer Science 412(39), 5187–5204, 2011. https://doi.org/10.1016/j.tcs.2011.05.022
- M. Vatshelle, New Width Parameters of Graphs, PhD thesis, University of Bergen, 2012 (reference [39] of Bonnet et al.; source of the chain boolw ≤ modw ≤ cw ≤ 2^{rw+1} − 1).