Clique removal lemma (source code)

= Clique removal lemma

For fixed $r\ge2$ and every $\varepsilon>0$, some $\delta>0$ has the following property for all sufficiently large $n$: a <graph> with fewer than $\delta n^r$ copies of $K_r$ can be made $K_r$-free by deleting at most $\varepsilon n^2$ edges. A <Szemerédi regularity lemma> partition and the <regular clique counting lemma> prove this. It converts sparse counts of a forbidden clique into a small edit distance from clique-freeness.