An Error in a Computer Verified Proof of Incompleteness by John Harrison
James R Meyer Copyright © 2009 - 2026
Version v1 03 November 2011
The following is a HTML transcription of the paper that was in PDF format when originally published, you can see that paper at PDF An Error in a Computer Verified Proof of Incompleteness by John Harrison. The content is the same with some minor formatting changes; the footnotes are now clickable within the text and invlaid links updated. Some additional links have been added for convenience.
Abstract
This paper examines a proof of incompleteness by John Harrison, who claims that his proof has been verified by computer. This paper demonstrates that the proof has a fundamental error of logic which renders the proof invalid.
Contents:
1. Introduction
This paper demonstrates a fundamental error in a proof of incompleteness by John Harrison, the description of which is found in a book by Harrison
J. Harrison, Handbook of Practical Logic and Automated Reasoning.
Cambridge University Press, 2009. ISBN: 9780521899574 (eBook format: ISBN: 9780511508653).
first published in 2005. This paper does not discuss the implications of the failure of the computer verification software to detect the error in the proof; that will be published elsewhere.
2. Harrison’s proof
Harrison’s proof was created using the HOL Light system,
HOL, “The HOL Light theorem prover.”
University of Cambridge Computer Laboratory website: https://hol-light.github.io.
which uses what is called HOL logic within the OCaml computer language. The principle behind the HOL logic that it is based on a theory of types.
Before we deal with the nub of Harrison’s proof, we shall summarize some of the notation and definitions that he uses:
represents what Harrison calls the numeral function, See Harrison’s Section 7.2 Tarski’s theorem on the undefinability of truth. and which gives the numeral of n. It is a function whose variable n has the domain of natural numbers, and the function gives an expression of the formal system that is an expression for a natural number (that is, in the form 0, S0, SS0, …).
represents the Gödel numbering function, See Harrison’s Section 7.2, para Arithmetization of syntax. and gives the Gödel number of ϕ. The domain of the variable ϕ is expressions of the formal system, and the function gives a unique numerical value for every expression of the formal system. This is a function of the meta language.
is a function that is the result of the combination of the two functions above, where the domain of the variable ϕ is expressions of the formal system, and the function gives an expression of the formal system that is an expression for a natural number. This also is a function of the meta language.
is also a function that is the result of the combination of the two functions
is defined as a relation in
where
is defined by Harrisonc as
is definedc as subst
according to Harrison, when a definition is made by
Harrison’s computer code expressions will be printed here in monospace typewriter font, for example: (arith_gnumeral s t).
In his description of his proof, Harrison points out that ‘various sets of natural numbers, and relations over natural numbers, are definable in arithmetic’. His proof of incompleteness is dependent on his Lemma 7.3, which is:
Let
Then
This lemma is dependent on a prior assertion made by Harrison that
Since
and, by the definition of
if
(2.1)
(2.2)
(2.3)
(2.4)
(2.5)
(2.6)
(2.7)
In the above Harrison assumes the equivalence:
that is, Harrison asserts that when
But that equivalence cannot apply within
This means that Harrison’s claim that (2.1) - (2.7) are all equivalent within
3 Response from Harrison to the demonstration of the error in his proof
Harrison’s response to the demonstration of an error in his proof is as follows:
‘In Section 3 the author considers Harrison’s discussion of the proof by HOL Light. However, the author’s criticisms appear not to be based on the actual formal proof itself, but rather on an informal proof in the book. This rather oblique line of criticism is doubly flawed:
1. The author is not in fact discussing the formal proof itself, but what the author claims, without obvious justification, to be an informal description of it. (Where does the book claim that, by the way?)’
The section in Harrison’s book with the heading ‘Gödel’s incompleteness theorem’ is quite obviously a description of a proof of incompleteness which is written in computer code. Why Harrison should imply that the book might not be an accurate description of his proof when his subsequent text (see below) indicates that he accepts that it is such a description, is perplexing; Harrison addresses the issues raised by this author by referring to the correspondence between the book and the proof, as can be seen below.
Harrison continues:
‘2. The author’s criticisms are connected with a typical abbreviatory abuse of language that occurs only in the informal presentation and NOT the formal proof. If anything, the author’s criticisms emphasize the imprecision of informal language and proofs.’
This author has proceeded in precisely the same way as would any reviewer of an article that consisted of a proof in a non-standard notation and a description of that proof. When a reviewer discovers that the description indicates that the proof contains an error, it would not be expected that the reviewer then performs a complete in depth examination of the non-standard notation of the proof itself. If we cannot place any reliance whatsoever on Harrison’s description, one is given to wonder what Harrison’s objective was in providing that description in the first place. And, in any case, as will be seen below, Harrison’s attempt to clarify what is occurring in his ‘formal proof’ fails to resolve the error - his code, as well as his description of it, is fundamentally flawed.
Harrison continues:
‘After a sound summary of the notation and general setup from the book [9], the author presents the nub of his objection which is the following equivalence in
The author objects to this equivalence because
‘If the author cares to examine the formal proof, however, he will see that his critique does not apply to it. On the contrary, one of the merits of completely formal proofs is that they don’t let one get away with any sloppiness at all, and are far more precise and pedantic than this author or any other human being.’
‘Examining the file where the relevant definitions and formal theorems are found: https://github.com/jrh13/hol-light/blob/master/Arithmetic/tarski.ml (original was http://code.google.com/p/hol-light/source/browse/trunk/Arithmetic/tarski.ml, now not applicable) one will see that the distinctions that the author cares about are maintained in a very precise way. The naming and other minor aspects of the formal proof are slightly different from those in the book; the
gnumeral m n = (gterm (numeral m) = n)
while arith_gnumeral n p:
arith_gnumeral n p:
formsubst ((0 |-> n) ((1 |-> p) V))
(arith_gnumeral1’ (arith_pair Z (numeral 3))
(arith_pair (V 0) (V 1))).’
‘But the essential distinction the author notes is still there:
arith_gnumeral n p: (for given parameters n and p) is a formula of the object logic. The equivalence at issue is stated formally as follows (the formal theorem called
holds v (arith_gnumeral s t) ⇔ gnumeral (termval v s) (termval v t).’
‘This is precisely reflecting the distinction between just the formula itself (arith_gnumeral s t) and the fact that it holds in v of the free variables (holds v (arith_gnumeral s t)). The equivalence is stated with s and t. In summary, the author’s criticisms, such as they are, emphatically do not apply to the formal proof itself.’
Harrison claims that the error in his description in his book is not replicated in his ‘formal proof ’. But an analysis of his actual code shows that the same careless disregard for the actual definition of the domains of variables applies both to his informal description and to the actual code of his proof. In the code that Harrison refers to:
holds v (arith_gnumeral s t) ⇔ gnumeral (termval v s) (termval v t).’
the terms v, s and t are all variables; termval is defined by Harrison as a function where its second variable is defined as having a domain that is not the domain of natural numbers. This can be ascertained by examining the code, which is viewable online at
https://github.com/jrh13/hol-light/blob/master/Arithmetic/tarski.ml (original was http://code.google.com/p/hol-light/source/browse/trunk/Arithmetic/fol.ml, now not applicable), and the HOL-light and OCaml reference manuals.
J. Harrison, “The HOL Light System - REFERENCE.” http://www.cl.cam.ac.uk/~jrh13/hol-light/reference_220.pdf, Oct, 2011.
“The OCaml system.” http://caml.inria.fr/distrib/ocaml-3.12/ocaml-3.12-refman.pdf, July, 2011.
So, considering the lines of Harrison’s proof which are:
let ARITH_GNUMERAL = prove
(`!v s t. holds v (arith_gnumeral s t) ⇔
gnumeral (termval v s) (termval v t)`…
if, as Harrison asserts, the relation arith_gnumeral is a formula of the formal system that is the object of the proof (which Harrison calls the ‘object logic’), we can see immediately that in this code there is a confusion of variable domains, since the variable s where it occurs in arith_gnumeral s t must have the domain of natural numbers, but where the same variable s occurs in termval, it must have a domain that is not the domain of natural numbers. The only alternative is that Harrison’s code has not correctly defined the domain of the variables of arith_gnumeral as restricted to the natural numbers; if arith_gnumeral is to represent a formula of the formal system that is the object of Harrison’s proof, then the variables of that formula must be defined as the domain of natural numbers.
If the reader is interested as to which of the two possibilities is the primary source of Harrison’s error, it is suggested that the reader contact Harrison with that question. This author sees no point in expending further analysis on a proof which is fundamentally flawed, when Harrison, who is presumably quite familiar with the details of his proof, should be able to answer the question without difficulty.
In either case, it is evident that Harrison’s code fails to observe elementary mathematical principles regarding the domains of variables; Harrison’s response only serves to confirm that his ‘formal proof’ relies on an erroneous confusion of the domains of the variables in the proof. Despite Harrison’s conviction that his computer software system cannot allow any ‘sloppiness’ in his code, the evidence is that it does indeed allow such ‘sloppiness’, and that it fails to detect a violation of elementary mathematical principles.
References
Bibliography - Errors in other incompleteness proofs
- J. R. Meyer. “An Error in a Computer Verified Proof of Incompleteness by Russell O’Connor”, 2011.
- J. R. Meyer. “An Error in a Computer Verified Proof of Incompleteness By Natarajan Shankar”, 2011
- J. R. Meyer. “A Fundamental Flaw in an Incompleteness Proof in the book ‘An Introduction to Gödel’s Theorems’ by Peter Smith.”
http://www.jamesrmeyer.com/pdfs/ff_smith.pdf, 2011 - J. R. Meyer. “A Fundamental Flaw In Incompleteness Proofs by Gregory Chaitin.”, 2011.
- J. R. Meyer. “A Fundamental Flaw In Incompleteness Proofs by S. C. Kleene.”, 2011.
Rationale: Every logical argument must be defined in some language, and every language has limitations. Attempting to construct a logical argument while ignoring how the limitations of language might affect that argument is a bizarre approach. The correct acknowledgment of the interactions of logic and language explains almost all of the paradoxes, and resolves almost all of the contradictions, conundrums, and contentious issues in modern philosophy and mathematics.
Site Mission
Please see the menu for numerous articles of interest. Please leave a comment or send an email if you are interested in the material on this site.
Interested in supporting this site?
You can help by sharing the site with others. You can also donate at
where there are full details.