Example ( x.(p(x) Q(x))) ( x.p(x) x.q(x)) premise. 2. ( x.(p(x) Q(x))) -elim, 1 3. ( x.p(x) x.q(x)) -elim, x. P(x) x.

Similar documents
Math.3336: Discrete Mathematics. Proof Methods and Strategy

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Normal Forms Note: all ppts about normal forms are skipped.

9/5/17. Fermat s last theorem. CS 220: Discrete Structures and their Applications. Proofs sections in zybooks. Proofs.

Disjunction/Conjunction Normal Form

Section 3.1: Direct Proof and Counterexample 1

Proof Terminology. Technique #1: Direct Proof. Learning objectives. Proof Techniques (Rosen, Sections ) Direct Proof:

Mat 243 Exam 1 Review

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Lecture 2: Proof Techniques Lecturer: Lale Özkahya

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Proofs. Joe Patten August 10, 2018

Mathematical Induction

MATH CSE20 Homework 5 Due Monday November 4

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

x P(x) x P(x) CSE 311: Foundations of Computing announcements last time: quantifiers, review: logical Inference Fall 2013 Lecture 7: Proofs

Section Summary. Proof by Cases Existence Proofs

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

First order Logic ( Predicate Logic) and Methods of Proof

Theorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)

Sec$on Summary. Mathematical Proofs Forms of Theorems Trivial & Vacuous Proofs Direct Proofs Indirect Proofs

CITS2211 Discrete Structures Proofs

Announcements. CS243: Discrete Structures. Sequences, Summations, and Cardinality of Infinite Sets. More on Midterm. Midterm.

1 The Foundation: Logic and Proofs

(3,1) Methods of Proof

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Introduction to proofs. Niloufar Shafiei

CMPSCI 250: Introduction to Computation. Lecture 11: Proof Techniques David Mix Barrington 5 March 2013

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. February 9, :30 pm Duration: 1:50 hs. Closed book, no calculators

1 The Foundation: Logic and Proofs

3.6. Disproving Quantified Statements Disproving Existential Statements

Show Your Work! Point values are in square brackets. There are 35 points possible. Tables of tautologies and contradictions are on the last page.

Equivalence of Propositions

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs

Mathematical Reasoning Rules of Inference & Mathematical Induction. 1. Assign propositional variables to the component propositional argument.

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

Direct Proof and Counterexample I:Introduction. Copyright Cengage Learning. All rights reserved.

Discrete Mathematics

Section 1.7 Proof Methods and Strategy. Existence Proofs. xp(x). Constructive existence proof:

Homework 3: Solutions

Proofs of Mathema-cal Statements. A proof is a valid argument that establishes the truth of a statement.

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

1.7 Proof Methods and Strategy

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

Direct Proof and Counterexample I:Introduction

PROBLEM SET 3: PROOF TECHNIQUES

Basic Proof Examples

Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Note 2

Chapter 2 Section 2.1: Proofs Proof Techniques. CS 130 Discrete Structures

EECS 1028 M: Discrete Mathematics for Engineers

Readings: Conjecture. Theorem. Rosen Section 1.5

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Winter

The Process of Mathematical Proof

Proofs. Chapter 2 P P Q Q

Proving Arguments Valid in Predicate Calculus

Some Review Problems for Exam 1: Solutions

CSE 20 DISCRETE MATH. Winter

Full file at

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

Proof by contrapositive, contradiction

Proofs. Chapter 2 P P Q Q

Introduction to Sets and Logic (MATH 1190)

Proof by Contradiction

Math Real Analysis

Handout on Logic, Axiomatic Methods, and Proofs MATH Spring David C. Royster UNC Charlotte

Predicate Logic. Andreas Klappenecker

Announcements. CS311H: Discrete Mathematics. Introduction to First-Order Logic. A Motivating Example. Why First-Order Logic?

Lecture 5 : Proofs DRAFT

Chapter 2: The Logic of Quantified Statements. January 22, 2010

Predicate Logic: Sematics Part 1

Mathematics 220 Midterm Practice problems from old exams Page 1 of 8

Intro to Logic and Proofs

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method

Mat2345 Week 2. Chap 1.5, 1.6. Fall Mat2345 Week 2. Chap 1.5, 1.6. Week2. Negation. 1.5 Inference. Modus Ponens. Modus Tollens. Rules.

Discrete Mathematics Basic Proof Methods

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

Arithmetic Algorithms: gcd, primality testing, the RSA cryptosystem. Polynomials and their Applications: error-correcting codes, secret sharing

Chapter 1 Elementary Logic

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

MATH 271 Summer 2016 Practice problem solutions Week 1

Your quiz in recitation on Tuesday will cover 3.1: Arguments and inference. Your also have an online quiz, covering 3.1, due by 11:59 p.m., Tuesday.

1.1 Statements and Compound Statements

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

Announcements. Read Section 2.1 (Sets), 2.2 (Set Operations) and 5.1 (Mathematical Induction) Existence Proofs. Non-constructive

CSE 311: Foundations of Computing. Lecture 6: More Predicate Logic

Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 1. Purpose of the Course. Propositions and Proofs

Supplementary Logic Notes CSE 321 Winter 2009

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Lecture 4: Probability, Proof Techniques, Method of Induction Lecturer: Lale Özkahya

Computer Science Section 1.6

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

2. Prove that there are no positive perfect cubes less than 1000 that are the sum of the cubes of two positive integers.

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

Transcription:

Announcements CS311H: Discrete Mathematics More Logic Intro to Proof Techniques Homework due next lecture Instructor: Işıl Dillig Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 1/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques /38 Review Example 1 Consider a formula F in first-order logic. How do you prove F is satisfiable? Is this formula valid, unsatisfiable, or contingent? Prove your answer! (( x.p(x)) ( x.q(x))) ( x.(p(x) Q(x))) How do you prove F is unsatisfiable? How do you prove it is valid? Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 3/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 4/38 Example Example, cont. What s wrong with the following proof of validity? Is the following formula valid, unsatisfiable, or contingent? ( x.(p(x) Q(x))) ( x.p(x) x.q(x)) 1. ( x.(p(x) Q(x))) ( x.p(x) x.q(x)) premise. ( x.(p(x) Q(x))) -elim, 1 3. ( x.p(x) x.q(x)) -elim, 1 4. x. P(x) x. Q(x) De Morgan, 3 5. x. P(x) -elim, 4 6. x. Q(x) -elim, 4 7. P(c) -inst, 5 8. Q(c) -inst, 6 9. P(c) Q(c) -inst, 10. Q(c) -elim, 9, 7 11. Q(c) Q(c) -intro, 10, 8 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 5/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 6/38 1

Example 3 Intro to Mathematical Proofs Consider the following puzzle inspired by Lewis Carroll: All babies are illogical. Anyone who can manage a crocodile is not despised. All illogical people are despised. Do these imply that No baby can manage a crocodile? Formalize this argument using predicates baby(x), illogical(x), managecroco(x), despised(x). Formalizing statements in logic allows formal, machine-checkable proofs But these kinds of proofs can be very long and tedious In practice, humans write slight less formal proofs, where multiple steps are combined into one We ll now move from formal proofs in logic to less formal mathematical proofs Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 7/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 8/38 Some Terminology Theorems, Lemmas, and Propositions Important mathematical statements that can be shown to be true are theorems Many famous mathematical theorems, e.g., Pythagorean theorem, Fermat s last theorem Pythagorean theorem: Let a, b the length of the two sides of a right triangle, and let c be the hypotenuse. Then, a + b = c Fermat s Last Theorem: For any integer n greater than, the equation a n + b n = c n has no solutions for non-zero a, b, c. There are many correct mathematical statements, but not all of them called theorems Less important statements that can be proven to be correct are propositions Another variation is a lemma: auxiliary result which aids in the proof of a theorem/proposition Corollary is a result whose proof follows immediately from a theorem or proposition Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 9/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 10/38 Conjectures vs. Theorems General Strategies for Proving Theorems Many different strategies for proving theorems: Conjecture is a statement that is suspected to be true by experts but not yet proven Goldbach s conjecture: Every even integer greater than can be expressed as the sum of two prime numbers. This conjecture is one of the oldest unsolved problems in number theory Direct proof: p q proved by directly showing that if p is true, then q must follow Proof by contraposition: Prove p q by proving q p Proof by contradiction: Prove that the negation of the theorem yields a contradiction Proof by cases: Exhaustively enumerate different possibilities, and prove the theorem for each case In many proofs, one needs to combine several different strategies! Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 11/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 1/38

Direct Proof More Direct Proof Examples To prove p q in a direct proof, first assume p is true. Then use rules of inference, axioms, previously shown theorems/lemmas to show that q is also true An integer a is called a perfect square if there exists an integer b such that a = b. Example: Prove that every odd number is the difference of two perfect squares. Example: If n is an odd integer, than n is also odd. Proof: Assume n is odd. By definition of oddness, there must exist some integer k such that n = k + 1. Then, n = 4k + 4k + 1 = (k + k) + 1, which is odd. Thus, if n is odd, n is also odd. Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 13/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 14/38 Proof by Contraposition Another Example In proof by contraposition, you prove p q by assuming q and proving that p follows. Makes no difference logically, but sometimes the contrapositive is easier to show than the original Prove: If n = ab, then a n or b n Prove: If n is odd, then n is odd. Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 15/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 16/38 Proof by Contradiction Example Prove by contradiction that If 3n + is odd, then n is odd. Proof by contradiction proves that p q is true by proving unsatisfiability of its negation What is negation of p q? Assume both p and q are true and show this yields contradiction Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 17/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 18/38 3

Another Example Example, cont Recall: Any rational number can be written in the form p q where p and q are integers and have no common factors. Example: Prove by contradiction that is irrational. Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 19/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 0/38 Proof by Cases Proof by Cases, cont. In some cases, it is very difficult to prove a theorem by applying the same argument in all cases For example, we might need to consider different arguments for negative and non-negative integers Proof by cases allows us to apply different arguments in different cases and combine the results Specifically, suppose we want to prove statement p, and we know that we have either q or r In general, there may be more than two cases to consider Proof by cases says that to show it suffices to show: (p 1 p... p k ) q p 1 q p q... p k q If we can show q p and r p, then we can conclude p Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 1/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques /38 Example Proof Prove that xy = x y Here, proof by cases is useful because definition of absolute value depends on whether number is negative or not. There are four possibilities: 1. x, y are both non-negative. x non-negative, but y negative 3. x negative, y non-negative 4. x, y are both negative Caveat: Your cases must cover all possibilites; otherwise, the proof is not valid! We ll prove the property by proving these four cases separately Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 3/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 4/38 4

Combining Proof Techniques So far, our proofs used a single strategy, but often it s necessary to combine multiple strategies in one proof Example: Prove that every rational number can be expressed as a product of two irrational numbers. Proof: Let s first employ direct proof. Observe that any rational number r can be written as r We already proved is irrational. r If we can show that is also irrational, we have a direct proof. Combining Proofs, cont. Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 5/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 6/38 Lesson from Example If and Only if Proofs In this proof, we combined direct and proof-by-contradiction strategies In more complex proofs, it might be necessary to combine two or even more strategies and prove helper lemmas It is often a good idea to think about how to decompose your proof, what strategies to use in different subgoals, and what helper lemmas could be useful Some theorems are of the form P if and only if Q (P Q) The easiest way to prove such statements is to show P Q and Q P Therefore, such proofs correspond to two subproofs One shows P Q (typically labeled ) Another subproof shows Q P (typically labeled ) Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 7/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 8/38 Example Counterexamples Prove A positive integer n is odd if and only if n is odd. We have already shown this using a direct proof earlier. We have already shown this by a proof by contraposition. Since we have proved both directions, the proof is complete. So far, we have learned about how to prove statements are true using various strategies But how to prove a statement is false? What is a counterexample for the claim The product of two irrational numbers is irrational? Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 9/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 30/38 5

Prove or Disprove Existence and Uniqueness Which of the statements below are true, which are false? Prove your answer. For all integers n, if n is positive, n is also positive. For all integers n, if n 3 is positive, n is also positive. For all integers n such that n 0, n n Common math proofs involve showing existence and uniqueness of certain objects Existence proofs require showing that an object with the desired property exists Uniqueness proofs require showing that there is a unique object with the desired property Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 31/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 3/38 Existence Proofs Non-Constructive Proof Example One simple way to prove existence is to provide an object that has the desired property This sort of proof is called constructive proof Example: Prove there exists an integer that is the sum of two perfect squares But not all existence proofs are contructive can prove existence through other methods (e.g., proof by contradiction or proof by cases) Such indirect existence proofs called nonconstructive proofs Prove: There exist irrational numbers x, y s.t. x y is rational We ll prove this using a non-constructive proof (by cases), without providing irrational x, y Consider. Either (i) it is rational or (ii) it is irrational Case 1: We have x = y = s.t. x y is rational Case : Let x = and y =, so both are irrational. Then, = =. Thus, x y is rational Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 33/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 34/38 Proving Uniqueness Example of Uniqueness Proof Some statements in mathematics assert uniqueness of an object satisfying a certain property To prove uniqueness, must first prove existence of an object x that has the property Second, we must show that for any other y s.t. y x, then y does not have the property Alternatively, can show that if y has the desired property that x = y Prove: If a and b are real numbers with a 0, then there exists a unique real number r such that ar + b = 0 Existence: Using a constructive proof, we can see r = b/a satisfies ar + b = 0 Uniqueness: Suppose there is another number s such that s r and as + b = 0. But since ar + b = as + b, we have ar = as, which implies r = s. Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 35/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 36/38 6

Summary of Proof Strategies Direct proof: p q proved by directly showing that if p is true, then q must follow Proof by contraposition: Prove p q by proving q p Proof by contradiction: Prove that the negation of the theorem yields a contradiction Proof by cases: Exhaustively enumerate different possibilities, and prove the theorem for each case Invalid Proof Strategies Proof by obviousness: The proof is so clear it need not be mentioned! Proof by intimidation: Don t be stupid of course it s true! Proof by mumbo-jumbo: α θ β α β γ Proof by intuition: I have this gut feeling.. Proof by resource limits: Due to lack of space, we omit this part of the proof... Proof by illegibility: sdjikfhiugyhjlaks??fskl; QED. Don t use anything like these in CS311!! Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 37/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro to Proof Techniques 38/38 7