Show that infinite sum/product of primitive recursive functions can be non-recursive.

computabilitylogic

first of all there is another recently posted question with almost the same title which got closed (this is the question: Can an infinite product of recursive functions be non-recursive?). So my question isn't a duplicate and I'm not the author of the closed question. Also, the posted answer for that question doesn't seem to be answering mine, because the considered $f(i)$ function in that post doesn't seem to be primitive recursive.

I believe that the overall logic is the same both for the sum and for the product, so I'll only take into consideration the case of the sum. Firstly, a bounded sum is defined as $g(x_1, …, x_n, y) = \sum_{i<y} {f(x_1,…,x_n, i)}$ for some $f: \mathbb{N}^{n+1} \to \mathbb{N}$ function and $g(x_1,…,x_n,0)=0$. Now, I only need the case when $f$ is primitively recursive and thus it will be defined everywhere. As did one of the commenters of that question I mentioned above, I'll define the infinite sum as $\psi(x_1,…,x_n) = \sum_{i = 0}^\infty {f(x_1,…,x_n, i)}$ if the sum is finite, and undefined if otherwise. The problem is to analyse the recursiveness of $\psi$. First of all I tried to get rid of the infinity sign. Suppose $\psi$ is defined for some fixed $x_1,…,x_n$. Then, $\psi(x_1,…,x_n) = 0 \iff \forall i\, f(x_1,…,x_n,i)=0$ and if $\psi(x_1,…,x_n) \neq 0$ then $\exists N=N(x_1,…,x_n)$ so big that $\psi(x_1,…,x_n) = g(x_1,…,x_n,N+1)$. Then in order to show that $\psi$ is non-recursive for some $f$, it's sufficient to find a primitive recursive $f$ and a non-recursive $N$, such that $1)\,f(x_1,…,x_n, N) \neq 0$; $2)\,\forall i > N(x_1,…,x_n)\implies\, f(x_1,…,x_n, i) = 0$. Note that the first condition can be omitted. Supposing that only $2)$ takes place, then we can find the minimum $i$ such that $f(x_1,…,x_n,N-i)\neq 0$ and it can be found using a non-recursive function (as it will depend on $N$). So now, in order to check if the infinite sum of a certain primitive recursive function $f$ will be recursive or non-recursive it is sufficient to find the function $N$ and analyze its recursiveness.

Did I make any mistakes so far? Could you give hints on how I could move on from here, maybe an example of such $\psi$ or $f$? Is it practical to search for such a function $N$ to prove the (non) recursiveness of $\psi$? Thanks in advance.

Update: could the problem of finding N be transformed into a halting problem?

Best Answer

(Turning my comment into an answer, and CW-ifying for obvious reasons:)

In fact, contra the opening of this post, the functions defined at the linked question are p.r. So the answer there applies here as well.

Related Question