Introduction to proofs. Niloufar Shafiei

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

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

Readings: Conjecture. Theorem. Rosen Section 1.5

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

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

Proofs. Joe Patten August 10, 2018

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

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

(3,1) Methods of Proof

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

Computer Science Section 1.6

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

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

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

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

Section Summary. Proof by Cases Existence Proofs

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

Lecture 2: Proof Techniques Lecturer: Lale Özkahya

Discrete Mathematics Basic Proof Methods

First order Logic ( Predicate Logic) and Methods of Proof

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Disjunction/Conjunction Normal Form

EECS 1028 M: Discrete Mathematics for Engineers

MATH 271 Summer 2016 Practice problem solutions Week 1

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.

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

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

1 The Foundation: Logic and Proofs

CSE 20 DISCRETE MATH. Fall

Homework 3: Solutions

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

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

(4) Using results you have studied, show that if x, y are real numbers,

CSE 20 DISCRETE MATH. Winter

Math.3336: Discrete Mathematics. Proof Methods and Strategy

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

Mathematics 220 Homework 4 - Solutions. Solution: We must prove the two statements: (1) if A = B, then A B = A B, and (2) if A B = A B, then A = B.

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

ECOM Discrete Mathematics

5 Set Operations, Functions, and Counting

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.

In Exercises 1 12, list the all of the elements of the given set. 2. The set of all positive integers whose square roots are less than or equal to 3

Lecture 7 Feb 4, 14. Sections 1.7 and 1.8 Some problems from Sec 1.8

1 The Foundation: Logic and Proofs

MATH CSE20 Homework 5 Due Monday November 4

Inference and Proofs (1.6 & 1.7)

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

Direct Proof and Proof by Contrapositive

Mat 243 Exam 1 Review

The Process of Mathematical Proof

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

Proofs. Chapter 2 P P Q Q

Proof by Contradiction

CSE 1400 Applied Discrete Mathematics Proofs

Climbing an Infinite Ladder

Definitions Chapter 1 Proof Technique (Pg.1): Proof (Pg.2): Statement (Pg.2): Conditional Statement/Implication (Pg3.): Hypothesis(Pg.

Lecture 3. Logic Predicates and Quantified Statements Statements with Multiple Quantifiers. Introduction to Proofs. Reading (Epp s textbook)

3.6. Disproving Quantified Statements Disproving Existential Statements

Ch 3.2: Direct proofs

Some Review Problems for Exam 1: Solutions

1. Propositions: Contrapositives and Converses

Math 3450 Homework Solutions

Foundations of Discrete Mathematics

With Question/Answer Animations. Chapter 1, Part III: Proofs

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

Homework - Sec. 2.3, Page 24 Fall 2016

We want to show P (n) is true for all integers

Midterm: Sample 3. ECS20 (Fall 2017) 1) Using truth tables, establish for each of the two propositions below if it is a tautology, a contradiction

In N we can do addition, but in order to do subtraction we need to extend N to the integers

Discrete Mathematics

In N we can do addition, but in order to do subtraction we need to extend N to the integers

CSE 20 DISCRETE MATH. Winter

Basic Proof Examples

Properties of the Integers

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

Argument. whenever all the assumptions are true, then the conclusion is true. If today is Wednesday, then yesterday is Tuesday. Today is Wednesday.

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

MATH 304 Linear Algebra Lecture 8: Vector spaces. Subspaces.

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

MTHSC 3190 Section 2.9 Sets a first look

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. March 1, :00 pm Duration: 1:15 hs

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

1. Mathematical Proofs

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

CSE 215: Foundations of Computer Science Recitation Exercises Set #5 Stony Brook University. Name: ID#: Section #: Score: / 4

Full file at

Proofs Not Based On POMI

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

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

AN INTRODUCTION TO MATHEMATICAL PROOFS NOTES FOR MATH Jimmy T. Arnold

MATH10040: Numbers and Functions Homework 1: Solutions

MAT 300 RECITATIONS WEEK 7 SOLUTIONS. Exercise #1. Use induction to prove that for every natural number n 4, n! > 2 n. 4! = 24 > 16 = 2 4 = 2 n

2 Truth Tables, Equivalences and the Contrapositive

MACM 101 Discrete Mathematics I. Exercises on Predicates and Quantifiers. Due: Tuesday, October 13th (at the beginning of the class)

Discrete Mathematics Recitation Course 張玟翔

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

MATH FINAL EXAM REVIEW HINTS

Logic and Proof. Aiichiro Nakano

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

Transcription:

Introduction to proofs Niloufar Shafiei

proofs Proofs are essential in mathematics and computer science. Some applications of proof methods Proving mathematical theorems Designing algorithms and proving they meet their specifications Verifying computer programs Establishing operating systems are secure Making inferences in artificial intelligence Showing system specifications are consistent 1

Terminology Theorem: A statement that can be shown to be true. Proposition: A less important theorem. Lemma: A less important theorem that is helpful in the proof of other results. 2

Terminology Proof: A convincing explanation of why the theorem is true. Axiom: A statement which is assumed to be true. Corollary: A theorem that can be established easily from a theorem that has been proven. 3

Theorem (example) Many theorems assert that a property holds for all elements in a domain. Example: If x>y, where x and y are positive real numbers, then x 2 > y 2. For all positive real numbers x and y, if x>y, then x 2 > y 2. x y (R(x,y) S(x,y))domain: all positive real numbers R(x,y): x>y S(x,y): x 2 > y 2 4

Theorem How to prove x (R(x) S(x))? Universal generalization (review): P(c) x P(x) Show R(c) S(c) where c is an arbitrary element of the domain. Using universal generalization, x (R(x) S(x)) is true. 5

Theorem How to prove x (R(x) S(x))? Show R(c) S(c) where c is an arbitrary element of the domain. Conditional statement (review): p q is true unless p is true and q is false. p T T q T F p q T F To show p q is true, we need to show that if p is true, then q is true. F F T F T T 6

Direct proof How to prove x (R(x) S(x))? Let c be any element of the domain. Assume R(c) is true. S(c) must be true. These steps are constructed using Rules of inference Axioms Lemmas Definitions Proven theorems Direct proof 7

Direct proof (example) Theorem: If n is an odd integer, then n 2 is odd. Proof: Assume n is an odd integer. By definition, integer k, such that n = 2k + 1 n 2 = (2k + 1) 2 n 2 = 4k 2 + 4k + 1 = 2 (2k 2 + 2k) + 1 Let m = 2k 2 + 2k. n 2 = 2m + 1 So, by definition, n 2 is odd. Definition: n is odd integer, if integer k such that n=2k+1. 8

Direct proof (example) Theorem: If n and m are both perfect squares then nm is also a perfect square. Proof: Assume n and m are perfect squares. By definition, integers s and t such that n=s 2 and m=t 2. nm = s 2 t 2 = (st) 2 Let k = st. nm = k 2 So, by definition, nm is a perfect square. Definition: An integer a is perfect square if integer b such that a=b 2. 9

Proof techniques Direct proof leads from the hypothesis of a theorem to the conclusion. Proofs of theorems that do not start with the hypothesis and end with the conclusion, are called indirect proofs. 10

Proof by contraposition p q q p Conditional statement Its contrapositive In a proof by contraposition of p q, we take q as a hypothesis and we show that p must follow. Proof by contraposition is an indirect proof. 11

Proof by contraposition Proof by contraposition of p q: Assume q is true. p must be true. These steps are constructed using Rules of inference Axioms Lemmas Definitions Proven theorems Proof by contraposition 12

Proof by contraposition (example) Theorem: If n is an integer and 3n+2 is odd, then n is odd. Proof (by contraposition): Assume n is even. integer k, such that n = 2k 3n+2 = 3(2k)+2 = 2(3k+1) Let m = 3k+1. 3n+2 = 2m So, 3n+2 is even. By contraposition, if 3n+2 is odd, then n is odd. 13

Proof by contraposition (example) Theorem: If n =ab, where a and b are positive integers, then b n or a n. Proof (by contraposition): Assume b > n and a > n. ab > ( n). ( n) = n So, n ab. By contraposition, if n=ab, then b n or a n. 14

Example Assume P(n) is if n > 0, then n 2 > 0. Show that P(0) is true. Proof: P(0) is if 0>0, then 0 2 > 0. Since the hypothesis of P(0) is false, then P(0) is true. Vacuous proof: p q is true when p is false. 15

Example Assume P(n) is if ab > 0, then (ab) n > 0. Show that P(0) is true. Proof: P(0) is if ab>0, then (ab) 0 > 0. (ab) 0 = 1 > 0 Since the conclusion of P(0) is true, P(0) is true. Trivial proof: p q is true when q is true. 16

Example Theorem: The sum of two rational numbers is rational. Proof: Assume r and s are rational. p,q r = p/q q 0 t,u s = t/u u 0 r+s = p/q + t/u = (pu+tq) / (qu) Since q 0 and u 0 then qu 0. Let m=(pu+tq) and n=qu where n 0. So, r+s = m/n, where n 0. So, r+s is rational. Definition: The real number r is rational if r=p/q, integers p and q that q. 17

Example Theorem: If n is an integer and n 2 is even, then n is even. Direct proof or proof by contraposition? Proof (direct proof): Assume n 2 is an even integer. n 2 = 2k (k is integer) n = ± 2k??? dead end! 18

Example Theorem: If n is an integer and n 2 is even, then n is even. Direct proof or proof by contraposition? Proof (proof by contraposition): Assume n is an odd integer. n = 2k+1 (k is integer) n 2 = (2k+1) 2 = 4k 2 + 4k + 1 = 2(2k 2 + 2k) + 1 Assume integer m = 2k 2 + 2k. n 2 = 2m + 1 So, n 2 is odd. By contraposition, If n 2 is even, then n is even. 19

Proof by contradiction How to prove a proposition by contradiction? Assume the proposition is false. Using the assumption and other facts to reach a contradiction. This is another kind of indirect proof. 20

Proof by contradiction Proof by contradiction of p q: Assume p and q is true. Contradiction. These steps are constructed using Rules of inference Axioms Lemmas Definitions Proven theorems Proof by contradiction 21

Proof by contradiction (example) Definition: The real number r is rational if r=p/q, integers p and q that q. Prove that 2 is not rational by contradiction. Proof (proof by contradiction): Assume 2 is rational. a,b 2 = a/b b 0 If a and b have common factor, remove it by dividing a and b by it 2 = a 2 / b 2 2b 2 = a 2 So, a 2 is even and by previous theorem, a is even. k a = 2k. 2b 2 = 4k 2 b 2 = 2k 2 So, b 2 is even and by previous theorem, b is even. m b = 2m. So, a and b have common factor 2 which contradicts the Assumption. 22

Proof by contradiction (example) Prove if 3n+5 is even then n is odd. Proof (proof by contradiction): Assume 3n+5 is even and n is even. n = 2k (k is some integer) 3n+5 = 3(2k) + 5 = 6k + 5 = 2(3k + 2) + 1 Assume m = 3k+2. 3n+5 = 2m + 1 So, 3n+5 is odd. Assume p is 3n+5 is even. p p is a contradiction. By contradiction, if 3n+5 is even then n is odd. 23

Proof by contradiction (example) Prove if n 2 is odd then n is odd. Proof (proof by contradiction): Assume n 2 is odd and n is even. integer k n = 2k n 2 = 4k 2 = 2(2k 2 ) Let m = 2k 2. n 2 = 2m So, n 2 is even. Let p is n 2 is odd. p p is a contradiction. By contradiction, if n 2 is odd then n is odd. 24

Proofs of equivalences How to prove p q? p T T F F q T F T F p q T F F T p q (p q) (q p) 25

Proofs of equivalences How to prove p q? We need to prove p q q p 26

Proofs of equivalences How to prove p p 1 p 2 p n? p p 1 p 2 p n (p 1 p 2 ) (p 2 p 3 ) (p n-1 p n ) (p n p 1 ) We need to prove p 1 p 2 p 2 p 3 p n-1 p n p n p 1 27

Proofs of equivalences (example) p q is true if and only if (p q) is true. Proof: Part1: if p q is true then (p q) is true. p q is true. p is true and q is true. p is false and q is false. p q is false. (p q) is true. 28

Proofs of equivalences (example) p q is true if and only if (p q) is true. Proof: Part2: if (p q) is true then p q is true. (p q) is true. p q is false. p is false and q is false. p is true and q is true. p q is true. 29

Proofs of equivalences (example) Show these statements about integer n are equivalent p: n is odd. q: n+1 is even. r: n 2 is odd. How to prove it? p q r (p q) (q r) (r p) 30

Proofs of equivalences (example) Show these statements about integer n are equivalent p: n is odd. q: n+1 is even. r: n 2 is odd. Proof: 1. p q: if n is odd then n+1 is even. (direct proof) n is odd. n=2k+1 n+1 = 2k+2 = 2(k+1) m=k+1 n+1 = 2m n+1 is even. 31

Proofs of equivalences (example) Show these statements about integer n are equivalent p: n is odd. q: n+1 is even. r: n 2 is odd. Proof: 2. q r: if n+1 is even then n 2 is odd. (direct proof) n+1 is even. n+1=2k n = 2k-1 n 2 = 4k 2-4k+1 = 2(2k 2-2k)+1 m= 2k 2-2k n 2 = 2m+1 n 2 is odd. 32

Proofs of equivalences (example) Show these statements about integer n are equivalent p: n is odd. q: n+1 is even. r: n 2 is odd. Proof: 3. r p: if n 2 is odd then n is odd. by previous example 33

Counterexample (review) How to show x P(x) is false? find a counterexample 34

Counterexample (example) Show every positive integer is a sum of the squares of two integers. is false. Proof: 3 cannot be written as the sum of the squares of two integers. Because only squares not exceeding 3 are 0 2 = 0 and 1 2 = 1. There is no way to get 3 as the sum of these squares. 35

Recommended exercises 1,3,7,9,10,11,15,17,25,27,33,39 36