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.
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 Turan 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.