[step:Prove that $Y$ is computable][claim:The set $Y$ is a computable subset of $\Sigma^* \times \mathbb{W}'$]
We describe a total register machine $M_Y$ that, on input $(w, v)$, outputs $a$ if $(w, v) \in Y$ and $\varepsilon$ otherwise; that is, computes the indicator $\mathbb{1}_Y$.
*(a) Parse $v$ into blocks.* Scan $v$ letter by letter. Maintain a list $B = (b_0, b_1, \ldots, b_k)$ of blocks, currently being written into scratch registers. Initialise with $k = 0$ and $b_0 = \varepsilon$. For each letter $\ell$ of $v$ in order:
- if $\ell = \to$, increment $k$ and start a new empty block $b_k = \varepsilon$;
- otherwise $\ell \in N$; append $\ell$ to the current block $b_k$ and verify $\ell \in N$ by lookup against the fixed finite set $N$ (the register machine has the elements of $V$ and $\Sigma$ hard-wired as finitely many comparison constants).
If during the scan any letter $\ell$ is not in $\Sigma'$, the input is ill-formed: halt with $\varepsilon$. After the scan, we have $n := k$ and blocks $\sigma_0 = b_0, \sigma_1 = b_1, \ldots, \sigma_n = b_n \in N^*$.
*(b) Check the boundary strings.* Test whether $\sigma_0 = S$ (string equality against a hard-wired constant — the single letter $S \in V$); if not, halt with $\varepsilon$. Test whether $\sigma_n = w$ (string equality against the input register holding $w$); if not, halt with $\varepsilon$.
*(c) Check each rewriting step.* For each $i \in \{0, 1, \ldots, n - 1\}$, verify $\sigma_i \Rightarrow_G \sigma_{i + 1}$: for each production $\alpha \to \beta \in P$ (finitely many, hard-wired), iterate over all decompositions $\sigma_i = \gamma_1 \alpha \gamma_2$. A decomposition is determined by a starting index $j \in \{0, 1, \ldots, |\sigma_i| - |\alpha|\}$: check whether the substring of $\sigma_i$ of length $|\alpha|$ starting at position $j$ equals $\alpha$; if yes, form $\tau := \gamma_1 \beta \gamma_2$ (a finite string operation on the registers) and test $\tau = \sigma_{i + 1}$. If some $(\alpha \to \beta, j)$ witnesses the step, record success for step $i$; otherwise, after exhausting the finitely many productions and starting indices, halt with $\varepsilon$.
*(d) Halt with $a$.* If all $n$ steps succeed, halt with output $a$.
Each stage is a bounded loop over finite data structures (blocks, productions, starting indices, register comparisons against a fixed finite constant set), hence $M_Y$ is a total register machine. The operations used — letter-by-letter traversal, string concatenation, length computation, substring comparison against a constant — are register-machine-primitive, cf. the register machine constructions in the proof of [Recursive Implies Computable](/theorems/1817). By L0 and L1 in Step 4 of that proof (closure of total computable functions under composition and case distinction), $M_Y$ computes a total function. Its output is $a$ iff, by construction, the three conditions (i)–(iii) in Step 2 hold together with "$\sigma_0 = S$" and "$\sigma_n = w$", which is the definition of $(w, v) \in Y$. Hence $\mathbb{1}_Y$ is total computable, so $Y$ is computable.
[/claim][/step]