History and Background: 1900: Hilbert's 23 problems for the next century http://en.wikipedia.org/wiki/Hilbert%27s_problems 2nd Problem: Prove that the axioms of arithmetic are consistent. Godel's Incompleteness Theorem 1930's (kind of kill's Hilbert's second problem): There is no sound and complete axiomization of arithmetic Definition: An axiomization is SOUND if Axioms |- phi then Axioms |= phi That is, one can only derive true statements from phi Definition: An axiomization is COMPLETE if Axioms |= phi then Axioms |- phi That is, one can derive every true statement using phi Example: Axioms of Group Theory 1. Closure. For all a, b in G, the result of the operation a + b is also in G. 2. Associativity.For all a, b and c in G, the equation (a + b) + c = a + (b + c) holds. 3. Identity element. There exists an element e in G, such that for all elements a in G , the equation e + a = a + e = a holds. 4. Inverse element. For each a in G, there exists an element b in G such that a + b = b + a = e, where e is the identity element. Venn Diagram: NT = some theory or axiomization of numbers and N is the standard model of arithmetic |= phi ---------------- NT |- phi ---------------- N|= phi ---------------- Neither N|= phi not N |= not phi ---------------- N |= not phi ---------------- NT |- not phi ---------------- |= not phi Detour to review some basic first order logic: Generic model M Generic theory T Generic statement S T is a theory of M iff T is the set of logical propositions that are true for M Definition: T_1 |= T_2 if any model satisfying T_1 also satisfies T_2 Definition: T |= S if any model satisfying T also satisfies S Definition: T |- S if there is a proof of S using T as axioms Definition: PROOF = sequence (p_1, ... p_n) of sentences such that each formula is an AXIOM or each formula follows from sentences by a PROOF RULE. Usually the proof rules are standard (e.g. Modus Ponens), independent of the system in question. Two warm-up Lemmas: Definition: A set is recursively enumerable iff there is a program that outputs only members of that set, and every member of the that set is eventually output Warm-up Lemma 1: Theoremhood = {S | Axioms |- S} is recursively enumerable if the axiomization is finite. Proof1: If there only only finitely many consequence of any proof rule then just do a breadth first search of the proof tree of possible proves Proof2: What if you have a proof rule like Forall x phi(x) yields phi(1) phi (2) .....? Answer: On i^th iteration, consider all nodes in derivation tree of depth <= i, where each node on path from the root is one of the first i children Warm-up Lemma 2: If there is a sound and complete axiomization of arithmetic then {phi | Number theory |= phi} is recursive/decidable Proof: Search for all proofs for phi and not phi (dovetailing the searches) And now the proof: Proof of Godel's Incompleteness Theorem: By reduction from the Halting problem. Let P and I be the input to the halting problem. We want to create a first order sentence of the form THEREEXISTS w P(w), where P(w) verifies that w is a valid computation history of P on I. Now since {phi | Number theory |= phi} is recursive, we can to determine whether THEREEXISTS w P(w) or NOT THEREEXISTS w P(w) is true. This allows us to decide whether P halts on I. How find P(w)? Configurations are encoded as strings as proof of term rewriting. If there are b symbols then these strings are then read as base b integers. Yields(C, D) where C are D are integers that encode configurations can be expressed in first order logic. The div and mod operators allow you to cut the string There exist two places to cut C and D such that C and D are equal to the left of the left cut, and to the right of the right cut, and are related by the Table relation in the fixed number of places between the cuts. The fact that a sequence of configurations (put a new symbol between each configuration) encodes a computation can be expressed in first order logic in the following way: Each configuration yields the next, the first configuration is the starting configuration, and the last configuration is the accepting configuration. Proof by example: Consider the Turing Machine states: p=start, q, h=halt input symbols:0,1,space (p,0)->(q,0,right) (p,1)->(p,1,right) (q,0)->(p,0,left) (q,1)->(p,1,right) (p,space)->(h,space,stay) (q,space)->(h,space,stay) Input: 0110 w = #p0110#0q110#01p10#011p0#0110q_#0110h_#