Fix the requested and choose much smaller constants in that order. Apply the Szemerédi regularity lemma with regularity parameter and a sufficiently large lower bound to a largest triangle-free subgraph . Let
be the resulting equitable partition, and form the reduced graph of a regularity partition on by joining and when is -uniform in and has -density at least .
Choose . If contained a triangle, the triangle embedding lemma for regular pairs would give a triangle in . Thus is triangle-free, and Turan theorem gives
Part (c), with error , holds simultaneously for every pair of sets of size at least . Since is bounded independently of , all regularity classes and their halves satisfy this size condition for large . It follows that every cross-pair contains at most edges of . It also gives
take a bipartition of carrying at least half its internal edges and apply the cross-pair estimate.
Now count the edges of . Pairs represented in contribute at most
The exceptional set, the at most irregular pairs, pairs of -density below , and edges inside classes together contribute at most
Choose , then , and finally small enough in terms of . The total is at most
with high probability, as required.