How do you prove that $A = \{ x \in \mathbb{N} | W_{x} = [0..x]\}$ is a productive set through functional reduction?
You likely need to exploit the second recursion theorem, which states that for any total recursive function $f$ there is some $n$ such that $\varphi_n = \varphi_{f(n)}$.

Given any $k$, using s-m-n you can first construct $f_k$ as follows, where $\#(\ldots)$ stands for "some index of".
$$
f_k(x) = \#\left(y \mapsto 
   \begin{cases}
   0 &amp; \mbox{if } y \leq x \\
   \varphi_k(k) &amp; \mbox{otherwise}
   \end{cases}
\right)
$$

This is recursive total, since it always returns an index (the fact that the index is for a partial function is irrelevant). So, by the second recursion theorem, there must exist $n_k$ for which $\varphi_{n_k} = \varphi_{f(n_k)}$.

By examining the proof of the second recursion theorem, we can also note that $n_k$ is effectively computable from $k$, that is there is a total recursive function $g$ such that $\varphi_{g(k)} = \varphi_{f(g(k))}$.

Let's verify that $g$ m-reduces $\bar K$ to your set $A$.

Assume $k \in \bar K$, and let's prove $g(k) \in A$. The latter means $W_{g(k)} = [0..g(k)]$, which is true because
$$
\varphi_{g(k)}(y) = \varphi_{f(g(k))}(y) =
\begin{cases}
   0 &amp; \mbox{if } y \leq g(k) \\
   \varphi_k(k) &amp; \mbox{otherwise}
   \end{cases}
= \begin{cases}
   0 &amp; \mbox{if } y \leq g(k) \\
   \uparrow &amp; \mbox{otherwise}
   \end{cases}
$$

Now, assume $k \notin \bar K$, and let's prove $g(k) \notin A$. The latter means $W_{g(k)} \neq [0..g(k)]$, which is true because

$$
\varphi_{g(k)}(y) = \varphi_{f(g(k))}(y) =
\begin{cases}
   0 &amp; \mbox{if } y \leq g(k) \\
   \varphi_k(k) &amp; \mbox{otherwise}
   \end{cases}
$$
Since $\varphi_k(k)\downarrow$, we have that $W_{g(k)} = \mathbb N \neq [0..g(k)]$



As a thumb rule, when you are defining a recursive function $f=\varphi_i$ and you need to use its own index $i$ in the definition of the function itself, you need the second recursion theorem.

From a more practical point of view, the second recursion theorem allows one to program in a programming language featuring a function getMyOwnCode() : String which returns the whole source code (the index) of the program calling the function.