Logic and
Load the menuLoad the menu

Copyright   James R Meyer    2012 - 2024 https://www.jamesrmeyer.com

A Step by Step Guide to Gödel’s Incompleteness Proof:
4: The Gödel numbering system




Page last updated 28 Dec 2022


Now printer friendly: this guide has now been set up for easy printing so that readers can also access the information in paper format.


Note that (provided you have JavaScript enabled) clicking on () will reveal further details, while clicking again will hide it. Also, clicking on () will reveal relevant parts of Gödel’s text (shown in green), while clicking again will hide it.


(like this)


(like this)

This guide is intended to assist in attaining a full understanding of Gödel’s proof. If there is any difficulty in following any part of the proof, please contact me and I will try to help. And if you have any suggestions as to how this guide might be improved, please contact me. This guide is intended to be read alongside the English translation of Gödel’s original proof which can be viewed online at English translation of Gödel’s original proof.


The Gödel numbering system

In his proof Gödel used a method so that any combination of symbols of the formal system can be represented as a natural number. This method has since been called the Gödel numbering system. In the paper it is given in the paragraph beginning “The basic symbols of the system P…” .


Gödel’s numbering system means that every formula of the formal system P can be represented as a number; and every proof-schema of the formal system P can also be represented as a number.


The Gödel numbering method is to be a one-to-one function, so that every string of symbols is matched to a unique number. No two strings can have the same number, and no two numbers can match to the same string. The numbering method can be considered as a two-step process. The first step is to match every symbol of the formal system to a specific number. The basic symbols 0, f, ¬, , , (, and ) are matched to the numbers 1, 3, 5, 7, 9, 11 and 13 as below:


0   1 f   3 ¬   5    7
   9  11 )   13      


where is the symbol for ‘or’, and is the symbol for ‘for all’.

For variables, the matching is done using prime numbers greater than 13. For type 1 variables, we use 17, 19, 23, etc. For type 2 variables, we use 172, 192, 232, etc. In general, for a type n variable, we use 17n, 19n, 23n, etc ().


“variables of type n are given numbers of the form pn (where p is a prime number > 13).”


In this way, every basic symbol and every variable of the formal system has a unique corresponding natural number.


This is the definition of a function, and although Gödel does not give this function a name, it is useful to call this function ψ; for example, ψ[] = 9. We will need to refer to this function later on. The function ψ gives a corresponding series of natural numbers for every symbol string of the formal system.


NB: It is important to bear in mind that while a variable of the formal system P is actually a string of symbols, for the purposes of the Gödel numbering function, every variable is considered in the same way as a single symbol. So, for convenience and to avoid undue verbosity, from this point forward, when the term ‘symbol’ is used, unless otherwise indicated, that means either a single basic symbol of the system P or a variable of the system P.


The next step is to convert such a series of natural numbers into a single natural number in a way that retains all the original information. This involves the use of prime numbers: 2, 3, 5, 7, 11, … . The method is to raise the power of the nth prime number to the value of the nth number in the series ().


“to every finite series of basic symbols … there corresponds, one-to-one, a finite series of natural numbers. These finite series of natural numbers we now map (again in a one-to-one correspondence) on to natural numbers, by letting the number 2n1, 3n2 … pknk correspond to the series n1, n2, … nk, where pk denotes the k‑th prime number in order of magnitude.”


For example, for the sequence ¬(ff0), the corresponding number series is 511331, 13. The single number corresponding to this series is 25· 311· 53· 73· 111· 1313 (where · indicates multiplication).


The name Gödel gives to this function is φ(a), where a is some combination of symbols of the formal system. Today it is commonly called the ‘Gödel numbering function’. The inverse of this function can be applied in order to retrieve the original combination of symbols.

Note that for type n variables, the factor corresponding to the variable is given as p(q ^ n) where p is the nth prime in the series of numbers 2, 3, 5, 7, 11, … , rather than p ^ q ^ n.


Correspondence of relations

In the part beginning with “Suppose now one is given a class or relation…”, Gödel states that given a relationship between symbol strings of the formal system, the aim is to produce a corresponding relation between the corresponding numbers given by the function φ. And the aim is also that if the relationship between the symbol strings applies, then the corresponding relation between the corresponding numbers also holds. In that way, the relations between the corresponding numbers mirror precisely the relationships between the symbol strings.


Usage of Italics

NB: The following is a crucially important detail and the failure to observe the distinction between certain words in italics and not in italics has been a source of confusion to many people. In this guide and in my English translation of Gödel’s original proof I also use a colored background to emphasize this distinction.


The Gödel numbering function φ gives for every symbol string a corresponding natural number. In Gödel’s paper such numbers are referred to by italics, so: (Footnote: This is the same as in the original German; in van Heijenoort’s and Hirzel’s translations, SMALL CAPITALS are used for the same purpose.)


It should also be noted that when Gödel refers to variables in italics, he is not actually referring to the Gödel numbering function φ, but to the ψ function (see above), so:


NB: Gödel also refers to numbers as a ‘series of formulas’ or as a ‘proof-schema’, where a ‘proof-schema’ is a special case of a ‘series of formulas’. These are referred to in the relations 22 and 44 which occur later in the proof. A ‘series of formulas’ or a ‘proof-schema’ is a number x with the value 2φ[ formula1 ] · 3φ[ formula2 ] · 5φ[ formula3 ] ·…, in other words, the exponents of the prime factors of x are Gödel numbers, rather than x itself being a Gödel number. So it is important to note that the number x in this case does not correspond by Gödel numbering to a series of formulas nor to a proof schema of the formal system P, i.e:

x  ≠  φ (series of formulas of the formal system P).

x  ≠  φ (proof-schema of the formal system P).


It is crucial to remember that the same word in Gödel’s proof - in plain text - and in italics - represents two quite separate concepts. The failure to appreciate this distinction has led many people astray in their attempt to understand the proof. It is important to always bear in mind the distinction between a statement which actually states:

“There exist propositional formulas A of the system P such that neither A nor the negation of A are provable by any proof-schema of the system P


and a similar statement of Gödel’s that is actually referring to natural numbers, such as the statement:


“There exist propositional formulae a such that neither a nor the negation of a are provable formulae”.


The above statement is not a statement that refers directly to formulas of the system P; it is a statement about numbers which correspond to expressions of the formal system, so that the statement is actually stating:


“There exists a number a, where a = φ[A] and A is a formula, such that there does not exist any number b, where b = φ[B] and B is a proof-schema and where B is a proof of A or ¬A.”


Because this dual use of the same word can result in confusion, it will not be used in this guide, except to refer to the italicized words in Gödel’s original paper.






Interested in supporting this site?

You can help by sharing the site with others. You can also donate at Go Get Funding: Logic and Language where there are full details.



As site owner I reserve the right to keep my comments sections as I deem appropriate. I do not use that right to unfairly censor valid criticism. My reasons for deleting or editing comments do not include deleting a comment because it disagrees with what is on my website. Reasons for exclusion include:
Frivolous, irrelevant comments.
Comments devoid of logical basis.
Derogatory comments.
Long-winded comments.
Comments with excessive number of different points.
Questions about matters that do not relate to the page they post on. Such posts are not comments.
Comments with a substantial amount of mathematical terms not properly formatted will not be published unless a file (such as doc, tex, pdf) is simultaneously emailed to me, and where the mathematical terms are correctly formatted.

Reasons for deleting comments of certain users:
Bulk posting of comments in a short space of time, often on several different pages, and which are not simply part of an ongoing discussion. Multiple anonymous user names for one person.
Users, who, when shown their point is wrong, immediately claim that they just wrote it incorrectly and rewrite it again - still erroneously, or else attack something else on my site - erroneously. After the first few instances, further posts are deleted.
Users who make persistent erroneous attacks in a scatter-gun attempt to try to find some error in what I write on this site. After the first few instances, further posts are deleted.

Difficulties in understanding the site content are usually best addressed by contacting me by e-mail.


Based on HashOver Comment System by Jacob Barkdull

Copyright   James R Meyer   2012 - 2024