HOME

TheInfoList



OR:

In
computability theory Computability theory, also known as recursion theory, is a branch of mathematical logic, computer science, and the theory of computation that originated in the 1930s with the study of computable functions and Turing degrees. The field has since e ...
the ' theorem, (also called the translation lemma, parameter theorem, and the parameterization theorem) is a basic result about
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
s (and, more generally,
Gödel numbering In mathematical logic, a Gödel numbering is a function that assigns to each symbol and well-formed formula of some formal language a unique natural number, called its Gödel number. The concept was developed by Kurt Gödel for the proof of his ...
s of the computable functions) (Soare 1987, Rogers 1967). It was first proved by Stephen Cole Kleene (1943). The name ' comes from the occurrence of an ''S'' with subscript ''n'' and superscript ''m'' in the original formulation of the theorem (see below). In practical terms, the theorem says that for a given programming language and positive integers ''m'' and ''n'', there exists a particular
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algorithms are used as specificat ...
that accepts as input the
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
of a program with free variables, together with ''m'' values. This algorithm generates source code that effectively substitutes the values for the first ''m'' free variables, leaving the rest of the variables free.


Details

The basic form of the theorem applies to functions of two arguments (Nies 2009, p. 6). Given a Gödel numbering \varphi of recursive functions, there is a primitive recursive function ''s'' of two arguments with the following property: for every Gödel number ''p'' of a partial computable function ''f'' with two arguments, the expressions \varphi_(y) and f(x, y) are defined for the same combinations of natural numbers ''x'' and ''y'', and their values are equal for any such combination. In other words, the following
extensional equality In logic, extensionality, or extensional equality, refers to principles that judge objects to be equal if they have the same external properties. It stands in contrast to the concept of intensionality, which is concerned with whether the internal ...
of functions holds for every ''x'': : \varphi_ \simeq \lambda y.\varphi_p(x, y). More generally, for any ''m'', , there exists a primitive recursive function S^m_n of arguments that behaves as follows: for every Gödel number ''p'' of a partial computable function with arguments, and all values of ''x''1, …, ''x''''m'': : \varphi_ \simeq \lambda y_1, \dots, y_n.\varphi_p(x_1, \dots, x_m, y_1, \dots, y_n). The function ''s'' described above can be taken to be S^1_1.


Formal statement

Given arities and , for every Turing Machine \text_x of arity m + n and for all possible values of inputs y_1, \dots, y_m, there exists a Turing machine \text_k of arity , such that : \forall z_1, \dots, z_n : \text_x(y_1, \dots, y_m, z_1, \dots, z_n) = \text_k(z_1, \dots, z_n). Furthermore, there is a Turing machine that allows to be calculated from and ; it is denoted k = S_n^m(x, y_1, \dots, y_m). Informally, finds the Turing Machine \text_k that is the result of hardcoding the values of into \text_x. The result generalizes to any
Turing-complete In computability theory, a system of data-manipulation rules (such as a computer's instruction set, a programming language, or a cellular automaton) is said to be Turing-complete or computationally universal if it can be used to simulate any Tur ...
computing model.


Example

The following
Lisp A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech. Types * A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lisping ...
code implements s11 for Lisp. (defun s11 (f x) (let ((y (gensym))) (list 'lambda (list y) (list f x y)))) For example, evaluates to .


See also

*
Currying In mathematics and computer science, currying is the technique of translating the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single argument. For example, currying a function f that ...
*
Kleene's recursion theorem In computability theory, Kleene's recursion theorems are a pair of fundamental results about the application of computable functions to their own descriptions. The theorems were first proved by Stephen Kleene in 1938 and appear in his 1952 b ...
*
Partial evaluation In computing, partial evaluation is a technique for several different types of program optimization by specialization. The most straightforward application is to produce new programs that run faster than the originals while being guaranteed to ...


References

* * (This is the reference that the 1989 edition of Odifreddi's "Classical Recursion Theory" gives on p. 131 for the S^m_n theorem.) * * * *


External links

*{{mathworld, urlname=Kleeness-m-nTheorem, title=Kleene's ''s''-''m''-''n'' Theorem Computability theory Theorems in theory of computation Articles with example Lisp (programming language) code