I recently asked myself a question concerning a constructivist reading of the Church-Turing thesis. Let us give the latter in the following formulation: put $EC(f)$ for "$f$ is effectively computable" and $R(f)$ for "$f$ is recursive", then $EC(f) \rightarrow R(f)$.
Now, in a constructivist reading, $EC(f) \rightarrow R(f)$ holds iff we have a total constructive function $h(x, y)$ such that, for every effectively computable $f$, for every $\pi$ proof of $EC(f)$, $h(f, \pi)$ is a proof of $R(f)$. However, it is generally admitted that "total constructive function" means nothing but "effectively computable function". So, if $h(x, y)$ is a total constructive function, it is an effectively computable function, and hence it should be, so to say, auto-applicable, i.e., it should be able to prove of itself that, if it is an effectively computable function, then it is a recursive function, i.e. again, for every $\pi$ proof of $EC(h(x, y))$, $h(h(x, y), \pi)$ is a proof of $R(h(x, y))$.
I was wondering if an auto-applicability of this kind, together with what $h(x, y)$ is supposedly expected to do, may create some problematic diagonalizations. What would you think about that?
Ok, so, as far as I understand, there seems to be two arguments that may concern my question. The first stems from the observation that, in an extensional approach, a Church function $(N \to N) \to N$ is injective and, provided it also is surjective or decidable, one easily derive a contradiction. However, this argument fails in that there are models providing an injective function $(N \to N) \to N$.
The second is instead based on the fact that, thanks to Kleene $T$ predicate, one can encode an algorithm $h(x, x) : (N \to N) \to N$ deciding whether programs halt or not. One can then define a diagonal function $$[\lambda x : N. \neg h(x, x)] : N \to N$$ for which the Church function would give us a code, say $n$. But then, we have a contradiction when we consider $$h(n, n)$$ However, I can't see how the contradiction is derived here, it maybe is $$h(n, n) = 1 \leftrightarrow d(n) \ \text{halts} \leftrightarrow \neg h(n, n) = 1 \leftrightarrow h(n, n) = 0$$ is that correct?
However, the problem with Church's thesis here does not really derive from the fact that computable functions are proved to be recursive by an auto-applicable computable function. It derives from the decidability of function equality, which, again if I am not wrong, implies that one can encode a decision algorithm.