Copyright © 2007-2014 Curt Hill Proofs An Introduction.

Slides:



Advertisements
Similar presentations
Lecture 3 – February 17, 2003.
Advertisements

With examples from Number Theory
Discrete Math Methods of proof 1.
Introduction to Proofs
Lecture 19. Reduction: More Undecidable problems
1 In this lecture  Number Theory ● Rational numbers ● Divisibility  Proofs ● Direct proofs (cont.) ● Common mistakes in proofs ● Disproof by counterexample.
Copyright © Cengage Learning. All rights reserved.
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Induction and recursion
More Number Theory Proofs Rosen 1.5, 3.1. Prove or Disprove If m and n are even integers, then mn is divisible by 4. The sum of two odd integers is odd.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
CSE115/ENGR160 Discrete Mathematics 02/07/12
CSE115/ENGR160 Discrete Mathematics 01/31/12 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 02/01/11
So far we have learned about:
Copyright © Zeph Grunschlag,
1 Indirect Argument: Contradiction and Contraposition.
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
TR1413: Discrete Mathematics For Computer Science Lecture 1: Mathematical System.
Fall 2002CMSC Discrete Structures1 Let’s proceed to… Mathematical Reasoning.
ELEMENTARY NUMBER THEORY AND METHODS OF PROOF
C OURSE : D ISCRETE STRUCTURE CODE : ICS 252 Lecturer: Shamiel Hashim 1 lecturer:Shamiel Hashim second semester Prepared by: amani Omer.
Methods of Proof & Proof Strategies
Copyright © Curt Hill Rules of Inference What is a valid argument?
Introduction to Proofs
Mathematics Review Exponents Logarithms Series Modular arithmetic Proofs.
MATH 224 – Discrete Mathematics
1 Methods of Proof CS/APMA 202 Epp, chapter 3 Aaron Bloomfield.
Proofs 1/25/12.
Copyright © Cengage Learning. All rights reserved. CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF ELEMENTARY NUMBER THEORY AND METHODS OF PROOF.
Review I Rosen , 3.1 Know your definitions!
CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
Section 3.1: Proof Strategy Now that we have a fair amount of experience with proofs, we will start to prove more difficult theorems. Our experience so.
1 Section 1.1 A Proof Primer A proof is a demonstration that some statement is true. We normally demonstrate proofs by writing English sentences mixed.
10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Methods of Proof Lecture 3: Sep 9. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical.
Discrete Structures (DS)
Chap 3 –A theorem is a statement that can be shown to be true –A proof is a sequence of statements to show that a theorem is true –Axioms: statements which.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 3 The Foundations: Logic and Proof,
Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases.
Propositional Equivalence A needed step towards proofs Copyright © 2014 Curt Hill.
Method of proofs.  Consider the statements: “Humans have two eyes”  It implies the “universal quantification”  If a is a Human then a has two eyes.
Predicate Logic One step stronger than propositional logic Copyright © Curt Hill.
CSci 2011 Discrete Mathematics Lecture 4 CSci 2011.
CS104:Discrete Structures Chapter 2: Proof Techniques.
1 CMSC 250 Chapter 3, Number Theory. 2 CMSC 250 Introductory number theory l A good proof should have: –a statement of what is to be proven –"Proof:"
Week 4 - Wednesday.  What did we talk about last time?  Divisibility  Proof by cases.
Chapter 5. Section 5.1 Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If we can reach.
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
5-5 Indirect Proof. Indirect Reasoning: all possibilities are considered and then all but one are proved false. The remaining possibility must be true.
1 Introduction to Abstract Mathematics Proof Methods , , ~, ,  Instructor: Hayk Melikya Purpose of Section:Most theorems in mathematics.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Chapter 1 Logic and proofs
Proof And Strategies Chapter 2. Lecturer: Amani Mahajoub Omer Department of Computer Science and Software Engineering Discrete Structures Definition Discrete.
Proof Techniques CS160/CS122 Rosen: 1.5, 1.6, 1.7.
Lecture 2: Proofs and Recursion. Lecture 2-1: Proof Techniques Proof methods : –Inductive reasoning Lecture 2-2 –Deductive reasoning Using counterexample.
Chapter 1 Logic and Proof.
Indirect Argument: Contradiction and Contraposition
CSE15 Discrete Mathematics 02/01/17
Chapter 3 The Real Numbers.
Module #10: Proof Strategies
Mathematical Reasoning
Elementary Number Theory & Proofs
Module #10: Proof Strategies
Foundations of Discrete Mathematics
Copyright © Cengage Learning. All rights reserved.
Mathematical Reasoning
Introduction to Proofs
Presentation transcript:

Copyright © Curt Hill Proofs An Introduction

What is a Proof? A valid argument Shows the correctness of a statement Uses axioms, theorems and any hypotheses of the problem May be informal or formal Informal uses some shortcuts –Multiple transformations per step Formal tend to be publication quality –Long and difficult Copyright © Curt Hill

Terminology Axioms –An unproven or unprovable given statement –These are self obvious or definitional Theorems –Statements of importance that have been proven Lemmas –Theorem of lesser importance –Often only used in the course of a proof Corollary –Theorem easy to prove from this one Conjectures or Suppositions –Statements we wish to prove –Today’s conjectures proven are tomorrow’s theorems

Types of Proofs Two basic forms, direct and indirect Direct –Start with hypotheses and argue towards the result Indirect –Any other direction –Two examples are proof by contraposition and proof by contradiction Copyright © Curt Hill

What constitutes a proof? The usual proof is a series of steps Each step consists of three pieces: –An original statement –A transformed statement –The justification of the transformation The transformed statement is the original for the next step The justification must cite axioms or theorems The first two may be on one line or two

Copyright © Curt Hill Proofs of Equivalence Conjectures are very often stated in terms of one thing equivalent to another In this case we can argue from one side to the other in either direction –Usually easier to go from more complicated to simpler –It reduces the combinatorics We may also consider the entire expression as the supposition –Then show that it is a tautology by reducing it to another tautology, that is an axiom or theorem

Implication Proofs Here the conjecture is an implication –Most common in Rosen We usually assert the antecedent Then use a series of steps to prove the consequent What happens if the antecedent is false? Copyright © Curt Hill

Direct Example Prove that the sum of two odd integers is even We will need the definition of odd and even: –An integer n is even if there exists an integer k such that 2k = n –An integer n is odd if there exists an integer k such that 2k + 1 = n –Odd and even are opposites Assume that the propositions E(n) is true if n is even and O(n) is true if n is odd Copyright © Curt Hill

Example Continues The statement of the conjecture is: –(O(n)  O(m))  E(n+m) More formally: –  n,m (n  I  m  I  O(n)  O(m))  E(n+m) Copyright © Curt Hill

Sum of odds is even Let n be 2i+1 and m be 2j+1 –The definition of odd Let p = n+m p = 2i+1 + 2j+1 p= 2i+2j –Algebraic commutativity p=2(i+j+1) –Algebraic distributivity p is even from definition of even Copyright © Curt Hill

Contrapositive Proofs Recall that if p  q then  q   p –This is the contrapositive A proof by contraposition uses this as the starting point Instead of starting with p  q, instead start with  q   p Sometimes this easier However, it is an indirect proof since we did not start with the hypothesis Copyright © Curt Hill

Commentary The distinction between direct and indirect gets a little fuzzy here Start with the hypothesis –That would be a direct proof As a first step apply the contrapositive Is it now direct or indirect? Lets do #17 or #18 on the board Copyright © Curt Hill

Positive and Negative Proofs usually assume the theorem is true and argue it from there Recall sum of odds is even theorem –  n,m (n  I  m  I  O(n)  O(m))  E(n+m) I could disprove this by showing only one pair of n and m that made the antecedent true and the consequent false Thus if I prove –  n,m (n  I  m  I  O(n)  O(m))  O(n+m) then I have disproved original

Proof by Contradiction Can also be quite effective but often easier State the theorem as false and show that there is a contradiction by reasoning to a known fallacy This fallacy is usually the opposite of a theorem or axiom This form is almost always backwards Copyright © Curt Hill

Halting Problem It is impossible to code a procedure that will input an arbitrary procedure and its input and determine if it halts Its output will be true if the program will halt with this data It will output false if the program has an infinite loop with this data This is a specific case of static analysis Copyright © Curt Hill

Proof 1 of 2 Suppose that a procedure exists that flawlessly solves the halting problem –Call this procedure Q(P,I) where P is the input procedure and I is the input We construct a procedure R as follows: –if(Q(R,R)) – while(true) – println(“oops”) –else println(“It will halt”); Copyright © Curt Hill

Proof 2 of 2 What is the result when R is fed into Q? If Q says R halts, then R infinitely loops If Q says R loops, then R halts Since Q cannot give the right answer for this example, there is a contradiction Thus no procedure that can solve the halting problem Copyright © Curt Hill

Proof Commentary This proof was done in 1936 by Alan Turing –The proof by contradiction is simple –What would a direct proof look like? What does this theorem not say? –It does not say that static analysis is completely impossible –It says that static analysis is impossible to complete Most compiler writers use this as an excuse to do little static analysis Copyright © Curt Hill

How many primes? Can we prove that there are an infinite number of primes? –Yes, by contradiction Assume that there are a finite number of primes Take these primes and multiply all of them together Add 1 The resulting number is not divisible by any of the primes –Thus there are an infinite number of primes Copyright © Curt Hill

Almost Finally The only thing easier to mess up than a program is a proof –The text lists several –You will likely find others This presentation is not the end all on proofs –Rather it is just the beginning –We enlarge our tool set in the next one Copyright © Curt Hill

Exercises 3, 9, 27, 39 Copyright © Curt Hill