I have the following problem.
Let $\Phi$ be an admissible numbering of the single-parameter partially-recursive functions. That is, $\Phi(i, x) = f_i(x)$ with $f_i$ the $i$th partially-recusive function with one parameter. Denote with $f(x)\!\uparrow$ that $f(x)$ is undefined in the sense that its computation does not halt.
Now let $B$ be a partially computable set (finite or infinite) so that $\Phi(i,i)\!\uparrow$ for all $i \in B$.
Show that
$\qquad H_1(x) = \begin{cases}1 \text{ if } \Phi(x,x)\downarrow \\ 0 \text{ if } x \in B \\ \uparrow \text{ otherwise}\end{cases}$
is partially recursive.
I know from here that there is even an infinite set. I am preparing for an exam, so just assume that they give an suitable infinite set. How would the program differ if B is a finite set like $B= \{b_1,b_2,\cdots,b_n\}$?
Also a function obtained from composition, recursion is partially computable. So since definition by piecewise is primitive recursive , Could I say $x \in B$ is partially computable if $B$ is finite or would it be better to comeup with a program. I don't know how using just these four instructions, one could say $x \in B$ or not.
\begin{array} \\ \;\;\;\;\;\;\;\;\;Y \gets 0 \\ \;\;\;\;\;\;\;\;\;\text{IF } X \neq 0 \text{ GOTO } A \\ [E] \;\;\;\text{ GOTO } E \\ [A]\;\;\;\; Y \gets Y+1 \end{array}
I am using the Davis book of Computability where this is mentioned in page 70 of second edition.