Overview. 1. Introduction to Propositional Logic. 2. Operations on Propositions. 3. Truth Tables. 4. Translating Sentences into Logical Expressions

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

Compound Propositions

CSCI Homework Set 1 Due: September 11, 2018 at the beginning of class

CSC Discrete Math I, Spring Propositional Logic

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

An Introduction to Logic 1.1 ~ 1.4 6/21/04 ~ 6/23/04

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

Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

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

DISCRETE STRUCTURES WEEK5 LECTURE1

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

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

PROPOSITIONAL CALCULUS

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

Logic. Def. A Proposition is a statement that is either true or false.

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

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

Discrete Mathematics and Applications COT3100

Chapter 3: Logic. Diana Pell. A statement is a declarative sentence that is either true or false, but not both.

Math.3336: Discrete Mathematics. Applications of Propositional Logic

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Course Staff. Textbook

Propositional logic ( ): Review from Mat 1348

CSE 240 Logic and Discrete Mathematics

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

EECS 1028 M: Discrete Mathematics for Engineers

ARTIFICIAL INTELLIGENCE

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

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

DISCRETE MATHEMATICS BA202

CSE 311: Foundations of Computing. Lecture 2: More Logic, Equivalence & Digital Circuits

Today s Topic: Propositional Logic

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies

Propositions. Frequently, we will use the word statement instead of proposition.

Discrete Mathematics and Its Applications

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

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

MAT2345 Discrete Math

Introduction to Sets and Logic (MATH 1190)

Boolean Logic. CS 231 Dianna Xu

Propositional Logic Not Enough

ICS141: Discrete Mathematics for Computer Science I

Definition 2. Conjunction of p and q

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

Proposition/Statement. Boolean Logic. Boolean variables. Logical operators: And. Logical operators: Not 9/3/13. Introduction to Logical Operators

AMTH140 Lecture 8. Symbolic Logic

Chapter 1, Section 1.1 Propositional Logic

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

ECOM Discrete Mathematics

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Logic and Proofs. (A brief summary)

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

Propositional Logic. Fall () Propositional Logic Fall / 30

LOGIC CONNECTIVES. Students who have an ACT score of at least 30 OR a GPA of at least 3.5 can receive a college scholarship.

Introduction Propositional Logic

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Connectives Name Symbol OR Disjunction And Conjunction If then Implication/ conditional If and only if Bi-implication / biconditional

Discrete Structures of Computer Science Propositional Logic I

Chapter 1 Elementary Logic

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

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

CSE 20 DISCRETE MATH. Fall

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

Introduction to Decision Sciences Lecture 2

Discrete Mathematics

1.1 Language and Logic

Math Assignment 2 Solutions - Spring Jaimos F Skriletz Provide definitions for the following:

Discrete Structures for Computer Science

Discrete Mathematics I Tutorial 01 - Answer

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

1.1 Language and Logic

Logic: Propositional Logic (Part I)

Propositional Logic 1

cse541 LOGIC FOR COMPUTER SCIENCE

Sec$on Summary. Propositions Connectives. Truth Tables. Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

COMP 2600: Formal Methods for Software Engineeing

Today s Lecture 2/9/10. Symbolizations continued Chapter 7.2: Truth conditions for our logical operators

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Formal Logic. Critical Thinking

Mat 243 Exam 1 Review

1 The Foundations. 1.1 Logic. A proposition is a declarative sentence that is either true or false, but not both.

Deductive and Inductive Logic

Logic. Readings: Coppock and Champollion textbook draft, Ch

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

CSE 311: Foundations of Computing I. Spring 2015 Lecture 1: Propositional Logic

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Symbolic Logic. Alice E. Fischer. CSCI 1166 Discrete Mathematics for Computing February 5 6,

2.2: Logical Equivalence: The Laws of Logic

Recall that the expression x > 3 is not a proposition. Why?

Logic and Proofs. (A brief summary)

LING 106. Knowledge of Meaning Lecture 3-1 Yimei Xiang Feb 6, Propositional logic

Logic. Propositional Logic: Syntax. Wffs

Section 1.1 Propositional Logic. proposition : true = T (or 1) or false = F (or 0) (binary logic) the moon is made of green cheese

~ p is always false. Based on the basic truth table for disjunction, if q is true then p ~

Chapter 1: Formal Logic

Section 3.1 Statements, Negations, and Quantified Statements

THE LOGIC OF COMPOUND STATEMENTS

Transcription:

Note 01 Propositional Logic 1 / 10-1 Overview 1. Introduction to Propositional Logic 2. Operations on Propositions 3. Truth Tables 4. Translating Sentences into Logical Expressions 5. Preview: Propositional Equivalence

Note 01 Propositional Logic 2 / 10-1 An Introduction 1. Logic is the framework upon which rigorous reasoning are built. Without some basic logical concepts, it would not be possible to reason properly, especially in structuring mathematical proofs. 2. The rules of logic are used to specify precise meaning to mathematical statements and to distinguish between logically valid and logically invalid statements. Logic, at its most basic, is concerned with the construction of well-formed statements and valid arguments. 3. Clearly, logic has wide practical applicability in, for example, the design of computing machines artificial intelligence programming languages a court of law etc. 4. There are many different kinds of logic such as propositional, predicate, temporal and fuzzy logics. 5. In propositional logic, we use two assumptions when dealing with statements: (a) Every statement is either true or false. (The Law of the excluded middle or bivalence). (b) No statement is both true and false. 6. One of the consequences of those assumptions is that if a statement is not false, then it must be true. Hence, to prove that something is true, it would suffice to prove that it is not false. 7. In propositional logic, we deal with propositions. A proposition is a declarative sentence that is either true or false (but not both). The following are some propositions:

Note 01 Propositional Logic 3 / 10-1 (a) Amr Ali is a student of KFUPM. (b) The largest Airport in the Eastern Province is in Dammam. (c) 9 = 4. (d) ICS102 is a pre-requisite of ICS253. (e) 5 2 = 3. (f) There are monkeys on Jupiter or there are no monkeys on Jupiter. 8. Note that not all sentences are propositions. Here are some examples: (a) You should study hard to get the grade you want. (b) What is the instructor s name? (c) What a brilliant student! (d) x + 2 5 9. The truth value of a proposition is true, T, if it is a true proposition and is false, F, if it is a false proposition.

Note 01 Propositional Logic 4 / 10-1 Propositions and Logical Connectives Definition 1 (propositions) The sentences of propositional logic are made up of the following symbols, called propositions: The truth symbols true (T) or false (F) The propositional symbols F, G, H, I,... Definition 2 (sentences) The sentences of propositional logic are built up from the propositions by application of the propositional connectives such as negation ( ), conjunction ( ), disjunction ( ), exclusive-or ( ), implication ( ), biconditional ( ). Definition 3 (not rule) The negation ( F) is true when F is false, and false when F is true. Definition 4 (and rule) The conjunction (F G) is true when F and G are both true, and is false otherwise. Definition 5 (or rule) The inclusive disjunction (F G) is false when F and G are both false, and true otherwise. Definition 6 The exclusive disjunction (F G) is true when F is true or when G is true, but not both, and false otherwise. Definition 7 The implication (F G) is true when F is false or when G is true, and false otherwise. if F, then G if F, G F implies G F only if G F is sufficient for G G if F G whenever F G is necessary for F In other words, to say F is a sufficient condition for G means that the occurrence of F is sufficient to guarantee the occurrence of G. On the other hand, to say F is a necessary condition for G means that if F does not occur, then G cannot occur either.

Note 01 Propositional Logic 5 / 10-1 Definition 8 The biconditional (F G) is true when F and G have the same truth values, and is false otherwise. F if and only if G, or F is necessary and sufficient for G, or if F then G, and conversely. Contrapositive, converse, inverse Definition 9 Suppose a conditional statement of the form p q is given. The contrapositive is q p The converse is q p The inverse is p q Example: Let P be the statement I am a man. Let Q be the statement I am not a mother.. Then, Name implication contrapositive converse inverse English Translation If I am a man, then I am not a mother. If I am a mother,then I am not a man. If I am not a mother, then I am a man. If I am not a man, then I am a mother.

Note 01 Propositional Logic 6 / 10-1 Truth Tables for Propositions A truth table displays the relationships between the truth values of propositions. P QP Q P Q P Q P Q P Q (P Q) T T T T F T T F T F F T T F F T F T F T T T F T F F F F F T T F Table 1: Truth Table Showing the Basic Logical Connectives. Example: The truth table of the statement P (Q R) is P (Q R) T T T F F T T T T T T T F T F T T F T T F F T F F F T T T T F T F T F F T F T T 1 5 2 4 3 In the truth table shown above, we first write columns 1, 2, and 3; we then write column 4 which is formed from columns 2 and 3, and column 5 is formed from columns 1 and 4. The final result (in column 5) refers to the compound statement in which we are interested.

Note 01 Propositional Logic 7 / 10-1 1. Note that bits (binary digits) consisting of 0 (zero) and 1 (one) are sometimes used to represent truth values. When bits are used, the bit 1 is customarily used to represent true while the bit 0 is used to represent false. 2. Some programming languages such as C and Java allow operations on bit strings which correspond to logical operations using connectives. 3. The hierarchy for evaluation of connectives (from do first to do last ) is: takes precedence over the other operations, followed by,,,,. 4. A string of the same operations is evaluated from left to right. For instance, P (P Q S R) Q means (( P) (((P Q) S) R)) Q. Example: Evaluate each of the following expressions. (a) 11000 (01011 11011) (b) (01010 11011) 01000 Solution: Example: It is known that Hassan was a good friend of Ali and Jafar. The following facts are true about them: (i) Either Ali or Jafar is the oldest of the three. (ii) Either Hassan is the oldest or Ali is the youngest. Who is the oldest and who is the youngest? Solution: There are nine possible statements: H1, H2, H3, A1, A2, A3, J1, J2, J3. Also, the proposition (A1 J1) (H1 A3) must be true.

Note 01 Propositional Logic 8 / 10-1 From Logical Expressions to English Sentences Example: Let F and G be the propositions: F: I bought a new car last year. G: I won the neatest car award on Friday. Express each of the following as an English sentence. (a) F (b) F G (c) F G (d) F G (e) F G (f) F G (g) F G (h) F (F G) Solution: (a) I didn t buy a new car last year. (b) Either I bought a new car last year or (in the inclusive sense) I won the neatest car award on Friday. (c) If I bought a new car last year, then I won the neatest car award on Friday. (d) I bought a new car last year and I won the neatest car award on Friday. (e) I bought a new car last year if and only if I won the neatest car award on Friday. (f) If I did not buy a new car last year, then I did not win the neatest car award on Friday. (g) I didn t buy a new car last year and I didn t win the neatest car award on Friday. (h) Either I did not buy a new car last year, or else I did buy one and won the neatest car award on Friday.

Note 01 Propositional Logic 9 / 10-1 Logical Expressions to English Sentences (cont.) Example: Let F, G, H and I be the propositions: F: You have the flu. G: You miss the final examination. H: You pass the course. Express each of the following as an English sentence. (a) F G (b) G H (c) F G H (d) (F G) (G H) Solution: (e) (F G) ( G H) (a) If you have the flu, then you miss the final exam. (b) You do not miss the final exam if and only if you pass the course. (c) You have the flu, or you miss the final exam, or you pass the course. (d) It is either the case that if you have the flu then you do not pass the course or the case that if you miss the final exam then you do not pass the course (or both, it is understood). (e) Either you have the flu and you miss the final exam, or you do no miss the final exam and do pass the course.

Note 01 Propositional Logic 10 / 10-1 From English Sentences to Logical Expressions Example: Let F, G, and H be the propositions: F: You get an A on the final exam. G: You do every exercise in this book. H: You get an A in this class. Write the following propositions using F, G, and H and logical connectives. (a) You get an A in this class, but you do not do every exercise in this book. (b) You get an A on the final, you do every exercise in this book, and you get an A in this class. (c) To get an A in this class, it is necessary for you to get an A on the final. (d) You get an A on the final, but you don t do every exercise in this book; nevertheless, you get an A in this class. (e) Getting an A on the final and doing every exercise in this book is sufficient for getting an A in this class. Solution: (a) F G (b) F G H (c) H F (d) F G H (e) (F G) H