1

I am trying to implement the Gödel numbering scheme in Nagel and Newman [1]. It uses first an encoding of the alphabet which we can use to give Gödel numbers to formulas and then an encoding of sequences of such formulas. They claim that given a Gödel number we can retrieve the original formula or sequence of formulas. They note that if the factorization of the Gödel number is the product of successive primes then it can be either a formula or a sequence of formulas. On page 79 they say "In this case the expression to which it corresponds can be exactly determined". I would like to know how this can be done. If I am not mistaken I find exactly the same Gödel number for two different expressions:

Take the formula $\vee \vee$ and the sequence of formulas $\sim : \sim$ (I use a colon to separate the formulas in a sequence since this symbol isn't present in their alphabet, write such sequences on top of each other.). The encoding of a formula $f$ uses a previously fixed assignment of numbers $n(f_i)$ to the symbols $f_i$ and then takes the product of the $i$th prime to the power of the number $n(i)$ assigned to the $i$th symbol.

$$\phi(f):=\prod_{i =1}^{\text{Length}(f)} p_i^{n(f_i)}.$$

Similarly, for a sequence $s$ of formulas they take the Gödel number $\phi(s_i)$ of each formula and then form the product of the $i$th prime to the power of the Gödel number $\phi(s_i)$ of the $i$th formula:

$$\phi(s):=\prod_{i = 1}^{\text{Length}(f)} p_i^{\phi(s_i)}.$$

Note that $n(\vee)=2$ and $n(\sim)=1$. This is enough to see that
$$\phi(\vee \vee)=2^2 \times 3^2=36$$ and $$\phi(\sim : \sim)=2^{(2^1)} \times 3^{(2^1)}=36.$$ These are somehow trivial examples and maybe they violate the rules for what constitutes a formula, but can I really be sure that this encoding scheme doesn't have collisions for non-trivial cases? Did I miss something that solves this problem? If not, is there a better encoding scheme? I have had a look and somehow the sequence of formula encoding is usually only mentioned as a side note if at all.

[1] Nagel, Ernest, and James R. Newman. "Gödel’s Proof, ed. Douglas R. Hofstadter, rev. ed." (2001).

mab
  • 177
  • There are many "numbering schema" but they all have the basic feature that no different formulas can have the same code. See page 69: "to assign a unique number to each formula". – Mauro ALLEGRANZA Feb 25 '20 at 14:52
  • 1
    It was long ago, but I believe for a single formula you start the primes at $3$, not $2$. Then any even number corresponds to a sequence of formulas. $\vee \vee$ would be $3^2 \cdot 5^2$ and $\sim:\sim$ would be $2^{3^1}\cdot 3^{3^1}$ – Ross Millikan Feb 25 '20 at 14:53
  • 2
    $\lor \lor$ is not a formula. – Mauro ALLEGRANZA Feb 25 '20 at 14:58
  • @MauroALLEGRANZA So for formulas there are definitely no collisions? Is this somehow obvious? – mab Feb 25 '20 at 15:10
  • @RossMillikan They explicitly start with the prime 2 in both cases (pp.76-77). However, that may be a simple solution you propose there. So whenever I find a 2 in the prime factorization I know it is a sequence of formulas? I can't see that going wrong at the moment... – mab Feb 25 '20 at 15:18
  • 1
    @MauroALLEGRANZA: I believe the numbering is supposed to assign a number to any string of symbols, whether it is a syntactically correct statement or not. Several of the functions are then used to sort out the syntactically correct statements. I recall there one called Axiom(n) that was true if $n$ was the number of an instance of one of the axioms. – Ross Millikan Feb 25 '20 at 15:30
  • 1
    Nagel & Newman is well-known for being a little bit sloppy... Original Godel's paper as well as Boolos&Jeffrey's textbook use odd numbers for basic logical symbols: I think that is enough to avoid "clashes". – Mauro ALLEGRANZA Feb 25 '20 at 15:31
  • 1
    Goedel was not satisfied with the treatment of Nagel & Newman – Mauro ALLEGRANZA Feb 25 '20 at 15:58
  • Having said that, is it possible that the book have so a blatant error ? See page 69: "Gödel first showed that it is possible to assign a unique number to each elementary sign, each formula (or sequence of signs), and each proof (or finite sequence of formulas)." Thus, the rules of the game are: each sequence of symbols (formula or not) must have a unique code. – Mauro ALLEGRANZA Feb 26 '20 at 09:12
  • @MauroALLEGRANZA I am also quite surprised. Especially, since changing the Goedel numbers for symbols from the first few odd integers to just the first few integers is quite simple and doesn't make the argument much easier to follow. So why did they do it if they weren't sure about it? – mab Feb 26 '20 at 14:01
  • Agreed: first of all my best esteem for having discovered an error in a very old (and thus often reprinted and reviewed (new edition by Hofstadter)) and well-known book: maybe you are the first one to discover it... otherwise (as you acutely observed) why not using the "odd-based" one that works so well? There is no real benefit in "simplifying" it, because no one will ever compute G-numbers except for very very simple examples used for pedagogical purposes, like $(0=0)$ (Boolos & Jeffrey) and $(\exists x)(x=sy)$ (N&N). – Mauro ALLEGRANZA Feb 26 '20 at 14:20

1 Answers1

2

In Goedel's original paper, all the single symbols of the formal alphabet were encoded as distinct odd numbers. Since every encoded alphabet sequence begins with a positive power of two, i.e is an even number, for any number which encodes anything at all, if its exponent for two is odd it must encode a formula, whereas if its exponent of two is even the number must encode a sequence of formulae.

Note that Nagel and Newman's encoding causes problems by encoding $\vee$ as 2.

mab
  • 177
PMar
  • 36
  • Yes, you are right. However the second sentence is quite hard to read. In the end I'm willing to accept your answer but I'll wait a bit in case you are willing to make it clearer. – mab Feb 26 '20 at 02:15