310 likes | 490 Views
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
E N D
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 • 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
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
Quantifiers • Loves(x,y): x loves y • Are they equivalent? vs vs vs
Quantifiers • Loves(x,y): x loves y • Are they equivalent? ≠ ≡ ≡
Prove or Disprove Counterexample: a=20, b=2 Counterexample: n=11
Argument with quantifiers • Nothing intelligible ever puzzles me. • Logic puzzles me.
Argument with quantifiers Logic is not intelligible
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
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
Contrapositive • Prove by contrapositive • If n2 is divisible by 3, then n is divisible by 3
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
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.
Contradiction - Answer • Assume the contrary, every bag contain different number of coins. • Minimum number of coin required = • 1 + 2 + 3 + …. + 9 = 45 > 40 • Contradiction!
Contradiction Prove is irrational • Given: If n2 is divisible by 3, then n is divisible by 3
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.
Contradiction Prove n2-2 is not divisible by 4 for all integer n.
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
Contradiction There are no positive integer solution x and y for x2 - y2 = 1
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!
Contradiction • For all prime numbers a, b and c, a2 + b2≠ c2
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)
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
Proof by cases • |x||y| = |xy| for all real numbers x, y
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.
Proof by cases Prove max(x,y) + min(x,y) = x+y
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
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