G. Carl Evans University of Illinois Summer 2013
Propositional logic Propositional Logic Review AND, OR, T/F, implies, etc Equivalence and truth tables Manipulating propositions
Implication Propositional Logic Review
Implication Propositional Logic Review a b a b a b b a b ( a b) ( b a) T T T T T T F F F F F T T F T F F T T F
Today Propositional Logic Review Be able to incorporate predicates and quantifiers into logical statements Be able to manipulate statements with quantifiers Learn how to prove a universal statement
Predicate Logic Propositional Logic Review Predicate: propositions that have input variables with a range of values For some integer x, x > 10 Cars that are read and speeding are likely to be ticketed. isred(x) speeding(x) likely to be ticketed(x) A person s mother s mother is his/her grandmother For every set of people x, y, z mother(x, y) mother(y, z) grandmother(x, z)
Quantifiers Propositional Logic Review For some x : x For all x : x For exactly one x :!x
Binding and Scope Propositional Logic Review x, p(x) q(x) Binding: x Scope: p(x) q(x) x, x 2 = 0 Binding: x Scope: x 2 = 0
Manipulating quantifiers: Negation Negation: Examples ( x, p(x)) x, p(x) ( x, p(x)) x, p(x) Not all dogs are fat is equivalent to At least one dog is not fat. There does not exist one fat dog is equivalent to All dogs are not fat.
Contrapositive Propositional Logic Review x, p(x) q(x) x, q(x) p(x)
Quantifiers with two variables For all integers a and b, a + b a
Quantifiers with two variables For all integers a and b, a + b a a Z, b Z, a + b a or a, b Z, a + b a For every real a, there exists an integer b such that a + b a
Quantifiers with two variables For all integers a and b, a + b a a Z, b Z, a + b a or a, b Z, a + b a For every real a, there exists an integer b such that a + b a a R, b Z, a + b a
Proving universal statements Claim: For any integers a and b, if a and b are odd, then ab is also odd.
Proving universal statements Claim: For any integers a and b, if a and b are odd, then ab is also odd. Definition: integer a is odd iff a = 2m + 1 for some integer m Let a, b Z s.t. a and b are odd. Then by definition of odd a = 2m + 1.m Z and b = 2n + 1.n Z So ab = (2m + 1)(2n + 1) = 4mn + 2m + 2n + 1 = 2(2mn + m + n) + 1 and since m, n Z it holds that (2mn + m + n) Z, so ab = 2k + 1 for some k Z. Thus ab is odd by definition of odd. QED
Approach to proving universal statements State the supposition (hypothesis) and define any variables Expand definitions such as odd or rational into their technical meaning (if necessary) Manipulate expression until claim is verified by a simple statement End with This is what was to be shown. or QED to make it obvious that the proof is finished. Tip: work out the proof on scratch paper first, then rewrite it in a clear, logical order with justification for each step.
Claim: For any real k, if k is rational, then k 2 is rational.
Claim: For any real k, if k is rational, then k 2 is rational. Definition: real k is rational iff k = m n for some integers m, n, with n 0. Let k Q. By definition of rational k = m n for some m, n Z with n 0. k 2 = m n 2 = m 2 Since m, n Z, m 2, n 2 Z and since n 0, n 2 0, k 2 is rational by definition. QED n 2
Claim: For all integers n, 4(n 2 + n + 1) 3n 2 is a perfect square. Definition: k is a perfect square iff k = m 2 for some integer m. Let n be an integer. 4(n 2 + n + 1) 3n 2 = n 2 + 4n + 4 = (n + 2) 2 Since n is an integer n + 2 is an integer so by definition of perfect square 4(n 2 + n + 1) 3n 2 is a perfect square. QED
Claim: The product of any two rational numbers is a rational number. Definition: real k is rational iff k = m n for some integers m, n, with n 0. Let a, b be rational numbers. By definition of rational a = m n, b = j k n and k are not 0. for some m, n, j, k Z s.t. ab = m j n k = mj nk Since m, n, j, k are integers mj, nk are integers and since n and k are not 0 nk 0. Thus by definition of rational ab is rational. QED