Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 5.4, p. 3:22 — at most α^{t′+1} row types of R_i outside its mixed zones

Proved
TwinWidthI.GridThm.row_types_le

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

matrixmixed-valuep2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1twin-width

Let MMM be an n×mn\times mn×m matrix over an alphabet AAA of size α\alphaα, with m≥1m\ge1m≥1. Let (R,C)(\mathcal R,\mathcal C)(R,C) be a division of MMM with mixed value at most t′t't′, and let Ri∈RR_i\in\mathcal RRi​∈R. Restrict every row of RiR_iRi​ to the columns that lie in column parts CjC_jCj​ for which the zone Ri∩CjR_i\cap C_jRi​∩Cj​ is not mixed. Then the number of distinct restricted rows is at most αt′+1\alpha^{t'+1}αt′+1:

#{ (ma,j)j∈J : a∈Ri } ≤ αt′+1,J=⋃{Cj∈C: Ri∩Cj not mixed}.\#\bigl\{\,(m_{a,j})_{j\in J}\ :\ a\in R_i\,\bigr\}\ \le\ \alpha^{t'+1},\qquad J=\bigcup\{C_j\in\mathcal C:\ R_i\cap C_j\text{ not mixed}\}.#{(ma,j​)j∈J​ : a∈Ri​} ≤ αt′+1,J=⋃{Cj​∈C: Ri​∩Cj​ not mixed}.

This count is the step of the proof of Theorem 5.4 that makes the refined partition (R′s,C′s)(\mathcal R'^s,\mathcal C'^s)(R′s,C′s) an αt′+1\alpha^{t'+1}αt′+1-refinement of (Rs,Cs)(\mathcal R^s,\mathcal C^s)(Rs,Cs).

Formalization Note A restricted row is a function from the subtype of columns jjj whose part C.part(j)C.\mathrm{part}(j)C.part(j) forms a non-mixed zone with RiR_iRi​ to AAA; the statement counts the image of RiR_iRi​ under restriction. Added hypothesis m≥1m\ge1m≥1: with m=0m=0m=0 and an empty alphabet the bound αt′+1=0\alpha^{t'+1}=0αt′+1=0 would fail for a non-empty RiR_iRi​ (the paper's matrices are non-empty).

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

open Classical in
/-- Proof of Theorem 5.4, p. 3:22: if a division `(R, C)` has mixed value at most `t'`, then the
rows of a row part `X ∈ R`, restricted to the columns lying in column parts `Y` for which the zone
`X ∩ Y` is not mixed, take at most `α ^ (t' + 1)` distinct values, where `α` is the alphabet
size. Counting uses classical decidability. -/
theorem row_types_le {A : Type*} [Fintype A] {n m : ℕ} (hm : 1 ≤ m)
    (M : Matrix (Fin n) (Fin m) A)
    (R : Finpartition (Finset.univ : Finset (Fin n)))
    (C : Finpartition (Finset.univ : Finset (Fin m)))
    (hR : IsDivision R) (hC : IsDivision C) (t' : ℕ) (hmv : MixedValueLE M R C t')
    (X : Finset (Fin n)) (hX : X ∈ R.parts) :
    (X.image (fun i => fun j : {j : Fin m // ¬ IsMixed M X (C.part j)} => M i j)).card ≤
      Fintype.card A ^ (t' + 1) := 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:22, proof of Theorem 5.4 ("there are at most α^r ⩽ α^{t′+1} different rows in R_i")
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