Source Theories the Signature of Arithmetic Decidability
Total Page:16
File Type:pdf, Size:1020Kb
Source Theories A signature is a (finite or infinite) set of predicate and function symbols. We fix a signature S. “Formula” means now “formula over the signature S”. A theory is a set of formulas T closed under consequence, i.e., if F ,...,F T and F ,...,F = G then G T . G.S. Boolos, J.P. Burgess, R.C Jeffrey: 1 n ∈ { 1 n} | ∈ Computability and Logic. Cambridge University Press 2002. Fact: Let be a structure suitable for S. The set F of formulas such A that (F )=1 is a theory. A We call them model-based theories. Fact: Let be a set of closed formulas. The set F of formulas such F that = F is a theory. F | 1 2 The signature of arithmetic Decidability, consistency, completeness, . The signature SA of arithmetic contains: A set of formulas is decidable if there is an algorithm that decides F a constant 0, for every formula F whether F holds. • ∈ F a unary function symbol s, • Let T be a theory. two binary function symbols + and , and • · T is decidable if it is decidable as a set of formulas. a binary predicate symbol <. • T is consistent if for every closed formula F either F / T or F / T . ∈ ¬ ∈ (slight change over previous definitions) T is complete if for every closed formula F either F T or F T . ∈ ¬ ∈ Arith is the theory containing the set of closed formulas over SA T is (finitely) axiomatizable if there is a (finite) decidable set T X ⊆ that are true in the canonical structure. of axioms such that every closed formula of T is a consequence of . X Arith contains “all the theorems of calculus”. 3 4 Conventions and notation Basic facts Fact: Every theory contains all valid formulas (because they are consequences of the empty set). Fact: Model-based theories (like Arith) are consistent and complete. In the following: set of axioms = decidable set of formulas over SA T denotes the theory of all closed formulas that are consequences of Fact: T is consistent iff there is a formula F such that F / T . X ∈ a set of axioms. Proof: If T is consistent then F / T for some F by definition. ∈ X If T is inconsistent, then there exists a formula F such that F T ∈ and F T . Let G be an arbitrary closed formula. Since F, F = G ¬ ∈ ¬ | and T is closed under consequence, we have G T . ∈ 5 6 Basic facts Lemma: If T is axiomatizable and complete, then T is decidable. If algorithm answers “F T ”, then F T . • ∈ ∈ Proof: If T inconsistent then T contains all closed formulas, and the If algorithm answers “F T ”, then F is syntactic consequence, ∈ algorithm that answers “F T ” for every input F decides T . and so consequence of the axioms. Since T is a theory, F T . ∈ ∈ If T consistent, let consider the following algorithm: If algorithm answers “F / T ”, then F / T . • ∈ ∈ Input: F If algorithm answers “F T ”, then F is consequence of the • ∈ ¬ Enumerate all syntactic consequences of the axioms of T , and axioms and so F T . By consistency, F / T . ¬ ∈ ∈ for each new syntactic consequence G do: The algorithm terminates. • If G = F halt with “F T ” Since T is complete, either F T or F T . − ∈ ∈ ¬ ∈ If G = F halt with “F / T ” Assume w.l.og. F T . − ¬ ∈ ∈ Observe: the syntactic consequences of the axioms can be Since T is axiomatizable, F is a consequence of the axioms. enumerated. So F is a syntactic consequence of the axioms. We prove this algorithm is correct: So eventually G := F and the algorithm terminates. 7 8 Basic facts G¨odel’s first incompleteness theorem Theorem: Let be any set of axioms such that Arith. Theorem: Arith is undecidable. X X ⊆ Then the theory T is incomplete. Proof: By reduction from the halting problem, similar to X undecidability proof for validity of predicate logic. Proof: Since Arith is not axiomatizable, there is a formula F Arith such that = F and so F / T . ∈ X 6| ∈ X Theorem: Arith is not axiomatizable. Assume now F T . Then = F and since Arith we get ¬ ∈ X X | ¬ X ⊆ Proof: Since Arith is undecidable, consistent, and complete, it is not F Arith, contradicting F Arith. ¬ ∈ ∈ axiomatizable (see Lemma). So F / T and F / T , which proves that T is incomplete. ∈ X ¬ ∈ X X 9 10 G¨odel’s first incompleteness theorem Minimal arithmetic Minimal arithmetic Q is the axiom-based theory over SA having the following axioms: Observe: F Arith, i.e., F is true in the canonical structure, but its ∈ truth cannot be proved using any set of axioms (unless some (Q1) x (0 = s(x)) X ∀ ¬ axiom is itself not true!) (Q2) x y s(x) = s(y) x = y ∀ ∀ → (Q3) x x + 0 = x In other words: for every set of true axioms, there are true formulas ∀ that cannot be deduced from the axioms (Q4) x y x + s(y) = s(x + y) ∀ ∀ (Q5) x x 0=0 But we have no idea how such formulas look like ... ∀ · (Q6) x y x s(y) = (x y) + x ∀ ∀ · · Goal: given a set of axioms Arith, construct a formula (Q7) x (x < 0) X ⊆ ∀ ¬ F Arith such that F / T (Q8) x y x<s(y) (x < y x = y) ∈ ∈ X ∀ ∀ ↔ ∨ (Q9) x y x<y x = y y<x ∀ ∀ ∨ ∨ 11 12 Peano arithmetic Some theorems of Q (and P) Peano arithmetic P is the axiom-based theory over SA having Q1-Q9 (0 = sn(0)) for every n 1 as axioms plus all closed formulas of the form ¬ ≥ (sn(0) = sm(0)) for every n, m 1, n = m (I) y F (0, y) x ( F (x, y) F (s(x), y)) ¬ ≥ 6 ∀ ∧ ∀ → x x < 1 x =0 → ∀ ↔ x F (x, y) x x<sn+1(0) (x =0 x = s(0) . x = sn(0)) ∀ ∀ ↔ ∨ ∨ ∨ where y = (y1,...yn). sn(0) + sm(0) = sl(0) for every n,m,l 1 such that n + m = l ≥ Observe: I is an axiom scheme; the set of axioms of P is infinite but sn(0) sm(0) = sl(0) for every n,m,l 1 such that n m = l decidable. · ≥ · 13 14 G¨odel encodings G¨odel encodings Example (Wikipedia): the formula x = y y = x A G¨odel encoding is an injective function that maps every formula → over SA to a natural number called its G¨odel number. written in ASCII as x=y => y=x Simple G¨odel encoding: assign to each symbol of the formula its ASCII code, assign to a formula the concatenation of the ASCII codes corresponds to the sequence of its symbols. 120-061-121-032-061-062-032-121-061-120 of ASCII codes, and so it is assigned the number 120061121032061062032121061120 15 16 G¨odel’s G¨odel encoding What are G¨odel encodings good for? A formula F (x) over SA with a free variable x defines a property of numbers: the property satisfied exactly by the numbers n such that Let pn denote the n-th prime number. F (sn(0)) is true in the canonical structure. G¨odel’s encoding assigns to each symbol λ a number g(λ), and to a We can easily construct formulas Even(x), Prime(x), sequence λ1 λn of symbols the number Power of two(x) . · · · Via the encoding formulas “are” numbers, and so a formula also 2g(λ1) 3g(λ2) 5g(λ3) . pg(λn) · · · · n defines a property of formulas! numbers formulas → formula F (x) set of numbers set of formulas → → 17 18 Going further . And even further . We can construct (even less easily) a formula We can (less easily) construct formulas like In Q(x) • First symbol is (x) that is true i.t.c.s. for x = sn(0) iff the number n encodes a closed • ∀ At least ten symbols(x) formula F such that F Q. • ∈ Closed(x) The reason is • . F Q iff Q1, ..., Q9 = F iff Q1, ..., Q9 F • ∈ | ⊢ that are true i.t.c.s. for x := sn(0) iff the number n encodes a and the derivation procedure amounts to symbol manipulation. formula and the formula satisfies the corresponding property. Same for any other set of axioms. X 19 20 Diagonal Lemma Reaching the goal Recall our goal: Given a set of axioms Arith, construct a X ⊆ formula F Arith such that F / T ∈ ∈ X Theorem: Let be any set of axioms containing Q1, ...Q9. Let F denote the term sn(0) where n is the G¨odel encoding of the X Let G be the G¨odel formula of In T (x). Then G Arith T . formula F . X ¬ X X ∈ \ X Proof idea: By definition, G is true i.t.c.s iff G / T . Intuition: F is a “name” we give to F X X ∈ X If G is false i.t.c.s. then G T . X X ∈ X Lemma (Diagonal Lemma): Let be any set of axioms containing Since Arith, we have G Arith. X X ⊆ X ∈ Q1, ...Q9. For every formula B(y) there is a closed formula G such But then, by definition of Arith, G is true i.t.c.s. X that G B(G) T . Contradiction! ↔ ∈ X We call G the G¨odel formula of B(x). So G is true i.t.c.s., i.e., G Arith. X X ∈ We have: G true i.t.c.s if and only if G has property B But then G / T , and so G Arith T .