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.