[step:Majorize the $W$-tricked primes by a pseudorandom enveloping sieve]
We use the Green-Tao enveloping sieve theorem in the finite cyclic interval model needed for $k$-term arithmetic progressions. For the fixed integer $k$, choose the sieve parameters in the Green-Tao construction with linear-forms complexity and correlation order large enough for the relative Szemerédi theorem for $k$-term progressions. Concretely, for every fixed finite system $\Psi=(\psi_i)_{i=1}^{t}$ of pairwise non-proportional affine-linear forms
\begin{align*}
\psi_i: \mathbb{Z}^{d} &\to \mathbb{Z}
\end{align*}
whose number of forms $t$, dimension $d$, and integer coefficients are bounded by constants depending only on $k$, the majorant must satisfy the linear forms estimate
\begin{align*}
\frac{1}{M^{d}}\sum_{x \in \{1,\dots,M\}^{d}} \prod_{i=1}^{t} \nu_{N,b,W}(\psi_i(x)) = 1 + o_{N \to \infty}(1),
\end{align*}
whenever all values $\psi_i(x)$ lie in $\{1,\dots,N\}$. It must also satisfy the corresponding correlation estimates up to the bounded order required by the Cauchy-Schwarz expansion of the $k$-term progression count: products of at most that many translates of $\nu_{N,b,W}$ are bounded by a fixed correlation weight with bounded moments. These two estimates are the Green-Tao linear forms condition and Green-Tao correlation condition at level $k$.
The enveloping sieve theorem supplies, after $w$ is chosen sufficiently large in terms of $k$ and then $N$ is chosen sufficiently large in terms of $w$ and $k$, a function
\begin{align*}
\nu_{N,b,W}: \{1,\dots,N\} &\to [0,\infty)
\end{align*}
with mean $1+o_{N \to \infty}(1)$ satisfying these two estimates uniformly in every residue class $b$ with $\gcd(b,W)=1$. It also gives the pointwise domination
\begin{align*}
0 \le f_{N,b,W}(n) \le C_k\nu_{N,b,W}(n)
\end{align*}
for every $n \in \{1,\dots,N\}$, where $C_k>0$ is finite and depends only on $k$, not on $N$, $b$, or the admissible choice of $W$ after the above parameter selection. Therefore the normalized function built from $f_{N,b,W}$ is eligible for the Green-Tao relative Szemerédi theorem.
[/step]