 = 2^{-18} \lambda^{-2}$.

\[lem:stability\] Let $\lambda {\geqslant}3$ and $n,k \in {\mathbb{N}}$, with $k {\geqslant}(\log n)^4$ and $k {\geqslant}2^{480} \lambda^{20}$. We have $$|\Lambda \setminus \Lambda^*| {\leqslant}\frac{n^2}{k} \cdot |{\mathcal{I}}| + \exp\bigg( - \frac{\delta k}{2^{10} \lambda} \bigg) {\lambda k / 2 \choose k}.$$

To prove Lemma \[lem:stability\], we will successively refine $\Lambda \setminus \Lambda^*$, at each step showing that some subset with a particular property is small. The first step in the proof of Lemma \[lem:stability\] is the following stability lemma, which is an almost immediate consequence of Theorem \[thm:M:stability\].

\[lem:stability:first\] Let $\lambda {\geqslant}3$ and $n,k \in {\mathbb{N}}$, with $k {\geqslant}(\log n)^4$ and $k {\geqslant}2^{480} \lambda^{4}$. There are at most $$\exp\bigg( - \frac{\delta k}{2^9 \lambda} \bigg)  {\lambda k / 2 \choose k}$$ sets $A \in \Lambda$ such that $$| A \setminus P | > \delta k$$ for every arithmetic progression $P$ of size $\lambda k/2$.

Note first that if $k {\geqslant}(\log n)^4$ and $k {\geqslant}2^{480} \lambda^{4}$ then $\frac{k}{(\log n)^{3}} {\geqslant}k^{1/4} {\geqslant}2^{120} \lambda$. Therefore, applying Theorem \[thm:M:stability\] with $\gamma = 2^{-9} \lambda^{-1} \delta$, it follows that for all but at most $$\exp\bigg( - \frac{\delta k}{2^9\lambda} \bigg) {\lambda k / 2 \choose k}$$ sets $A \in \Lambda$, there exists $T \subset A$, with $|T| {\leqslant}(2^9 + 2^7 \lambda) \gamma k {\leqslant}\delta k$, such that $A \setminus T$ is contained in an arithmetic
= 2^{-18 } \lambda^{-2}$. 

 \[lem: stability\ ] Let $ \lambda { \geqslant}3 $ and $ n, k \in { \mathbb{N}}$, with $ k { \geqslant}(\log n)^4 $ and $ k { \geqslant}2^{480 } \lambda^{20}$. We have $ $ |\Lambda \setminus \Lambda^*| { \leqslant}\frac{n^2}{k } \cdot |{\mathcal{I}}| + \exp\bigg (- \frac{\delta k}{2^{10 } \lambda } \bigg) { \lambda k / 2 \choose k}.$$ 

 To prove Lemma   \[lem: stability\ ], we will successively polish $ \Lambda \setminus \Lambda^*$, at each gradation showing that some subset with a particular property is little. The first step in the validation of Lemma   \[lem: stability\ ] is the following stability lemma, which is an almost immediate consequence of Theorem   \[thm: M: stability\ ]. 

 \[lem: constancy: first\ ] lease $ \lambda { \geqslant}3 $ and $ n, k \in { \mathbb{N}}$, with $ k { \geqslant}(\log n)^4 $ and $ k { \geqslant}2^{480 } \lambda^{4}$. There be at most $ $ \exp\bigg (- \frac{\delta k}{2 ^ 9 \lambda } \bigg)   { \lambda k / 2 \choose k}$$ sets $ A \in \Lambda$ such that $ $ | A \setminus P | > \delta k$$ for every arithmetical progression $ P$ of size $ \lambda k/2$. 

 Note first that if $ k { \geqslant}(\log n)^4 $ and $ k { \geqslant}2^{480 } \lambda^{4}$ then $ \frac{k}{(\log n)^{3 } } { \geqslant}k^{1/4 } { \geqslant}2^{120 } \lambda$. Therefore, applying Theorem   \[thm: M: stability\ ] with $ \gamma = 2^{-9 } \lambda^{-1 } \delta$, it succeed that for all but at most $ $ \exp\bigg (- \frac{\delta k}{2 ^ 9\lambda } \bigg) { \lambda k / 2 \choose k}$$ sets $ A \in \Lambda$, there exist $ T \subset A$, with $ |T| { \leqslant}(2 ^ 9 + 2 ^ 7 \lambda) \gamma k { \leqslant}\delta k$, such that $ A \setminus T$ is contained in an arithmetic
 = 2^{-18} \pambda^{-2}$.

\[lem:stability\] Let $\lxmbda {\geqslant}3$ cbd $n,k \mn {\mathgb{N}}$, with $k {\geqslant}(\log n)^4$ and $k {\geqslent}2^{480} \oambdq^{20}$. We have $$|\Lambda \setmivus \Lambdw^*| {\leqslabt}\frec{n^2}{k} \cdot |{\mathcal{I}}| + \exp\blyg( - \fdwc{\denva k}{2^{10} \lambda} \bign) {\lambda k / 2 \choose k}.$$

To psoxe Lemma \[lem:stability\], we will successidely regije $\Lambda \setmynus \Jambsa^*$, at each step showing that some aubset xith a particulsr property is small. The flrst step in the proof of Lemma \[len:stafulity\] is the following stability lgmma, which is an almost immediatd conxequence od Rheltem \[thm:M:stabioity\].

\[lvm:stability:fivxt\] Let $\lambda {\geqslant}3$ and $k,k \in {\marhbb{N}}$, with $k {\geqslant}(\nog n)^4$ and $k {\geqslagt}2^{480} \lambda^{4}$. Tkere are at most $$\exp\bugt( - \frdc{\denta y}{2^9 \laobdz} \uigf)  {\lamhda k / 2 \chooss k}$$ sets $A \un \Lambda$ such that $$| W \setminus P | > \delta k$$ for every arithmetic progression $P$ of vizs $\lambda k/2$.

Note first thqt if $k {\geqslant}(\log n)^4$ and $k {\gezslant}2^{480} \lambda^{4}$ then $\frac{k}{(\log n)^{3}} {\geqslant}k^{1/4} {\geqslant}2^{120} \nambde$. Ghexcnore, qpolying Theorem \[thm:M:stability\] with $\gamma = 2^{-9} \lambqz^{-1} \cekta$, it follows that for akl bij at most $$\exp\bkgg( - \fxzc{\selta k}{2^9\lambda} \bigg) {\lambda k / 2 \xhoose k}$$ fets $A \in \Lambda$, there exists $T \subset A$, winh $|T| {\leqslant}(2^9 + 2^7 \lambda) \gamma k {\ledslamt}\delya k$, such that $A \setminbs T$ ia contained in an arjghmetic
= 2^{-18} \lambda^{-2}$. \[lem:stability\] Let $\lambda {\geqslant}3$ \in with $k n)^4$ and $k \setminus {\leqslant}\frac{n^2}{k} \cdot |{\mathcal{I}}| \exp\bigg( - \frac{\delta \lambda} \bigg) {\lambda k / 2 k}.$$ To prove Lemma \[lem:stability\], we will successively refine $\Lambda \setminus \Lambda^*$, at step showing that some subset with a particular property is small. The first in proof Lemma is the following stability lemma, which is an almost immediate consequence of Theorem \[thm:M:stability\]. \[lem:stability:first\] Let {\geqslant}3$ and $n,k \in {\mathbb{N}}$, with $k {\geqslant}(\log and $k {\geqslant}2^{480} \lambda^{4}$. are at most $$\exp\bigg( - k}{2^9 \bigg) {\lambda / \choose sets $A \in such that $$| A \setminus P | > \delta k$$ for every arithmetic progression $P$ of size k/2$. Note if $k n)^4$ $k \lambda^{4}$ then $\frac{k}{(\log {\geqslant}2^{120} \lambda$. Therefore, applying Theorem \[thm:M:stability\] 2^{-9} \lambda^{-1} \delta$, it follows that for all at most - \frac{\delta k}{2^9\lambda} \bigg) {\lambda k 2 \choose k}$$ sets $A \in \Lambda$, there $T \subset A$, with $|T| {\leqslant}(2^9 + 2^7 \lambda) \gamma k {\leqslant}\delta k$, such that T$ is contained in arithmetic
 = 2^{-18} \lambda^{-2}$.

\[lem:stability\] Let $\lambDa {\geqslant}3$ And $n,k \In {\mAthBb{n}}$, witH $k {\geQslant}(\log n)^4$ and $k {\GEqslAnt}2^{480} \lambda^{20}$. We have $$|\Lambda \sEtminUs \lAmbdA^*| {\LeQslanT}\frac{n^2}{k} \CDoT |{\MAthCaL{I}}| + \Exp\BiGG( - \fRac{\deLta K}{2^{10} \lambda} \Bigg) {\lambda K / 2 \chOoSe k}.$$

To prove LeMMa \[Lem:stabiliTy\], wE will successIveLy refiNe $\lamBDa \setMinUs \LamBda^*$, at eACh step Showing thAt SOme subSEt with a PARtIculAr property is small. tHe FIrst step in the pRoof of leMMa \[LEM:stAbiLity\] is the fOlLowinG StabiliTY lEMMA, whICh is an almost iMmediate conSEquEnce of thEorEM \[thm:M:sTabilItY\].

\[Lem:Stability:fiRst\] LEt $\lambda {\gEqslanT}3$ And $n,k \in {\MAthbb{N}}$, wIth $k {\geQslAnt}(\Log n)^4$ ANd $K {\gEqsLaNT}2^{480} \laMBdA^{4}$. ThERe aRe at most $$\ExP\bIgg( - \frAc{\deLTA K}{2^9 \LambDa} \bIgg)  {\lAmbda K / 2 \choose k}$$ sets $A \In \LAmbdA$ SucH that $$| a \setmInus p | > \dElta k$$ For eveRy ariThMetic progressioN $P$ of Size $\lambdA k/2$.

NOtE fiRsT that IF $k {\geqsLanT}(\loG n)^4$ and $k {\gEqslant}2^{480} \LAmbDa^{4}$ THEN $\fRac{k}{(\log n)^{3}} {\geqslant}k^{1/4} {\gEqSLAnT}2^{120} \lambda$. THerefoRE, aPpLYing TheoReM \[thM:M:stABIlity\] With $\GAmMa = 2^{-9} \lambda^{-1} \Delta$, iT FoLlOws that FoR all buT aT moSt $$\eXp\bigG( - \Frac{\Delta k}{2^9\Lambda} \biGg) {\lamBDa k / 2 \choose k}$$ sets $a \In \Lambda$, there EXiSTS $T \SUbseT A$, wIth $|T| {\leqslanT}(2^9 + 2^7 \lamBDa) \gaMma k {\LEqSlaNT}\deltA k$, sucH tHAt $a \Setminus T$ is containeD iN an ariThmetIc
 = 2^{-18} \lambda^{-2}$.
\[lem:sta bilit y\]  Le t$\la mbda  {\geqslant}3$ and$n,k \in {\mathbb{N}}$ , wit h$ k {\ g eq slant }(\logn )^ 4 $  an d$k  {\ ge q sl ant}2 ^{4 80} \la mbda^{20}$ . W ehave $$|\Lam b da  \setminus  \L ambda^*| {\l eqs lant}\ fr ac{ n ^2}{k } \ cdot|{\mat h cal{I} }| + \exp \b i gg( -\ frac{\d e l ta  k}{ 2^{10} \lambda} \ b ig g ) {\lambda k /  2 \ch oo s ek } .$$ 

T o prove Le mm a \[l e m:stabi l it y \ ] , w e  will success ively refin e  $\ Lambda  \ set m inus \ Lambd a^ * $,at each ste p sh owing tha t some subsetw ith a p articu lar  pr oper t yis  sm al l . T h efir s t s tep in t he  p roofof L e m m a  \[l em: stab ility \] is the fol low ings tab ility  lemm a, w hi ch is  an al mostim mediate consequ ence  of Theor em\[ thm :M :stab i lity\] .
\[l em:stab ility:f i rst \] L e t$\lambda {\geqslan t} 3 $  a nd $n,k\in {\ m at hb b {N}}$, w it h $ k {\ g e qslan t}(\ l og  n)^4$ a nd $k{ \g eq slant}2 ^{ 480} \ la mbd a^{ 4}$.T here  are a t most $ $\exp \ bigg( - \frac{ \ delta k}{2^9\ la m b da }  \bi gg)   {\lambdak /2  \ch oose k} $$s ets $ A \in  \ L am b da$ such that $$| A  \ setmin us P| > \delta k$ $ for ever y a rithmeti c pr o gr e ssion $P$ of s ize $ \lambda k/ 2 $.

Note  firs t that i f $k {\ge q s lant}(\l ogn)^ 4$and $ k{\geqslant}2^ { 4 80}\l ambda^{ 4}$  then $ \fr ac{ k}{ (\l og  n)^{3}}{\geqsla nt }k ^{ 1/ 4}{\geq s lant}2^{ 12 0}\l amb da$.T herefo re, a pply in gT heo rem \[t h m: M : stab il it y\]wit h$\gam ma = 2^{ -9} \la mbda^{-1}  \d e lta$ ,it  follow s that for al lbut at mos t$$\ exp\bi g g ( - \fra c{\delta k}{2^9\lambda} \bigg){\l ambda  k /  2 \choos e k }$$ se ts$ A \in\Lambd a$, t he ree x ists$ T  \ sub se t A$, with $ |T|  {\le qs lant }(2^9 +  2^7 \lambda) \gam m a k  {\leqslant}\ del ta k $ ,  s uch th a t $ A\ set m i nus T$ is conta ined in an  a r it hmetic
 =_2^{-18} \lambda^{-2}$.

\[lem:stability\]_Let $\lambda {\geqslant}3$ and_$n,k \in_{\mathbb{N}}$,_with $k_{\geqslant}(\log_n)^4$ and $k_{\geqslant}2^{480} \lambda^{20}$. We_have $$|\Lambda \setminus \Lambda^*|_{\leqslant}\frac{n^2}{k} \cdot |{\mathcal{I}}|_+_\exp\bigg( - \frac{\delta k}{2^{10} \lambda} \bigg) {\lambda k / 2 \choose k}.$$

To prove Lemma \[lem:stability\],_we_will successively_refine_$\Lambda_\setminus \Lambda^*$, at each step_showing that some subset with_a particular_property is small. The first step in the_proof_of Lemma \[lem:stability\] is_the following stability lemma, which is an almost immediate_consequence of Theorem \[thm:M:stability\].

\[lem:stability:first\] Let $\lambda {\geqslant}3$_and $n,k \in_{\mathbb{N}}$,_with_$k {\geqslant}(\log n)^4$ and_$k {\geqslant}2^{480} \lambda^{4}$. There are at_most $$\exp\bigg( - \frac{\delta k}{2^9 \lambda}_\bigg)  {\lambda k / 2 \choose_k}$$ sets $A \in \Lambda$ such_that $$| A \setminus P_| >_\delta k$$ for every arithmetic_progression $P$ of_size $\lambda_k/2$.

Note first that_if $k {\geqslant}(\log n)^4$ and $k_{\geqslant}2^{480} \lambda^{4}$ then_$\frac{k}{(\log n)^{3}} {\geqslant}k^{1/4} {\geqslant}2^{120} \lambda$. Therefore,_applying_Theorem \[thm:M:stability\] with $\gamma_=_2^{-9}_\lambda^{-1} \delta$,_it follows that_for_all but_at_most $$\exp\bigg( - \frac{\delta k}{2^9\lambda} \bigg)_{\lambda_k / 2 \choose k}$$ sets $A_\in \Lambda$, there exists_$T_\subset A$, with $|T|_{\leqslant}(2^9 + 2^7 \lambda) \gamma_k {\leqslant}\delta k$, such that $A_\setminus T$_is contained_in an arithmetic