Adapted from jtraverso/turan-stability (Palomar-registered source).
The clique removal lemma #
This file generalises Mathlib's triangle removal lemma (SimpleGraph.triangle_removal,
SimpleGraph.FarFromTriangleFree.le_card_cliqueFinset) from triangles to cliques of any size r,
using Szemerédi's regularity lemma (SzemerediRegularity, szemeredi_regularity), Mathlib's
reduced graph SimpleGraph.regularityReduced and the clique counting lemma
CliqueCounting.card_cliqueFinset_ge.
CliqueRemoval.le_card_cliqueFinset_of_deleteFar: clique removal lemma, far form. For everyrandε > 0there isδ > 0such that every finite graph from which one must delete at leastε n²edges to destroy allr-cliques has at leastδ n^rcliques of sizer.CliqueRemoval.clique_removal: clique removal lemma. For everyrandε > 0there isδ > 0such that every finite graph onnvertices with fewer thanδ n^rcliques of sizercan be madeK_r-free by deleting fewer thanε n²edges.
Parts of an equipartition with at most B parts have size at least card α / (2 B).
Generalisation of SimpleGraph.unreduced_edges_subset to arbitrary parameters.
Generalisation of SimpleGraph.regularityReduced_edges_card_aux to a uniformity parameter
η ≤ ε / 8.
An r-clique of the reduced graph yields many r-cliques of G.
Clique removal lemma, far form. For every r and ε > 0 there is δ > 0 such that a
finite graph on n vertices that is ε n²-far from being K_r-free (in the sense of Mathlib's
SimpleGraph.DeleteFar) has at least δ n^r cliques of size r.
Clique removal lemma. For every r and ε > 0 there is δ > 0 such that every finite
graph on n vertices with fewer than δ n^r cliques of size r has a K_r-free subgraph
obtained by deleting fewer than ε n² edges.