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.
Use the identification of two-element subsets of with the edges of the complete graph . A colour class in the Kneser graph is an intersecting two-element set family, so its edges must pairwise meet.
Such a class is contained either in a star graph or in a triangle in a graph. Indeed, if not all edges have a common vertex, take two meeting edges . An edge not containing must then be . Any further edge meeting all three of is one of these three. Classes with at most two edges already lie in a star graph.
Assume that a graph colouring used colours. Classify classes as stars and the remaining classes as triangles. Delete a chosen centre of each star class, leaving vertices. Every edge between those remaining vertices must belong to a triangle class, of which each covers at most three edges. Hence
But
a contradiction. Thus . For the matching upper bound, assign a two-set the colour of its smaller element if that element is at most , and otherwise give it colour . The last class comprises the three pairs on the last three elements, an intersecting family. Consequently an entirely combinatorial argument gives
Symmetrization for an arbitrary real coefficient. Among graphs maximizing , choose one maximizing
For a vertex , put . This is the contribution of edges and triangles in a graph containing . If are nonadjacent, Zykov symmetrization replacing by a clone of changes by ; the opposite replacement changes it by . Maximality implies , so both changes preserve .
Let and . In the first replacement the vertex degrees in increase by one and those in decrease by one; in the opposite replacement these changes reverse. The changes to cancel when the two replacements are added. Since ,
If the two vertex neighbourhoods differ, one replacement increases , a contradiction. Thus every pair of nonadjacent vertices has the same vertex neighbourhood. Nonadjacency, with equality allowed, is an equivalence relation: if and are nonadjacent and and are nonadjacent, their identical vertex neighbourhoods forbid as well. Its classes are independent sets and every cross-class edge is present. Therefore
This edge-triangle symmetrization works for either sign of .
The exact supporting line. For , write
We prove the triangle support line between bipartite and tripartite Turan graphs by maximizing . First . For , its values are respectively . For , the exact balancing of the Turan graph gives , while and the arithmetic-geometric mean inequality gives . Hence
By edge-triangle symmetrization a maximizing graph can be taken complete multipartite graph; among such maximizers use one with the fewest nonempty parts. If there are at least four parts, let be the two smallest sizes. Then . Merging them loses edges and triangles in a graph, so the objective changes by
This contradicts the choice of the number of parts. Thus at most three parts remain.
For three part sizes , the objective is
If , merging the parts of sizes does not decrease it, again contradicting minimality. If and , transferring one vertex from the largest to the smallest part raises by and strictly increases the objective. Thus a three-part maximizer has all sizes differing by at most one, and is . A maximizer with at most two parts has objective at most , since it has no triangles in a graph and the Mantel theorem bounds its edges. Finally,
Therefore every graph satisfies . At the prescribed edge count this gives
For , the conclusion is simply the nonnegative lower bound zero. All rounding in the Turan graphs has been retained.
One edge above the bipartite threshold. Write . We prove the Triangle lower bound one edge above the Mantel threshold by induction on , allowing at least edges. For , five edges on four vertices give two triangles in a graph, and adding edges preserves this bound.
We will also use the following consequence of an inductive bound: on vertices, at least edges, for an integer , force at least triangles in a graph. Delete surplus edges first to leave exactly . Repeatedly delete an edge in a triangle in a graph until edges remain. The Mantel theorem guarantees such a triangle in a graph at every step; each deletion destroys at least one distinct triangle in a graph. Apply the inductive bound to the remaining graph.
Now take exactly edges. If every edge lies in a triangle in a graph, the edge-triangle incidence bound gives . This is at least for ; the base case was handled separately.
Otherwise choose an edge in no triangle in a graph. Its endpoints have disjoint vertex neighbourhoods, so . Deleting removes exactly edges and leaves at least edges. If , it leaves at least edges, and the strengthened inductive bound gives at least triangles in a graph already.
If , induction gives at least triangles in a graph after deletion. There must be an additional triangle in a graph containing or . Otherwise both and are independent sets; since they are disjoint and cover all vertices, would be bipartite graph, contradicting by the Mantel theorem. Hence
The bound is sharp: add one internal edge to one class of the complete bipartite graph . Its triangles in a graph are precisely that edge together with each of the vertices in the other class.
Statement and definitions. For disjoint nonempty sets of vertices, their edge density of a bipartite graph is . They form a regular pair of vertex sets, or an -uniform pair, if
whenever , , and .
The Szemerédi regularity lemma states that for every and positive integer , there are integers such that every graph of order has a set partition
with , , equal nonzero sizes , and at most unordered pairs , , that fail to be -uniform. It is enough to prove this for , since decreasing the parameter strengthens the conclusion.
Energy increment. For the proof, regard each exceptional vertex as a singleton part and use the equitable regularity energy
The sum is over ordered pairs, including diagonal pairs; for those pairs define as the mean adjacency indicator on . Thus . Under a refinement, the subrectangle densities have the original density as their weighted mean. The Cauchy-Schwarz inequality, equivalently the nonnegativity of their weighted variance, gives .
Suppose there are more than irregular pairs, with main cell size . For each such pair choose witnesses , of sizes at least and with . Refine every main cell by all its witness subsets. Each splits into at most atoms, and we may use the larger bound .
For an ordered irregular rectangle, write its refined densities as and relative areas as . The energy gain on that rectangle is
The witness rectangle has relative area at least . Applying the Cauchy-Schwarz inequality to the subrectangles it contains shows that this expression is greater than . There are two orientations of each irregular pair. Since , the total gain is greater than
Restoring equal sizes without losing energy. Put , assuming . Split every refined atom into sets of size , putting its leftover fewer than vertices into the exceptional set as singleton parts. This is a further refinement, so the energy cannot decrease. The number of new exceptional vertices is at most
The number of new main cells satisfies
For the first inequality, in each old cell the leftovers have total size less than , so at least one full chunk survives. All previous exceptional singleton parts are kept. Treating leftovers as singleton parts is what makes the energy increment survive equitabilization exactly.
Take and choose so large that . Start with equal main cells, with fewer than exceptional vertices. Define a finite bound by iterating a total of times, starting from . Choose sufficiently large that and whenever .
At each of the first refinements, the exceptional set has size at most
the cell count is between and , and , so all the chunk sizes above are valid. But unsuccessful refinements would raise by more than , which is impossible. Thus the procedure terminates at a partition satisfying the Szemerédi regularity lemma.
Three linearly large uniform sets. Apply the Szemerédi regularity lemma with
For , delete all edges touching , all internal main-cell edges, all edges of irregular pairs, and all edges of regular pairs whose edge density of a bipartite graph is less than . The respective losses are bounded by
Thus the total loss is at most , and the remaining graph has at least
edges. Form the reduced graph of a regularity partition , joining two main cells precisely when they are -uniform and have edge density of a bipartite graph at least . If their common size is , the remaining edge count is at most . Since , we obtain . The Mantel theorem gives a triangle in a graph in . Its three cells have the required pairwise density and are -uniform: an -uniform pair is uniform for any larger parameter.
Each selected cell has size . Choose
For , the Mantel theorem gives a triangle in a graph in the original graph, since its edge count exceeds ; take its three singleton vertices. Their pairs have density one and are uniform for every positive parameter, and . Therefore in all cases
The constant is absolute; the energy proof gives a very large bound for , which does not affect its positivity.
Here and . By Mantel theorem, a triangle-free graph of this order has at most
edges, so contains a triangle in a graph.
If , then has four vertices and five of the six possible edges, so it is with one edge deleted. Exactly the two triangles containing neither both endpoints of the deleted edge remain. Hence contains two triangles.
The vertices form a triangle in a graph, so every cut of a graph leaves at least one of their three edges uncut. Hence the cut size is at most four. Take
The crossing edges are , so . The upper bound is attained and this is a maximum cut.
Triangle count Created 2026-10-05 Updated 2026-10-06
The triangle count of a finite simple graph is the number of unordered triples of vertices inducing a triangle in a graph. In a tripartite graph with parts and adjacency indicator functions , it equals , using uniform expectations on nonempty parts.
Triangle removal lemma 2026-10-06
For every , some and have this property: a graph on vertices with fewer than unordered triangles in a graph can be made triangle-free by deleting at most edges. A Szemerédi regularity lemma partition deletes exceptional, intraclass, irregular and sparse-pair edges cheaply. A surviving triangle in a graph would force a positive cubic count by the regular triangle counting lemma.
Tripartite graph 2026-10-05
A tripartite graph has a set partition of its vertices into three classes, with every edge joining different classes. Each pair of classes induces a bipartite graph, and every triangle in a graph uses one vertex from each class.
For , use three disjoint labelled vertex classes , , . Each inserts the three edges , producing pairwise edge-disjoint triangles. Every triangle in a graph with labels corresponds to the three points of . It is canonical when ; otherwise it gives a corner in an integer grid with nonzero displacement .