CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2012 CSE 311 1.

Slides:



Advertisements
Similar presentations
Discrete Math Methods of proof 1.
Advertisements

Introduction to Proofs
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Discussion #131/18 Discussion #13 Induction (the process of deriving generalities from particulars) Mathematical Induction (deductive reasoning over the.
Logic and Proof. Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement.
CSE115/ENGR160 Discrete Mathematics 01/31/12 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 02/01/11
Logic: Connectives AND OR NOT P Q (P ^ Q) T F P Q (P v Q) T F P ~P T F
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic Autumn 2011 CSE 3111.
Copyright © Zeph Grunschlag,
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2.1 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
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.
Introduction to Proofs ch. 1.6, pg. 87,93 Muhammad Arief download dari
EE1J2 – Discrete Maths Lecture 5 Analysis of arguments (continued) More example proofs Formalisation of arguments in natural language Proof by contradiction.
Mathematical Induction Assume that we are given an infinite supply of stamps of two different denominations, 3 cents and and 5 cents. Prove using mathematical.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
Methods of Proof & Proof Strategies
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Introduction to Proofs
Reading and Writing Mathematical Proofs
Introduction to Proofs
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 03: PROOFS Section 1.5 Jarek Rossignac CS1050: Understanding.
MATH 224 – Discrete Mathematics
CSE 311: Foundations of Computing Fall 2013 Lecture 8: More Proofs.
Section 1.8. Section Summary Proof by Cases Existence Proofs Constructive Nonconstructive Disproof by Counterexample Nonexistence Proofs Uniqueness Proofs.
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.
Proofs1 Elementary Discrete Mathematics Jim Skon.
CSE 311 Foundations of Computing I Lecture 8 Proofs and Set Theory Spring
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
1 Math/CSE 1019C: Discrete Mathematics for Computer Science Fall 2011 Suprakash Datta Office: CSEB 3043 Phone: ext
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.
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
Induction Proof. Well-ordering A set S is well ordered if every subset has a least element. [0, 1] is not well ordered since (0,1] has no least element.
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.
CSE 311 Foundations of Computing I Lecture 7 Logical Inference Autumn 2012 CSE
Section 3.3: Mathematical Induction Mathematical induction is a proof technique that can be used to prove theorems of the form:  n  Z +,P(n) We have.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 3 The Foundations: Logic and Proof,
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
Chapter 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
CSci 2011 Discrete Mathematics Lecture 4 CSci 2011.
CS104:Discrete Structures Chapter 2: Proof Techniques.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
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.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2011 CSE 3111.
Methods of Proof Lecture 4: Sep 20 (chapter 3 of the book, except 3.5 and 3.8)
Section 1.7. Section Summary Mathematical Proofs Forms of Theorems Direct Proofs Indirect Proofs Proof of the Contrapositive Proof by Contradiction.
Foundations of Computing I CSE 311 Fall Announcements Homework #2 due today – Solutions available (paper format) in front – HW #3 will be posted.
Proof Techniques CS160/CS122 Rosen: 1.5, 1.6, 1.7.
Hubert Chan (Chapters 1.6, 1.7, 4.1)
The Foundations: Logic and Proofs
CSE15 Discrete Mathematics 02/01/17
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
Predicate Calculus Validity
Chapter 1: The Foundations: Logic and Proofs
CSE 311: Foundations of Computing
Methods of Proof A mathematical theorem is usually of the form pq
Hubert Chan (Chapters 1.6, 1.7, 4.1)
The Foundations: Logic and Proofs
CSE 311 Foundations of Computing I
CSE 311: Foundations of Computing
CSE 311: Foundations of Computing
CS 220: Discrete Structures and their Applications
Section 2.1 Proof Techniques Introduce proof techniques:   o        Exhaustive Proof: to prove all possible cases, Only if it is about a.
Negations of quantifiers
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Presentation transcript:

CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2012 CSE 311 1

Announcements Reading assignments – Logical Inference 1.6, th Edition 1.5, th Edition 1.5, th Edition Homework – HW 1 returned – Turn in HW2 Now! – HW3 available Autumn 2012CSE 311 2

Highlights from last lecture Autumn 2012CSE 311 3

Proofs Start with hypotheses and facts Use rules of inference to extend set of facts Result is proved when it is included in the set Autumn 2012CSE 3114 Fact 1 Fact 2 Hypothesis 3 Hypothesis 2 Hypothesis 1 Statement Result

An inference rule: Modus Ponens If p and p  q are both true then q must be true Write this rule as Given: – If it is Wednesday then you have 311 homework due today. – It is Wednesday. Therefore, by Modus Ponens: – You have 311 homework due today. Autumn 2012CSE p, p  q ∴ q

Proofs Show that r follows from p, p  q, and q  r 1. p Given 2.p  q Given 3.q  r Given 4.q Modus Ponens from 1 and 2 5.r Modus Ponens from 3 and 4 Autumn 2012CSE 311 6

Inference Rules Each inference rule is written as which means that if both A and B are true then you can infer C and you can infer D. – For rule to be correct (A  B)  C and (A  B)  D must be a tautologies Sometimes rules don’t need anything to start with. These rules are called axioms: – e.g. Excluded Middle Axiom Autumn 2012CSE A, B ∴ C,D ∴ p  p

Simple Propositional Inference Rules Excluded middle plus two inference rules per binary connective, one to eliminate it and one to introduce it Autumn 2012CSE p  q ∴ p, q p, q ∴ p  q p ∴ p  q p  q,  p ∴ q p, p  q ∴ q p  q ∴ p  q ∴ p  p Direct Proof Rule Not like other rules! See next slide…

Direct Proof of an Implication p  q denotes a proof of q given p as an assumption. Don’t confuse with p  q. The direct proof rule – if you have such a proof then you can conclude that p  q is true E.g. Let’s prove p  (p  q) 1. p Assumption 2. p  q Intro for  from 1 3. p  (p  q) Direct proof rule Autumn 2012CSE Proof subroutine for p  (p  q)

Example Prove ((p  q)  (q  r))  (p  r) Autumn 2012CSE

Proofs can use Equivalences too Show that  p follows from p  q and  q 1. p  q Given 2.  q Given 3.  q   p Contrapositive of 1 (Equivalence!) 4.  p Modus Ponens from 2 and 3 Autumn 2012CSE

Inference Rules for Quantifiers Autumn 2012CSE P(c) for some c ∴  x P(x)  x P(x) ∴ P(a) for any a “Let a be anything * ”...P(a) ∴  x P(x)  x P(x) ∴ P(c) for some special c * in the domain of P

Proofs using Quantifiers “There exists an even prime number” Autumn 2012CSE Prime(x): x is an integer > 1 and x is not a multiple of any integer strictly between 1 and x

Even and Odd Prove: “The square of every even number is even” Formal proof of:  x (Even(x)  Even(x 2 )) Autumn 2012CSE Even(x)   y (x=2y) Odd(x)   y (x=2y+1) Domain: Integers

Even and Odd Prove: “The square of every odd number is odd” English proof of:  x (Odd(x)  Odd(x 2 )) Let x be an odd number. Then x=2k+1 for some integer k (depending on x) Therefore x 2 =(2k+1) 2 = 4k 2 +4k+1=2(2k 2 +2k)+1. Since 2k 2 +2k is an integer, x 2 is odd. Autumn 2012CSE Even(x)   y (x=2y) Odd(x)   y (x=2y+1) Domain: Integers

“Proof by Contradiction”: One way to prove  p If we assume p and derive False (a contradiction) then we have proved  p. 1. p Assumption F 4. p  F Direct Proof rule 5.  p  F Equivalence from 4 6.  p Equivalence from 5 Autumn 2012CSE

Even and Odd Prove: “No number is both even and odd” English proof:   x (Even(x)  Odd(x))  x  (Even(x)  Odd(x)) Let x be any integer and suppose that it is both even and odd. Then x=2k for some integer k and x=2n+1 for some integer n. Therefore 2k=2n+1 and hence k=n+½. But two integers cannot differ by ½ so this is a contradiction. Autumn 2012CSE Even(x)   y (x=2y) Odd(x)   y (x=2y+1) Domain: Integers

Rational Numbers A real number x is rational iff there exist integers p and q with q  0 such that x=p/q. Prove: – If x and y are rational then xy is rational Autumn 2012CSE Rational(x)   p  q ((x=p/q)  Integer(p)  Integer(q)  q  0)  x  y ((Rational(x)  Rational(y))  Rational(xy)) Domain: Real numbers

Rational Numbers A real number x is rational iff there exist integers p and q with q  0 such that x=p/q. Prove: – If x and y are rational then xy is rational – If x and y are rational then x+y is rational Autumn 2012CSE Rational(x)   p  q ((x=p/q)  Integer(p)  Integer(q)  q  0)

Rational Numbers A real number x is rational iff there exist integers p and q with q  0 such that x=p/q. Prove: – If x and y are rational then xy is rational – If x and y are rational then x+y is rational – If x and y are rational then x/y is rational Autumn 2012CSE Rational(x)   p  q ((x=p/q)  Integer(p)  Integer(q)  q  0)

Counterexamples To disprove  x P(x) find a counterexample – some c such that  P(c) – works because this implies  x  P(x) which is equivalent to  x P(x) Autumn 2012CSE

Proofs Formal proofs follow simple well-defined rules and should be easy to check – In the same way that code should be easy to execute English proofs correspond to those rules but are designed to be easier for humans to read – Easily checkable in principle Simple proof strategies already do a lot – Later we will cover a specific strategy that applies to loops and recursion (mathematical induction) Autumn 2012CSE