tutorial 2: first o rder logic and methods of proofs

20
Tutorial 2: First Order Logic and Methods of Proofs Peter Poon

Upload: jalena

Post on 24-Feb-2016

42 views

Category:

Documents


0 download

DESCRIPTION

Tutorial 2: First O rder Logic and Methods of Proofs. Peter Poon. Agenda. First Order Logic Order of quantifier Formulation Negation Methods of Proofs Direct Proof Contrapositive Contradiction. First Order Logic. Order of quantifier. Which one are equivalent?. Order of quantifier. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Tutorial 2: First  O rder Logic and Methods of Proofs

Tutorial 2: First Order Logic and Methods of Proofs

Peter Poon

Page 2: Tutorial 2: First  O rder Logic and Methods of Proofs

Agenda

• First Order Logic– Order of quantifier– Formulation– Negation

• Methods of Proofs– Direct Proof– Contrapositive– Contradiction

Page 3: Tutorial 2: First  O rder Logic and Methods of Proofs

First Order Logic

Page 4: Tutorial 2: First  O rder Logic and Methods of Proofs

Order of quantifier

• Which one are equivalent?

Page 5: Tutorial 2: First  O rder Logic and Methods of Proofs

Order of quantifier

• Which one are equivalent?

Page 6: Tutorial 2: First  O rder Logic and Methods of Proofs

Formulation

• Express the following using first order logic• Let be the set of all positive integers be the set of all real numbers be “x is prime”

Page 7: Tutorial 2: First  O rder Logic and Methods of Proofs

Formulation

• Express the following using first order logic

Page 8: Tutorial 2: First  O rder Logic and Methods of Proofs

Negation

• You know that

• Write down the negation of the following statements

Page 9: Tutorial 2: First  O rder Logic and Methods of Proofs

Negation

• Write down the negation of the following statements

Page 10: Tutorial 2: First  O rder Logic and Methods of Proofs

Method of Proof

Page 11: Tutorial 2: First  O rder Logic and Methods of Proofs

Direct Proof

• For every positive integer n, is even

Page 12: Tutorial 2: First  O rder Logic and Methods of Proofs

Direct Proof

• For every positive integer n, is even

Page 13: Tutorial 2: First  O rder Logic and Methods of Proofs

Contrapositive

• If n2 is divisible by 3, then n is divisible by 3

Page 14: Tutorial 2: First  O rder Logic and Methods of Proofs

Contrapositive

• If n2 is divisible by 3, then n is divisible by 3• Contrapositive form

– 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 = 3(3k2 + 2k) + 1• Case 2: n = 3k + 2

– n2 = (3k + 2)2 = 9k2 + 12k + 4 = 3(3k2 + 4k + 1) + 1• Both are not divisible by 3

Page 15: Tutorial 2: First  O rder Logic and Methods of Proofs

Contradiction

• Show that is not rational.– Given If n2 is divisible by 3, then n is divisible by 3

Page 16: Tutorial 2: First  O rder Logic and Methods of Proofs

Contradiction

• Show that is not rational.– Given If n2 is divisible by 3, then n is divisible by 3

• If is rational• Since , which is divisible by 3• So p = 3k, k is positive integer• Also p2 = 3q2

• so 9k2 = 3q2

• q2 = 3k2 (p and q have the common factor 3 contradiction!!!)

Page 17: Tutorial 2: First  O rder Logic and Methods of Proofs

Contradiction

• If there 40 pigeons sharing 7 pigeonholes, then at least 1 pigeonhole have more then 5 pigeons.

Page 18: Tutorial 2: First  O rder Logic and Methods of Proofs

Contradiction

• If there 40 pigeons sharing 7 pigeonholes, then at least 1 pigeonhole have more then 5 pigeons.

• Assume it is false• Then every pigeonhole have at most 5 pigeons• Total number of pigeons <= 5 * 7 = 35• Contradiction!!!

• Pigeonhole principle• http://en.wikipedia.org/wiki/Pigeonhole_principle

Page 19: Tutorial 2: First  O rder Logic and Methods of Proofs

Conclusion

• Contrapositive– Find the contrapositive form– Prove it

• Contradiction– Assume it is false– Show it is impossible by finding contradiction

Page 20: Tutorial 2: First  O rder Logic and Methods of Proofs