Recursive Relation is Turing Computable

Theorem
Let $f: S \to \set {0, 1}$, where $S \subseteq \N^k$ be a recursive function.

Let the strict encoding of some $\tuple {x_1, x_2, \dotsc, x_k} \in \N^k$ be the string:
 * $1^{x_1} 0 1^{x_2} 0 1^{x_3} 0 \dotsm 0 1^{x_k}$

Let an encoding of some $\tuple {x_1, x_2, \dotsc, x_k} \in \N^k$ be the strict encoding, with any number of $0$'s added or removed from the end.

That is, if $x_k = 0$, the separator between it and $x_{k - 1}$ may be removed, and so on.

Then, there exists a Turing machine such that:
 * The input symbols of the machine are $\set {0, 1}$
 * The accepted language is the set of encodings of $\tuple {x_1, x_2, \dotsc, x_k}$ such that $\map f {x_1, x_2, \dotsc, x_k} = 1$
 * The machine does not halt on an input it is an encoding of some $\tuple {x_1, x_2, \dotsc, x_k}$ such that $\map f {x_1, x_2, \dotsc, x_k}$ is undefined

Proof
Define the function $g: S' \to \set {0, 1}$, where $S \subseteq \N$, as follows:
 * $\map g x = \begin{cases}

0 & : \map {\operatorname{bincodelen} } x > k \\ \map f {\map {\operatorname{bincode} } {x, 0}, \map {\operatorname{bincode} } {x, 1}, \dotsc, \map {\operatorname{bincode} } {x, k} } & : \text {otherwise} \end{cases}$

That is, $g$ is $0$ if the base-$2$ representation contains $1$-digits after the $k$-th $0$.

Otherwise, its value (or lack thereof) matches $f$ when applied to the lengths of the strings of $1$ digits.

Additionally, from: it follows that $g$ is recursive, as it is obtained by substitution on $f$ and other recursive functions.
 * Definition by Cases is Primitive Recursive
 * Ordering Relations are Primitive Recursive
 * Constant Function is Primitive Recursive
 * Primitive Recursive Function is Total Recursive Function

By Recursive Set is Turing Computable, there exists a Turing machine that computes $g$, from which the result follows.