{\leqslant}\delta .$$ If so, then the process terminates. If not, we show how our iteration may proceed to stage $d+1$.

Applying the cut norm inverse theorem (Lemma \[inverse theorem\]), we conclude that there exist 1-bounded local functions $\phi_i$ of resolution $ \gg (\delta/q)^{O(1)}N^{1/2}$ and modulus $qq_i$ for some $q_i{\leqslant}\delta^{-O(1)}$ such that $${\left| {\left\langlef - \Pi_{\mathcal{B}}f, \phi_1\phi_2\right\rangle}\right|} = {\left| \sum_{x \in [N]} (f - \Pi_{\mathcal{B}}f)(x) \phi_1(x)\phi_2(x)\right|} \gg \delta^{O(1)} N.$$

Let $\mathcal{B}' $ denote the join of $\mathcal{B}$ and the simple local factors generated by $\phi_1$ and $\phi_2$, so that $\mathcal{B}'$ is a local factor of dimension at most $2(d+1)$, resolution $ \gg (\delta/q)^{O(1)}N^{1/2}$ and modulus $qq''$ for some $q'' {\leqslant}q'q_1q_2{\leqslant}O(1/\delta)^{O(d+1)}$. Since $\phi_1\phi_2$ is $\mathcal{B}'$-measurable, we can use the properties listed in Lemma \[properties\] together with the Cauchy–Schwarz inequality to deduce that $$\begin{split}
{\left| {\left\langlef- \Pi_{\mathcal{B}}f ,\phi_1\phi_2\right\rangle}\right|} & ={\left| {\left\langlef- \Pi_{\mathcal{B}}f ,\Pi_{\mathcal{B}'}(\phi_1\phi_2)\right\rangle}\right|} = {\left| {\left\langle\Pi_{\mathcal{B}'} f - \Pi_{\mathcal{B}} f , \phi_1\phi_2\right\rangle}\right|}\\
& {\leqslant}N^{1/2}  {\left\| \Pi_{\mathcal{B}'} f - \Pi_{\mathcal{B}}f \right\|}_{\ell^2}.
\end{split}$$ It follows that $${\left\| \Pi_{\mathcal{B}'} f - \Pi_{\mathcal{B}}f\right\|}_{\ell^2} \gg\delta^{O(1)} N^{1/2}.$$

Lemma \[properties\] tells us that $\Pi_{\mathcal{B}} f$ is orthogonal to $\Pi_{\mathcal{B}'}f -  \Pi_{\mathcal{B}} f$, hence by Pythagoras’s theorem $${\left\| \Pi_{\mathcal{B}'} f\right\|}_{\ell^2}^2 = {\left\| \Pi_{\mathcal{B}}f \right\|}_{\ell^2}^2+ {\left\| \Pi_{\mathcal{B}'} f- \Pi_{\mathcal{B}}f \right\|}_{\ell^2}^2.$$ The energy 