CITS2211 Discrete Structures Proofs

Similar documents
2. The Logic of Compound Statements Summary. Aaron Tan August 2017

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

Chapter 1 Elementary Logic

Lecture 5 : Proofs DRAFT

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

Manual of Logical Style (fresh version 2018)

Section 1.2: Propositional Logic

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

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

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

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

Manual of Logical Style

Propositional Logic. Fall () Propositional Logic Fall / 30

Chapter 1: The Logic of Compound Statements. January 7, 2008

1.1 Statements and Compound Statements

Propositional Logic. Spring Propositional Logic Spring / 32

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Supplementary Logic Notes CSE 321 Winter 2009

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Proof Templates 1

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

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

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

1.1 Language and Logic

Propositional natural deduction

Warm-Up Problem. Write a Resolution Proof for. Res 1/32

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

MCS-236: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, Methods of Proof

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

4 Derivations in the Propositional Calculus

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.

Predicate Logic. Andreas Klappenecker

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

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

Readings: Conjecture. Theorem. Rosen Section 1.5

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Natural deduction for truth-functional logic

Proof. Theorems. Theorems. Example. Example. Example. Part 4. The Big Bang Theory

Adam Blank Spring 2017 CSE 311. Foundations of Computing I

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Logic Overview, I. and T T T T F F F T F F F F

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

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

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

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

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

cis32-ai lecture # 18 mon-3-apr-2006

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

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

15414/614 Optional Lecture 1: Propositional Logic

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

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

3 The Semantics of the Propositional Calculus

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

The statement calculus and logic

Propositional Logic: Part II - Syntax & Proofs 0-0

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

CSE Discrete Structures

Natural Deduction for Propositional Logic

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

Logic, Sets, and Proofs

The Process of Mathematical Proof

Formal (natural) deduction in propositional logic

LECTURE 1. Logic and Proofs

CSC Discrete Math I, Spring Propositional Logic

Intro to Logic and Proofs

Proof strategies, or, a manual of logical style

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

First order Logic ( Predicate Logic) and Methods of Proof

Proving Things. Why prove things? Proof by Substitution, within Logic. Rules of Inference: applying Logic. Using Assumptions.

Logic and Proofs. (A brief summary)

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

3 The language of proof

Advanced Topics in LP and FP

Math 3336: Discrete Mathematics Practice Problems for Exam I

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

Section 3.1: Direct Proof and Counterexample 1

Section 1.1 Propositions

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.

Compound Propositions

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

Deductive Systems. Lecture - 3

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

The Logic of Compound Statements cont.

Math 10850, fall 2017, University of Notre Dame

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

STUDY PROBLEMS FOR EXAM I CMSC 203 DISCRETE STRUCTURES. n (n +1)(2n +1), 6. j 2 = 1(1+1)(2 1+1) 6. k (k +1)(2k +1) 6

Topic 1: Propositional logic

Language of Propositional Logic

CPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

PROPOSITIONAL CALCULUS

Logic. Propositional Logic: Syntax. Wffs

02 Propositional Logic

Proof Techniques (Review of Math 271)

Transcription:

CITS2211 Discrete Structures Proofs Unit coordinator: Rachel Cardell-Oliver August 13, 2017

Highlights 1 Arguments vs Proofs. 2 Proof strategies 3 Famous proofs

Reading Chapter 1: What is a proof? Mathematics for Computer Science by Lehman, Leighton and Meyer http://courses.csail.mit.edu/6.042/spring17/mcs.pdf

Why 1 Theoretical Computer Science based on Mathematics. 2 Most famous problem about proofs: P=NP? 3 Automatic proofs = AI? https://www.umsu.de/logik/trees/ 4 Critical Thinking.

Notes and examples selected by Profs Reynolds and Cardell-Oliver from Introductory Logic and Sets for Computer Scientists, N. Nissanke, Addison Wesley

Proofs in logic and maths A proof is a really good argument that something is true. In this unit we will see two different main sorts of proofs. In today s lecture we will see (formal) proofs by logical deduction. Then we will see rigorous (but informal) mathematical proofs. There are similarities and differences.

Direct Proof by Logical Deduction Definition: An axiom is a proposition that is simply accepted as true. Definition: A proof is a sequence of logical deductions from axioms and previously-proved statements that concludes with the proposition in question. Definition: Logical deductions or inference rules are used to prove new propositions using previously proved ones.

Inference Rules Inference rules are sometimes written using this notation: P, P Q Q When the statements above the line, called the antecedents, are proved, then we can consider the statement below the line, called the conclusion or consequent, to also be proved. Definition: The turnstile symbol,, means infer that. We write p, p q q instead of the fraction notation above.

Soundness and Completeness A key requirement of an inference rule is that it must be sound: any assignment of truth values that makes all the antecedents true must also make the consequent true. Definition: Soundness: Any statement you get by following the rules is true. Definition: Completeness: Any statement that is true, you can get by following the rules.

Arguments in Propositional Logic Definition: An argument is a collection of propositions, one of which, referred to as the conclusion is justified by the others, referred to as the premises. Definition: A valid argument is a set of propositions, the last of which follows from or is implied by the rest. Definition: All other arguments are invalid

Arguments in Propositional Logic Example: 1 If the patient has a pulse then the patient s heart is pumping. 2 The patient has a pulse. 3 Therefore, the patient s heart is pumping. The conclusion (3) is true whenever the premises are true. The argument is therefore valid.

Arguments in Propositional Logic Example: 1 If I win the lottery then I am lucky. 2 I do not win the lottery. 3 Therefore, I am unlucky. This argument is invalid. Can you see why?

Arguments in Propositional Logic Example: 1 If I win the lottery then I am lucky. 2 I do not win the lottery. 3 Therefore, I am unlucky. This argument is invalid. Can you see why? Because the conclusion (3) does not follow whenever the premises (1,2) are true. Suppose W is false and L is true. Then W L is true and W is true. So both premises are true. But the conclusion, L, is false. It is possible that I am lucky, but I did not win the lottery.

Inference Rules Definition: An inference rule is a primitive valid argument form. Each inference rule enables the elimination or introduction of a logical connective.

Some example rules Modus ponens {p q, p} q Modus tollens {p q, q} p Double negation p p Contradiction p, p q Conjunction introduction {p, q} (p q) Conjunction elimination (p q) p, (p q) q Disjunction introduction p (p q), q (p q) Disjunction elimination {p q, p r, q r} r Biconditional introduction {p q, q p} (p q) Biconditional elimination (p q) (p q), (p q) (q p)

Proof Example Example: From the premise (p q) r, derive p r 1 (p q) r premise 2 r (p q) from 1, commutativity 3 (r p) (r q) from 2, distributivity 4 (r p) from 3, conjunction elimination 5 p r from 4, commutativity 6 p r from 5, double negation 7 p r from 6, implication law QED

Proof Example Example: From the premises H C, (L Y ) and Y C, derive H L. Fill in the missing propositions and justifications from the following proof. 1. H C premise 2. (L Y ) premise 3. 4. C Y 3, contrapositive 5. L Y 6. 5, commutativity 7. Y L 6, implication law 8. 1,4, transitivity of implication 9. H L QED.

the complete proof 1. H C premise 2. (L Y ) premise 3. Y C premise 4. C Y 3, contrapositive 5. L Y 2, De Morgan 6. Y L 5, commutativity 7. Y L 6, implication law 8. H Y 1,4, transitivity of implication 9. H L 8,7, transitivity of implication QED.

Proofs with Predicates - elim and intro laws RTP x.(p(x) Q(x)) y.(q(y) R(y)) x.p(x) x.r(x) goal is to derive x.r(x) from the premises. 1. x.(p(x) Q(x)) premise 2. y.(q(y) R(y)) premise 3. x.p(x) premise 4. P(a) Q(a) 1, exist elimination 5. Q(a) R(a) 2, forall elimination 6. P(a) 3, forall elimination 7. Q(a) 6,4 modus ponens 8. R(a) 5,7, modus ponens 9. x.r(x) 8, exist introduction QED

Proof Templates In principle, a proof can be any sequence of logical deductions from axioms and previously proved statements that concludes with the proposition in question. Fortunately, many proofs follow one of a handful of standard templates such as proof by contradiction, proof by cases, reductio ad absurdum and proving the contrapositive. We will meet some of these when we study mathematical proofs. Note on abbreviations used above: write RTP at the beginning of proofs for required to prove and QED at the end for quod erat demonstrandum meaning which was to be demonstrated, or end of proof.

Proofs A proof is a logical argument that demonstrates the truth of some proposition. Ultimately, mathematics rests on a set of axioms, which are very simple propositions that are simply accepted as being true. Then a proof is a sequence of logical deductions using agreed-upon inference rules that leads from the axioms to the proposition in question. In practice, a proof will lead from previously-proved statements to the new proposition.

Axioms The axioms that are most broadly used (ZFC) are very low-level statements that encapsulate what we would normally consider to be obvious statements about sets. For example, what does say? x y [ z(z x z y) x = y]

Axioms The axioms that are most broadly used (ZFC) are very low-level statements that encapsulate what we would normally consider to be obvious statements about sets. For example, what does say? x y [ z(z x z y) x = y] It simply says that two sets x and y are equal if they have the same elements!

Inference Rules Inference rules are sometimes written using this notation: P, P Q Q When the statements above the line, called the antecedents, are proved, then we can consider the statement below the line, called the conclusion or consequent, to also be proved. Recall this inference rule is called modus ponens.

Modus tollens Another frequently used inference rule is modus tollens P Q, Q P For example, if P is It has rained recently and Q is The ground is wet, then if you observe that the ground is dry, then you can conclude that it has not rained recently.

Logical fallacies An incorrect rule of inference is P Q, P Q This is often called modus morons for obvious reasons. It has not rained recently and therefore the ground is not wet.

Logical Proof Hilbert asked whether it was possible to devise a (finite) set of axioms and inference rules such that Everything that can be formally logically proved is a true statement (Soundness) Every true statement (in number theory) can be formally logically proved from the axioms (Completeness) In essence, he wondered whether mathematics could be completely automated as a complicated string manipulation exercise. Gödel proved that any logical system that is complicated enough to formalise addition and multiplication cannot be proved to be consistent within the system itself. Or to put it another way, no such system can prove its own consistency.

Real world proofs Despite Gödel s result, the quest for formal proofs is not entirely dead Mathematicians and computer scientists are building systems such as HOL (hol-theorem-prover.org) and Coq (coq.inria.fr) to automate and validate proofs of important results. Computer scientists are working on systems to automatically reason about and prove program correctness. However proofs are still mostly expressed at a higher level with larger steps between each assertion.

The following sections describe some different proof strategies

Proving implications Many assertions are of the form P Q, though usually stated If P, then Q. For example, consider these simple statements If n is even, then n 2 is even If r is irrational, then r 1/5 is irrational

Direct Proof To prove that P Q, you should Start the proof with Assume P holds, Make logical deductions for a few steps, End the proof with and hence Q follows

Proof: If n is even, then n 2 is even. We use the definition of the word even: an integer multiple of 2, and then the proof proceeds: Let n be an even integer (Assumption)

Proof: If n is even, then n 2 is even. We use the definition of the word even: an integer multiple of 2, and then the proof proceeds: Let n be an even integer Then n = 2k for some integer k (Assumption) (Defn. of even)

Proof: If n is even, then n 2 is even. We use the definition of the word even: an integer multiple of 2, and then the proof proceeds: Let n be an even integer Then n = 2k for some integer k Then n 2 = 4k 2 (Assumption) (Defn. of even)

Proof: If n is even, then n 2 is even. We use the definition of the word even: an integer multiple of 2, and then the proof proceeds: Let n be an even integer Then n = 2k for some integer k Then n 2 = 4k 2 Then n 2 = 2(2k 2 ) (Assumption) (Defn. of even)

Proof: If n is even, then n 2 is even. We use the definition of the word even: an integer multiple of 2, and then the proof proceeds: Let n be an even integer Then n = 2k for some integer k Then n 2 = 4k 2 Then n 2 = 2(2k 2 ) Then n 2 = 2k where k = 2k 2 is an integer (Assumption) (Defn. of even) (Arithmetic - twice)

Proof: If n is even, then n 2 is even. We use the definition of the word even: an integer multiple of 2, and then the proof proceeds: Let n be an even integer Then n = 2k for some integer k Then n 2 = 4k 2 Then n 2 = 2(2k 2 ) Then n 2 = 2k where k = 2k 2 is an integer Therefore n 2 is even (Assumption) (Defn. of even) (Arithmetic - twice) (Defn. of even)

Contrapositive: If r is irrational, then r 1/5 is irrational To prove the second statement, the direct proof technique doesn t work as well the reason is that the statement Let r be irrational is really a negative statement. However, recall from propositional logic that the contrapositive of P Q, that is, the statement is logically equivalent to P Q. Q P

Working the contrapositive So the contrapositive statement is If r 1/5 is rational, then r is rational. We use the definition of the word rational: a number of the form p/q where p and q are integers and q 0. The proof proceeds: Assume that r 1/5 is rational (Assumption)

Working the contrapositive So the contrapositive statement is If r 1/5 is rational, then r is rational. We use the definition of the word rational: a number of the form p/q where p and q are integers and q 0. The proof proceeds: Assume that r 1/5 is rational Then r 1/5 = p/q for integers p, q 0 (Assumption) (Defn. of rational)

Working the contrapositive So the contrapositive statement is If r 1/5 is rational, then r is rational. We use the definition of the word rational: a number of the form p/q where p and q are integers and q 0. The proof proceeds: Assume that r 1/5 is rational Then r 1/5 = p/q for integers p, q 0 Then r = p 5 /q 5 (Assumption) (Defn. of rational)

Working the contrapositive So the contrapositive statement is If r 1/5 is rational, then r is rational. We use the definition of the word rational: a number of the form p/q where p and q are integers and q 0. The proof proceeds: Assume that r 1/5 is rational (Assumption) Then r 1/5 = p/q for integers p, q 0 (Defn. of rational) Then r = p 5 /q 5 Then r = p /q where p = p 5, q = q 5 0 are integers (Arithm.)

Working the contrapositive So the contrapositive statement is If r 1/5 is rational, then r is rational. We use the definition of the word rational: a number of the form p/q where p and q are integers and q 0. The proof proceeds: Assume that r 1/5 is rational (Assumption) Then r 1/5 = p/q for integers p, q 0 (Defn. of rational) Then r = p 5 /q 5 Then r = p /q where p = p 5, q = q 5 0 are integers (Arithm.) Therefore r is rational (Defn. of rational)

If and only if Mathematicians are particularly fond of if-and-only-if statements An integer is even if and only if its square is even. A matrix is invertible if and only if its determinant is non-zero. It is common to use the abbreviation iff instead of if and only if. However P if and only if Q just means that both the implications P Q, Q P hold, and so you can simply provide proofs for each separately.

If and only if Lemma. An integer is even if and only if its square is even. Proof. ( ) The forward implication is n even implies that n 2 is even, and was proved earlier. ( ) The reverse implication is n 2 even implies that n is even, but for this we choose to prove the contrapositive, namely that n odd implies that n 2 is odd. Let n be an odd integer (Assumption)

If and only if Lemma. An integer is even if and only if its square is even. Proof. ( ) The forward implication is n even implies that n 2 is even, and was proved earlier. ( ) The reverse implication is n 2 even implies that n is even, but for this we choose to prove the contrapositive, namely that n odd implies that n 2 is odd. Let n be an odd integer Then n = 2k + 1 for some integer k (Assumption) (Defn. of odd)

If and only if Lemma. An integer is even if and only if its square is even. Proof. ( ) The forward implication is n even implies that n 2 is even, and was proved earlier. ( ) The reverse implication is n 2 even implies that n is even, but for this we choose to prove the contrapositive, namely that n odd implies that n 2 is odd. Let n be an odd integer Then n = 2k + 1 for some integer k Then n 2 = 4k 2 + 4k + 1 (Assumption) (Defn. of odd)

If and only if Lemma. An integer is even if and only if its square is even. Proof. ( ) The forward implication is n even implies that n 2 is even, and was proved earlier. ( ) The reverse implication is n 2 even implies that n is even, but for this we choose to prove the contrapositive, namely that n odd implies that n 2 is odd. Let n be an odd integer Then n = 2k + 1 for some integer k Then n 2 = 4k 2 + 4k + 1 Then n 2 = 2(2k 2 + 2k) + 1 (Assumption) (Defn. of odd)

If and only if Lemma. An integer is even if and only if its square is even. Proof. ( ) The forward implication is n even implies that n 2 is even, and was proved earlier. ( ) The reverse implication is n 2 even implies that n is even, but for this we choose to prove the contrapositive, namely that n odd implies that n 2 is odd. Let n be an odd integer Then n = 2k + 1 for some integer k Then n 2 = 4k 2 + 4k + 1 Then n 2 = 2(2k 2 + 2k) + 1 Then n 2 = 2k + 1 where k = 2k 2 + 2k is an integer (Assumption) (Defn. of odd)

If and only if Lemma. An integer is even if and only if its square is even. Proof. ( ) The forward implication is n even implies that n 2 is even, and was proved earlier. ( ) The reverse implication is n 2 even implies that n is even, but for this we choose to prove the contrapositive, namely that n odd implies that n 2 is odd. Let n be an odd integer Then n = 2k + 1 for some integer k Then n 2 = 4k 2 + 4k + 1 Then n 2 = 2(2k 2 + 2k) + 1 Then n 2 = 2k + 1 where k = 2k 2 + 2k is an integer Therefore n 2 is odd (Assumption) (Defn. of odd) (Defn. of odd)

Proof by cases A common technique in proving is to divide the proof into separate cases and resolve each case separately. Theorem If the 15 edges of the graph shown below are coloured red or blue then there will either be a red triangle or a blue triangle.

Proof Consider an arbitrary vertex, and call it v. Now look at the five edges leading from v and notice that by the Pigeonhole Principle, either Case 1: At least three of the edges are red, or Case 2: At least three of the edges are blue. Now consider each case separately.

Case 1 Consider any three vertices at the other end of red edges from v, and consider the three edges joining them. v Then either : Case 1.1 One of these three edges is red, in which case it forms a red triangle using v, or Case 1.2 All of these three edges are blue, in which case they form a blue triangle.

Case 2 Consider any three vertices at the other end of blue edges from v, and consider the three edges joining them. v Then either : Case 2.1 One of these three edges is blue, in which case it forms a blue triangle using v, or Case 2.2 All of these three edges are red, in which case they form a red triangle.

Proof by Contradiction This is a type of indirect proof where you show that a proposition is true by demonstrating that its negation leads to something known to be false. Prove P by first assuming P and then deriving false. Prove P Q by first assuming P Q and then deriving false. For example, to prove proposition P you start by saying Write Assume, for a contradiction, that P holds Deduce something known to be false (which will take several steps) Conclude with This is a contradiction, and so P is false and P is true.

The most famous example Let P be the statement 2 is irrational and see how we can prove this by contradiction.

The most famous example Let P be the statement 2 is irrational and see how we can prove this by contradiction. Proof Assume, for a contradiction, that 2 is rational (Pf. by contradiction)

The most famous example Let P be the statement 2 is irrational and see how we can prove this by contradiction. Proof Assume, for a contradiction, that 2 is rational (Pf. by contradiction) Express 2 = p/q in lowest terms (Defn. of rational)

The most famous example Let P be the statement 2 is irrational and see how we can prove this by contradiction. Proof Assume, for a contradiction, that 2 is rational (Pf. by contradiction) Express 2 = p/q in lowest terms (Defn. of rational) Then p and q have no common factors (Defn of lowest terms)

The most famous example Let P be the statement 2 is irrational and see how we can prove this by contradiction. Proof Assume, for a contradiction, that 2 is rational (Pf. by contradiction) Express 2 = p/q in lowest terms (Defn. of rational) Then p and q have no common factors (Defn of lowest terms) Then p 2 /q 2 = 2

The most famous example Let P be the statement 2 is irrational and see how we can prove this by contradiction. Proof Assume, for a contradiction, that 2 is rational (Pf. by contradiction) Express 2 = p/q in lowest terms (Defn. of rational) Then p and q have no common factors (Defn of lowest terms) Then p 2 /q 2 = 2 Then p 2 = 2q 2

The most famous example Let P be the statement 2 is irrational and see how we can prove this by contradiction. Proof Assume, for a contradiction, that 2 is rational (Pf. by contradiction) Express 2 = p/q in lowest terms (Defn. of rational) Then p and q have no common factors (Defn of lowest terms) Then p 2 /q 2 = 2 Then p 2 = 2q 2 Then p is even (Earlier proof)

The most famous example Let P be the statement 2 is irrational and see how we can prove this by contradiction. Proof Assume, for a contradiction, that 2 is rational (Pf. by contradiction) Express 2 = p/q in lowest terms (Defn. of rational) Then p and q have no common factors (Defn of lowest terms) Then p 2 /q 2 = 2 Then p 2 = 2q 2 Then p is even (Earlier proof) Then p 2 is a multiple of 4

The most famous example Let P be the statement 2 is irrational and see how we can prove this by contradiction. Proof Assume, for a contradiction, that 2 is rational (Pf. by contradiction) Express 2 = p/q in lowest terms (Defn. of rational) Then p and q have no common factors (Defn of lowest terms) Then p 2 /q 2 = 2 Then p 2 = 2q 2 Then p is even (Earlier proof) Then p 2 is a multiple of 4 Then q 2 is even, so q is even (Earlier proof)

The most famous example Let P be the statement 2 is irrational and see how we can prove this by contradiction. Proof Assume, for a contradiction, that 2 is rational (Pf. by contradiction) Express 2 = p/q in lowest terms (Defn. of rational) Then p and q have no common factors (Defn of lowest terms) Then p 2 /q 2 = 2 Then p 2 = 2q 2 Then p is even (Earlier proof) Then p 2 is a multiple of 4 Then q 2 is even, so q is even (Earlier proof) Then p and q do have a common factor

The most famous example Let P be the statement 2 is irrational and see how we can prove this by contradiction. Proof Assume, for a contradiction, that 2 is rational (Pf. by contradiction) Express 2 = p/q in lowest terms (Defn. of rational) Then p and q have no common factors (Defn of lowest terms) Then p 2 /q 2 = 2 Then p 2 = 2q 2 Then p is even (Earlier proof) Then p 2 is a multiple of 4 Then q 2 is even, so q is even (Earlier proof) Then p and q do have a common factor This is a contradiction, and so P is false and P is true

Another famous example Let P be the statement There are infinitely many prime numbers and see how we can prove this by contradiction. Proof Assume, for a contradiction, that P holds (Pf. by contradiction)

Another famous example Let P be the statement There are infinitely many prime numbers and see how we can prove this by contradiction. Proof Assume, for a contradiction, that P holds (Pf. by contradiction) Then there are finitely many, say k, primes (Meaning of finite)

Another famous example Let P be the statement There are infinitely many prime numbers and see how we can prove this by contradiction. Proof Assume, for a contradiction, that P holds (Pf. by contradiction) Then there are finitely many, say k, primes (Meaning of finite) Let L = {p 1, p 2,..., p k } contain all primes (Using assumption)

Another famous example Let P be the statement There are infinitely many prime numbers and see how we can prove this by contradiction. Proof Assume, for a contradiction, that P holds (Pf. by contradiction) Then there are finitely many, say k, primes (Meaning of finite) Let L = {p 1, p 2,..., p k } contain all primes (Using assumption) Set n = p 1 p 2... p k + 1 (Using assumption)

Another famous example Let P be the statement There are infinitely many prime numbers and see how we can prove this by contradiction. Proof Assume, for a contradiction, that P holds (Pf. by contradiction) Then there are finitely many, say k, primes (Meaning of finite) Let L = {p 1, p 2,..., p k } contain all primes (Using assumption) Set n = p 1 p 2... p k + 1 (Using assumption) Then n = p 1 K 1 + 1, so p 1 does not divide n

Another famous example Let P be the statement There are infinitely many prime numbers and see how we can prove this by contradiction. Proof Assume, for a contradiction, that P holds (Pf. by contradiction) Then there are finitely many, say k, primes (Meaning of finite) Let L = {p 1, p 2,..., p k } contain all primes (Using assumption) Set n = p 1 p 2... p k + 1 (Using assumption) Then n = p 1 K 1 + 1, so p 1 does not divide n Then n = p 2 K 2 + 1, so p 2 does not divide n

Another famous example Let P be the statement There are infinitely many prime numbers and see how we can prove this by contradiction. Proof Assume, for a contradiction, that P holds (Pf. by contradiction) Then there are finitely many, say k, primes (Meaning of finite) Let L = {p 1, p 2,..., p k } contain all primes (Using assumption) Set n = p 1 p 2... p k + 1 (Using assumption) Then n = p 1 K 1 + 1, so p 1 does not divide n Then n = p 2 K 2 + 1, so p 2 does not divide n None of the primes in L divide n (Simple generalisation)

Another famous example Let P be the statement There are infinitely many prime numbers and see how we can prove this by contradiction. Proof Assume, for a contradiction, that P holds (Pf. by contradiction) Then there are finitely many, say k, primes (Meaning of finite) Let L = {p 1, p 2,..., p k } contain all primes (Using assumption) Set n = p 1 p 2... p k + 1 (Using assumption) Then n = p 1 K 1 + 1, so p 1 does not divide n Then n = p 2 K 2 + 1, so p 2 does not divide n None of the primes in L divide n (Simple generalisation) Therefore n has a prime factor not in L (Property of integers)

Another famous example Let P be the statement There are infinitely many prime numbers and see how we can prove this by contradiction. Proof Assume, for a contradiction, that P holds (Pf. by contradiction) Then there are finitely many, say k, primes (Meaning of finite) Let L = {p 1, p 2,..., p k } contain all primes (Using assumption) Set n = p 1 p 2... p k + 1 (Using assumption) Then n = p 1 K 1 + 1, so p 1 does not divide n Then n = p 2 K 2 + 1, so p 2 does not divide n None of the primes in L divide n (Simple generalisation) Therefore n has a prime factor not in L (Property of integers) This is a contradiction, so P is false and P is true

Strategies Choosing what proof strategy to use is not always obvious. Try writing down what you do know: assumptions and relevant properties. Then consider which proof strategies could be used.

Advice Advice from the text Mathematics for Computer Science by Lehman, Leighton and Meyer. 1 State your game plan 2 Keep a linear flow 3 A proof is an essay, not a calculation 4 Avoid excessive symbolism 5 Revise and simplify 6 Introduce notation thoughtfully 7 Structure long proofs 8 Be wary of the obvious 9 Finish

Exercise If a, b are irrational numbers, then is it ever possible for a b to be rational? Surprisingly, the answer is YES! Try to prove the statement There exist irrational numbers a and b such that a b is rational. Hint: consider c = d = 2 and start a proof-by-cases based on whether c d is rational or not.