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

Similar documents
Rules Build Arguments Rules Building Arguments

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

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

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

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

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

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

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

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

Readings: Conjecture. Theorem. Rosen Section 1.5

CS 2336 Discrete Mathematics

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

Mathacle. PSet ---- Algebra, Logic. Level Number Name: Date: I. BASICS OF PROPOSITIONAL LOGIC

Rules of Inference. Arguments and Validity

Review: Potential stumbling blocks

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

Methods of Proof. 1.6 Rules of Inference. Argument and inference 12/8/2015. CSE2023 Discrete Computational Structures

software design & management Gachon University Chulyun Kim

KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) RULES OF INFERENCE. Discrete Math Team

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

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

Intro to Logic and Proofs

Outline. Rules of Inferences Discrete Mathematics I MATH/COSC 1056E. Example: Existence of Superman. Outline

1 The Foundation: Logic and Proofs

Predicate Logic. Andreas Klappenecker

Discrete Mathematics

1 The Foundation: Logic and Proofs

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

CSE 20 DISCRETE MATH. Winter

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

CSE 20 DISCRETE MATH. Fall

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

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

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

ECOM Discrete Mathematics

Discrete Mathematics. Propositional & Predicate Logic. Lecture Notes

Mat 243 Exam 1 Review

Discrete Structures for Computer Science

Agenda. Introduction to Proofs Dr Patrick Chan School of Computer Science and Engineering South China University of Technology

Section 1.1 Propositions

Inference and Proofs (1.6 & 1.7)

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

Mat2345 Week 2. Chap 1.5, 1.6. Fall Mat2345 Week 2. Chap 1.5, 1.6. Week2. Negation. 1.5 Inference. Modus Ponens. Modus Tollens. Rules.

Supplementary Logic Notes CSE 321 Winter 2009

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

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

Propositional Logic Not Enough

Logic and Proofs. (A brief summary)

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.

Chapter 1 Elementary Logic

Manual of Logical Style

Logic and Proof. Aiichiro Nakano

(Refer Slide Time: 02:20)

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

Full file at

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

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

Chapter 3. The Logic of Quantified Statements

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

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

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

2. Use quantifiers to express the associative law for multiplication of real numbers.

DISCRETE MATHEMATICS BA202

CSE Discrete Structures

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

Discrete Mathematics Basic Proof Methods

Introduction to proofs. Niloufar Shafiei

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

Math 55 Homework 2 solutions

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Test 1 Solutions(COT3100) (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology:

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

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Predicate Logic. Example. Statements in Predicate Logic. Some statements cannot be expressed in propositional logic, such as: Predicate Logic

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Solutions to Exercises (Sections )

Review. p q ~p v q Contrapositive: ~q ~p Inverse: ~p ~q Converse: q p

Logic, Sets, and Proofs

MAT 243 Test 1 SOLUTIONS, FORM A

PROPOSITIONAL CALCULUS

Math 3336: Discrete Mathematics Practice Problems for Exam I

[Ch 3, 4] Logic and Proofs (2) 1. Valid and Invalid Arguments ( 2.3, 3.4) 400 lecture note #2. 1) Basics

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

Section 1.2: Propositional Logic

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

ICS141: Discrete Mathematics for Computer Science I

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

Chapter 2: The Logic of Quantified Statements

Logic and Proofs. (A brief summary)

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

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

1.1 Statements and Compound Statements

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

Transcription:

Review Propositions, propositional operators, truth tables Logical Equivalences. Tautologies & contradictions Some common logical equivalences Predicates & quantifiers Some logical equivalences involving quantifiers Nested quantifiers Proofs Arguments. Valid arguments. Argument forms Rules of inference

Arguments in Propositional Logic An argument in propositional logic is a sequence of propositions. All but the final proposition are called premises. The last statement is the conclusion. The argument is valid if the premises imply the conclusion. (If the premises are p 1,p 2,,p n and the conclusion is q then (p 1 p 2 p n ) q) An argument form is an argument that is valid no matter what propositions are substituted into its propositional variables. (If the premises are p 1,p 2,,p n and the conclusion is q then (p 1 p 2 p n ) q is a tautology) Inference rules are simple argument forms that will be used to construct more complex argument forms.

Inference Rules for Propositional Logic

p p \ q q Example: Modus Ponens Let p be It is raining. Corresponding Tautology: ( qù ( p q)) q Let q be I will study discrete math. If it is raining, then I will study discrete math. It is raining. Therefore, I will study discrete math.

Modus Tollens Corresponding Tautology: p p \ q q Example: ( qù ( p q)) q Let p be it is raining. Let q be I will study discrete math. If it is raining, then I will study discrete math. I will not study discrete math. Therefore, it is not raining.

Hypothetical Syllogism p q q r \ p r Corresponding Tautology: (( p q) Ù ( q r) ) ( p r) Example: Let p be it rains. Let q be I will study discrete math. Let r be I will get an A. If it rains, then I will study discrete math. If I study discrete math, I will get an A. Therefore, If it rains, I will get an A.

Disjunctive Syllogism pú p \ q q Example: Corresponding Tautology: pù pú q q Let p be I will study discrete math. Let q be I will study English literature. I will study discrete math or I will study English literature. I will not study discrete math. Therefore, I will study English literature.

Addition p \ pú q Example: Corresponding Tautology: p ( púq) Let p be I will study discrete math. Let q be I will visit Las Vegas. I will study discrete math. Therefore, I will study discrete math or I will visit Las Vegas.

Simplification pù q \ p Corresponding Tautology: ( pù q) p Example: Let p be I will study discrete math. Let q be I will study English literature. I will study discrete math and English literature Therefore, I will study discrete math.

Conjunction p q \ pù q Example: Corresponding Tautology: (( p) Ù ( q) ) ( pùq) Let p be I will study discrete math. Let q be I will study English literature. I will study discrete math. I will study English literature. Therefore, I will study discrete math and I will study English literature.

Resolution Corresponding Tautology: Example: Let p be I will study discrete math. Let r be I will study English literature. Let q be I will study databases. I will not study discrete math or I will study English literature. I will study discrete math or I will study databases. Therefore, I will study databases or I will study English literature.

Using the Rules of Inference to Build Valid Arguments A valid argument is a sequence of statements. Each statement is either a premise or follows from previous statements by rules of inference. The last statement is called conclusion. A valid argument takes the following form: S 1 S 2... S n \C

Valid Arguments 2 Example 1: From the single proposition pù ( p q) Show that q is a conclusion. Solution: Step 1. pù p q Premise Modus Ponens using ( 2 ) and ( 3) 2. p Simplification using 1 3. p q Simplification using 1 4. q Reason

Valid Arguments 3 Example 2: With these hypotheses: It is not sunny this afternoon and it is colder than yesterday. We will go swimming only if it is sunny. If we do not go swimming, then we will take a canoe trip. If we take a canoe trip, then we will be home by sunset. Using the inference rules, construct a valid argument for the conclusion: We will be home by sunset. Solution: 1. Choose propositional variables: p : It is sunny this afternoon. r : We will go swimming. t : We will be home by sunset. q : It is colder than yesterday. s : We will take a canoe trip. 2. Translation into propositional logic: Hypotheses: pù q, r p, r s, s t Conclusion: t Continued on next slide à

Valid Arguments 4 3. Construct the Valid Argument Step Reason 1. pù q Premise 2. p Simplification using 1 3. r p Premise 4. r Modus tollens using 2 and 3 5. r s Premise 6. s Modus ponens using 4 and 5 7. s t Premise 8. t Modus ponens using 6 and 7

Inference Rules for Quantified Statements

Handling Quantified Statements Valid arguments for quantified statements are a sequence of statements. Each statement is either a premise or follows from previous statements by rules of inference which include: Rules of Inference for Propositional Logic Rules of Inference for Quantified Statements The rules of inference for quantified statements are introduced in the next several slides.

Universal Instantiation (UI) " xp x \ Pc Example: Our domain consists of all dogs and Fido is a dog. All dogs are cuddly. Therefore, Fido is cuddly.

Universal Generalization (UG) Pc for an arbitrary \"xp x c Used often implicitly in Mathematical Proofs. E.g., to show all primes > 2 are odd, may start with Let n denote an arbitrary prime > 2 Beware: don t make additional assumptions about c!!

Existential Instantiation (EI) \ Pc $ xp ( x) for some element c Example: There is someone who got an A in the course. Let s call her a and say that a got an A

Existential Generalization (EG) Pc for some element \$xp x c Example: Michelle got an A in the class. Therefore, someone got an A in the class.

Using Rules of Inference 1 Example 1: Using the rules of inference, construct a valid argument to show that John Smith has two legs is a consequence of the premises: Every man has two legs. John Smith is a man. Solution: Let M(x) denote x is a man and L(x) x has two legs and let John Smith be a member of the domain. Valid Argument: Step Reason xm ( ( x) Lx ) ( J) 1. " Premise 2. M J L UI from 1 3. M J Premise 4. L J Modus Ponens using ( 2 ) and ( 3)

Returning to the Socrates Example ( Mortal ( x) ) " x Man x \ Man Socrates Mortal Socrates

Solution for Socrates Example Valid Argument Step Mortal ( x) Mortal ( Socrates) Premise 1. " x Man x Premise 2. Mam Socrates UI from 1 3. Mam Socrates Reason 4. Mortal Socrates MP from 2 and 3

Universal Modus Ponens Universal Modus Ponens combines universal instantiation and modus ponens into one rule. Q( x) " x P x Pa, where ais a particular element in the domain \ Qa This rule could be used in the Socrates example.

Introduction to Proofs Section 1.7

Proofs of Mathematical Statements A proof is a valid argument that establishes the truth of a statement. In math, CS, and other disciplines, informal proofs which are generally shorter, are often used. More than one rule of inference in a step. The rules of inference used are not always explicitly stated. Easier for to understand and to explain to people. But it is also easier to introduce errors. Proofs have many practical applications: verification that computer programs are correct establishing that operating systems are secure enabling programs to make inferences in artificial intelligence showing that system specifications are consistent

Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as true) rules of inference A lemma is a helping theorem or a result which is needed to prove a theorem. A corollary is a result which follows directly from a theorem. Less important theorems are sometimes called propositions. A conjecture is a statement that is being proposed to be true. Once a proof of a conjecture is found, it becomes a theorem. It may turn out to be false.

Forms of Theorems Many theorems assert that a property holds for all elements in a domain, such as the integers, the real numbers, or some of the discrete structures that we will study in this class. Often the universal quantifier (needed for a precise statement of a theorem) is omitted by standard mathematical convention. For example, the statement: If x > y, where x and y are positive real numbers, then x 2 > y 2 really means For all positive real numbers x and y, if x > y, then x 2 > y 2.

Proving Theorems Many theorems have the form Q( x) " x P x So, we must prove something of the form Pc Qc where c is an arbitrary element of the domain. The original theorem then follows by universal generalization.

Proving Conditional Statements: p q 1. Trivial 2. Vacuous 3. Direct 4. By Contraposition Trivial Proof: If we know q is true, then p q is true as well. If it is raining then 1=1. Vacuous Proof: If we know p is false then p q is true as well. If I am both rich and poor then 2 + 2 = 5. [ Even though these examples seem silly, both trivial and vacuous proofs are often used in mathematical induction]

Even and Odd Integers Definition: The integer n is even if there exists an integer k such that n = 2k, and n is odd if there exists an integer k, such that n = 2k + 1. Note that every integer is either even or odd and no integer is both even and odd. We will need this basic fact about the integers in some of the example proofs to follow. We will learn more about the integers in Chapter 4.

Proving Conditional Statements: p q 1 Direct Proof: Assume that p is true. Use rules of inference, axioms, and logical equivalences to show that q must also be true. Example: Give a direct proof of the theorem If n is an odd integer, then n 2 is odd. Solution: Assume that n is odd. Then n = 2k + 1 for an integer k. Squaring both sides of the equation, we get: n 2 = (2k + 1) 2 = 4k 2 + 4k +1 = 2(2k 2 + 2k) + 1= 2r + 1, where r = 2k 2 + 2k, an integer. We have proved that if n is an odd integer, then n 2 is an odd integer.

Proving Conditional Statements: p q 2 Definition: The real number r is rational if there exist integers p and q where q 0 such that r = p/q Example: Prove that the sum of two rational numbers is rational. Solution: Assume r and s are two rational numbers. Then there must be integers p, q and also t, u such that r = p/ q, s = t/ u, u ¹ 0, q ¹ 0 p t pu + qt v r+ s = + = = q u qu w Thus the sum is rational. where v = pu + qt w = qu 0

Proving Conditional Statements: p q 3 Proof by Contraposition: Assume q and show p must be true. This is sometimes called an indirect proof method. If we give a direct proof of q p then we have a proof of p q. (Why does this work?) Example: Prove that if n is an integer and 3n + 2 is odd, then n is odd. Solution: Assume n is even. So, n = 2k for some integer k. Thus 3n + 2 = 3(2k) + 2 =6k +2 = 2(3k + 1) = 2j for j = 3k +1 Therefore 3n + 2 is even. Since we have shown q p, p q must hold as well. If n is an integer and 3n + 2 is odd (not even), then n is odd (not even).