# Hypergraph removal lemma

In graph theory, the hypergraph removal lemma states that when a hypergraph contains few copies of a given sub-hypergraph, then all of the copies can be eliminated by removing a small number of hyperedges. It is a generalization of the graph removal lemma. The special case in which the graph is a tetrahedron is known as the tetrahedron removal lemma. It was first proved by Nagle, Rödl, Schacht and Skokan and, independently, by Gowers.
The hypergraph removal lemma can be used to prove results such as Szemerédi's theorem and the multi-dimensional Szemerédi theorem.

## Statement

Let $H$ be $r$-uniform (every edge connects exactly r vertices) hypergraph with $h$ vertices. The hypergraph removal lemma states that for any $\varepsilon >0$ exists $\delta =\delta (r,m,\varepsilon )>0$ such that for any $r$-uniform, $n$-vertices hypergraph $G$ with fewer than $\delta n^{h}$ subhypergraphs isomorphic to $H$ it is possible to remove all copies of $H$ by removing at most $\varepsilon n^{r}$ edges.
An equivalent formulation is that, for any hypergraph $G$ with $o(n^{h})$ copies of $H$, we can eliminate all copies of $H$ from $G$ by removing $o(n^{r})$ hyperedges.
Graph removal lemma is a special case with $r=2$.

## Proof idea of the hypergraph removal lemma

The high level idea of the proof is similar to that of graph removal lemma. We prove a hypergraph version of Szemerédi's regularity lemma (partition hypergraphs into pseudorandom blocks) and a counting lemma (estimate the number of hypergraphs in an appropriate pseudorandom block). The key difficulty in the proof is to define the correct notion of hypergraph regularity. There were multiple attempts to define "partition" and "pseudorandom (regular) blocks" in a hypergraph, but none of them are able to give a strong counting lemma. The first correct definition of Szemerédi's regularity lemma for general hypergraphs is given by Rödl et al.
In Szemerédi's regularity lemma, the partitions are performed on vertices (1-hyperedge) to regulate edges (2-hyperedge). However, for $k>2$, if we simply regulate $k$-hyperedges using only 1-hyperedge, we will lose information of all $j$-hyperedges in the middle where $1<j<k$, and fail to find a counting lemma. The correct version has to partition $(k-1)$-hyperedges in order to regulate $k$-hyperedges. To gain more control of the $(k-1)$-hyperedges, we can go a level deeper and partition on $(k-2)$-hyperedges to regulate them, etc. In the end, we will reach a complex structure of regulating hyperedges.

## Proof idea for 3-uniform hypergraphs

For example, we demonstrate an informal 3-hypergraph version of Szemerédi's regularity lemma, first given by Frankl and Rödl. Consider a partition of edges$E(K_{n})=G_{1}^{(2)}\cup \dots \cup G_{l}^{(2)}$ such that for most triples $(i,j,k),$ there are a lot of triangles on top of $\left(G_{i}^{(2)},G_{j}^{(2)},G_{k}^{(2)}\right).$ We say that $\left(G_{i}^{(2)},G_{j}^{(2)},G_{k}^{(2)}\right)$ is "pseudorandom" in the sense that for all subgraphs $A_{i}^{(2)}\subset G_{i}^{(2)}$ with not too few triangles on top of $\left(A_{i}^{(2)},A_{j}^{(2)},A_{k}^{(2)}\right),$ we have
    $\left|d\left(G_{i}^{(2)},G_{j}^{(2)},G_{k}^{(2)}\right)-d\left(A_{i}^{(2)},A_{j}^{(2)},A_{k}^{(2)}\right)\right|\leq \varepsilon ,$
    where $d(X,Y,Z)$ denotes the proportion of $3$-uniform hyperedge in $G^{(3)}$ among all triangles on top of $(X,Y,Z)$.
We then subsequently define a regular partition as a partition in which the triples of parts that are not regular constitute at most an $\varepsilon$ fraction of all triples of parts in the partition.
In addition to this, we need to further regularize $G_{1}^{(2)},\dots ,G_{l}^{(2)}$ via a partition of the vertex set. As a result, we have the total data of hypergraph regularity as follows:
* a partition of $E(K_{n})$ into graphs such that $G^{(3)}$ sits pseudorandomly on top;
* a partition of $V(G)$ such that the graphs in (1) are extremely pseudorandom (in a fashion resembling Szemerédi's regularity lemma).
After proving the hypergraph regularity lemma, we can prove a hypergraph counting lemma. The rest of proof proceeds similarly to that of Graph removal lemma.

## Proof of Szemerédi's theorem

Let $r_{k}(N)$ be the size of the largest subset of $\{1,\ldots ,N\}$ that does not contain a length $k$ arithmetic progression. Szemerédi's theorem states that, $r_{k}(N)=o(N)$ for any constant $k$. The high level idea of the proof is that, we construct a hypergraph from a subset without any length $k$ arithmetic progression, then use graph removal lemma to show that this graph cannot have too many hyperedges, which in turn shows that the original subset cannot be too big.
Let $A\subset \{1,\ldots ,N\}$ be a subset that does not contain any length $k$ arithmetic progression. Let $M=k^{2}N+1$ be a large enough integer. We can think of $A$ as a subset of $\mathbb {Z} /M\mathbb {Z}$. Clearly, if $A$ doesn't have length $k$ arithmetic progression in $\mathbb {Z}$, it also doesn't have length $k$ arithmetic progression in $\mathbb {Z} /M\mathbb {Z}$.
We will construct a $k$-partite $(k-1)$-uniform hypergraph $G$ from $A$ with parts $V_{1},V_{2},\ldots ,V_{k}$, all of which are $M$ element vertex sets indexed by $\mathbb {Z} /M\mathbb {Z}$. For each $1\leq i\leq k$, we add a hyperedge among vertices $(v_{j}\in V_{j})_{j\in [k]\setminus \{i\}}$ if and only if $\sum _{j\neq i}(j-i)v_{j}\in A.$ Let $H$ be the complete $k$-partite $(k-1)$-uniform hypergraph. If $G$contains an isomorphic copy of $H$ with vertices $v_{1},\ldots ,v_{k}$, then $\alpha _{i}=\sum _{j\neq i}(j-i)v_{j}\in A$ for any $1\leq i\leq j$. However, note that $\alpha _{i}$ is a length $k$ arithmetic progression with common difference $\alpha _{i+1}-\alpha _{i}=-\sum _{j}v_{j}$. Since $A$ has no length $k$ arithmetic progression, it must be the case that $\alpha _{1}=\cdots =\alpha _{k}$, so $\sum _{j}v_{j}=0$.
Thus, for each hyperedge $(v_{j}\in V_{j})_{j\in [k]\setminus \{i\}}$, we can find a unique copy of $H$ that this edge lies in by finding $v_{i}=-\sum _{j\neq i}v_{j}$. The number of copies of $H$ in $G$ equals ${\frac {1}{k}}e(G)=O(N^{k-1})=o(N^{k})$. Therefore, by the hypergraph removal lemma, we can remove $o(N^{k-1})$ edges to eliminate all copies of $H$ in $G$. Since every hyperedge of $G$ is in a unique copy of $H$, to eliminate all copies of $H$ in $G$, we need to remove at least $e(G)/k$ edges. Thus, $e(G)=o(N^{k-1})$.
The number of hyperedges in $G$ is $kM^{k-2}|A|=o(N^{k-1})$, which concludes that $|A|=o(N)$.
This method usually does not give a good quantitative bound, since the hidden constants in hypergraph removal lemma involves the inverse Ackermann function. For a better quantitive bound, Leng, Sah, and Sawhney proved that $|A|\leq {\frac {N}{\exp(-(\log \log N)^{c_{k}})}}$ for some constant $c_{k}$ depending on $k$. It is the best bound for $k\geq 5$ so far.

## Applications

* The hypergraph removal lemma is used to prove the multidimensional Szemerédi theorem by J. Solymosi. The statement is that any for any finite subset $S$ of $\mathbb {Z} ^{r}$, any $\delta >0$ and any $n$ large enough, any subset of $[n]^{r}$ of size at least $\delta n^{r}$ contains a subset of the form $a\cdot S+d$, that is, a dilated and translated copy of $S$. Corners theorem is a special case when $S=\{(0,0),(0,1),(1,0)\}$.
* It is also used to prove the polynomial Szemerédi theorem, the finite field Szemerédi theorem and the finite abelian group Szemerédi theorem.