[proofplan]
The theorem assumes the Selberg upper bound formulation, which reduces the sifted count to a displayed main term plus the accumulated remainder $R(D,z)$:
\begin{align*}
S(A,P,z) \le \frac{X}{G(D,z)} + R(D,z).
\end{align*}
The dimension hypothesis gives a uniform lower bound for $G(D,z)$, so the main term has size at most $X(\log D)^{-\kappa}$. The assumed remainder estimate has one additional negative logarithmic power and is therefore absorbed into the same bound because $D \ge 2$.
[/proofplan]
[step:Apply the assumed Selberg upper bound at level $D$]
Let $R(D,z)$ denote the accumulated Selberg remainder term appearing in the theorem statement at level $D$ and sifting range $z$. Since $2 \le D \le z$, the Selberg upper bound hypothesis in the theorem statement applies to the sequence $A$, the sifting product $P(z)$, the denominator $G(D,z)$, and the level $D$. Therefore
\begin{align*}
S(A,P,z) \le \frac{X}{G(D,z)} + R(D,z).
\end{align*}
This step uses the Selberg upper bound formulation as an explicit hypothesis of the theorem rather than as an uncited external theorem.
[guided]
The first task is to replace the arithmetic counting problem by a numerical estimate. In this theorem, that reduction is not being proved from scratch; it is one of the hypotheses. More precisely, the statement assumes that for every admissible pair $2 \le D \le z$, there is an accumulated Selberg remainder term $R(D,z)$ such that the sifted counting function satisfies
\begin{align*}
S(A,P,z) \le \frac{X}{G(D,z)} + R(D,z).
\end{align*}
We now verify that the hypothesis applies in the present proof. The level and sifting range satisfy $2 \le D \le z$ by the theorem statement. The quantities $A$, $P(z)$, $G(D,z)$, and $R(D,z)$ are the same objects appearing in the assumed Selberg upper bound formulation. Hence the assumed inequality applies directly and gives
\begin{align*}
S(A,P,z) \le \frac{X}{G(D,z)} + R(D,z).
\end{align*}
The term
\begin{align*}
\frac{X}{G(D,z)}
\end{align*}
is the main Selberg term, while $R(D,z)$ is the accumulated contribution of the local remainders. The remaining proof is therefore purely quantitative: bound the denominator from below and show that the remainder has smaller logarithmic order.
[/guided]
[/step]
[step:Bound the Selberg main term using the dimension lower bound]
By the quantitative dimension hypothesis, there is a constant $c_3 > 0$ such that
\begin{align*}
G(D,z) \ge c_3(\log D)^\kappa.
\end{align*}
Since $G(D,z) > 0$, taking reciprocals reverses the inequality:
\begin{align*}
\frac{1}{G(D,z)} \le \frac{1}{c_3(\log D)^\kappa}.
\end{align*}
Multiplying by $X > 0$ gives
\begin{align*}
\frac{X}{G(D,z)} \le c_3^{-1}X(\log D)^{-\kappa}.
\end{align*}
[guided]
The main Selberg term is controlled entirely by the lower bound for $G(D,z)$. The notation $G(D,z) \gg (\log D)^\kappa$ means that there exists a constant $c_3 > 0$, depending only on $\kappa$ and the local regularity constants, such that
\begin{align*}
G(D,z) \ge c_3(\log D)^\kappa.
\end{align*}
This lower bound is positive because $D \ge 2$ gives $\log D > 0$ and $\kappa > 0$.
Since both sides are positive, taking reciprocals reverses the inequality and gives
\begin{align*}
\frac{1}{G(D,z)} \le \frac{1}{c_3(\log D)^\kappa}.
\end{align*}
Multiplying by the positive main scale $X$ yields
\begin{align*}
\frac{X}{G(D,z)} \le c_3^{-1}X(\log D)^{-\kappa}.
\end{align*}
This is the desired logarithmic order for the Selberg main term.
[/guided]
[/step]
[step:Absorb the remainder into the same logarithmic order]
By hypothesis, there is a constant $C_R > 0$, depending only on the permitted dimension and local regularity data, such that the remainder term satisfies
\begin{align*}
|R(D,z)| \le C_R X(\log D)^{-\kappa-1}.
\end{align*}
Because $D \ge 2$, we have $\log D \ge \log 2 > 0$, and hence
\begin{align*}
(\log D)^{-\kappa-1} = \frac{1}{\log D}(\log D)^{-\kappa} \le \frac{1}{\log 2}(\log D)^{-\kappa}.
\end{align*}
Therefore
\begin{align*}
R(D,z) \le |R(D,z)| \le \frac{C_R}{\log 2}X(\log D)^{-\kappa}.
\end{align*}
[guided]
The assumed Selberg remainder estimate says that there is a constant $C_R > 0$, depending only on the permitted dimension and local regularity data, such that
\begin{align*}
|R(D,z)| \le C_R X(\log D)^{-\kappa-1}.
\end{align*}
We need to compare this to the target scale $X(\log D)^{-\kappa}$. The extra factor is $(\log D)^{-1}$, and the hypothesis $D \ge 2$ gives the uniform lower bound $\log D \ge \log 2 > 0$. Hence
\begin{align*}
(\log D)^{-\kappa-1} = \frac{1}{\log D}(\log D)^{-\kappa} \le \frac{1}{\log 2}(\log D)^{-\kappa}.
\end{align*}
Substituting this into the remainder estimate gives
\begin{align*}
|R(D,z)| \le \frac{C_R}{\log 2}X(\log D)^{-\kappa}.
\end{align*}
Since $R(D,z) \le |R(D,z)|$, we obtain
\begin{align*}
R(D,z) \le \frac{C_R}{\log 2}X(\log D)^{-\kappa}.
\end{align*}
Thus the remainder is absorbed into the same logarithmic order as the main term.
[/guided]
[/step]
[step:Combine the main term and remainder estimates]
Substituting the main term estimate and the remainder estimate into the Selberg upper bound gives
\begin{align*}
S(A,P,z) \le c_3^{-1}X(\log D)^{-\kappa} + \frac{C_R}{\log 2}X(\log D)^{-\kappa}.
\end{align*}
Define
\begin{align*}
C := c_3^{-1} + \frac{C_R}{\log 2}.
\end{align*}
The constant $c_3$ is the constant in the lower bound for $G(D,z)$, and $C_R$ is the constant in the assumed Selberg remainder estimate. By the dependence hypotheses on these constants, $C > 0$ depends only on $\kappa$ and the local regularity constants. The preceding inequality becomes
\begin{align*}
S(A,P,z) \le C\frac{X}{(\log D)^\kappa}.
\end{align*}
This is the desired Selberg sieve upper bound in dimension $\kappa$.
[guided]
We now combine the two estimates with the Selberg upper bound obtained at the start. The upper bound was
\begin{align*}
S(A,P,z) \le \frac{X}{G(D,z)} + R(D,z).
\end{align*}
The main-term estimate gives
\begin{align*}
\frac{X}{G(D,z)} \le c_3^{-1}X(\log D)^{-\kappa},
\end{align*}
and the remainder estimate gives
\begin{align*}
R(D,z) \le \frac{C_R}{\log 2}X(\log D)^{-\kappa}.
\end{align*}
Substituting both inequalities into the Selberg upper bound yields
\begin{align*}
S(A,P,z) \le c_3^{-1}X(\log D)^{-\kappa} + \frac{C_R}{\log 2}X(\log D)^{-\kappa}.
\end{align*}
Define the combined constant by
\begin{align*}
C := c_3^{-1} + \frac{C_R}{\log 2}.
\end{align*}
The constant $c_3$ comes from the lower bound for $G(D,z)$, and $C_R$ comes from the assumed Selberg remainder estimate. Therefore $C > 0$ depends only on $\kappa$ and the local regularity constants. The preceding inequality becomes
\begin{align*}
S(A,P,z) \le C\frac{X}{(\log D)^\kappa}.
\end{align*}
This is exactly the asserted upper bound
\begin{align*}
S(A,P,z) \ll \frac{X}{(\log D)^\kappa}.
\end{align*}
[/guided]
[/step]