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 function
Computable functions are the basic objects of study in computability theory. Computable functions are the formalized analogue of the intuitive notion of algorithms, in the sense that a function is computable if there exists an algorithm that can do ...
s) (Soare 1987, Rogers 1967). It was first proved by
Stephen Cole Kleene
Stephen Cole Kleene ( ; January 5, 1909 – January 25, 1994) was an American mathematician. One of the students of Alonzo Church, Kleene, along with Rózsa Péter, Alan Turing, Emil Post, and others, is best known as a founder of the branch of ...
(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
In mathematics, and in other disciplines involving formal languages, including mathematical logic and computer science, a free variable is a notation (symbol) that specifies places in an expression where substitution may take place and is not ...
, 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
of recursive functions, there is a
primitive recursive function
In computability theory, a primitive recursive function is roughly speaking a function that can be computed by a computer program whose loops are all "for" loops (that is, an upper bound of the number of iterations of every loop can be determined ...
''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
and
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'':
:
More generally, for any ''m'', , there exists a primitive recursive function
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'':
:
The function ''s'' described above can be taken to be
.
Formal statement
Given arities and , for every Turing Machine
of arity
and for all possible values of inputs
, there exists a Turing machine
of arity , such that
:
Furthermore, there is a Turing machine that allows to be calculated from and ; it is denoted
.
Informally, finds the Turing Machine
that is the result of hardcoding the values of into
. 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 s
11 for Lisp.
(defun s11 (f x)
(let ((y (gensym)))
(list 'lambda (list y) (list f x y))))
For example, evaluates to .
See also
*
Currying
*
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 ...
*
Partial evaluation
References
*
* (This is the reference that the 1989 edition of Odifreddi's "Classical Recursion Theory" gives on p. 131 for the
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