Gödel's Completeness Theorem Power & Limits of Logic Three Profound Theorems about Mathematical Logic Thm 1, good news: only need to know* a few axioms & rules, to prove all validities. *Theoretically only: having more rules is convenient. Copyright © Albert R. Meyer, 2005. September 16, 2005 lec 2F.1 Axioms & Inference Rules September 16, 2005 lec 2F.3 Copyright ©Albert R. Meyer, 2005. September 16, 2005 lec 2F.4 Three Profound Theorems Thm 3, Worse News: if we stick to domain, N, with predicates x + y = z, x · y = z, We won't prove these Theorems. Their proofs usually require half a term in an intro logic course after 6.042. then no proof system can prove all the true assertions! September 16, 2005 lec 2F.2 Thm 2, Bad News: there is no procedure that determines when quantified assertions are valid (in contrast to propositional formulas). Gödel's Incompleteness Theorem for Arithmetic Copyright © Albert R. Meyer, 2005. September 16, 2005 Cannot Determine Validity Namely, starting from a few propositional & simple predicate validities, every valid assertion can be proved using just UG and modus ponens repeatedly! Copyright © Albert R. Meyer, 2005. Copyright ©Albert R. Meyer, 2005. lec 2F.5 Copyright ©Albert R. Meyer, 2005. September 16, 2005 lec 2F.6 1 Sets Mathematics for Computer Science MIT 6.042J/18.062J Informally, a set is a collection of mathematical objects with the collection treated as a single mathematical object. This is circular of course: what’s a collection? Sets & Functions Copyright © Albert R. Meyer, 2005. lec 2F.7 September 16, 2005 Copyright ©Albert R. Meyer, 2005. Some sets lec 2F.8 September 16, 2005 Some sets Real numbers, R complex numbers, C integers, Z ∅ the emptyset, {7, “Albert R.”, π/2, Τ} A set with 4 elements: two numbers, a string, and a Boolean value. Same as the set of all sets of integers , pow(Z) {“Albert R.”,7,Τ, π/2} the power set -- order doesn’t matter Copyright © Albert R. Meyer, 2005. lec 2F.9 September 16, 2005 Copyright ©Albert R. Meyer, 2005. Membership x∈ A Membership x∈ A x is an element of A π/2 ∈ {7, “Albert R.”,π/2, Τ} π/3 ∉ {7, “Albert R.”,π/2, Τ} 14/2 ∈ {7, “Albert R.”,π/2, Τ} Copyright © Albert R. Meyer, 2005. September 16, 2005 lec 2F.10 September 16, 2005 lec 2F.11 x is a member of A shorter: “x is in A” 7∈Z Copyright © Albert R. Meyer, 2005. 2/3 ∉ Z September 16, 2005 Z ∈pow(R) lec 2F.12 2 In or Not In Containment A⊆ B {7, π/2, 7} is same as {7, π/2} An element, like 7, is in a set, or not in the set. (No notion of being in the set more than once) A is a subset of B A is contained in B Every element of A is also an element of B. Z⊆R, R⊆C, {3}⊆{5,7,3} ∅⊆ every set Copyright © Albert R. Meyer, 2005. September 16, 2005 lec 2F.13 Copyright © Albert R. Meyer, 2005. Team Problem lec 2F.14 September 16, 2005 Defining Sets The set of elements, x, in A Problem 1 Copyright © Albert R. Meyer, 2005. September 16, 2005 such that P(x) is true. {x ∈ A | P( x)} lec 2F.15 Copyright © Albert R. Meyer, 2005. lec 2F.16 September 16, 2005 New sets from old Defining Sets The set of even integers: {n ∈ Z | n is even} A {n ∈ Z | ∃m ∈ Z. n = 2m} Copyright © Albert R. Meyer, 2005. September 16, 2005 B Venn Diagram for A and B lec 2F.17 Copyright © Albert R. Meyer, 2005. September 16, 2005 lec 2F.19 3 union A intersection A B A ∪ B ::= {x | ( x ∈ A) ∨ ( x ∈ B)} Copyright © Albert R. Meyer, 2005. lec 2F.20 September 16, 2005 B A ∩ B ::= {x | x ∈ A ∧ x ∈ B} Copyright © Albert R. Meyer, 2005. set difference complement D −A known A= A domain D B A A − B ::= {x | ( x ∈ A) ∧ ( x ∉ B)} Copyright © Albert R. Meyer, 2005. September 16, 2005 lec 2F.22 A ::= {x ∈ D | x ∉ A} = D − A Copyright © Albert R. Meyer, 2005. power set pow({a, b}) = {{a, b} , {a} , {b} , ∅} September 16, 2005 September 16, 2005 lec 2F.23 Quickie pow ( A) ::= {S | S ⊆ A} Copyright © Albert R. Meyer, 2005. lec 2F.21 September 16, 2005 lec 2F.24 What is Pow(∅)? Ans: {∅} What is Pow(Pow(∅))? Ans: {{∅}, ∅} Copyright © Albert R. Meyer, 2005. September 16, 2005 lec 2F.25 4 Russell’s Paradox Russell’s Paradox Let W ::= {S ∈ Sets | S ∉ S } So the collection, Sets, of all sets, cannot be considered a set! so S ∈ W ↔ S ∉ S Let S be W and reach a contradiction: W ∈W ↔ W ∉W Copyright © Albert R. Meyer, 2005. September 16, 2005 lec 2F.26 Copyright © Albert R. Meyer, 2005. September 16, 2005 lec 2F.27 f :A→ B Mathematics for Computer Science MIT 6.042J/18.062J function, f, from set A to set B associates an element, f ( a ) ∈ B with an element a ∈ A. Functions Example: f is the string-length function: f(“aabd”)=4 Copyright © Albert R. Meyer, 2005. September 16, 2005 lec 2F.31 Copyright © Albert R. Meyer, 2005. f :A→ B September 16, 2005 lec 2F.32 g :R2 → R 1 x− y domain(g) = all pairs of reals g ( x, y ) = f is the string-length function. A, the domain of f, is the set of strings. B, the codomain of f, is N Copyright © Albert R. Meyer, 2005. September 16, 2005 codomain(g)= all reals But g is partial: not defined on all pairs of reals lec 2F.33 Copyright © Albert R. Meyer, 2005. September 16, 2005 lec 2F.34 5 g′ : D → R g ′( x, y ) = Total functions 1 x− y f : A → B is total iff every element of A is assigned a B-value by f where D = R − {( x, y ) | y = x} Then g´ is total: defined on all pairs in domain D. 2 Copyright © Albert R. Meyer, 2005. September 16, 2005 ∀a ∈ A ∃b ∈ B. f (a ) = b lec 2F.35 Copyright © Albert R. Meyer, 2005. September 16, 2005 Onto functions 1-1 functions f : A → B is onto f : A → B is 1-1 iff every element of B is f of something iff every element of B is f of at most 1 thing ∀b ∈ B ∃a ∈ A. f (a ) = b a surjection Copyright © Albert R. Meyer, 2005. September 16, 2005 lec 2F.37 Bijections an injection Copyright © Albert R. Meyer, 2005. September 16, 2005 lec 2F.38 f : A → B is a bijection iff it is an exact correspondence: it is all those good things: total, onto, and 1-1 September 16, 2005 ∀a, a′ ∈ A.( f (a ) = f (a ')) → (a = a ') Bijections f : A → B is a bijection iff Copyright © Albert R. Meyer, 2005. lec 2F.36 f( )= A lec 2F.39 Copyright © Albert R. Meyer, 2005. B September 16, 2005 lec 2F.40 6 Team Problem Bijections exactly one arrow out exactly one arrow in f( )= A Copyright © Albert R. Meyer, 2005. B September 16, 2005 lec 2F.41 Problem 2 Copyright © Albert R. Meyer, 2005. September 16, 2005 lec 2F.42 7