1 / 31

More about First Order Logic and Methods of Proof

More about First Order Logic and Methods of Proof. Leo Cheung. A Quick Review. First Order Logic Proof by contrapositive Proof by contradiction Proof by cases. Formulating statements. Give the predicate prime(x): x is prime Write the predicate in first order logic odd(x): x is odd

Download Presentation

More about First Order Logic and Methods of Proof

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. More about First Order Logic and Methods of Proof Leo Cheung

  2. A Quick Review • First Order Logic • Proof by contrapositive • Proof by contradiction • Proof by cases

  3. Formulating statements • Give the predicate • prime(x): x is prime • Write the predicate in first order logic • odd(x): x is odd • Write the following in first order logic • All odd numbers greater than 7 are the sum of two odd primes. • There are infinite # of solutions for sin(x)=1

  4. Formulating statements • odd(x): • All odd numbers greater than 7 are the sum of two odd primes. • There are infinite # of solutions for sin(x)=1

  5. Quantifiers • Loves(x,y): x loves y • Are they equivalent? vs vs vs

  6. Quantifiers • Loves(x,y): x loves y • Are they equivalent? ≠ ≡ ≡

  7. Prove or Disprove

  8. Prove or Disprove Counterexample: a=20, b=2 Counterexample: n=11

  9. Argument with quantifiers • Nothing intelligible ever puzzles me. • Logic puzzles me.

  10. Argument with quantifiers Logic is not intelligible

  11. Contrapositive • If 3k+1 is even, then k is odd. • Try to prove its contrapositive • If k is even, 3k+1 is odd • Let k = 2n • 3k + 1 = 3(2n)+1 = 2(3n)+1 which is odd

  12. Contrapositive • For any integers a and b, a+b<=15 implies that a<8 or b<8 • Consider its contrapositive • If a>= 8 and b>=8, then a+b>15 • a + b >= 8 + 8 = 16 > 15

  13. Contrapositive • Prove by contrapositive • If n2 is divisible by 3, then n is divisible by 3

  14. Contrapositive - Answer • Contrapositive: • If n is not divisible by 3, then n2 is not divisible by 3. • Case 1: n=3k+1 • n2 = (3k+1)2 = 9k2 +6k+1 which is not divisible by 3 • Case 1: n=3k+2 • n2 = (3k+2)2 = 9k2+12k+4 which is not divisible by 3 • Hence n2 is not divisible by 3

  15. Contradiction • If 40 coins are distributed among 9 bags, so that each bag contains at least one coin. Then at least 2 bags contain the same number of coins.

  16. Contradiction - Answer • Assume the contrary, every bag contain different number of coins. • Minimum number of coin required = • 1 + 2 + 3 + …. + 9 = 45 > 40 • Contradiction!

  17. Contradiction Prove is irrational • Given: If n2 is divisible by 3, then n is divisible by 3

  18. Contradiction - Answer Assume is rational, then we can write where p and q do not have common factor > 1 p2 is divisible by 3, so p is divisible by 3 q2 is divisible by 3, so q is divisible by 3 Since p and q are both divisible by 3, it contradict with our assumption. Hence is irrational.

  19. Contradiction Prove n2-2 is not divisible by 4 for all integer n.

  20. Contradiction - Answer • Assume the contrary, then • There exists x2 – 2 = 4m • x must be even, write x=2k • 4k2-2 = 4m • Contradiction! • 4k2-2 is not divisible by 4 • 4m is divisible by 4

  21. Contradiction There are no positive integer solution x and y for x2 - y2 = 1

  22. Contradiction - Answer • Assume the contrary, there exist positive x and y such that x2 – y2 = 1 • Then we get • (x+y)(x-y) = 1 • (x+y)=1 or (x+y)=-1 • Contradiction!

  23. Contradiction • For all prime numbers a, b and c, a2 + b2≠ c2

  24. Contradiction - Answer • Assume the contrary, there exist prime number a, b and c such that a2 + b2 = c2 • Then we get • a2 = c2 – b2 • a2 = (c-b)(c+b)

  25. Contradiction - Answer • Since a is prime • There are 3 cases Implies b = 0, Contradiction Implies c = 3, b = 2, but 2+3=5 is not perfect square. Contradiction Implies b<=1, c<=1, Contradiction

  26. Proof by cases • |x||y| = |xy| for all real numbers x, y

  27. Proof by cases • |x||y| = |xy| for all real numbers x, y • Case 1: x>=0, y>=0 • |x||y| = xy, |xy| = xy • Case 2: x>=0, y<0 • |x||y| = x(-y), |xy| = -(xy) • Case 3: x<0, y>=0 • |x||y| = (-x)y, |xy| = -(xy) • Case 4: x<0, y<0 • |x||y| = (-x)(-y), |xy| = xy They are equal in every cases.

  28. Proof by cases Prove max(x,y) + min(x,y) = x+y

  29. Proof by cases Prove max(x,y) + min(x,y) = x+y • Case 1: x ≥ y • max(x,y) + min(x,y) = x + y • Case 2: x < y • max(x,y) + min(x,y) = y + x = x + y

  30. Exercises in textbook • 2.3: 11 18 20 22 28 36 53 • 2.4: 3 5 9 10 31 32 • 3.1: 11 17 50 • 3.2: 13 33 34 • 3.3: 17 19 29 • 3.5: 15 • 3.6: 3 5 10 21 27 • 3.7: 7 9

  31. END

More Related