Existing in Mathlib · Combinatorics
Szemerédi’s Regularity Lemma
Given a finite simple graph, a positive tolerance ε, and a requested minimum l no larger than the vertex count, the vertices can be split into nearly equal-sized parts. The number of parts is at least l and no more than Mathlib’s source-defined bound, and all but an ε-proportion of ordered distinct part-pairs have stable edge density on sufficiently large subparts.
- finite simple graphs
- equipartitions
- ε-uniform pairs
- edge density
- energy increment
- bounded refinement
Exact theorem
Exact Mathlib statement
theorem szemeredi_regularity {α : Type*} [DecidableEq α] [Fintype α] (G : SimpleGraph α) [DecidableRel G.Adj] {ε : ℝ} {l : ℕ} (hε : 0 < ε) (hl : l ≤ Fintype.card α) : ∃ P : Finpartition Finset.univ, P.IsEquipartition ∧ l ≤ #P.parts ∧ #P.parts ≤ SzemerediRegularity.bound ε l ∧ P.IsUniform G εThe theorem at a glance
Szemerédi’s Regularity Lemma at a glance
A visual guide to the theorem's hypotheses, structure, and conclusion; the exact statement gives the formal detail.
Szemerédi’s Regularity Lemma at a glance

Detailed visual description
The poster leads with a finite simple graph divided into nearly equal cells, preserving a small minority of visibly irregular relations. Its central statement records ε > 0, l ≤ |V|, equipartition, the exact part-count inequalities, and ε-uniformity. Three source-bound movements refine non-uniformity witnesses, raise energy in controlled steps, and use energy ≤ 1 to force termination. The scope box explicitly excludes Szemerédi’s arithmetic-progression theorem and the unproved diagonal and degree versions.
Statement structure
Statement and scope
Read the exact Mathlib declaration
This map summarizes the statement's structure; the exact Mathlib declaration remains authoritative.
Szemerédi’s Regularity Lemma — scientific diagram

Detailed visual description
The scientific schematic follows a finite vertex set through a coarse equipartition and a nested refinement. Its representative pair-classification matrix is symmetric for the undirected graph, leaves every diagonal cell neutral, and retains a small mirrored minority of irregular distinct-part pairs alongside an energy-increase motif.
Why it matters
A mathematical landmark
Szemerédi’s regularity lemma is a foundational structural result in extremal graph theory: every finite graph can be decomposed into a bounded number of nearly equal classes whose pairwise edge distributions are mostly random-like. Mathlib retains the effective equipartition endpoint together with the characteristic energy-increment proof architecture.
ProofAtlas record
What has been checked
Mathlib is the source of the theorem; the local Lean replay and page review are separate.
Claim boundary
No new theorem is claimed
This page indexes Mathlib’s effective equipartition form of the finite graph regularity lemma. It assumes ε > 0 and l no larger than the finite vertex count, and it produces a partition of the full vertex set with part sizes differing by at most one, l ≤ #P.parts ≤ SzemerediRegularity.bound ε l, and at most an ε-proportion of ordered distinct part-pairs non-ε-uniform. It does not require every pair to be uniform. This is not Szemerédi’s theorem on arithmetic progressions, a diagonal or degree form of regularity, a counting or removal lemma, or a claim that the bound is optimal, small, or attained.
- ProofAtlas did not originate Szemerédi’s regularity lemma or Mathlib’s declaration.
- The selected declaration is the equipartition graph-regularity lemma, not Szemerédi’s theorem on arithmetic progressions.
- The selected declaration permits an ε-proportion of ordered distinct part-pairs to be non-uniform; it does not say every pair is uniform.
- The selected declaration does not prove the diagonal or degree versions, a counting lemma, a removal lemma, or optimality of the source-defined bound.
- The generated explanation and visuals are not proof evidence.
Source and local evidence
Where the theorem comes from
- Existing declaration
szemeredi_regularityin mathlib- Relationship
- The checked artifact is the upstream declaration itself
- Local Lean evidence
artifact.library.mathlib.szemeredi-regularity-lemma.v001