Logic and Proof. Aiichiro Nakano

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

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

software design & management Gachon University Chulyun Kim

Readings: Conjecture. Theorem. Rosen Section 1.5

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

CSC Discrete Math I, Spring Propositional Logic

1 The Foundation: Logic and Proofs

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

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

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.

1 The Foundation: Logic and Proofs

ECOM Discrete Mathematics

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

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

ICS141: Discrete Mathematics for Computer Science I

Intro to Logic and Proofs

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

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

PROPOSITIONAL CALCULUS

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

Compound Propositions

Predicate Logic. Andreas Klappenecker

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

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

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Mat 243 Exam 1 Review

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

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

First order Logic ( Predicate Logic) and Methods of Proof

Review: Potential stumbling blocks

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Introduction to Sets and Logic (MATH 1190)

DISCRETE MATHEMATICS BA202

Logic and Proofs. (A brief summary)

Chapter 4, Logic using Propositional Calculus Handout

Discrete Structures for Computer Science

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

Full file at

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

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

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.

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

Propositional Logic. Spring Propositional Logic Spring / 32

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

A. Propositional Logic

Discrete Mathematical Structures: Theory and Applications

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

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

2.2: Logical Equivalence: The Laws of Logic

Logic, Sets, and Proofs

Chapter 1 Elementary Logic

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

Discrete Mathematics and Its Applications

CS 2336 Discrete Mathematics

CHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic

CSE 20 DISCRETE MATH. Winter

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

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

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

Do not start until you are given the green signal

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

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Propositional and First-Order Logic

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

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

Math 3336: Discrete Mathematics Practice Problems for Exam I

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

Definition 2. Conjunction of p and q

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

Logic and Propositional Calculus

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

The Logic of Compound Statements cont.

CSE 20 DISCRETE MATH. Fall

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.

MAT 243 Test 1 SOLUTIONS, FORM A

Logic and Proofs. (A brief summary)

Rules Build Arguments Rules Building Arguments

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

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

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

Section 1.7 Proof Methods and Strategy. Existence Proofs. xp(x). Constructive existence proof:

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

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

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

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

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Logic and Propositional Calculus

Today. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology

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

1.1 Language and Logic

Section 1.1 Propositions

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

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

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Transcription:

Logic and Proof Aiichiro Nakano Collaboratory for Advanced Computing & Simulations Department of Computer Science Department of Physics & Astronomy Department of Chemical Engineering & Materials Science Department of Biological Sciences University of Southern California Email: anakano@usc.edu rom K. H. Rosen, Discrete Mathematics and Its Applications (McGraw-Hill) Chapter 1

Logic Logic = mathematical foundation for: Objective reasoning ormal proofs Computation Proposition: A declarative sentence that is either true or false, but not both (Example) today is riday read this book imperative what time is it interrogative Predicate (propositional function): A statement involving variables (Example) P(x, y): Student x has studied subject y ruth value: rue () or false ()

Connectives (1) Logical operators to form composite propositions from existing propositions Negation p: not p ; inverts the truth value Conjunction p Ù q: p and q ; if both p and q are Disjunction p Ú q: p or q ; if both p and q are, otherwise Exclusive or p Å q: when exactly one of p and q is ruth table: Combinatorial enumeration of the truth values of composite propositions; 2 n rows for a n-proposition composite Unary p p Binary p q p Ù q p Ú q p Å q

Connectives (2) Implication: p q; when p is and q is, and otherwise hypothesis conclusion if p, then q ( q if p ) p implies q p is a sufficient condition for q p q p q Related implications Contrapositive: q p Converse: q p Inverse: p q Biconditional: p «q; if p and q has the same truth value q if and only if (iff) p p q p «q p is sufficient and necessary for q

Nested Connectives Use parenthesis (p Ù q) Ú r Precedence: No need to memorize, except for p Ù q is ( p) Ù q not (p Ù q) Operator Precedence 1 Ù 2 Ú 3 operate first «4 5 operate last

Logical Equivalences autology: A compound proposition that is always p º q: p and q are logically equivalent; p «q is a tautology Syntactically different composite propositions can have the same meaning (truth values) ruth table can be used to determine the equivalence (Example) equivalence of contrapositive p q º q p p q p q q p q p

Basic Logical Equivalences (1) Useful to simplify complex composite propositions p Ù º p p Ú º p p Ú º p Ù º p Ú p º p p Ù p º p ( p) º p Identity laws Domination laws Idempotent laws Double negation

Basic Logical Equivalences (2) Ù and Ú are commutative, associative, and distributive p Ù q º q Ù p p Ú q º q Ú p (p Ù q) Ù r º p Ù (q Ù r ) (p Ú q) Ú r º p Ú (q Ú r) p Ú (q Ù r) º (p Ú q ) Ù (p Ú r ) p Ù (q Ú r) º (p Ù q ) Ú (p Ù r ) Commutative laws Associative laws Distributive laws Associative laws make the following well defined p 1 Ù p 2 Ù... Ù p n if all are p 1 Ú p 2 Ú... Ú p n if one is

Basic Logical Equivalences (3) (p Ù q) º p Ú q (p Ú q) º p Ù q p Ú (p Ù q) º p p Ù (p Ú q) º p p Ú p º p Ù p º De Morgan s laws Absorption laws Negation laws Generalized De Morgan s theorem (p 1 Ù p 2 Ù... Ù p n ) º p 1 Ú p 2 Ú... Ú p n it is not the case that all are º one is (p 1 Ú p 2 Ú... Ú p n ) º p 1 Ù p 2 Ù... Ù p n it is not the case that one is º all are

Basic Logical Equivalences (4) Equivalences involving implication & biconditional in terms of other connectives p q º p Ú q p q º q p (contrapositive) p «q º (p q) Ù (q p)

Basic Logical Equivalences (5) Additional logical equivalences can be derived, combining other logical equivalences that have already been established (Example) Show that (p Ù q) (p Ú q) º i.e., (p Ù q) (p Ú q) is a tautology (p Ù q) (p Ú q) º (p Ù q) Ú (p Ú q) p q º p Ú q º ( p Ú q) Ú (p Ú q) De Morgan º p Ú q Ú p Ú q Associative law º ( p Ú p) Ú ( q Ú q) Associative law º Ú Negation laws º Domination law

Quantifiers Universe of discourse: he collection of values that a variable can take Universal quantifier, ": "xp(x), for all x P(x) P(x) is for all values of x in the universe of discourse (Example) Universe of discourse consists of all integers "x(x + 1 > x) is "x(x 2 > x) is (P(0) is, counterexample) Existential quantification, $: $xp(x), there is an x such that P(x) here exists an element x in the universe of discourse such that P(x) is (Example) Universe of discourse consists of all integers $x(x > 3) is (P(4) is for example)

Negating Quantifiers "xp(x) º $x P(x) it is not the case that P(x) is for all x º there exists x such that P(x) is (Example) Negation of all Americans eat cheeseburgers there is an American who do not eat cheeseburgers $xp(x) º "x P(x) it is not the case that there exists x such that P(x) is º P(x) is for all x (Example) Negation of there is an honest politician all politicians are dishonest hese equivalences are just De Morgan s theorems: (P(x 1 ) Ù P(x 2 ) Ù... Ù P(x n )) º P(x 1 ) Ú P(x 2 ) Ú... Ú P(x n ) (P(x 1 ) Ú P(x 2 ) Ú... Ú P(x n )) º P(x 1 ) Ù P(x 2 ) Ù... Ù P(x n )

Nesting Quantifiers 1. "x"yp(x,y): P(x,y) is for every pair x,y 2. $x$yp(x,y): there is a pair for which P(x,y) is 3. "x$yp(x,y): for every x there is a y for which P(x,y) is 4. $x"yp(x,y): there is a x, for which P(x,y) is for all y (Example) P(x, y) = x relies upon y "x($yp(x,y)): everyone has someone to rely on $x("yp(x,y)): there is a needy person who relies on everybody

Proof Axioms: Statements assumed to be, defining a mathematical structure heorem: A statement that can be shown to be Proof: Demonstration that a theorem is Rules of inference: Patterns to deduce a true statement (conclusion) from a set of other true statements (hypotheses) General form: If we know that a set of hypotheses are all, then a conclusion is hypothesis 1 (h 1 ) hypothesis 2 (h 2 )... \ (denotes therefore ) conclusion (c) Associated tautology: h 1 Ù h 2 Ù... c

Examples of Axioms Axioms of Euclidean geometry (~300BC) 1. Given two distinct points, one can draw one and only one line segment connecting these points. 2. Given two distinct points, one can draw one and only one circle centered at the first point and passing through the second one. 3. Any two right angles are equal. 4. Every line segment can be infinitely continued in either direction. 5. or any given line l and a point P not on that line one can draw one and only one line l 1 through P that will not intersect the original line l. Axioms of Riemann s geometry (1854) Euclid s axioms 1-4 5. Given a straight line and a point not on the line, there are no straight lines through the point parallel to the original line. Axioms in Newtonian mechanics 1. An object at rest tends to stay at rest and an object in motion tends to stay in motion with the same speed and in the same direction unless acted upon by an unbalanced force. 2. he acceleration of an object as produced by a net force is directly proportional to the magnitude of the net force, in the same direction as the net force, and inversely proportional to the mass of the object. 3. or every action, there is an equal and opposite reaction.

Rules of Inference Rule of Inference autology Name p. p (p Ú q) Addition \ p Ú q p Ù q. (p Ù q) p Simplification \ p p (p) Ù (q) p Ù q Conjunction q. \ p Ù q p [p Ù (p q)] q Modus ponens p q. \q q p q. \ p [ q Ù (p q)] p Modus tollens

Rules of Inference Rule of Inference autology Name p q [(p q) Ù (q r)] (p r) Hypothetical q r. syllogism \p r p Ú q p. \q p Ú q p Ú r. \q Ú r [(p Ú q) Ù p] q [(p Ú q) Ù ( p Ú r)] (q Ú r) Disjunctive syllogism Resolution

Rules of Inference for Quantified Statements Rule of Inference "xp(x). \P(c) for a particular c P(c) for an arbitrary c \"xp(x) $xp(x). \P(c) for some c P(c) for some c \$xp(x) Name Universal instantiation Universal generalization Existential instantiation Existential generalization

Methods of Proving heorems Proving implications p q: Direct proof: Assume p is, and use rules of inference to prove that q is Indirect proof: Prove its contrapositive; assume q, and prove p Proof by cases: Prove (p 1 Ú p 2 ) q by proving (p 1 q) and (p 1 q) Based on [(p 1 Ú p 2 ) q] º [(p 1 q) Ù (p 2 q)]

Sample Direct Proof Write your answer to a homework at this level of readability!

Proof by Contradiction Proving p: Prove p (q Ù q) Since (q Ù q) º (contradiction, by negation law), p his is only, if p = (i.e., p = ) (Example) Prove that p: Ö2 is irrational Assume p: Ö2 is rational (i.e., Ö2 = a/b, where integers a & b have no common factors). It follows that 2 = a 2 /b 2, hence 2b 2 = a 2. his means a 2 is even, which implies a is even. urthermore, since a is even, a = 2c for some integer c. hus 2b 2 = 4c 2, so b 2 = 2c 2. his means b 2 is even, which implies b is even. It has been shown that p Ö2 = a/b, where integers a & b have no common factors Ù 2 divides both a & b.

Existence Proofs Existence proof: Proving $xp(x) Constructive proof: ind an element a such that P(a) is Nonconstructive proof: or example, proof by contradiction prove that its negation leads to contradiction