Interpret the language of ordered rings in the standard natural numbers, with nonlogical symbols . We give a single first-order formula defining , rather than a separate expression with multiplication signs. The key is Gödel beta-function sequence coding. The remainder relation
uses only the allowed symbols; all variables range over . With , it assigns a unique remainder at each position .
The factorial graph formula via remainder coding asserts that one code contains the initial value , the final value , and every recurrence step. Here is the fully expanded formula, with no remainder-function or factorial symbol:
The first equation represents remainder at position zero: its omitted explicit remainder bound follows from . The second line represents remainder at position . The universally checked equations represent the adjacent remainders and impose multiplication by . Uniqueness of remainders therefore forces them, successively, to be , proving by mathematical induction. When , the recurrence clause is empty and the two endpoint clauses force .
Conversely, choose a positive larger than every value in the finite sequence and divisible by each positive integer at most . The moduli , , are pairwise coprime. Indeed, for , a common divisor of divides and is coprime to , so divides . Since divides , the common divisor must be one. The Chinese remainder theorem gives a nonnegative with for every . The chosen values are smaller than their moduli, so they are the actual remainders; the appropriate quotient witnesses then make true. Thus
The formula has fixed length, independent of . For example, writing its displayed syntax in plain text with one-character variables, ordinary parentheses, and explicit logical connectives takes fewer than characters and fewer than logical-symbol tokens. Its length is therefore as a uniform definition of the graph. Numeral names for particular input values, if substituted for the variables, add their own encoding lengths. Over the ordered ring , restrict every quantifier to nonnegative integers and require ; this gives the same definition on its nonnegative part. It is the chosen arithmetic structure, not ring axioms alone, that makes the formula define factorial.
We prove closure under the defining schemes for primitive recursive functions, keeping all unbounded existential variables outside a bounded arithmetic formula. A bounded quantifier means or , where does not contain . All formulas are interpreted in the standard natural numbers.
First we need a finite sequence code using only the permitted language of ordered rings. Define the bounded arithmetic formula
For given , it specifies the unique remainder of modulo . In particular the quotient and remainder variables are bounded by arithmetic terms; division is not a new language symbol.
Every finite list can be coded by some pair . Choose larger than every list entry and divisible by every integer from to . The moduli are pairwise coprime. Indeed a prime dividing both cannot divide , but then divides ; since and is divisible by that integer, this is impossible. The Chinese remainder theorem gives with for every . Since , each holds. This is Gödel beta-function sequence coding. The external choice of a divisible proves that codes exist; factorial and exponentiation do not occur in the existential bounded representation of a primitive recursive function.
For the zero function, successor function and projections use , and . These formulas need no auxiliary variables. For function composition in recursion theory, suppose have representations with bounded arithmetic formulas . A bounded arithmetic formula for is
Treat every as an auxiliary variable in the outer existential block. The logical conjunction is true for some such variables exactly when is the desired output.
Now suppose
By structural induction for primitive recursive functions, assume and are bounded arithmetic formulas representing . We code the values with . For finite witness array coding, give each component of the step witness another code pair , so that the witness at step is the remainder specified by .
With these code pairs and as free auxiliary variables, take the following bounded arithmetic formula:
The displayed line breaks are only for readability: the bounded quantifiers on the last three lines bind the entire bracket. If , their empty block and logical conjunction are omitted. Expanding every occurrence of leaves only bounded quantifiers, logical conjunctions, the bounded arithmetic formulas already obtained, and the symbols .
If , take the actual finite computation values and select witnesses for the finitely many true instances of , together with witnesses for . The Gödel beta-function sequence coding provides and the finitely many . These make true. Conversely, suppose some code pairs and initial witnesses make true. The unique remainders of give values . The initial clause makes . Every step clause makes , since its coded witnesses satisfy the representing matrix for . Induction on gives , and the final remainder clause gives . This argument includes , when the step condition is empty.
Closure under the initial functions of recursion theory, composition and primitive recursion proves
Coding the step witnesses is essential: leaving an unrestricted existential witness block inside would not give the required syntactic form.
We prove the claim by structural induction for primitive recursive functions. A formula is bounded when every quantifier is a bounded quantifier; this is a Delta-0 formula. The graphs of the initial functions have quantifier-free definitions:
Suppose and the graphs of have existential bounded definitions. Introduce variables for the intermediate values and conjoin the graph formulas
Pulling all unrestricted existential witnesses to the front leaves a bounded matrix, so the required form is preserved by composition.
For primitive recursion, use Gödel beta-function sequence coding. The relation
is bounded in the language of ordered rings. Given any finite sequence , choose larger than all its entries and divisible by . The moduli are pairwise coprime, so the Chinese remainder theorem supplies with for every .
Suppose
and the induction hypothesis gives existential bounded graph formulas for and . Then exactly when there are coding values , together with a common witness bound , such that:
Write each using , bound the variables representing by , and bound every witness used by the graph formulas for and by . All quantifiers checking the displayed finite recursion are then bounded; only and the finitely many outer coding witnesses are unrestricted existential variables. Conversely, any code passing these bounded checks satisfies the recursion equations, and induction on forces its th entry to be . This proves the existential bounded representation of a primitive recursive function.
Let be a nonstandard model of the theory of true arithmetic whose carrier is , and suppose for contradiction that the graphs of and are decidable. Because these operations are total, searching their decidable graphs computes their output on any pair of carrier elements.
Choose disjoint recursively inseparable sets that are computably enumerable, with primitive recursive stage predicates and . Let be nonstandard. True arithmetic proves finite sequence coding, so inside there is an element such that, for every ,
where is the th prime. This can be obtained by taking the product of the selected primes internally; it is the same finite coding mechanism as Gödel beta-function sequence coding.
Define the external set
This set is decidable from the assumed operations. For fixed standard , compute the model element . The division algorithm in gives unique and a remainder among the finitely many standard residues
such that . Dovetail the search over and these finitely many residues, using the computable model operations. It eventually finds the unique remainder, and exactly when that remainder is zero.
If , it enters at a standard stage below the nonstandard , so . If , the true arithmetical sentence asserting that the two enumerations are disjoint holds in , so cannot enter the coded -set below ; hence . Thus
contradicting recursive inseparability. The two operation graphs therefore cannot both be decidable. This is the recursively inseparable-set proof of Tennenbaum theorem.