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.