In mathematical logic, **Gödel's incompleteness theorems** are two celebrated theorems proved by Kurt Gödel in 1930.
Somewhat simplified, the first theorem states:

In any consistent axiomatic system (formal system of mathematics) sufficiently strong to allow one to do basic arithmetic, one can construct a statement about natural numbers that can be neither proved nor disproved within that system.

In this context, an axiomatic system is one with a recursive set of axioms; equivalently, the theorems of the system can be generated by a Turing machine.
The statement which cannot be proved nor disproved in the system is furthermore *true* in the sense that what it asserts about the natural numbers in fact holds. Because the system fails to prove a true statement, it is said to be *incomplete*. In other words, then, Gödel's first incompleteness theorem says that any sufficiently strong formal system of mathematics is either inconsistent or incomplete.

Gödel's second incompleteness theorem, which is proved by formalizing part of the proof of the first within the system itself, states:

Any sufficiently strong consistent system cannot prove its own consistency.

(See below for a discussion of what "sufficiently strong" means in this context.) This ended the project of answering **Hilbert's second problem**, which set forth a challenge of proving that mathematics could be reduced to a consistent set of axioms from which all mathematical truths could be derived -- Gödel proved that there can be no such set.
See Hilbert's problems for background.

The subsequent combined work of Gödel and Paul Cohen has given concrete examples of undecidable statements (statements which can be neither proven nor disproven): both the axiom of choice and the continuum hypothesis are undecidable in the standard axiomatization of set theory. These results do not require the incompleteness theorem.

In 1973, the Whitehead problem in group theory was shown to be undecidable in standard set theory. In 1977, Kirby, Paris and Harrington proved that a statement in combinatorics, a version of the Ramsey theorem, is undecidable in the axiomatization of arithmetic given by the Peano axioms but can be proven to be true in the larger system of set theory. Kruskal's tree theorem, which has applications in computer science, is also undecidable from the Peano axioms but provable in set theory. Goodstein's theorem is a relatively simple statement about natural numbers that is undecidable in Peano arithmetic.

Gregory Chaitin produced undecidable statements in algorithmic information theory and in fact proved his own incompleteness theorem in that setting.

The incompleteness results affect the philosophy of mathematics, particularly viewpoints like formalism, which uses formal logic to
define its principles.
One can paraphrase the first theorem as saying that "we can never find an all encompassing axiomatic system which is able to prove *all* mathematical truths, but no falsehoods."

The following rephrasing of the second theorem is even more unsettling to the foundations of mathematics:

If an axiomatic system can be proven to be consistent from within itself, then it is inconsistent.

Therefore, in order to establish the consistency of a system S, one needs to utilize some other system T, but a proof in T is not completely convincing unless T's consistency has already been established without using S. The consistency of the Peano axioms for natural numbers for example can be proven in set theory, but not in the theory of natural numbers alone. This provides a negative answer to problem number 2 on David Hilbert's famous list of important open questions in mathematics.

In principle, Gödel's theorems still leave some hope: it might be possible to produce a general algorithm that for a given statement determines whether it is undecidable or not, thus allowing mathematicians to bypass the undecidable statements altogether. However, the negative answer to the Entscheidungsproblem shows that no such algorithm exists.

Note that Gödel's theorems only apply to *sufficiently strong*
axiomatic systems.
"Sufficiently strong" means that the theory contains enough arithmetic to carry out the coding constructions needed for the proof of the first incompleteness theorem. Essentially, all that is required are some basic facts about addition and multiplication as formalized, e.g., in Robinson arithmetic Q.
There are even weaker axiomatic systems which are consistent and complete, for instance Presburger arithmetic which proves every true first-order statement which only involves addition.

The axiomatic system may consist of infinitely many axioms (as first-order Peano arithmetic does), but for Gödel's theorem to apply, there has to be an effective algorithm which is able to check proofs for correctness. For instance, one might take the set of all first-order sentences which are true in the standard model of the natural numbers. This system is complete; Gödel's theorem does not apply because there is no effective procedure that decides if a given sentences is an axiom. In fact, that this is so is a consequence of Gödel's first incompleteness theorem.

Another example of a specification of a theory to which Gödel's first theorem does not apply can be constructed as follows: order all possible statements about natural numbers first by length and then lexicographically, start with an axiomatic system initially equal to the Peano axioms, go through your list of statements one by one, and, if the current statement cannot be proven nor disproven from the current axiom system, add it to that system. This creates a system which is complete, consistent, and sufficiently powerful, but not recursively enumerable.

Gödel himself only proved a technically slightly weaker version of the above theorems; the first proof for the versions stated above was given by Rosser in 1936.

In essence, the proof of the first theorem consists of constructing the statement

*p*= "This statement cannot be proven"

If the axiomatic system is consistent, Gödel's proof shows that *p* (and its negation) cannot be proven in the system.
Therefore *p* is true (*p* claims not to be provable, and it isn't) yet it cannot be formally proved in the system.
Note that adding *p* to the axioms of the system would not solve the problem: there would be another Gödel sentence for the enlarged theory.

Roger Penrose claims that this (alleged) difference between "what can be mechanically proven" and "what can be seen to be true by humans" shows that human intelligence is not mechanical in nature.
This view is not widely accepted, because as stated by Marvin Minsky, human intelligence is capable of error and of **understanding** statements which are in fact inconsistent or false. However, Marvin Minsky has reported that Kurt Gödel told him personally that he believed that human beings had an intuitive, not just computational, way of arriving at truth and that therefore his theorem did not limit what can be known to be true by humans.

The position that the theorem shows humans to have an ability that transcends formal logic can also be criticized as follows: We do not know whether the sentence *p* is true or not, because we do not (and can not) know whether the system is consistent.
So in fact we do not know any truth outside of the system.
All we know is the following statement:

- Either
*p*is unprovable within the system, or the system is inconsistent.

To begin with, every formula or statement that can be formulated in our system gets a unique number, called its **Gödel number**.
This is done in such a way that it is easy to mechanically convert back and forth between formulas and Gödel numbers. Because our system is strong enough to reason about *numbers*, it is now also possible to reason about *formulas*.

A formula *F*(*x*) that contains exactly one free variable *x*
is called a *statement form*.
As soon as *x* is replaced by a specific number, the statement form turns into a bona fide statement, and it then is either provable in the system, or not.
Statement forms themselves are not statements and therefore cannot be proved or disproved.
But every statement form *F*(*x*) has a Gödel number which we will denote by **G**(*F*).
The choice of the free variable used in the form *F*(*x*) is not relevant to the assignment of the Gödel number **G**(*F*).

By carefully analyzing the axioms and rules of the system, one can then write down a statement form *P*(*x*) which embodies the idea that *x* is the Gödel number of a statement which can be proved in our system.
Formally: *P*(*x*) can be proved if *x* is the Gödel number of a provable statement, and its negation *~P*(*x*) can be proved if it isn't.
(While this is good enough for this proof sketch, it is technically not completely accurate.
See Gödel's paper for the problem and Rosser's paper for the resolution.
The key word is "omega-consistency".)

Now comes the trick: a statement form *F*(*x*) is called *self-unprovable* if the form *F*, applied to its own Gödel number, is not provable.
This concept can be defined formally, and we can construct a statement form *SU*(*z*) whose interpretation is that *z* is the Gödel number of a self-unprovable statement form. Formally, *SU*(*z*) is defined as: *z* = **G**(*F*) for some particular form *F*(*x*), and *y* is the Gödel number of the statement *F*(**G**(*F*)), and *~P*(*y*). Now the desired statement *p* that was mentioned above can be defined as:

*p*=*SU*(**G**(*SU*)).

We will now assume that our axiomatic system is consistent.

If *p* were provable, then *SU*(**G**(*SU*)) would be true, and by
definition of *SU*, *z* = **G**(*SU*) would be the Gödel number of a self-unprovable statement form.
Hence *SU* would be self-unprovable, which by definition of self-unprovable means that *SU*(**G**(*SU*)) is not provable, but this was our *p*: *p* is not provable.
This contradiction shows that *p* cannot be provable.

If the negation of *p*= *SU*(**G**(*SU*)) were provable, then by definition of *SU* this would mean that *z* = **G**(*SU*) is not the Gödel number of a self-unprovable form, which implies that *SU* is not self-unprovable.
By definition of self-unprovable, we conclude that *SU*(**G**(*SU*)) is provable, hence *p* is provable. Again a contradiction.
This one shows that the negation of *p* cannot be provable either.

So the statement *p* can neither be proved nor disproved within our system.

- K. Gödel:
*Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme, I.*Monatshefte für Mathematik und Physik, 38 (1931), pp. 173-198. Translated in van Heijenoort:*From Frege to Gödel*. Harvard University Press, 1971., online at http://home.ddc.net/ygg/etext/godel/ - B. Rosser:
*Extensions of some theorems of Gödel and Church*. Journal of Symbolic Logic, 1 (1936), N1, pp. 87-91 - Karl Podnieks:
*Around Goedel's Theorem*, http://www.ltn.lv/~podnieks/gt.html - D. Hofstadter:
*Gödel, Escher, Bach: An Eternal Golden Braid*, 1979, ISBN 0465026850. (1999 reprint: ISBN 0465026567). - Ernest Nagel, James Roy Newman, Douglas R. Hofstadter:
*Godel's Proof*, revised edition (2002). ISBN 0814758169. - See here for an English translation of Hilbert's second problem: http://aleph0.clarku.edu/~djoyce/hilbert/problems.html#prob2