As part of a reduction I am trying to come up with a computable function that will fill in the holes of another function. Suppose $A$ is the set of all $n$ such that $\Phi(x,n)$ halts for all $x \in \mathbb{N}$, and suppose $B$ is the set of all $n$ such that $\Phi(x,n)$ halts for almost all $x \in \mathbb{N}$ ($\mathbb{N}$ minus finitely many natural numbers). I'm trying to show that $A \leq_m B$, i.e. $a \in A \Leftrightarrow f(a) \in B$ for some $f$.
What I have so far is: Suppose $f(x) = S^1_1(x,p)$ for some program encoded by $p$. let $f(a) \in B \Leftrightarrow \Phi(x,f(a))$ halts for almost all $x \Leftrightarrow \Phi(x,S^1_1(a,p))$ halts for almost all $x \Leftrightarrow \Phi(x,a,p)$ halts for almost all $x \Leftrightarrow$ (somehow by def of p) $\Phi(x,a)$ halts for all $x \Leftrightarrow a \in A$.
I'm stuck on what the program P should be to complete this proof. I think that it should "fill the holes" from almost all to all natural numbers. Any hints?
Note: $\Phi$ is the universal $L$ program and $S^1_1$ is from the S-n-m theorem (or parameter theorem).