In graph theory, the graph removal lemma states that when a graph contains few copies of a given subgraph, then all of the copies can be eliminated by removing a small number of edges. The special case in which the subgraph is a triangle is known as the triangle removal lemma. The graph removal lemma can be used to prove Roth's theorem on 3-term arithmetic progressions, and a generalization of it, the hypergraph removal lemma, can be used to prove Szemerédi's theorem. It also has applications to property testing.
Formulation Let H be a graph with h vertices. The graph removal lemma states that for any ϵ>0, there exists a constant δ=δ(ϵ,H)>0 such that for any n-vertex graph G with fewer than δnh subgraphs isomorphic to H, it is possible to eliminate all copies of H by removing at most ϵn2 edges from G. An alternative way to state this is to say that for any n-vertex graph G with o(nh) subgraphs isomorphic to H, it is possible to eliminate all copies of H by removing o(n2) edges from G. Here, the o indicates the use of little o notation. In the case when H is a triangle, the resulting lemma is called the triangle removal lemma.
History The original motivation for the study of triangle removal lemma was the Ruzsa–Szemerédi problem. Its initial formulation due to Imre Z. Ruzsa and Szemerédi from 1978 was slightly weaker than the triangle removal lemma used nowadays and can be roughly stated as follows: every locally linear graph on n vertices contains o(n2) edges. This statement can be quickly deduced from a modern triangle removal lemma. Ruzsa and Szemerédi provided also an alternative proof of Roth's theorem on arithmetic progressions as a simple corollary. In 1986, during their work on generalizations of the Ruzsa–Szemerédi problem to arbitrary r-uniform graphs, Erdős, Frankl, and Rödl provided a statement for general graphs very close to the modern graph removal lemma: if graph H2 is a homomorphic image of H2, then any H1-free graph G on n vertices can be made H2-free by removing o(n2) edges. The modern formulation of the graph removal lemma was first stated by Füredi in 1994. The proof generalized earlier approaches by Ruzsa and Szemerédi and Erdős, Frankl, and Rödl, also using the Szemerédi regularity lemma.
Graph counting lemma A key component of the proof of the graph removal lemma is the graph counting lemma about counting subgraphs in systems of regular pairs. The graph counting lemma is also very useful on its own. According to Füredi, it is used "in most applications of regularity lemma".
Heuristic argument Let H be a graph on h vertices, whose vertex set is V={1,2,…,h} and edge set is E. Let X1,X2,…,Xh be sets of vertices of some graph G such that, for all ij∈E, the pair (Xi,Xj) is ϵ-regular (in the sense of the regularity lemma). Let also dij be the density between the sets Xi and Xj. Intuitively, a regular pair (X,Y) with density d should behave like a random Erdős–Rényi-like graph, where every pair of vertices (x,y)∈(X×Y) is selected to be an edge independently with probability d. This suggests that the number of copies of H on vertices x1,x2,…,xh such that xi∈Xi should be close to the expected number from the Erdős–Rényi model,∏ij∈E(H)dij∏i∈V(H)|Xi|,where E(H) and V(H) are the edge set and the vertex set of H.
Precise statement The straightforward formalization of the above heuristic claim is as follows. Let H be a graph on h vertices, whose vertex set is V={1,2,…,h} and whose edge set is E. Let δ>0 be arbitrary. Then there exists ϵ>0 such that for any X1,X2,…,Xh as above, satisfying dij>δ for all ij∈E, the number of graph homomorphisms from H to G such that vertex i∈V(H) is mapped to Xi is not smaller than(1−δ)∏ij∈E(dij−δ)∏i∈V|Xi|.
Blow-up Lemma One can even find bounded-degree subgraphs of blow-ups of H in a similar setting. The following claim appears in the literature under name of the blow-up lemma and was first proven by Komlós, Sárközy, and Szemerédi. The precise statement here is a slightly simplified version due to Komlós, who referred to it also as the key lemma, as it is used in numerous regularity-based proofs. Let H1 be an arbitrary graph and let t∈ℤ+. Construct H(t) by replacing each vertex i of H by an independent set Vi of size t and replacing every edge ij of H by the complete bipartite graph on (Vi,Vj). Let ϵ,δ>0 be arbitrary reals, let N be a positive integer, and let H2 be a subgraph of H(t) with h vertices and maximum degree Δ. Define ϵ0=δΔ/(2+Δ). Finally, let G be a graph and X1,X2,…,Xh be disjoint sets of vertices of G such that, whenever ij∈E(H2), then (Xi,Xj) is a ϵ-regular pair with density at least ϵ+δ. Then if ϵ≤ϵ0 and 1−t≤Nϵ0, then the number of injective graph homomorphisms from H2 to G is at least (ϵ0N)h. In fact, one can restrict to counting only those homomorphisms such that any vertex k∈[h] of H2 with k∈Vi is mapped to a vertex in Xi.
Proof We will provide a proof of the counting lemma in the case when H is a triangle (triangle counting lemma). The proof of the general case, as well as the proof of the blow-up lemma, are very similar and do not require different techniques. Take ϵ=δ/2. Let X1′⊂X1 be the set of those vertices in X1 which have at least (d12−ϵ)|X2| neighbors in X2 and at least (d13−ϵ)|X3| neighbors in X3. Note that if there were more than ϵ|X1| vertices in X1 with less than (d12−ϵ)|X2| neighbors in X2, then these vertices together with the whole X2 would witness ϵ-irregularity of the pair (X1,X2). Repeating this argument for X3 shows that we must have |X1′|>(1−2ϵ)|X1|. Now take an arbitrary x∈X1′ and define X2′ and X3′ as neighbors of x in X2 and X3, respectively. By definition, |X2′|≥(d12−ϵ)|X2|≥ϵ|X2| and |X3′|≥ϵ|X3|, so by the regularity of (X2,X3) we obtain existence of at least(d23−ϵ)|X2′||X3′|≥(d12−ϵ)(d23−ϵ)(d13−ϵ)|X2||X3|triangles containing x. Since x was chosen arbitrarily from the set X1′ of size at least (1−2ϵ)|X1|, we obtain a total of at least(1−2ϵ)|X1|(d23−ϵ)|X2′||X3′|≥(1−2ϵ)(d12−ϵ)(d23−ϵ)(d13−ϵ)|X1||X2||X3|,which finishes the proof as ϵ=δ/2.
Proof
Proof of the triangle removal lemma To prove the triangle removal lemma, consider an ϵ/4-regular partition V1∪⋯∪VM of the vertex set of G. This exists by the Szemerédi regularity lemma. The idea is to remove all edges between irregular pairs, low-density pairs, and small parts, and prove that if at least one triangle still remains, then many triangles remain. Specifically, remove all edges between parts Vi and Vj if
… excerpt ends here. Continue reading the full article.

