[guided]We unpack why this reduction works and why we had to "waste an argument" in $g$.
*The target: self-applying convergence.* The set $\mathbb{K}$ is defined by the self-application predicate "$f_{w, 1}(w) \downarrow$" — the machine coded by $w$ halts on input $w$. Deciding membership in $\mathbb{K}$ therefore requires producing, from an arbitrary input $w$, a *code* whose self-application is equivalent to $w \in X$.
*Why not try $h(w) = \operatorname{code}(M_f)$?* This candidate is constant in $w$, so it cannot distinguish $w \in X$ from $w \notin X$. We need $h$ to depend on $w$.
*The $s$-$m$-$n$ idea.* The $s$-$m$-$n$ theorem is the mechanism by which "dependence on a parameter" becomes computable: it says that plugging a parameter into a multi-argument computable function yields a *code* that depends computably on the parameter. Formally, for any computable $g : \mathbb{W}^{k+1} \rightharpoonup \mathbb{W}$, the partial application $(u_1, \ldots, u_k) \mapsto g(u_1, \ldots, u_k, w)$ is itself computable (fix $w$, run $g$), but what matters is that its *code* can be computed totally from $w$. That is the promotion from "sliced semantics" to "computable code selection".
*Why make $g$ ignore its first argument?* We want the resulting sliced function $u \mapsto g(u, w) = f(w)$ to be *constant* in $u$, because then $W_{h(w)} = \{u : f_{h(w), 1}(u) \downarrow\}$ is all-or-nothing: either $f(w)$ converges and $W_{h(w)} = \mathbb{W}$, or $f(w)$ diverges and $W_{h(w)} = \varnothing$. The all-or-nothing is what lets us decide $h(w) \in \mathbb{K}$ by simply asking "is $W_{h(w)} \neq \varnothing$?" — equivalently, "is $f(w)$ defined?" — which is exactly "$w \in X$".
*Why is the self-application $f_{h(w), 1}(h(w))$ the right thing to check?* Because of the all-or-nothing structure. When $W_{h(w)} = \mathbb{W}$, *every* input converges — in particular $h(w)$ itself. When $W_{h(w)} = \varnothing$, *no* input converges — in particular $h(w)$. The self-application is just one of many equivalent ways to witness definedness; we use it because that is how $\mathbb{K}$ is defined.
*Where did we use totality of $h$?* A reduction must be total — see the definition of $\leq_m$ (Step 1 of the proof of [Many-One Reducibility Is a Preorder](/theorems/???)). The $s$-$m$-$n$ theorem gives this: $h$ is *total* computable, not merely partial. Even when $f(w) \uparrow$, the code $h(w)$ is produced — it is the code of a machine that loops on all inputs.
*Summary of dependencies.* Step 2 depends on [Halting Sets Are Computably Enumerable](/theorems/1822) and [Computably Enumerable Sets Are $\Sigma_1$](/theorems/1824). Step 3 depends on [Computably Enumerable Sets Are $\Sigma_1$](/theorems/1824). Step 5 depends on the [$s$-$m$-$n$ Theorem](/theorems/???). Step 7 depends only on the definition of $\mathbb{K}$ and the case analysis of Step 6.[/guided]