Problem solved: I did not actually read the table given on page 70 of nagel and newman. s does have a Godel number. It's 7. So ss0 would be broken down into 7, 7, and 6, since 0 is given the number 6. That makes me so much less confused. Without realizing that, I just didn't know how to construct the infinite class of formulas that have number successors in them.

I'm trying to read through the book Gödel's proof by Nagel and Newman, and I have some questions about representing primitive recursive truths with Gödel numbering. Specifically, I'm pretty sure I understand that a numerical variable is given its own Gödel number greater than 12. What I don't understand is if/how actual numbers, like 0, s0, ss0, sss0, and so on are represented via Gödel numbering in a formula.

I don't have much of a math background other than a few classes including intro to analysis, discrete structures, linear algebra, and vector calc (did poorly in those about 7-8 years ago). Regardless, the book seems to be written for anyone, regardless of their math background, as long as they bear with the authors as they develop parts of a formal system. Also, apologies for not using Math Jax or whatever is used for formatting. I'll figure it out if I have more posts to make.

Problem from the book:

We have a way of describing the formula '~(0 = 0)' - 2^1 x 3^8 x 5^6 x 7^5 x 11^6 x 13^9. There are 12 types of symbols, and each symbol is given a Gödel number. The formula is given a Gödel number by assigning each symbol of the formula a sequentially ordered prime number, raising that prime to the power of the symbol's Gödel number, and making that one factor of the formula.

The authors make a meta-mathematical statement about this formula "the tilde is the first symbol of this formula".

The meta-mathematical statement can be represented with formulas derived from the axioms of PM (Principia Mathematica):

(There exists Z) (sss...sss0 = z x ss0) AND ~(There exists Z)(sss...sss0 = z x (ss0 x ss0))

This says that there exists a number Z such that '~(0 = 0)' has a Gödel number which is divisible by 2, but not by 2^2. This expresses that the tilde is the first symbol of the formula, since ~ has a Gödel number of 1, and is raised to the power of the first prime, 2.

What I'm missing here is how the longer formula expressing the meta-mathematical statement in PM is represented via Gödel numbering.

The longer formula has sss...sss0 and ss0. On page 74 of my book, it's given that numerical variables can be assigned Gödel numbers greater than 12, like the primes 13, 17, 19, and so on.

Looking at this formula again: (There exists Z) (sss...sss0 = z x ss0) AND ~(There exists Z)(sss...sss0 = z x (ss0 x ss0))

Are those numerical successors simply represented by a numerical variable, or are they explicitly written out? The book does not give any Gödel number for the natural numbers. It only says that they are possible substitutions for numerical variables.

If I'm correct, you can't write any random formula with unsubstituted numerical variables and have it be a definite true statement about a specific selection of numbers. What if we were trying to show that 5 is a factor of 81002? It wouldn't be true. The above formula is only true because ss0 is a factor of the formula's Gödel number which has 2^1 as a factor, and does not have 2^2 as a factor.

I guess I'm just a bit lost, and I don't know what the Gödel number of the meta-mathematical statement would be, given that it has a bunch of sss...sss0 type numbers in it. It should have one though as a theorem of PM.

Editing in a tldr/clarification: My concern is that there's no way that I know to assign s0, ss0, sss0 a godel number, so I don't know how the meta-mathematical statement gets a Godel number. I understand how it does if we assign numerical variables to those successors of 0, but variables themselves don't describe the specific situation we're talking about (that 2^1 is a factor but not 2^2), and therefore aren't guaranteed to make a true statement.

Is it that every single natural number gets its own numerical variable? Say, s0 gets x, x gets the Godel number 13, sssssssss0 gets a, a gets Godel number 101 (or whatever).

  • $\begingroup$ one word: primes $\endgroup$ Commented May 19 at 20:40
  • $\begingroup$ @RyRytheFlyGuy Primes are used a bunch in Godel numbering so I don't yet understand what that may be referring to. $\endgroup$ Commented May 19 at 20:55
  • $\begingroup$ primes = axioms $\endgroup$ Commented May 19 at 21:31
  • $\begingroup$ @RyRytheFlyGuy So, if I'm following, you can build a formula out of a bunch of axioms, and so it'll be built out of a bunch of primes. If I have a formula that contains ssss0, will that formula have a different Godel number from one that replaces ssss0 with sss0? I guess one thing that complicates it is that it has to be built from the axioms, so if you're trying to make an untrue statement, and switching ssss0 with sss0 makes it untrue, then you can't build it. $\endgroup$ Commented May 19 at 21:35
  • 1
    $\begingroup$ @RyRytheFlyGuy I figured it out. I didn't realize Nagel and Newman gave s the Godel number 7. That gets rid of all my confusion, for now. $\endgroup$ Commented May 19 at 21:48

2 Answers 2


No, each natural is represented by a string of $s$'s followed by $0$, so $5$ is represented as $sssss0$. When we want to find the Godel number of a sentence that includes $5$ we treat each character one by one. If we want to write the sentence $3=1+2$ and find its Godel number, we first must write it in the official language as $sss0=s0+ss0$. We use the Godel numbers of the characters as the exponents of the primes in order. As the number of $s$ is $7$, the number of $0$ is $6$, the number of $=$ is $5$ and the number of $+$ is $11$ we get the sequence $(7,7,7,6,5,7,6,11,7,7,6)$ and $2^73^75^711^613^517^719^623^{11}29^731^737^6$ as the Godel number of this sentence. There is another example just below Table 3 on page 75 in my edition.

The details of the numbering system vary among authors. I believe Nagel and Newman use the comma to separate sentences in a proof. Another book I have does not use the comma but rather starts the primes at $3$ for a simple sentence. Then if you have sentences with Godel numbers $s_1,s_2,s_3$ the sequence of them would be represented by $2^{s_1}3^{s_2}5^{s_3}$. The details do not matter as long as you can represent the required functions.

  • $\begingroup$ The table of Godel numbers of the characters used in sentences is on page 70 of my edition, so the example I describe is probably a little later in yours. $\endgroup$ Commented May 19 at 21:51
  • $\begingroup$ Yeah I just went back to the book and saw that s does have a number. Gets rid of all my confusion. I don't have proof that I figured it out on my own, but thanks for giving this answer and confirming. I feel a bit silly lol. $\endgroup$ Commented May 19 at 21:51

Problem solved: I did not actually read the table given on page 70 of nagel and newman. s does have a Godel number. It's 7. So ss0 would be broken down into 7, 7, and 6, since 0 is given the number 6. That makes me so much less confused. Without realizing that, I just didn't know how to construct the infinite class of formulas that have number successors in them.

Well, not so fast. Yes, you now have numbers for the individual symbols, but you still need to code expressions involving those symbols. Indeed, we don't code numbers 'themselves' ... we just code symbols, but also expressions of symbols, and whole proof objects involving those expressions. But we don't code numbers.

Now, as far as coding expressions of symbols, there are many ways you can reasonably do this.

The most intuitive and obvious way to do this is of course to just concatenate the codes, so that, for example, $ss0$ becomes $776$. However, this method can quickly run into trouble: since you need to decode the expressions from the codings, you need to ensure that you cannot have two different logic objects have the same code. And suppose the code for the function symbol $f$ would be $77$. Then the code for $f0$ would be $776$, just like the code for $ss0$, and so that's not what we want.

Now, there are ways to code the individual symbols to make the coding of expressions thereof be unique. For example, we could use numbers that, when written in decimal, are such that the first digit represents the start of a new symbol, and make sure that that digit does not occur elsewhere. For example, $ss0$ could be coded as $171716$, while $f0$ would then be $17716$. We could also use that first digit to represent the kind of symbol we are dealing with. For example, constant symbols $c_0$, $c_1$, $c_2$ ... could be coded as $1$, $19$, $199$, etc., while variables $v_0, v_1, v_2, ..$ would be $2$, $29$, $299$, etc.

However, most treatments will use some kind of prime coding, exploiting the fact that numbers have a unique prime factorization. For example, $ss0$ would be coded as the number $2^7 \times 3^7 \times 5^6 = 4374000000$, while $f0$ becomes $2^77 \times 3^6$. Given $4374000000$ we find its prime factors, find that it's $2^7 \times 3^7 \times 5^6$, and recover the expression $ss0$ from that. For practical purposes, many treatments will actually use the first prime exponent to indicate the length of the string, and so $ss0$ would be coded as the number $2^3 \times 3^7 \times 5^7 \times 7 ^ 6$.

In sum, there are many ways to do this kind of coding, and you don't have to use prime coding. In fact, think about this: logic symbols, expressions, and whole proof objects used in logic software are (somehow) represented with long binary strings, and you can imagine that for efficiency sake those will not involve any prime codings.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .