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.

Slides:



Advertisements
Similar presentations
With examples from Number Theory
Advertisements

Discrete Math Methods of proof 1.
Introduction to Proofs
PROOF BY CONTRADICTION
Chapter 3 Elementary Number Theory and Methods of Proof.
Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
1 Introduction to Abstract Mathematics Valid AND Invalid Arguments 2.3 Instructor: Hayk Melikya
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Elementary Number Theory and Methods of Proof
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.
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,
Discrete Structures CS 2800
First Order Logic (chapter 2 of the book) Lecture 3: Sep 14.
Introduction to Proofs ch. 1.6, pg. 87,93 Muhammad Arief download dari
Propositional Logic Lecture 1: Sep 2. Content 1.Mathematical proof (what and why) 2.Logic, basic operators 3.Using simple operators to construct any operator.
Discrete Structures CS 23022
Propositional Logic Lecture 2: Sep 9. Conditional Statement If p then q p is called the hypothesis; q is called the conclusion “If your GPA is 4.0, then.
Methods of Proof Lecture 4: Sep 16 (chapter 3 of the book)
Fall 2002CMSC Discrete Structures1 Let’s proceed to… Mathematical Reasoning.
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
Propositional Logic.
Methods of Proof & Proof Strategies
Introduction to Proofs
Introduction to Proofs
MATH 224 – Discrete Mathematics
1 Methods of Proof CS/APMA 202 Epp, chapter 3 Aaron Bloomfield.
Methods of Proof. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical theorems. Direct.
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.
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.
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.
1 Math/CSE 1019C: Discrete Mathematics for Computer Science Fall 2011 Suprakash Datta Office: CSEB 3043 Phone: ext
Proofs1 Advanced Discrete Mathematics Jim Skon. Proofs2  Definition: A theorem is a valid logical assertion which can be proved using other theorems.
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)
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.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Introduction to Proofs.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 3 The Foundations: Logic and Proof,
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
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.
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.
Week 4 - Wednesday.  What did we talk about last time?  Divisibility  Proof by cases.
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 2012 CSE
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Methods of Proof Lecture 4: Sep 20 (chapter 3 of the book, except 3.5 and 3.8)
Chapter 1, Part III: Proofs With Question/Answer Animations Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without.
Section 1.7. Section Summary Mathematical Proofs Forms of Theorems Direct Proofs Indirect Proofs Proof of the Contrapositive Proof by Contradiction.
Chapter 1 Logic and proofs
The Foundations: Logic and Proofs
CSE15 Discrete Mathematics 02/01/17
Argument An argument is a sequence of statements.
Predicate Calculus Validity
The Foundations: Logic and Proofs
Mathematical Reasoning
Propositional Logic.
First Order Logic Rosen Lecture 3: Sept 11, 12.
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept 24, 25.
Mathematical Reasoning
Introduction to Proofs
Methods of Proof Rosen 1.7, 1.8 Lecture 4: Sept, 2019.
Presentation transcript:

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 is called the conclusion. An argument is valid if: whenever all the assumptions are true, then the conclusion is true. If today is Wednesday, then yesterday is Tuesday. Today is Wednesday. Yesterday is Tuesday.

Modus Ponens If p then q. p q pqp→qpq Modus ponens is Latin meaning “method of affirming”.

Modus Tollens If p then q. ~q ~p pqp→q~q~p Modus tollens is Latin meaning “method of denying”.

Equivalence A student is trying to prove that propositions P, Q, and R are all true. She proceeds as follows. First, she proves three facts: P implies Q Q implies R R implies P. Then she concludes, ``Thus P, Q, and R are all true.'' Proposed argument: Is it valid?

Valid Argument? Conclusion true whenever all assumptions are true. assumptionsconclusion To prove an argument is not valid, we just need to find a counterexample.

Valid Arguments? If p then q. q p If p then q. ~p ~q If you are a fish, then you drink water. You drink water. You are a fish. If you are a fish, then you drink water. You are not a fish. You do not drink water.

Exercises

More Exercises Valid argument True conclusion True conclusion Valid argument

Contradiction If you can show that the assumption that the statement p is false leads logically to a contradiction, then you can conclude that p is true. You are working as a clerk. If you have won Mark 6, then you would not work as a clerk. You have not won Mark 6.

Arguments with Quantified Statements Universal instantiation: Universal modus ponens: Universal modus tollens:

Universal Generalization valid rule providing c is independent of A e.g. given any number x, 2x is an even number => for all x, 2x is an even number.

Proof: Give countermodel, where  z [Q(z)  P(z)] is true, but  x.Q(x)   y.P(y) is false. In this example, let domain be integers, Q(z) be true if z is an even number, i.e. Q(z)=even(z) P(z) be true if z is an odd number, i.e. P(z)=odd(z)  z [Q(z)  P(z)] → [  x.Q(x)   y.P(y)] Not Valid Find a domain, and a predicate.

Proof strategy: We assume  z [Q(z)  P(z)] and prove  x.Q(x)   y.P(y)  z [Q(z)  P(z)] → [  x.Q(x)   y.P(y)] Validity

Proof: Assume  z [Q(z)  P(z)]. So Q(z)  P(z) holds for all z in the domain. Now let c be some domain element. So Q(c)  P(c) holds, and therefore Q(c) by itself holds. But c could have been any element of the domain. So we conclude  x.Q(x). We conclude  y.P(y) similarly. Therefore,  x.Q(x)   y.P(y) QED. (by UG)  z [Q(z)  P(z)] → [  x.Q(x)   y.P(y)] Validity

Proof and Logic We prove mathematical statement by using logic. not valid To prove something is true, we need to assume some axioms! This is invented by Euclid in 300 BC, who begins with 5 assumptions about geometry, and derive many theorems as logical consequences.

Proofs

Proving an Implication Goal: If P, then Q. (P implies Q) Method 1: Write assume P, then show that Q logically follows. If Claim:, then

Proving an Implication Goal: If P, then Q. (P implies Q) Method 1: Write assume P, then show that Q logically follows. If Claim:, then Reasoning: When x=0, it is true. When x grows, 4x grows faster than x 3 in that range. Proof: When

Proving an Implication Claim: If r is irrational, then √r is irrational. How to begin with? What if I prove “If √r is rational, then r is rational”, is it equivalent? Yes, this is equivalent; proving “if P, then Q” is equivalent to proving “if not Q, then not P”. Goal: If P, then Q. (P implies Q) Method 1: Write assume P, then show that Q logically follows.

Proving an Implication Claim: If r is irrational, then √r is irrational. Method 2: Prove the contrapositive, i.e. prove “not Q implies not P”. Goal: If P, then Q. (P implies Q)

Proving an Implication Claim: If r is irrational, then √r is irrational. Method 2: Prove the contrapositive, i.e. prove “not Q implies not P”. Proof: We shall prove the contrapositive – if √r is rational, then r is rational. Since √r is rational, √r = a/b for some integers a,b. So r = a 2 /b 2. Since a,b are integers, a 2,b 2 are integers. Therefore, r is rational. (Q.E.D.) "which was to be demonstrated", or “quite easily done”. Goal: If P, then Q. (P implies Q)

Proving an “if and only if” Goal: Prove that two statements P and Q are “logically equivalent”, that is, one holds if and only if the other holds. Example: An integer is a multiple of 3 if and only if the sum of its digits is a multiple of 3. Method 1: Prove P implies Q and Q implies P. Method 1’: Prove P implies Q and not P implies not Q. Method 2: Construct a chain of if and only if statement.

Proof the Contrapositive Statement: If m 2 is even, then m is even Try to prove directly.

Proof the Contrapositive Statement: If m 2 is even, then m is even Contrapositive: If m is odd, then m 2 is odd. Proof (the contrapositive):

Since m is an odd number, m = 2l+1 for some natural number l. So m 2 is an odd number. Proof the Contrapositive Statement: If m 2 is even, then m is even Contrapositive: If m is odd, then m 2 is odd. So m 2 = (2l+1) 2 = (2l) 2 + 2(2l) + 1 Proof (the contrapositive):

Proof by Contradiction To prove P, you prove that not P would lead to ridiculous result, and so P must be true. You are working as a clerk. If you have won Mark 6, then you would not work as a clerk. You have not won Mark 6.

Theorem: is irrational. Proof (by contradiction): Proof by Contradiction

Suppose was rational. Choose m, n integers without common prime factors (always possible) such that Show that m and n are both even, thus having a common factor 2, a contradiction! Theorem: is irrational. Proof (by contradiction): Proof by Contradiction

Theorem: is irrational. Proof (by contradiction):Want to prove both m and n are even.

so can assume so n is even. so m is even. Proof by Contradiction Theorem: is irrational. Proof (by contradiction):Want to prove both m and n are even.

Proof by Cases x is positive or x is negative e.g. want to prove a nonzero number always has a positive square. if x is positive, then x 2 > 0. if x is negative, then x 2 > 0. x 2 > 0.

Rational vs Irrational Question: If a and b are irrational, can a b be rational?? We know that √2 is irrational, what about √2 √2 ? Case 1: √2 √2 is rational Case 2: √2 √2 is irrational So in either case there are a,b irrational and a b be rational. We don’t need to know which case is true!

Rational vs Irrational Question: If a and b are irrational, can a b be rational?? We know that √2 is irrational, what about √2 √2 ? Case 1: √2 √2 is rational Then we are done, a=√2, b=√2. Case 2: √2 √2 is irrational Then (√2 √2 ) √2 = √2 2 = 2, a rational number So a=√2 √2, b= √2 will do. So in either case there are a,b irrational and a b be rational. We don’t need to know which case is true! We’ll also prove this fact later.

Extra

Power and Limits of Logic Good news: Gödel's Completeness Theorem Only need to know a few axioms & rules, to prove all validities. That is, starting from a few propositional & simple predicate validities, every valid assertion can be proved using just universal generalization and modus ponens repeatedly! modus ponens

Thm 2, bad news: Given a set of axioms, there is no procedure that decides whether quantified assertions are valid. (unlike propositional formulas). Power and Limits of Logic

Thm 3, worse news: For any “reasonable” theory that proves basic arithmetic truth, an arithmetic statement that is true, but not provable in the theory, can be constructed. Gödel's Incompleteness Theorem for Arithmetic Power and Limits of Logic No hope to find a complete and consistent set of axioms! An excellent project topic:

Application: Logic Programming

Other Applications Making queries Data mining Digital logic: Database system: