[step:Build the $s$-$m$-$n$-produced reduction $h$ from a "positive" witness $w$]Suppose we are given $w \in \mathbb{W}$ with $W_w \neq \varnothing$ (the role of $w$ will be pinned down in Steps 4 and 5). Fix a register machine $M_w$ of arity $1$ with code $w$, so $f_{w, 1}$ is the partial function it computes.
Define
\begin{align*}
g : \mathbb{W}^2 &\rightharpoonup \mathbb{W}, \\
(v, u) &\mapsto f_{w, 1}(v).
\end{align*}
[claim:$g$ is computable]
$g$ ignores its second argument and returns the result of running $M_w$ on its first. Explicitly, $g = f_{w, 1} \circ \pi_1^2$, where $\pi_1^2 : \mathbb{W}^2 \to \mathbb{W}$, $(v, u) \mapsto v$ is the first projection (total computable by L0 of Step 3 of the proof of [Recursive Implies Computable](/theorems/1817)). By L1 of the same step, $g$ is computable.
[/claim]
Apply the [$s$-$m$-$n$ Theorem](/theorems/???) to $g$, treating $u$ as the parameter: we obtain a total computable
\begin{align*}
h : \mathbb{W} &\to \mathbb{W}
\end{align*}
such that for every $u \in \mathbb{W}$ and $v \in \mathbb{W}$,
\begin{align*}
f_{h(u), 1}(v) &= g(v, u) = f_{w, 1}(v).
\end{align*}
*Wait* — this says $f_{h(u), 1} = f_{w, 1}$ for every $u$, which would make $W_{h(u)} = W_w$ unconditionally, not depending on whether $u \in \mathbb{K}$. That is not what the strategy needs. The fix: we must *force* divergence of $f_{h(u), 1}$ when $u \notin \mathbb{K}$. We do this by gating $g$ on the halting of $f_{u, 1}(u)$.
Replace $g$ above by the *gated* version
\begin{align*}
\tilde g : \mathbb{W}^2 &\rightharpoonup \mathbb{W}, \\
(v, u) &\mapsto \begin{cases} f_{w, 1}(v) & \text{if } f_{u, 1}(u) \downarrow, \\ \uparrow & \text{if } f_{u, 1}(u) \uparrow. \end{cases}
\end{align*}
[claim:$\tilde g$ is computable]
A register machine $M_{\tilde g}$ witnessing $\tilde g$ runs on input $(v, u)$ as follows:
(a) Save a master copy of $v$ in a scratch register.
(b) Run the *universal* register machine on input $(u, u)$ — equivalently, simulate $M_u$ on input $u$. Computability of this subroutine is the content of the universal machine construction (Step 2 of the proof of [Halting Sets Are Computably Enumerable](/theorems/1822), or [Computability of the Configuration Function](/theorems/1818) combined with minimisation). If $f_{u, 1}(u) \uparrow$, the subroutine diverges and so does $M_{\tilde g}$; if $f_{u, 1}(u) \downarrow$, control passes to (c) with the master copy of $v$ recoverable from the scratch register.
(c) Restore $v$ from the scratch register into input register $0$ and run $M_w$ on $v$. The outcome is $f_{w, 1}(v)$.
Formally, $\tilde g = g \circ ((\pi_1^2, (\mathrm{univ}_1 \circ \Delta_2) \circ \pi_2^2))$ or any equivalent composition: we use $f_{u, 1}(u)$ as a convergence gate, then compute $g(v, u) = f_{w, 1}(v)$. By L1 of Step 4 of the proof of [Recursive Implies Computable](/theorems/1817), the composition of computable partial functions is computable; hence $\tilde g$ is computable.
[/claim]
Apply the [$s$-$m$-$n$ Theorem](/theorems/???) to $\tilde g$, treating $u$ as the parameter: we obtain a total computable
\begin{align*}
h : \mathbb{W} &\to \mathbb{W}
\end{align*}
such that for every $u \in \mathbb{W}$ and $v \in \mathbb{W}$,
\begin{align*}
f_{h(u), 1}(v) &= \tilde g(v, u) = \begin{cases} f_{w, 1}(v) & \text{if } u \in \mathbb{K}, \\ \uparrow & \text{if } u \notin \mathbb{K}. \end{cases}
\end{align*}
[claim:For every $u \in \mathbb{W}$: $W_{h(u)} = W_w$ if $u \in \mathbb{K}$, and $W_{h(u)} = \varnothing$ if $u \notin \mathbb{K}$]
Fix $u \in \mathbb{W}$.
*Case $u \in \mathbb{K}$.* Then $f_{u, 1}(u) \downarrow$, so by the previous display $f_{h(u), 1}(v) = f_{w, 1}(v)$ for every $v$ (in particular, both sides converge together and agree when they do). Hence
\begin{align*}
W_{h(u)} &= \operatorname{dom} f_{h(u), 1} = \operatorname{dom} f_{w, 1} = W_w.
\end{align*}
*Case $u \notin \mathbb{K}$.* Then $f_{u, 1}(u) \uparrow$, so $f_{h(u), 1}(v) \uparrow$ for every $v$, giving $W_{h(u)} = \varnothing$.
[/claim]
Translating via weak equivalence: $u \in \mathbb{K} \Rightarrow h(u) \sim w$ and $u \notin \mathbb{K} \Rightarrow h(u) \sim e$. This is the technical core used in both cases of the theorem.[/step]