[proofplan]
We exhibit each halting set as the domain of an explicit computable partial function, which is the definition of a computably enumerable set. For $\mathbb{K}_0 = \{(w, v) \in \mathbb{W}^2 : f_{w, 1}(v) \downarrow\}$, the [software principle](/theorems/1820) provides a computable partial function $f_{U, 2} : \mathbb{W}^2 \rightharpoonup \mathbb{W}$ satisfying $f_{U, 2}(w, v) = f_{w, 1}(v)$ whenever the right-hand side is defined; since the two sides share the same domain of definition, $\operatorname{dom} f_{U, 2} = \mathbb{K}_0$. For $\mathbb{K} = \{w \in \mathbb{W} : f_{w, 1}(w) \downarrow\}$, precompose $f_{U, 2}$ with the computable diagonal $\Delta(w) = (w, w)$: the domain of $f_{U, 2} \circ \Delta$ is exactly $\mathbb{K}$. Closure of computable partial functions under composition and the definition of "computably enumerable" via domains then complete both parts.
[/proofplan]
[step:Fix the definitions of $\mathbb{K}_0$, $\mathbb{K}$, and computable enumerability]
Recall the course's definitions. Let $\mathbb{W} = \Sigma^*$ and let $\operatorname{code}$ be a fixed injective encoding of register machines as words of $\mathbb{W}$, as in the proof of [Computability of the Configuration Function](/theorems/1818). For a register machine $N$ of arity $k$, write $f_{N, k} : \mathbb{W}^k \rightharpoonup \mathbb{W}$ for the partial function $N$ computes. The course writes $f_{w, k}$ as shorthand for $f_{N, k}$ when $w = \operatorname{code}(N)$; if $w$ is not the code of any machine, $f_{w, k}$ is defined to be the everywhere-undefined partial function. Then:
\begin{align*}
\mathbb{K}_0 &:= \{(w, v) \in \mathbb{W}^2 : f_{w, 1}(v) \downarrow\}, \\
\mathbb{K} &:= \{w \in \mathbb{W} : f_{w, 1}(w) \downarrow\}.
\end{align*}
A set $X \subseteq \mathbb{W}^k$ is *computably enumerable* iff $X = \varnothing$ or $X$ is the domain of some computable partial function $\mathbb{W}^k \rightharpoonup \mathbb{W}$. Both $\mathbb{K}_0$ and $\mathbb{K}$ are non-empty (for example, the code of any register machine that halts immediately belongs, paired with any input for $\mathbb{K}_0$, and itself for $\mathbb{K}$ provided the machine's arity is $1$), so it suffices to exhibit each as the domain of a computable partial function.
[/step]
[step:Exhibit $\mathbb{K}_0$ as the domain of the universal partial function]
By the [software principle](/theorems/1820), there is a register machine $U$ of arity $2$ whose computed function
\begin{align*}
f_{U, 2} : \mathbb{W}^2 &\rightharpoonup \mathbb{W}, \\
(w, v) &\mapsto \begin{cases} f_{w, 1}(v) & \text{if } w \text{ is the code of a register machine of arity } 1 \text{ and } f_{w, 1}(v) \downarrow, \\ \uparrow & \text{otherwise}, \end{cases}
\end{align*}
acts as a universal interpreter: it decodes $w$ into a machine, then simulates it on $v$. In the course's shorthand convention $f_{w, 1} \equiv \uparrow$ whenever $w$ does not encode a machine of arity $1$, so we may write $f_{U, 2}(w, v) = f_{w, 1}(v)$ uniformly, with both sides undefined exactly on the same arguments.
Hence
\begin{align*}
\operatorname{dom} f_{U, 2} &= \{(w, v) \in \mathbb{W}^2 : f_{U, 2}(w, v) \downarrow\} = \{(w, v) : f_{w, 1}(v) \downarrow\} = \mathbb{K}_0.
\end{align*}
Since $f_{U, 2}$ is computable (its witness is $U$) and $\mathbb{K}_0$ is its domain, $\mathbb{K}_0$ is computably enumerable.
[/step]
[step:Exhibit $\mathbb{K}$ as the domain of $f_{U, 2} \circ \Delta$]
Define the diagonal map
\begin{align*}
\Delta : \mathbb{W} &\to \mathbb{W}^2, \\
w &\mapsto (w, w).
\end{align*}
Read as a pair of computable coordinate functions, $\Delta$ is computable: each coordinate is the identity $\pi_1^1 : \mathbb{W} \to \mathbb{W}$, which is a basic projection and thus computable by L0 in Step 3 of the proof of [Recursive Implies Computable](/theorems/1817).
Define
\begin{align*}
F : \mathbb{W} &\rightharpoonup \mathbb{W}, \\
w &\mapsto f_{U, 2}(\Delta(w)) = f_{U, 2}(w, w).
\end{align*}
[claim:$F$ is computable]
$F$ is the composition of $\Delta$ (total computable) with $f_{U, 2}$ (computable by Step 2). By L1 in Step 4 of the proof of [Recursive Implies Computable](/theorems/1817) (closure of computable partial functions under composition), $F$ is computable. Explicitly, a register machine $M_F$ witnessing $F$ is obtained by: starting from input register $0 = w$, copy $w$ into input register $1$ (producing the pair $(w, w)$ in the first two input registers, which is exactly the initial configuration for $U$); then run the machine $U$. The output is $f_{U, 2}(w, w)$ as required, and the composite diverges iff $U$ diverges on $(w, w)$.
[/claim]
Now compute $\operatorname{dom} F$:
\begin{align*}
\operatorname{dom} F &= \{w \in \mathbb{W} : F(w) \downarrow\} = \{w : f_{U, 2}(w, w) \downarrow\} = \{w : f_{w, 1}(w) \downarrow\} = \mathbb{K},
\end{align*}
where the third equality uses the defining property $f_{U, 2}(w, v) = f_{w, 1}(v)$ (with both sides defined on the same set) from Step 2. Since $F$ is computable, $\mathbb{K}$ is computably enumerable.
[/step]
[step:Conclude]
Both $\mathbb{K}_0 = \operatorname{dom} f_{U, 2}$ (Step 2) and $\mathbb{K} = \operatorname{dom} F$ (Step 3) are domains of computable partial functions, and both are non-empty (Step 1). Hence both are computably enumerable.
[/step]