For disjoint nonempty vertex sets of a graph, an -irregular pair is one that is not an -regular pair of vertex sets. Equivalently there are witnesses , with , and . Splitting both cells by these witnesses increases their contribution to the regularity energy by at least : the witness rectangle has relative weight at least , its mean discrepancy has magnitude greater than , and the Cauchy-Schwarz inequality bounds the weighted sum of squared discrepancies below by the rectangle weight times its squared mean. This is the local increment in the energy-increment proof of Szemerédi regularity.
For disjoint nonempty vertex sets , write . A regular pair of vertex sets is -regular if every with , satisfies .
The Szemerédi regularity lemma states that, for every and integer , there are such that every finite simple graph on vertices has a set partition
with , , , and at most irregular unordered pairs among the nonexceptional classes. Prove it for ; larger parameters follow by using a smaller one.
For the energy-increment proof of Szemerédi regularity, keep every exceptional vertex as a singleton cell in the set partition used to measure regularity energy. Define the equitable regularity energy
The sum is ordered, and on diagonal cells subset density means the average of the adjacency indicator, with zero on loops. Thus . If are refined into , expanding squares gives
The cross term vanishes because the weighted arithmetic mean of the refined subset densities is the original subset density. Consequently every refinement of a set partition increases or preserves regularity energy.
Suppose the current nonexceptional classes have common size and there are of them. For each irregular pair , choose witnesses of sizes at least and discrepancy greater than . Refine each class by all its incident witness subsets. There are at most cuts in each class and at most resulting atoms. The witness rectangle is a union of refined rectangles. By the Cauchy-Schwarz inequality, its contribution to the variance identity is at least
Indeed, the sum of squared deviations on the witness rectangle is at least its total weight times the square of their weighted arithmetic mean. If more than unordered pairs are irregular, summing even just one orientation of each gives
provided the exceptional set has at most vertices. This is the strictly positive regularity energy increment.
Restore equal class sizes without losing that increment. Divide every witness atom into blocks of size and make every leftover vertex an exceptional singleton. This is a further refinement of a set partition, so it cannot decrease . There are at most atoms, hence fewer than newly exceptional vertices. If , then , so the number of full blocks is at most . Each original class produces at least one full block: its leftovers occupy less than , whereas . Thus the new class count is at least .
Choose , and choose an initial integer large enough that . Initially partition into equal classes and fewer than exceptional vertices. Take large enough that this initial exception is at most . During at most rounds, the additional exception is at most , so it never exceeds .
A bound on class counts is obtained by iterating at most times starting at ; call the resulting bound . Increasing further to satisfy guarantees at every round, so all full-block constructions are valid. If the desired regularity had not been reached after refinements, the regularity energy increments would total more than one, impossible. Therefore the process terminates with the required partition and bounds. The singleton treatment of discarded vertices is what preserves regularity energy monotonicity during equalization.
For disjoint nonempty vertex sets , define their edge density of a bipartite graph by . They form an -regular pair of vertex sets if every , with , satisfies .
The Szemerédi regularity lemma asserts that, given and a positive integer , there are such that every graph on vertices has a set partition with
and at most irregular ordered pairs with .
Assume , which suffices since a smaller regularity parameter gives the claim for a larger one. Treat the exceptional vertices as singleton cells in the full partition , and use equitable regularity energy
Here the adjacency indicator function defines density even for diagonal cells. Clearly . If refines , weighted averaging of densities gives the refinement variance identity for regularity energy
To verify it, expand each square and use .
For every irregular ordered pair of nonexceptional cells, choose witnesses of relative sizes at least and density discrepancy greater than . Split each along all witnesses involving it; symmetry allows at most one witness for each other cell, hence at most atoms in each . In the witness rectangle, the weighted Cauchy-Schwarz inequality in the variance identity contributes more than .
If more than pairs are irregular and the equal cell size is , the energy increase is greater than
Restore equal cell sizes by cutting each witness atom into pieces of size , with leftover vertices added to as singleton cells. This operation is a further refinement, so the energy does not decrease. There are at most atoms, and fewer than leftover vertices in each, giving at most new exceptional vertices.
Here is a uniform bound ensuring that the iteration is legitimate. Put and choose
Start with equal classes and fewer than exceptional vertices. Taking makes the initial exception at most . At every refinement the number of nonexceptional cells does not decrease: each old cell loses at most vertices and is cut into pieces of size at most . Thus each of the at most rounds adds at most exceptional vertices.
When , the new cell count is at most
using . Define and , and take . Choosing ensures at every stage. All rounds are therefore defined, with cell count between and and exceptional size at most .
If the lemma still failed after refinements, the energy would have increased by more than , impossible because it lies in . Hence some stage has the required regular pairs. This completes the energy-increment proof of Szemerédi regularity, including the equal-size and exceptional-set conditions.