3
$\begingroup$

I have written out a proof using lambda-functions that formalizes the exposition of Kleene's Recursion Theorem statement and proof in Michael Sipser's book "Introduction to the Theory of Computation." But my setup is rather naive, so I wonder whether there is a published rigorous proof in a typed lambda-calculus (in the sense of the Lambek-Scott book on categorical logic). If so, there would be a statement and proof of Kleene's Recursion Theorem in the corresponding cartesian closed category.

$\endgroup$
3
  • 3
    $\begingroup$ I'd expect the answer to be negative, because the typed lambda-calculus (in contrast to the untyped one) can be modeled using only total functions (e.g., in the cartesian closed category of sets), while the recursion theorem depends on the availability of partial functions. $\endgroup$ Jul 10, 2019 at 0:07
  • 1
    $\begingroup$ Can you be a bit more precise as to what you proved and what was the methd of proof? Are you saying that you actually constructed all the relevant $\lambda$-terms (where one would usually construct the corresponding Turing machines)? What is the precise statement of the theorem (in particular, how are you encoding natural numbers and how are you encoding Turing machines)? $\endgroup$ Jul 10, 2019 at 7:14
  • $\begingroup$ My result is For every $T\in\calc{2}$ there is $R\in\calc{1}$ such that for $\sigma\in S$, $R\sigma=T(DR,\sigma)$. $\calc{2}$, $\calc{1}$, $S$ are types, and satisfy some conditions. $S$ is a "set of descriptions," $\calc{2}$ is a "set of 2-input partially-defined calculators" and $\calc{1}$ is a "set of 1-input partially-defined calculators." With explicit lambda notation I prove existence of a fixed point, namely $R$, where $DR$ is "the description of $R$." My take was stimulated by Nancy Lynch OpenCourseware , Spring 2011, "Automata, Computability, and Complexity." I cleaned it up. $\endgroup$ Jul 10, 2019 at 20:22

3 Answers 3

4
$\begingroup$

In my paper On fixed-point theorems in synthetic computability I prove the recursion theorem using higher-order intuitionistic logic a la Lambek & Scott in the following form (Theorem 5.2 in the paper):

Theorem: If there is a surjection $e : \mathbb{N} \to A^\mathbb{N}$ then every multivalued map $f : A \rightrightarrows A$ has a fixed point. $\newcommand{\NN}{\mathbb{N}}$

Proof. Recall that a multivalued map $f : A \rightrightarrows A$ is a map $f : A \to P_*(A)$ from $A$ to the set of inhabited subsets of $A$. For every $n \in \NN$ there is $x \in f(e(n)(n))$, hence by the Axiom of Countable Choice there is a map $g : \NN \to A$ such that $g(n) \in f(e(n)(n))$ for all $n \in \NN$. There is $k \in \NN$ such that $e(k) = g$, and so $e(k)(k) = g(k) \in f(e(k)(k))$. $\Box$

Note tha the proof uses the Axiom of Countable Choice, which is valid in realizability toposes, and in particular in the effective topos. Also, the above proof is really using $\lambda$-calculus, but not its notation.

The usual Kleene's Recursion Theorem is a consequence of the synthetic one, at least in the effective topos, see Corollary 5.3 in the paper.

$\endgroup$
0
$\begingroup$

Assume there are types $\mathbb{C}^{(1)},D^{(1)}, \mathbb{C}^{(2)},D^{(2)},S$ and $\lambda$ functions $D:\mathbb{C}^{(n)}\rightarrow D^{(n)}\hookrightarrow S, E:D^{(n)}\rightarrow \mathbb{C}^{(n)}$ such that $D\circ E =1$ and $E\circ D=1$. Define $K: S\rightarrow \mathbb{C}^{(1)}$ by $K\sigma=\lambda \tau\in S.\sigma$. Theorem. For every $T\in \mathbb{C}^{(2)}$ there exists $R\in\mathbb{C}^{(1)}$ such that $R\sigma=T(DR,\sigma)$. Proof. Define $1_S=\lambda \sigma\in S.\sigma$, and define $B=\lambda DM\in D^{(2)}.D(EDM\circ(KDM,1_S))$, where $(KDM,1_S):S\rightarrow \mathbb{C}^{(1)}\times\mathbb{C}^{(1)}$. For any $T\in \mathbb{C}^{(2)}$, define $A=KD(T\circ(B,1_S))\in\mathbb{C}^{(1)}$. Also, define $R=T\circ ((B\circ A),1_S)$. Calculate $(B\circ A)\sigma = B(A\sigma)=BD(T\circ (B,1_S))=D(T\circ (B,1_S)\circ(A,1_S))=D(T\circ(B\circ A),1_S)=DR$. Therefore, $R\sigma=(T\circ (B\circ A,1_S))\sigma=T((B\circ A,1_S)\sigma)=T((B\circ A)\sigma,\sigma)=T(DR,\sigma)$. My original question is whether this is sufficiently abstract to be formalized in a legitimate typed $\lambda-$calculus. I understand there is no idea here about natural numbers ($S$ is just "description strings"). there are no Turing machines here ($\mathbb{C}^{(n)}$ are just types that represent the sets of partial recursive functions with $n$ inputs, $n=1,2$) and I am being very vague about things like arrows and composition.

$\endgroup$
-1
$\begingroup$

Kleene's recursion theorem follows from the call-by-value version of $Y$ combinator (let's call it $Z$), which is a special case of Lawvere's fixed point theorem. The proof can be found in this post: call-by-value version of $Y$ combinator

$$Z := \lambda y.(\lambda x.y(\lambda v.xxv))(\lambda x.y(\lambda v.xxv))$$

$$Zhv=h(Zh)v$$

$$e := Zh\implies ev=hev$$

which is the Kleene's recursion theorem.

$\endgroup$
3
  • $\begingroup$ Kleene's recursion theorem states that for any total computable map $f : \mathbb{N} \to \mathbb{N}$ there is $e$ such that $\varphi_e = \varphi_{f(e)}$. How does your answer establish the theorem? You're just constructing some fixed-point operators in the untyped $\lambda$-calculus. $\endgroup$ Apr 13, 2021 at 23:09
  • $\begingroup$ @Andrej Bauer $ev=hev$ means for any total computable function $h$, there is $e$ such that $\{e\}(v)=\{he\}(v)$. It's almost Kleene's $\varphi_e(v)=\varphi_{h(e)}(v)$. $\endgroup$
    – Xi Li
    Apr 14, 2021 at 1:50
  • $\begingroup$ "Almost"? Heh. To get from the $\lambda$-calculus application $e v$ to Kleene application $\{e\}(v)$ you would have to interpret the $\lambda$-calculus in a suitable model (maybe Kleene's number PCA), but then you have to carry out some computations to verify what you've got. $\endgroup$ Apr 14, 2021 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.