Fix an odd cycle length. If the graph has edge density at least and sufficiently few copies of that cycle, odd-cycle copies from positive triangle density forces few triangles in a graph. The triangle removal lemma deletes at most edges, after which the clique-free edit bound applies with two parts. Absorbing its linear rounding error into the density margin gives the displayed bound for large order.
Corners theorem 2026-10-06
For every , all sufficiently large integers have the property that every with contains a corner in an integer grid. The tripartite graph encoding of a grid turns the absence of a corner into a family of many edge-disjoint triangles but only quadratically many total triangles in a graph, contradicting the triangle removal lemma.
For disjoint vertex sets , define their edge density of a bipartite graph by . They form a regular pair with parameter if every with , satisfies .
The Szemerédi regularity lemma says that for every and minimum cell count , some have the following property. Every graph on vertices admits
with , equal-sized , and at most unordered irregular pairs. It is enough to consider .
Prove this using equitable regularity energy. Treat exceptional vertices as singleton cells and set
with ordered pairs and the adjacency indicator also defining diagonal densities. Then . The refinement variance identity for regularity energy proves refinement cannot decrease :
An irregular pair supplies witness subsets of relative sizes at least whose density differs by more than . Refining along those witnesses raises by more than per orientation, where is the common cell size. If there are more than irregular pairs, the increase is greater than , provided the exceptional set has size at most .
Refine each cell by all its witness subsets; this produces at most atoms per cell. Restore equal sizes by the equalization with a controlled exceptional set: cut each atom into blocks of size and declare its remainder exceptional, still retaining every such vertex as a singleton in the energy. This is another refinement, so no energy is lost. At most vertices become exceptional, and, when , at most new nonexceptional cells occur.
Put and start with so large that . An initial equitable partition has at most exceptional vertices when is sufficiently large. Subsequent cell counts only increase, so the total added exceptional set has size at most . The recurrence , iterated at most times, supplies a finite bound ; choose large enough that every intermediate meets the size requirement. More than unsuccessful refinements would raise above one. The process must therefore stop with the required regular pairs. This proves the lemma.
Its usefulness comes from replacing an arbitrarily large graph by the bounded reduced graph of a regularity partition. For fixed positive cross-density, the graph embedding lemma for regular pairs lifts fixed configurations from the reduced graph to the original one. In particular, three sufficiently regular positive-density pairs contain many triangles in a graph. Deleting exceptional, intracell, irregular and sparse-pair edges then gives the triangle removal lemma: a graph with sufficiently few triangles can be made triangle-free by deleting edges. A triangle surviving in the reduced graph would force a positive proportion of the original possible triangles, a contradiction. More generally this approach yields the clique removal lemma and the asymptotic Erdős-Stone theorem. Applied to the tripartite graph encoding , triangle removal also gives Roth theorem on three-term arithmetic progressions. The price is that the energy argument gives a very rapidly growing, iterated-exponential bound on ; the lemma is a structural tool, not a promise of small practical constants.
We prove a weighted version of the Szemerédi regularity lemma, which is sufficient for the grid application. For disjoint nonempty vertex sets in a graph, write for their edge density of a bipartite graph. Call the pair -regular if every , with and satisfies .
The weighted Szemerédi regularity lemma states that, for every , there are integers such that every graph on vertices has a set partition into at most nonempty cells , each of size at most , for which
The sum is ordered. The cells need not have equal sizes; their weights replace the usual unweighted count of bad pairs.
To prove it, start with nearly equal cells, taking . Each has size at most . Define the regularity energy
Here even diagonal rectangles use the mean adjacency indicator, counting ordered pairs of vertices. Thus . Under a refinement, the old rectangle density is the weighted mean of the new ones, and the refinement variance identity for regularity energy gives
In particular refinement cannot decrease energy.
If the irregular-pair weight exceeds , choose witness subsets , for every irregular unordered pair, and split each cell simultaneously by all its witnesses. There are at most such subsets in any one cell, so the new number of cells is at most . In an irregular rectangle, its witness has relative area at least and density discrepancy greater than . Since the witness rectangle is now a union of refined rectangles, the Cauchy-Schwarz inequality applied to their weighted density discrepancies bounds the variance contribution from below by
Summing over both orientations of all irregular pairs raises by more than . Since , after at most rounds the required weight bound must hold. The finite recurrence , starting at , supplies ; all cells remain small because we only refine. This proves the stated weighted Szemerédi regularity lemma.
We next derive the triangle removal lemma from this version. First, three disjoint classes whose pairs are -regular pairs of density at least have many triangles if and . Fewer than vertices of have fewer than neighbours in : otherwise that set of vertices, paired with all of , would violate regularity. The same holds for . For each of the at least remaining vertices, both neighbour sets have relative size at least . Regularity of then supplies at least times the product of those two neighbour-set sizes edges. Thus the regular triangle counting lemma, also for unequal class sizes, gives
For a desired deletion tolerance , take , , and a weighted regularity partition with at most cells. Put . Delete edges inside cells, between irregular pairs, between regular pairs of density less than , and incident to cells smaller than . The first two deletions each cost at most . The sparse-pair deletion costs at most . For the last deletion, small-cell deletion in weighted regularity removes at most vertices and at most incident edges. The total is bounded by
A triangle surviving these deletions would lie in three distinct cells, all of size at least , with all their pairs regular and of density at least . The original graph would then have at least triangles. Therefore, with
a graph on sufficiently many vertices with at most triangles can be made triangle-free by deleting fewer than edges. This establishes the triangle removal lemma with every parameter depending only on .
Now apply a tripartite graph encoding of a grid. Take separate vertex classes , , . For each grid point in the given set, put in the three edges
where their endpoints belong respectively to , , and . Each point supplies a triangle. These triangles are edge-disjoint triangles, since any one of the three edge types uniquely determines the point that supplied it.
Conversely, any triangle with vertices , , forces the three points
to belong to . Put . For these form a corner in an integer grid; for they all arise from the same grid point. Thus if there is no corner, the graph has exactly triangles, yet destroying all triangles requires at least edge deletions.
We may suppose , since larger densities make the request vacuous. Use the triangle removal lemma with . Our graph has vertices, so, for sufficiently large , its bound on the number of triangles is at most . The lemma would delete fewer than
edges to destroy all triangles. This contradicts the lower bound from the edge-disjoint family. Hence every sufficiently large positive-density square grid contains a nondegenerate corner, proving the requested corners theorem and in particular the existence of a suitable .
First derive the triangle removal lemma from the Szemerédi regularity lemma. Given an allowed deletion fraction , take , , and . Apply part (i), with upper class bound . Delete edges incident with , inside each nonexceptional class, between irregular pairs, and between regular pairs of subset density less than . Their total number is at most
These four terms are bounded respectively by , , , and .
If a triangle in a graph remains, its three vertices lie in three distinct equal classes, all three regular pairs with subset density at least . The permitted regular triangle counting lemma gives at least triangles in a graph in the original graph, where is the class size. This lower bound can also be checked directly: all but vertices of the first class have at least neighbors in each of the other two. Those neighborhoods are large enough to use the regular pair condition on the remaining pair, giving at least edges between them. Hence the total is at least .
Since , a surviving triangle in a graph forces at least original triangles in a graph. Thus a graph with fewer than triangles in a graph, where , can be made triangle-free by deleting fewer than edges, for all sufficiently large . This proves the removal lemma needed here.
Now use the triangle-removal proof of Roth theorem. Fix a subset density lower bound and suppose , , has no nonconstant three-term arithmetic progression. Set and . Use three disjoint copies of and put edges according to
Division by two is valid because is odd. A triangle in a graph corresponds to , , with and . Since and , this congruence is an integer equality. Progression-freeness therefore forces .
Every triangle in a graph is consequently of the form with , so there are exactly triangles in a graph. These triangles in a graph are edge-disjoint: an edge determines ; a edge determines and then ; and an edge determines and . Eliminating them all requires at least edge deletions.
The graph has vertices but only triangles in a graph. Take . For large enough its triangle in a graph count is below , so removal requires fewer than deletions. Yet
a contradiction. Therefore every fixed positive-density subset of a sufficiently long interval contains a nonconstant three-term arithmetic progression.
This proves the qualitative Roth theorem on three-term arithmetic progressions. The quantitative bound from part 2(i) came from the explicit Fourier iteration; the regularity-removal argument gives a density-dependent threshold without that double-logarithmic estimate.
We prove edit-distance stability for clique-free graphs by induction on , using the symmetric difference of edge sets as the distance. For , a -free graph is edgeless, and there is nothing to change. For , choose a vertex of maximum degree , let be its neighbourhood and put . Then is -free. Write
Both deficits are nonnegative by the Turan theorem. Since every vertex of has degree at most ,
The complete -partite graph formed from an -partite Turán graph on and the new class has at most edges. Thus , and direct subtraction gives
By induction, edit into a complete -partite graph using at most changes. Delete the edges inside , and add the missing edges between and . The resulting graph is complete -partite on the same vertex set, and
where the inequality uses . The required edit distance is at most . Empty partition classes are allowed; a sufficiently dense nondegenerate case has the usual full complement of classes.
For the odd-cycle conclusion, use two standard consequences of the Szemerédi regularity lemma, stated explicitly. The triangle removal lemma says that for every , some ensures that a graph with at most triangles in a graph can be made triangle-free by deleting at most edges, for all sufficiently large . Also, for each fixed odd length and each , there is such that a graph with at least triangles in a graph contains at least copies of .
For clarity, the latter odd-cycle copies from positive triangle density consequence follows by applying regularity with error small relative to , removing exceptional, irregular and very sparse pairs, and retaining a triangle in a graph among the remaining regular dense pairs. The graph embedding lemma for regular pairs counts a positive constant times embeddings of any fixed graph properly three-coloured into those three clusters, including . Dividing by the fixed number of descriptions of a cycle gives the same conclusion for unlabelled copies.
Apply triangle in a graph removal with , and take the resulting . A -free graph cannot have triangles in a graph for large , by the preceding consequence. Delete at most edges to obtain a triangle-free . With ,
Apply the proved stability result with . The resulting complete bipartite graph satisfies
Choose also large enough that . Then the distance is at most .
For the unheaded continuation, use the same and its associated , and set . Having at most cycles rules out triangles in a graph just as before. The identical deletion and stability calculation applies. A sufficiently small gives the same bound.
The triangle removal lemma says that for every there are and such that a graph on vertices with fewer than triangles in a graph can be made triangle-free by deleting at most edges. Here triangles in a graph are unordered triples of distinct vertices. We prove this consequence with the necessary quantitative dependence.
We may assume . Put , choose an integer , and choose
Apply the Szemerédi regularity lemma to obtain an exceptional class of size at most and equal-sized classes of size , where , and at most pairs are not regular pairs of vertex sets. The constant depends only on these chosen parameters. Delete all edges incident with , all edges within a class, all edges between irregular pairs, and all edges between pairs whose edge density of a bipartite graph is less than . The respective costs are at most
Their sum is at most , hence certainly at most .
If a triangle in a graph survives, it lies in three distinct classes whose three pairs are -regular pairs of vertex sets of edge density of a bipartite graph at least in the original graph. We now check the needed regular triangle counting lemma. In the first class all but at most vertices have at least neighbours in each of the other two classes; otherwise the definition of a regular pair of vertex sets would be violated. For each such vertex , its two neighbour sets each have size at least , so their mutual edge density of a bipartite graph is at least . It follows that the original three classes contain at least
triangles in a graph. The elementary lower bound holds because and . Also . Thus a surviving triangle in a graph implies at least original triangles in a graph. Set and take large enough for the Szemerédi regularity lemma. Fewer than original triangles in a graph force the cleaned graph to be triangle-free, proving the triangle removal lemma.
Now suppose and . Use the tripartite graph encoding of a grid to construct a tripartite graph with disjoint labelled classes
For each , put in the three edges joining , , and . These yield canonical triangles in a graph. They are pairwise edge-disjoint triangles: an edge determines directly, an edge determines , and a edge determines . Any deletion making the graph triangle-free must therefore remove at least edges.
On the other hand, an arbitrary triangle in a graph with labels gives three points of :
Writing , these are . If , they form the required corner in an integer grid. If there is no such corner in an integer grid, every triangle in a graph is canonical, and the total number is precisely .
Apply the triangle removal lemma with . The constructed graph has vertices. For sufficiently large , and
In the absence of a corner in an integer grid, the triangle removal lemma would destroy all triangles in a graph by deleting at most
edges, contradicting the pairwise edge-disjoint triangles. Every sufficiently large grid therefore has the asserted corner in an integer grid in every subset of positive fixed density of a finite subset. For there is no eligible subset, so the assertion is vacuous. This proves the corners theorem, including the stipulated nonzero displacement; no positivity of was required.
Embed in the odd cyclic group , so additive three-term relations in cannot wrap around. Form three copies of , putting edges when , when , and when . A triangle in a graph encodes in . If has no nonconstant arithmetic progression, every triangle in a graph has ; there are exactly triangles in a graph, and they are edge-disjoint. Thus at least edges must be removed to eliminate them. For fixed positive subset density of , this is a positive fraction of the squared vertex count, whereas the triangle in a graph count is only quadratic. The triangle removal lemma permits deletion of an arbitrarily small quadratic fraction when the cubic triangle in a graph subset density is sufficiently small. This contradiction establishes Roth theorem on three-term arithmetic progressions.