

An Outline of the Proof of Gödel's Incompleteness Theorem
All essential ideas  without the final technical details
Informally, Gödel's Incompleteness Theorem states that in any consistent formalization of mathematics that is strong enough to define the concept of natural numbers, one can construct a statement that can be neither proved nor disproved within that system.
In our outline, we will try to demonstrate that the conclusion of Gödel's Theorem is valid for the formalization of mathematics based on axiomatic set theory. But a careful reader will notice that this is only a technical restriction.
What we show on this page is not a presentation of the proof that was written by Gödel himself. We present all the basic ideas that are necessary to understand what the theorem asserts and what it would take to write a proof.
Before we start we have to go through a brief review of how set theory is constructed and what theorems are.
We claim that any mathematical formula can be written in the alphabet
a  '  :  {  }  O  /\  \/  ~  >  (  )  ,  = 
where
a  will be used to denote variables, 
'  will be used to write more than one variable like this: a', a'', a''', etc., 
:  will be used to mean "is an element of", 
{ , }  will be used to write the elements of a set as in {O,{O}}, 
O  will be used to denote the empty set, 
/\  will be used to denote the universal quantifier, 
\/  will be used to denote the existential quantifier, 
~  will be used to denote negation, 
>  will be used to denote implication, 
( , )  will be used as brackets, 
,  will be used to separate the elements of sets as in {O,{O},{O,{O}}}, 
=  will be used to denote equality. 
We don't claim that this alphabet is minimal. But we have chosen it for didactic reasons.
These are three examples of mathematical formulas:
Notice that every mathematical formula is a string but not every string is a mathematical formula. In order to determine which strings are mathematical formulas we have to define a formal grammar.
We need to define a class of formulas for which it makes sense to ask whether it is a theorem or not. We will call such formulas statements.
Definition: A statement is a formula that has no free variables.
These are two examples of statements:
We are now preparing for the definition of theorem. Recall that in set theory there are axioms and rules of inference. Axioms are carefully chosen statements and rules of inference are certain operations on strings.
The application of inference rules looks like this:
given two strings
It will be very important for later arguments to bear in mind that
Rules of inference are operations on strings. 
Now we are ready to define theorem.
Definition:
p is a theorem if and only if
(1) p is an axiom
or
(2) there is a sequence
Now we are able to give a more precise statement of what we are trying to prove:
There exists a statement p such that
p is not a theorem and 
Now we are moving on to the proper part of our proof.
Within axiomatic set theory it is possible to construct natural numbers in the following way:
0  
1  
2  
3  
4  
5 
At this point, we will take the crucial step toward understanding the proof of Gï¿½el's Incompleteness Theorem. We are going to identify each mathematical expression with a unique natural number. To this purpose, we will establish a way of encoding a string of symbols from the aforementioned alphabet into a natural number.
For convenience, we will use the hexadecimal notation of natural numbers to write a clear algorithm to perform this encoding. We will use the following convention: if n is a natural number then #n denotes its hexadecimal representation. The following table shows how symbols from our alphabet are encoded as hexadecimal digits.
#Code[ a ]  =  0 
#Code[ ' ]  =  1 
#Code[ : ]  =  2 
#Code[ { ]  =  3 
#Code[ } ]  =  4 
#Code[ O ]  =  5 
#Code[ /\ ]  =  6 
#Code[ \/ ]  =  7 
#Code[ ~ ]  =  8 
#Code[ > ]  =  9 
#Code[ ( ]  =  A 
#Code[ ) ]  =  B 
#Code[ , ]  =  C 
#Code[ = ]  =  D 
And the following defines by recursion how any string from our alphabet is encoded as a natural number:
Code[ sx ] = Code[ s ]*H + Code[ x ],
where #H = 10, s is a string, x is a symbol from our alphabet, and sx is the concatenation of s and x.
Examples:
#Code[ ~\/(a)(a:a) ] = 87A0BA020B
#Code[ /\(a)(~(a:O)) ] = 6A0BA8AO25BB
#Code[ {O,{O}} ] = 35C3544
Notice that if s is a string then Code[ s ] is a natural number and #Code[ s ] is only its hexadecimal notation.
It can be proved that we can define, in terms of set theory,
a function
It would be a long and tedious job to actually construct such a function from the foundations of set theory. We will not do it here. But the following remarks may serve to convince oneself that it is possible.
The art of determining which statement is a theorem comes down to string operations. We can think of the hexadecimal notation of a number as a string. So we can define operations (like concatenation) on such "hexadecimal" strings by using simple operations on natural numbers like addition and multiplication. We can define rules of inference on these "hexadecimal" strings  still only by using operations on natural numbers. And finally, we can define which of these "hexadecimal" strings are "hexadecimal" theorems. Then we would have our function T.
We are going to introduce function
At this point some readers may be a little confused by the fact
that we write
Notice that our function A has the following property:
if n is a natural number which encodes a formula with the free variable a
then
Notice also that our function A could in fact be defined without explicitly mentioning Code. But such a way would be long and tedious.
Before we move on to the culminating point, take your time to contemplate the fact that functions T and A are indeed ordinary functions which can be defined in terms of set theory.
Consider this mathematical formula
Consider the statement below.
T(A(m))=O
Contemplate the fact that the statement above is a real mathematical statement in set theory because the functions T and A are constructible in set theory and the natural number m is also precisely defined.
Notice that
(*)
Suppose that
So we showed that
Suppose that
So we showed that
We have shown that
T(A(m))=O  is not a theorem. 
~(T(A(m))=O)  is not a theorem. 
So we have finally constructed a statement in set theory such that it is not a theorem and its negation is not a theorem.