Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
Próximos SlideShares
Carregando em…5
×

# True but Unprovable

791 visualizações

Logicians sometimes talk about sentences being “true but unprovable." What does this mean? This presentation includes a fairly thorough introduction to mathematical logic.

• Full Name
Comment goes here.

Are you sure you want to Yes No
• Seja o primeiro a comentar

• Seja a primeira pessoa a gostar disto

### True but Unprovable

1. 1. LOGIC True But Unprovable
2. 2. Goal Logicians sometimes talk about sentences being “true but unprovable” Our goal: Understand what they mean by this. “Gödel’s first incompleteness theorem states that no consistent system of axioms whose theorems can be listed by an algorithm is capable of proving all truths about the arithmetic of natural numbers.” “For any such consistent formal system, there will always be statements about natural numbers that are true, but that are unprovable within the system.”
3. 3. An Illustration There’s an island on which there lives two types of people: truthers and liars. Truthers always speak the truth, liars always say falsehoods. A logician that knows all of this visits the island. He is a perfectly sound reasoner, i.e. he never proves anything that is false. The logician encounters an individual named Jal living on the island. Jal makes some statement to the logician, after which the following two things are true: (1) Jal’s statement logically entails that Jal is a truther. (2) The logician can never possibly prove that Jal is a truther. The question: What did Jal say?
4. 4. A solution Jal’s statement to the logician: “You can not prove that I am a truther.” Only a truther could say this sentence.
5. 5. A solution Jal’s statement to the logician: “You can not prove that I am a truther.” Only a truther could say this sentence. But if Jal is a truther, then his statement is true. So the logician can not prove that Jal is a truther. Suppose Jal is a liar. Then the sentence “You can not prove that I am a truther” is false. So the logician can prove that Jal is a truther. But the logician cannot prove a falsehood. Contradiction
6. 6. But... Why can’t the logician make this exact argument, therefore proving just as we did that Jal is a liar? Suppose Jal is a liar. Then the sentence “You can not prove that I am a truther” is false. So the logician can prove that Jal is a truther. But the logician cannot prove a falsehood. Contradiction
7. 7. But... Why can’t the logician make this exact argument, therefore proving just as we did that Jal is a liar? Because to do so, he would have to assert his own soundness. Gödel’s second incompleteness theorem tells us that no sound reasoner can assert this of himself. Suppose Jal is a liar. Then the sentence “You can not prove that I am a truther” is false. So the logician can prove that Jal is a truther. But the logician cannot prove a falsehood. Contradiction
8. 8. Example 2: Busy beavers The busy beaver numbers are a well-defined sequence BB(n). Run all n-state Turing machines. Some never halt, the rest eventually do. BB(n) is the halt time of the longest-running machine. BB(n) is a measure of how complex a program you can run on an n-state Turing machine. We will now prove that no effective and consistent proof system can enumerate all its values.
9. 9. Example 2: Busy beavers Take any consistent formal proof system F whose theorems can be listed by a Turing machine. Construct an n-state Turing machine that enumerates the theorems of F, halting only if it reaches a contradiction. Whether this Turing machine halts depends on if F is consistent. BB(n) tells us how long we have to wait to know for sure if it halts. So if F could prove the value of BB(n), F could prove its own consistency. Violation of Gödel’s second! (F can’t even upper bound BB(n)! Why?) The busy beaver numbers are a well-defined sequence BB(n). Run all n-state Turing machines. Some never halt, the rest eventually do. BB(n) is the halt time of the longest-running machine. BB(n) is a measure of how complex a program you can run on an n-state Turing machine. We will now prove that no effective and consistent proof system can determine all its values.
10. 10. Example 2: Busy beavers Different proof systems will have different thresholds for unprovability. The “standard proof system” for mathematics is ZFC set theory. We know ZFC can only prove at most 7,918 values of BB(n), and probably much fewer.
11. 11. Final Example: Goldbach Conjecture Every even integer greater than 2 is the sum of two primes. 4 = 2 + 2 6 = 3 + 3 8 = 5 + 3 10 = 5 + 5 12 = 7 + 5 Etc...
12. 12. Final Example: Goldbach Conjecture Every even integer greater than 2 is the sum of two primes. 4 = 2 + 2 6 = 3 + 3 8 = 5 + 3 10 = 5 + 5 12 = 7 + 5 Etc... Know to be true for values up to 4×1018. Goldbach: "I regard as a completely certain theorem, although I cannot prove it." What if it cannot be proven true or false? Then it must be true!
13. 13. Final Example: Goldbach Conjecture Every even integer greater than 2 is the sum of two primes. 4 = 2 + 2 6 = 3 + 3 8 = 5 + 3 10 = 5 + 5 12 = 7 + 5 Etc... Know to be true for values up to 4×1018. Goldbach: "I regard as a completely certain theorem, although I cannot prove it." What if it cannot be proven true or false? Then it must be true! If the conjecture were false, that would mean that there’s a counterexample. So we could eventually find that counterexample and prove the conjecture false. So if it’s unprovable, then it must be true.
14. 14. So, what is it to be “true but unprovable”? Logicians distinguish between syntax, semantics, and proof. SYNTAX SEMANTICS PROOF Defines an alphabet of symbols. Defines a grammar: some subset of the set of all finite strings of symbols. Defines the meaning of each symbol. Defines a “valuation function” from grammatical sentences to truth values, consistent with the meanings of the symbols. Defines a deductive calculus. Gives a set of axioms (sentences) and inference rules (functions from sentences to other sentences) from which you can derive theorems.
15. 15. Propositional Logic SYNTAX SEMANTICS PROOF Alphabet ( ) ∧ ∨ → ¬ p1 p2 p3 … Grammar > pn is grammatical for each n > If a is grammatical, so is (¬a) > If a and b are grammatical, so are (a∧b), (a∨b), (a→b) We want to define a truth valuation function V from grammatical sentences to truth values. But not just any function will do. The allowed functions must respect our intended meaning of the symbols ∧, ∨, →, and ¬. (There’s a possible function from grammatical sentences to truth values that assigns V(p) = F, V(q) = F, and V(p∧q) = T. We don’t want to say that this is a valid “truth valuation.” Thus our set of truth valuation functions will be restricted to only those that align nicely with our intended semantics.)
16. 16. Propositional Logic SYNTAX SEMANTICS PROOF Alphabet ( ) ∧ ∨ → ¬ p1 p2 p3 … Grammar > pn is grammatical for each n > If a is grammatical, so is (¬a) > If a and b are grammatical, so are (a∧b), (a∨b), (a→b) V: Atomic Propositions → {T,F} V’: Grammatical Sentences → {T,F} V’(pn) = V(pn) V’(¬a) = T iff V’(a) = F V’(a∧b) = T iff V’(a) = V’(b) = T V’(a∨b) = F iff V’(a) = V’(b) = F V’(a→b) = F iff V’(a) ≠ V’(b) = F With our truth functions defined, we want a purely mechanical procedure for deriving theorems without having to look directly at the semantics. We define a set of axioms and inference rules that will blindly churn out new sentences, and choose them to align as best as we can with our semantics. Say I want to prove that a certain sentence p is a tautology. One way I could do this would be to look at all possible valuation functions, and see that each of them assigns p the value T. But what if I want to prove it without looking at the semantics?
17. 17. Propositional Logic SYNTAX SEMANTICS PROOF Alphabet ( ) ∧ ∨ → ¬ p1 p2 p3 … Grammar > pn is grammatical for each n > If a is grammatical, so is (¬a) > If a and b are grammatical, so are (a∧b), (a∨b), (a→b) V: Atomic Propositions → {T,F} V’: Grammatical Sentences → {T,F} V’(pn) = V(pn) V’(¬a) = T iff V’(a) = F V’(a∧b) = T iff V’(a) = V’(b) = T V’(a∨b) = F iff V’(a) = V’(b) = F V’(a→b) = F iff V’(a) ≠ V’(b) = F Axioms 1. a→(b→a) 2. (a→(b→c))→((a→b)→(a→c)) 3. ((¬b)→(¬a))→(a→b) Inference Rules MP(a, a→b) = b Notice that truth and proof are distinct! A sentence a is a logical truth if for every function V, V’(a) = T. A sentence is provable if it follows from the axioms via repeated use of the inference rules.
18. 18. Proof of a→a Two proofs that a→a is a logical truth: Semantic Proof Syntactic Proof For any V, either V’(a) = T or V’(a) = F - If V’(a) = T, V’(a→a) = T - If V’(a) = F, V’(a→a) = T So for any V, V’(a→a) = T. So a→a is a logical truth. 1. (a→((a→a)→a)) → ((a→(a→a))→(a→a)) Axiom 2 2. a→((a→a)→a) Axiom 1 3. (a→(a→a))→(a→a) MP(1,2) 4. a→(a→a) Axiom 1 5. a→a MP(3,4) a (a→a) T T F T (Reminders) V’(a→b) = F iff V’(a) =T and V’(b) = F Axiom 1: a→(b→a) Axiom 2: (a→(b→c))→((a→b)→(a→c))
19. 19. Semantic and Syntactic Entailment More generally: - A set of sentences B semantically entails (or logically entails) a sentence a (written B ⊨ a) if for every function V such that V’ assigns T to all sentences in B, V’ also assigns T to a. - A set of sentences B syntactically entails a sentence a (written B ⊢ a) if a follows from the axioms AND the sentences in B via repeated use of the inference rules. It so happens that these concepts perfectly coincide for propositional logic. - The logical truths of propositional logic are exactly the provable sentences. - B ⊨ a exactly when B ⊢ a Some important logical concepts: - Soundness: If B ⊢ a then B ⊨ a - Completeness: If B ⊨ a then B ⊢ a - Propositional logic is both sound and complete.
20. 20. Soundness, Completeness, and Decidability For logics with more expressive power, semantics and syntax come apart. In particular, there is no proof system that is both sound and complete for second order logic. Sound and Complete Proof System Decidable Propositional Logic ✔ ✔ First Order Logic ✔ ✘ Second Order Logic ✘ ✘
21. 21. First Order Logic Let’s see how this plays out for first order logic! Buckle up, things are going to get a lot more complicated. Outline Syntax - Terms - Atomic Formulas - Grammatical Formulas Semantics - Structures - Variable assignments - Valuation function
22. 22. First Order Logic: Alphabet First difference: First order logic is a collection of languages, not a single language. All first order languages share a certain set of symbols, but also contain a set of language-specific symbols. Shared Alphabet ( ) , ∧ ∨ → ¬ ∀ ∃ = Variables: x1 x2 x3 … Language-Specific Alphabet Constant symbols: c1 c2 c3 … Relation symbols: R1 R2 R3 … Function symbols: f1 f2 f3 … Arity function Arity: (Relation symbols ∪ Function symbols) → ℕ
23. 23. First Order Logic: Grammar Grammar is a bit trickier than ‘twas for propositional logic. We do it in three steps. Terms All variables and constants are terms. f(t1, t2, …, tn) is a term for any function symbol f with Arity(f) = n, and for any terms t1, t2, …, tn. Atomic Formulas For any terms t1, t2, (t1=t2) is an atomic formula. R(t1, …, tn) is an atomic formula for any relation symbol R with Arity(R) = n, and for any terms t1, …, tn. Grammatical Formulas Every atomic formula is grammatical. If a is grammatical, so is (¬a). If a and b are grammatical, so are (a∧b), (a∨b), (a→b). If a is grammatical, x is a variable, and a doesn’t contain ∀x or ∃x, then ∀xa and ∃xa are both grammatical.
24. 24. First Order Logic: Semantics We define a structure M= <U, I> for a first order language. U is a set: it is the set of all objects in the domain of discourse. I is an interpretation function: it “interprets” every constant, relation, and function symbol. Constants: I(c) = cM ∈ U Relations: I(R) = RM: UArity(R) → {T,F} Functions: I(f) = fM: UArity(f) → U U c1 M c2 M c3 M R1 M c4 M f1 M R2 M R3 M
25. 25. First Order Logic: Semantics Now we define a variable assignment for our structure M = <U,I>. s: Variables → U We extend this to all terms as follows: s’: Terms → U s’(x) = s(x) for variables x s’(c) = cM for constants c s’(f(t1, t2,...,tn)) = fM(s’(t1), s’(t2), …, s’(tn)), for any function symbol f with Arity(f) = n. U c1 M c2 M c3 M R1 M c4 M f1 M R2 M R3 M
26. 26. First Order Logic: Semantics With our structure M and our variable assignment s, we are finally ready to construct a valuation function! First for atomic formulas. VM,s: Atomic Formulas → {T,F} VM,s(t1=t2) = T iff t1 M = t2 M VM,s(R(t1,t2,...,tn)) = T iff RM(t1 M,t2 M,...,tn M) = T U c1 M c2 M c3 M R1 M c4 M f1 M R2 M R3 M
27. 27. First Order Logic: Semantics Now for the rest of the language! V’M,s: Grammatical Formulas → {T,F} V’M,s(a) = VM,s(a) if a is atomic V’M,s(¬a) = T iff V’M,s(a) = F V’(a∧b) = T iff V’M,s(a) = V’M,s(b) = T V’M,s(a∨b) = F iff V’M,s(a) = V’M,s(b) = F V’M,s(a→b) = F iff V’M,s(a) =T and V’M,s(b) = F V’M,s(∀xa) = T iff V’M, s(x/d)(a) = T for all d ∈ U V’M,s(∃xa) = T iff V’M, s(x/d)(a) = T for some d ∈ U For the last two, we used the concept of a variant variable assignment: sx/d(y) = s(y) if y ≠ x, otherwise d
28. 28. First Order Logic: Proof System Axioms Every propositional tautology with atomic propositions substituted for first order sentences. A(t) → ∃xA(x) ∀xA(x) → A(t), where t is not bound by A (A→B) → (A→∀xB), where x is not free in A (A→B) → (∃xA→B), where x is not free in A x = x (x = y) → (A → A’), where A’ is obtained by replacing any number of free occurrences of x with y Inference Rules Modus Ponens: MP(A, A→B) = B
29. 29. First Order Logic: Semantics The structure M = <U,I> and the variable assignment s together uniquely determine the truth values of all the grammatical sentences. Notation: M,s ⊨ a iff V’M,s(a) = T A sentence a is a logical truth if for all structures M and variable assignments s, M,s ⊨ a Semantic entailment: B ⊨ a iff for all M and s, if M,s ⊨ b for every b in B, then it’s also the case that M,s ⊨ a. Examples ∀x(x=x) is a logical truth (R(x)∨(¬R(x))) is a logical truth ∀xR(x) ⊨ ∃xR(x) ∀x∀yR(x,y) ⊨ ∀y∀xR(x,y) ∀x∃yR(x,y) ⊭ ∃y∀xR(x,y)
30. 30. First Order Logic: The Limitations This proof system for first order logic is both sound and complete, but not decidable! Decidability: there’s a decision procedure which determines whether arbitrary formulas are logical truths. If a first-order language has at least one predicate of arity at least 2, then it is undecidable! Expressive limitations: - Not capable of expressing the notion that “there are finitely many things” - Doesn’t have the expressive power to distinguish between different cardinalities of infinity - There is no first order language in which you can uniquely pin down the natural numbers. No set of sentences is consistent with the structure of the natural numbers and no other structures.
31. 31. Second Order Logic Second order logic fixes these problems! Second order logic is what you get when you add the ability to quantify over predicates and functions to first order logic. Second order logic is capable of expressing finiteness, talking about specific cardinalities, and uniquely pinning down the natural numbers. But as we’ll see, it has problems of its own.
32. 32. Second Order Logic: Alphabet Almost the same as with first order logic, but now we have extra variables and remove =. Shared Alphabet ( ) , ∧ ∨ → ¬ ∀ ∃ Individual variables: x1 x2 x3 … Relation variables: X1 X2 X3 … (actually an infinite store for each possible arity) Function variables: F1 F2 F3 … (actually an infinite store for each possible arity) Language-Specific Alphabet Constant symbols: c1 c2 c3 … Relation symbols: R1 R2 R3 … Function symbols: f1 f2 f3 … Arity function Arity: (Relation symbols ∪ Function symbols) → ℕ
33. 33. Second Order Logic: Grammar Almost the same as with first order logic, but now we also allow the following grammatical constructions: If a is grammatical and x is an individual variable, then so is ∀xa and ∃xa If a is grammatical and X is a relation variable, then so is ∀Xa and ∃Xa If a is grammatical and F is a function variable, then so is ∀Fa and ∃Fa
34. 34. Second Order Logic: Standard Semantics There are actually several different “second order logics” with different semantics. We’ll spend most our time on standard semantics. Like in first order logic, we have a structure M = <U,I>. Now, though, our variable assignment function has to assign values to all the relation and function variables as well as the individual variables. s1: Individual Variables → U s2: n-ary Relation Variables → {f: Un → {T,F}} s3: n-ary Function Variables → {f: Un → U}
35. 35. Second Order Logic: Standard Semantics Together, M, s1, s2, and s3 uniquely pin down a truth value for every sentence of second order logic. The semantics for all the non-quantified formulas are identical to first-order logic. For quantified formulas we have the following: V’M,s1,s2,s3(∀xa) = T iff V’M,s1(x/d),s2,s3(a) = T for all d ∈ U V’M,s1,s2,s3(∃xa) = T iff V’M,s1(x/d),s2,s3(a) = T for some d ∈ U V’M,s1,s2,s3(∀Xa) = T iff V’M,s1,s2(X/D),s3(a) = T for all D ⊆ Un, for n-ary X V’M,s1,s2,s3(∃Xa) = T iff V’M,s1,s2(X/D),s3(a) = T for some D ⊆ Un, for n-ary X V’M,s1,s2,s3(∀Fa) = T iff V’M,s1,s2,s3(F/G)(a) = T for all G ∈ {f: Un → U}, for n-ary F V’M,s1,s2,s3(∃Fa) = T iff V’M,s1,s2,s3(F/G)(a) = T for some G ∈ {f: Un → U}, for n-ary F
36. 36. Second Order Logic: Proof System The drawback of all this expressive power we now have… There is no sound and complete proof system for second order logic! For any sound proof system you choose for second order logic, and for any second-order language, there will be logical truths in that language that the proof system will fail to prove.
37. 37. Second Order Logic and Complexity Theory - REG (the set of regular languages) is definable by monadic, second-order formulas. - NP is the set of languages definable by existential, second-order formulas. - co-NP is the set of languages definable by universal, second-order formulas. - PH is the set of languages definable by second-order formulas.
38. 38. Summary Logical truth is fundamentally about semantics. We define the truth of a sentence based off of our intended meaning for the symbols in use. SYNTAX SEMANTICS PROOF Defines an alphabet of symbols. Defines a grammar: some subset of the set of all finite strings of symbols. Defines the meaning of each symbol. Defines a “valuation function” from grammatical sentences to truth values, consistent with the meanings of the symbols. Defines a deductive calculus. Gives a set of axioms and inference rules from which you can derive more sentences. Sound and Complete Proof System Decidable Propositional Logic ✔ ✔ First Order Logic ✔ ✘ Second Order Logic ✘ ✘