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.

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

Proofs. Joe Patten August 10, 2018

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

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

CSC Discrete Math I, Spring Propositional Logic

Mat 243 Exam 1 Review

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.

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

2-4: The Use of Quantifiers

Logic and Proofs. (A brief summary)

Chapter 1 Elementary Logic

Predicate Logic. Andreas Klappenecker

The Process of Mathematical Proof

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

1.1 Language and Logic

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

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

1 The Foundation: Logic and Proofs

1.1 Statements and Compound Statements

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Introduction to Sets and Logic (MATH 1190)

1.1 Language and Logic

1 The Foundation: Logic and Proofs

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Introducing Proof 1. hsn.uk.net. Contents

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

software design & management Gachon University Chulyun Kim

PROPOSITIONAL CALCULUS

A. Propositional Logic

Chapter 2: The Logic of Quantified Statements

Packet #1: Logic & Proofs. Applied Discrete Mathematics

2.2: Logical Equivalence: The Laws of Logic

Section 1.1 Propositions

Manual of Logical Style

MAT 243 Test 1 SOLUTIONS, FORM A

Propositional Logic. Fall () Propositional Logic Fall / 30

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

Handout on Logic, Axiomatic Methods, and Proofs MATH Spring David C. Royster UNC Charlotte

Logic and Proofs. (A brief summary)

Logic and Proof. Aiichiro Nakano

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

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

Compound Propositions

Propositional Logic. Spring Propositional Logic Spring / 32

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

Predicate Calculus lecture 1

Basic Logic and Proof Techniques

Propositional Logic Not Enough

15414/614 Optional Lecture 1: Propositional Logic

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

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

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

A statement is a sentence that is definitely either true or false but not both.

Propositional Logic, Predicates, and Equivalence

Introduction to Decision Sciences Lecture 2

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

CSE 20: Discrete Mathematics

Logic, Sets, and Proofs

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

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination I (Spring 2008)

MATH 2001 MIDTERM EXAM 1 SOLUTION

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

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

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

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

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

MCS-236: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, Methods of Proof

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

Mathematical Reasoning (Part I) 1

CHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic

What is the decimal (base 10) representation of the binary number ? Show your work and place your final answer in the box.

Propositional logic (revision) & semantic entailment. p. 1/34

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

Glossary of Logical Terms

Chapter 1 : The language of mathematics.

The statement calculus and logic

Proof. Theorems. Theorems. Example. Example. Example. Part 4. The Big Bang Theory

HANDOUT AND SET THEORY. Ariyadi Wijaya

CSE 20 DISCRETE MATH. Winter

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

First order Logic ( Predicate Logic) and Methods of Proof

Language of Propositional Logic

A Guide to Proof-Writing

Topic 1: Propositional logic

02 Propositional Logic

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

AMTH140 Lecture 8. Symbolic Logic

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

Logic and Propositional Calculus

ECOM Discrete Mathematics

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

ICS141: Discrete Mathematics for Computer Science I

Logic and Proofs 1. 1 Overview. 2 Sentential Connectives. John Nachbar Washington University December 26, 2014

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Section 1.1: Logical Form and Logical Equivalence

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

Logic and Propositional Calculus

LECTURE 1. Logic and Proofs

Transcription:

Chapter 1 Logic 1.1 Introduction and Definitions Definitions. A sentence (statement, proposition) is an utterance (that is, a string of characters) which is either true (T) or false (F). A predicate is a property that a variable (or a list of variables) might have; a predicate in the variables x 1,..., x n returns a value T or F for each choice of values of x 1,..., x n. Example. Let φ(n) denote n is prime. Then φ is a predicate; φ(17) is a true sentence and φ(4) is a false sentence. Also, if n is an integer, then φ(n) is a false sentence. Definitions. A predicate is said to be a compound sentence if the variables of the predicate are propositions. Given a compound sentence, all possible truth inputs can be inserted, and the corresponding truth outcomes listed. Such a list is known as a truth table. 1.2 Logical Connectives Let p and q be sentences. The following definitions are made. Disjunction: p q is true if at least one of p, q is true, and false if both p, q are false. The truth table for disjunction is as follows. p q p q T T T T F T F T T F F F 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. p q p q T T T F F F Negation: p is false if p is true, and true if p is false. The truth table for negation is as follows. p p T F F T 3

Implication: p q means ( p) q. The truth table for implication is as follows. Note that q p is the same as p q. p q p ( p) q T T F T F F T T T F F T T Equivalence: p q means (p q) (q p), p if and only if q. The truth table for equivalence is as follows. p q p q q p p q T T T T T T F F T F F T T T Examples. Let p and q be sentences. 1. Consider the compound sentence p (p ( q)). The truth table is as follows. Hence, this compound sentence is always true. p q q p ( q) p (p ( q)) T T T F T T T T T F F T T T 2. Consider the compound sentence p (q (p q)). The truth table is as follows. p q p q q (p q) p (q (p q)) T T T T T T F T T T F T T T F F F, whence p (q (p q)) has the same outcomes as p. Definitions. Two compound sentences, P and Q, are said to be logically equivalent if P and Q have the same truth tables, written P Q. A compound sentence that is true for all values of the inputs is called a tautology. A compound sentence that is always false is called a contradiction. Examples. Let p and q be sentences 1. As above, p (p ( q)) is a tautology. 2. Also from above, p (q (p q)) p. 3. Let p and q be sentences and consider the compound sentence p (p q). The truth table is as follows. p q p q p (p q) T T T T T F T T T F F T T Hence, p (p q) is a tautology. 4

4. Consider the compound sentence p ( p). The truth table is as follows. Hence, p ( p) is a tautology. p p p ( p) 5. Consider the compound sentence p ( p). The truth table is as follows. Hence, p ( p) is a contradiction. p p p ( p) 6. Consider the compound sentence p ( p). The truth table is as follows. p p p ( p) F T T 7. Finally, consider the compound sentence p (p q). The truth table is as follows. Hence, p (p q) is a tautology. p q p q p (p q) T T T T T F T T F T T T F F F T Definitions. Let p and q be sentences. The following terminology is used: 1. if p then q means p q; 2. q if p means p q; 3. p is a sufficient condition for q means p q; 4. p is a necessary condition for q means q p; 5. p unless q means ( p) q, that is, p q; 6. either p or q means (p q) ( (p q)) known as exclusive or. Remark. In common usage, either... or is often used for emphasis, when inclusive or is intended. Definitions. A definition is an agreement to assign a certain name to those x that make a certain predicate true (the if is a definition is really an if and only if sometimes written in short form as iff ). An axiom is an agreement to make a certain statement true. Theorem. Let P and Q be compound sentences. Then P Q if and only if P Q is a tautology. Proof. Assume firstly that P Q. Then for any truth inputs, P and Q are both true or both false, so P Q is true, so P Q is a tautology. Conversely, assume that P Q is a tautology. Then, for any inputs, P Q is true, so P and Q are both true or both false, so P and Q have the same truth table, so P Q. Lemma. For any sentence p, ( p) p. Proof. Consider the following truth table. p p ( p) T F T The first and third columns agree, so ( p) p as required. 5

1.3 De Morgan s Laws and the Distributive Laws Theorem (De Morgan s Laws). Let p, q and r be sentences. Then De Morgan s laws state that (p q) ( p) ( q); (p q) ( p) ( q). Proof. For the first law, consider the following truth table. p q p q (p q) p q ( p) ( q) T T F F T F T F F T T F F F F T T T T Hence (p q) and ( p) ( q) have the same truth table, so (p q) ( p) ( q), as required. The second law may be deduced from the first law. If p P and q Q are substituted into the first law, then (( P ) ( Q)) P Q. Negating this equivalence and using ( r) r now gives as required. ( P ) ( Q) (P Q), Theorem (The Distributive Laws for Propositions). Let p, q and r be propositions. Then, the distributive laws state that p (q r) (p q) (p r); p (q r) (p q) (p r). Proof. The first law can be proved by considering the following truth table. p q r q r p (q r) p q p r (p q) (p r) T T T T T T T T T T F T T T F T T F T T T F T T F T T F F F F T F F F F F F F F F F F F F F F F F The second law may also be proved by means of a truth table. Alternatively, forming the negation of each side of the first law, and using De Morgan s laws, gives (p (q r)) ((p q) (p r)) ( p) ( (q r)) ( (p q)) ( (p r)) ( p) (( q) ( r)) (( p) ( q)) (( p) ( r)). Replacing p by P, q by Q and r by R now gives P (Q R) (P Q) (P R), and since p, q and r were arbitrary sentences, the second law follows as required. Example. For sentences p and q, (p q) (( p) q) ( p) ( q) p ( q). 6

Remark. Suppose that p(x) and q(x) are predicates. Then, p(x) q(x) should mean that for all x such that p(x) is true, q(x) is also true. If p(x) q(x) is false, then there are some instances of p(x) being true but q(x) being false, that is, there exists an x for which p(x) ( q(x)). Remark. It is possible to call the truth values 0 (for false) and 1 (for true). If this convention is adopted, then makes 1 into 0, and 0 into 1, so p is 1 Truth(p). p q means that q is at least as true as p or Truth(q) Truth(p). p q has truth value min(truth(p), Truth(q)), or even just Truth(p). Truth(q). p q has truth value max(truth(p), Truth(q)) or even Truth(p) + Truth(q), but 1 + 1 = 1 in this case. This makes the system of truth values into what is called a Boolean Algebra. This actually proves that the propositional calculus is complete; that is, given a phrase X in propositional calculus it is always possible to answer the question is X a tautology? by writing out truth tables. 1.4 Standard Methods of Argument Let p and q be sentences. The following are some standard methods of argument. Proof. Reductio ad absurdum: (( p) q) ( q)) p is a tautology. Proof by Contraposition: (p q) ( q) ( p) Modus Ponens (Method of Placing): (p (p q)) q is a tautology. Recall that p q ( p) q. Hence, (( p) q) ( q)) p ((( p) q) ( q)) p Thus, (( p) q) ( q)) p is a tautology. ((p q) ( q)) p ((p ( q)) (p ( q))) p (p ( q)) p ( p) q p T. In this case, ( q) ( p) ( q) ( p) q ( p) ( p q p q. In this case, (p (p q)) q (p (p q)) q (p ( p q)) q ((p ( p) (p q)) q (p q) q ( p) ( q) q T. Hence, (p (p q)) q is a tautology, as required. 7

Remarks. The first method above is argument by contradiction. q p is sometimes easier to prove than p q. Since ( p) p, in order to prove p, it is sometimes easier to disprove p. Definitions. Suppose that φ is a predicate in one variable. Then x φ(x) means φ(x) is true for every value of the variable x, and x φ(x) means φ(x) is true for some value of the variable x. The symbol is called the universal quantifier, and the symbol is called the existential quantifier. Example. If ψ is a predicate in three variables, then x y zψ(x, y, x) is a proposition and x yψ(x, y, z) is now a predicate in one variable. Definition. In an example such as the above, the variables preceded by a quantifier are known as bound variables and the other variables are known as free variables. Remark. To disprove x φ(x) it is just necessary to find (at least) one x for which φ(x) is false; such an x is called a counterexample. 1.5 Forming the Negation of a Statement Lemma. Let φ be a predicate in one variable. Then, ( x φ(x)) ( x φ(x)); ( x φ(x)) ( x φ(x)). Proof. Firstly, ( x φ(x)) is true if and only if there is a counterexample, that is, if and only if x φ(x). Similarly, ( x φ(x)) is true if and only if φ(x) is never true, that is, if and only if x φ(x). Remarks. 1. The notation is sometimes used to mean, but the notation is seldom seen. 2. If an expression contains several quantifiers, then in general their order is important. However, two consecutive universal quantifiers may be interchanged, as may two consecutive existential quantifiers can be interchanged. For example, x y φ(x, y) y x φ(x, y); x y φ(x, y) y x φ(x, y); x y φ(x, y) y x φ(x, y); y x φ(x, y) x y φ(x, y), but generally, one cannot write in the last two expressions. Examples. Let m, n be integer variables and let φ(m, n) be the predicate m = 1+n 2. Then n mφ(m, n) is true and m n φ(m, n) is false; m = 3 gives a counterexample. Also, m n φ(m, n) is false; whatever m is, the equation m = 1 + n 2 has at most 2 solutions n. Two or More Quantifiers Consider the following illustrative examples. 1. 2. ( x y φ(x, y)) x ( y φ(x, y)) x y φ(x, y) ( x y φ(x, y)) x ( y φ(x, y)) x y φ(x, y) 8

3. Let f : R R be a function, and a R. The statement f is continuous at a means ɛ > 0 δ > 0 x R ( x a < δ f(x) f(a) < ɛ). By negation, the statement f is not continuous at a may be formulated. Then, f is discontinuous at a if and only if ( ɛ > 0 δ > 0 x R ( x a < δ f(x) f(a) < ɛ)) ɛ > 0 ( δ > 0 x R ( x a < δ f(x) f(a) < ɛ)) ɛ > 0 δ > 0 ( x R ( x a < δ f(x) f(a) < ɛ)) ɛ > 0 δ > 0 x R ( x a < δ f(x) f(a) < ɛ) ɛ > 0 δ > 0 x R ( ( x a < δ) ( f(x) f(a) < ɛ) ɛ > 0 δ > 0 x R ( x a < δ f(x) f(a) ɛ). 9