Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 5.2 — an r-refining sequence of partitions with error value t gives twin-width at most rt

Proved
TwinWidthI.GridThm.lemma_5_2

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

contraction-sequenceerror-valuematrixp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1twin-width

Let MMM be an n×mn\times mn×m matrix over a finite alphabet and let (R0,C0),…,(RN,CN)(\mathcal R^0,\mathcal C^0),\dots,(\mathcal R^N,\mathcal C^N)(R0,C0),…,(RN,CN) be a sequence of partitions of MMM such that

  1. (R0,C0)(\mathcal R^0,\mathcal C^0)(R0,C0) is the finest partition;
  2. (RN,CN)(\mathcal R^N,\mathcal C^N)(RN,CN) is the coarsest partition;
  3. for every i<Ni<Ni<N, Ri\mathcal R^iRi rrr-refines Ri+1\mathcal R^{i+1}Ri+1 and Ci\mathcal C^iCi rrr-refines Ci+1\mathcal C^{i+1}Ci+1 (every part of the former lies in a part of the latter, and every part of the latter contains at most rrr parts of the former);
  4. every (Ri,Ci)(\mathcal R^i,\mathcal C^i)(Ri,Ci) has error value at most ttt.

Then

tww⁡(M)≤r t.\operatorname{tww}(M)\le r\,t.tww(M)≤rt.

The sequence need not perform one contraction at a time; the lemma converts such a coarse sequence into a genuine contraction sequence. It is the final step of the proof of Theorem 5.4.

Formalization Note The conclusion is MatTwinWidthLE M (r * t) in the partition form of twin-width. The sequence is indexed by Fin (N + 1).

Preamble
import Mathlib
import Definitions.Def_TwinWidthI_GridThm_Setting
Formal statement
namespace TwinWidthI.GridThm

/-- Lemma 5.2, p. 3:18: a sequence of partition pairs from the finest to the coarsest partition in
which each pair `r`-refines the next and every pair has error value at most `t` shows that `M`
has twin-width at most `r t`. -/
theorem lemma_5_2 {A : Type*} [Fintype A] {n m : ℕ} (M : Matrix (Fin n) (Fin m) A) (r t N : ℕ)
    (R : Fin (N + 1) → Finpartition (Finset.univ : Finset (Fin n)))
    (C : Fin (N + 1) → Finpartition (Finset.univ : Finset (Fin m)))
    (hR0 : R 0 = ⊥) (hC0 : C 0 = ⊥)
    (hRN : (R (Fin.last N)).parts.card ≤ 1) (hCN : (C (Fin.last N)).parts.card ≤ 1)
    (hrefR : ∀ i : Fin N, KRefines r (R i.castSucc) (R i.succ))
    (hrefC : ∀ i : Fin N, KRefines r (C i.castSucc) (C i.succ))
    (herr : ∀ i, ErrorLE M (R i) (C i) t) :
    MatTwinWidthLE M (r * t) := by sorry

end TwinWidthI.GridThm
Source
Bonnet, Kim, Thomassé and Watrigant, Twin-width I: Tractable FO Model Checking, J. ACM 69(1), Article 3 (2021), p. 3:18, Lemma 5.2
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