THE LOGIC OF COMPOUND STATEMENTS

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

THE LOGIC OF COMPOUND STATEMENTS

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

Proposition logic and argument. CISC2100, Spring 2017 X.Zhang

Where are my glasses?

The Logic of Compound Statements cont.

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

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Chapter 2: The Logic of Compound Statements

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

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

Propositional Logic. Spring Propositional Logic Spring / 32

CSC Discrete Math I, Spring Propositional Logic

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

Propositional Logic. Argument Forms. Ioan Despi. University of New England. July 19, 2013

Section 1.1: Logical Form and Logical Equivalence

PROPOSITIONAL CALCULUS

ANS: If you are in Kwangju then you are in South Korea but not in Seoul.

1.1 Statements and Compound Statements

PHI Propositional Logic Lecture 2. Truth Tables

Compound Propositions

A Little Deductive Logic

Chapter 1 Elementary Logic

A Little Deductive Logic

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

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

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

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

Propositional Logic. Fall () Propositional Logic Fall / 30

5. And. 5.1 The conjunction

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

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

Manual of Logical Style (fresh version 2018)

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

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

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. 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

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Proseminar on Semantic Theory Fall 2013 Ling 720 Propositional Logic: Syntax and Natural Deduction 1

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

15414/614 Optional Lecture 1: Propositional Logic

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

8. Reductio ad absurdum

Symbolic Logic 3. For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true.

Advanced Topics in LP and FP

First Order Logic (1A) Young W. Lim 11/18/13

1 The Foundation: Logic and Proofs

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.

Artificial Intelligence. Propositional logic

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

Manual of Logical Style

Proof strategies, or, a manual of logical style

First Order Logic (1A) Young W. Lim 11/5/13

Language of Propositional Logic

Chapter 4, Logic using Propositional Calculus Handout

1 The Foundation: Logic and Proofs

The Logic of Compound Statements. CSE 2353 Discrete Computational Structures Spring 2018

5. And. 5.1 The conjunction

1.3 Propositional Equivalences

Truth-Functional Logic

A Quick Lesson on Negation

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Deduction by Daniel Bonevac. Chapter 3 Truth Trees

DISCRETE MATHEMATICS BA202

Propositional Logic: Part II - Syntax & Proofs 0-0

Rules Build Arguments Rules Building Arguments

CITS2211 Discrete Structures. Propositional Logic

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

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

CISC-102 Winter 2016 Lecture 17

Logic (3A) Young W. Lim 11/2/13

Logical Form 5 Famous Valid Forms. Today s Lecture 1/26/10

Chapter 1, Section 1.1 Propositional Logic

Logic (3A) Young W. Lim 10/31/13

Tautologies, Contradictions, and Contingencies

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

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

02 Propositional Logic

PSU MATH RELAYS LOGIC & SET THEORY 2017

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

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

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

A Statement; Logical Operations

3 The Semantics of the Propositional Calculus

cis32-ai lecture # 18 mon-3-apr-2006

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

PL: Truth Trees. Handout Truth Trees: The Setup

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

The statement calculus and logic

Introduction to Sets and Logic (MATH 1190)

COMP 2600: Formal Methods for Software Engineeing

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

DISCRETE MATH: LECTURE 3

Natural deduction for truth-functional logic

UNIT-I: Propositional Logic

Today s Topic: Propositional Logic

Section 1.2: Propositional Logic

Transcription:

THE LOGIC OF COMPOUND STATEMENTS

All dogs have four legs. All tables have four legs. Therefore, all dogs are tables

LOGIC Logic is a science of the necessary laws of thought, without which no employment of the understanding and the reason takes place. Immanuel Kant, 1785

Aristotle Greek philosopher who wrote the first great treatises on logic. Those he wrote were a collection of rules for deductive reasoning that were intended to serve as a basis for the study of every branch of knowledge.

Gottfried Leibniz German philosopher and mathematician Conceived the idea of using symbols to mechanize the process of deductive reasoning during 17th century

Symbolic Logic Founded by the English mathematicians George Boole and Augustus De Morgan after Leibniz s idea was realized in the nineteenth century

Symbolic Logic With research continuing to the present day, symbolic logic has provided, among other things, the theoretical basis for many areas of computer science such as digital logic circuit design, relational database theory, automata theory and computability and artificial intelligence

Argument An argument is a sequence of statements aimed at demonstrating the truth of an assertion. The assertion at the end of the sequence is called the conclusion, and the preceding statements are called premises.

Example Argument 1 If the program syntax is faulty or if program execution results in division by zero, then the computer will generate an error message. Therefore, if the computer does not generate an error message, then the program syntax is correct and program execution does not result in division by zero.

Example Argument 2 If x is a real number such that x < 2 or x > 2, then x 2 > 4. Therefore, if x 2 4, then x 2 and x 2.

Logical Form of Arguments We use letters of the alphabet (such as p, q, and r) to represent the component sentences and the expression not p to refer to the sentence It is not the case that p. Then the common logical form of both the previous arguments is as follows: If p or q, then r. Therefore, if not r, then not p and not q.

Identifying Logical Form Fill in the blanks below so that argument (b) has the same form as argument (a). Then represent the common form of the arguments using letters to stand for component sentences. a. If Jane is an ECE student or Jane is a computer science major, then Jane will take Math 121. Jane is a. Therefore, Jane will.

Identifying Logical Form b. If logic is easy or (1), then (2). I will study hard. Therefore, I will get an A in this course.

Statement Or Proposition A sentence that is true or false but not both. Example: Two plus two equals four (true statement) Two plus two equals five (false statement) x + y > 0 (not a statement)

Compound Statements Symbols are used to build more complicated logical expressions out of simpler ones. The symbol denotes not, denotes and, and denotes or. Given a statement p, the sentence p is read not p or It is not the case that p and is called the negation of p.

In some computer languages the symbol is used in place of. p q is read p and q and is called the conjunction of p and q. p q is read p or q and is called the disjunction of p and q.

Logical Connectives Operator Symbol Usage Negation not Conjunction and Disjunction or Exclusive or xor Conditional if, then Biconditional iff Lecture 1 17

Translating from English to Symbols Write each of the following sentences symbolically, letting h = It is hot and s = It is sunny. a. It is not hot but it is sunny. b. It is neither hot nor sunny.

Suppose x is a particular real number. Let p, q, and r symbolize 0 < x, x < 3, and x = 3, respectively. Write the following inequalities symbolically: a. x 3 b. 0 < x < 3 c. 0 < x 3

Truth Values If such sentences are to be statements, they must have well-defined truth values they must be either true or false.

Truth table for negation p ~p T F F T 21

Truth table for conjunction p q p q True only if both statements are true T T T T F F F T F F F F 22

Truth table for disjunction p q p q False only if both statements are false T T T T F T F T T F F F 23

Statement form Expression made up of statement variables (such as p, q)and logical connectives becomes a statement when actual statements are substituted for the variables. Example: (Exclusive Or) ( p q) ~ ( p q) p q 24

Truth Table for a Statement Form Ex: Truth table for ~ p ( p q ) p q ~p p q ~ p ( p q) T T F T F T F F T F F T T T T F F T F F 25

Conditional (Implication) English usage of if, then or implies DEF: p q is true if q is true, or if p and q are both false. Semantics: p implies q is true if one can mathematically derive q from p. Lecture 1 26

Conditional -- truth table p q p q T T F F T F T F T F T T Lecture 1 27

Conditional Q: Does this makes sense? Let s try examples for each row of truth table: If pigs like mud then pigs like mud. If pigs like mud then pigs can fly. Lecture 1 28

Activity Q: Does this makes sense? Let s try examples for each row of truth table: If pigs like mud then pigs like mud. If pigs like mud then pigs can fly. If pigs can fly then pigs like mud. If pigs can fly then pigs can fly. Lecture 1 29

Bi-Conditional -- truth table For p q to be true, p and q must have the same truth value. Else, p q is false: p q p q T T F F T F T F T F F T Q : Which operator is the opposite of? 30

Bi-Conditional A : has exactly the opposite truth table as. This means that we could have defined the bi-conditional in terms of other previously defined symbols, so it is redundant. In fact, only really need negation and disjunction to define everything else. Extra operators are for convenience. Lecture 1 31

Logical equivalence Statements P and Q are logically equivalent: P Q if and only if they have identical truth values for each substitution of their component statement variables. Ex: x y y x 32

Verifying logical equivalence Ex: ~ ( p q) ~ p ~ q p q ~p ~q p ~ ( p q) T T F F T F F T F F T T F F F T T F T F F F F T T F T T q ~ p ~ q 33

De Morgan s Laws The negation of an and statement is logically equivalent to the or statement in which each component is negated. The negation of an or statement is logically equivalent to the and statement in which each component is negated.

Applying De Morgan s Laws Write negations for each of the following statements: a. John is 6 feet tall and he weighs at least 200 pounds. b. The bus was late or Tom s watch was slow.

Tautology A tautology is a statement form that is always true regardless of the truth values of the individual statements substituted for its statement variables. A statement whose form is a tautology is a tautological statement.

Contradiction A contradiction is a statement form that is always false regardless of the truth values of the individual statements substituted for its statement variables. A statement whose form is a contradiction is a contradictory statement.

Example Show that the statement form p p is a tautology and that the statement form p p is a contradiction.

Test Yourself 1. An and statement is true if, and only if, both components are. 2. An or statement is false if, and only if, both components are. 3. Two statement forms are logically equivalent if, and only if, they always have.

Test Yourself 4. De Morgan s laws say (1) that the negation of an and statement is logically equivalent to the or statement in which each component is, and (2) that the negation of an or statement is logically equivalent to the and statement in which each component is. 5. A tautology is a statement that is always. 6. A contradiction is a statement that is always.

Valid and Invalid Argument To say that an argument form is valid means that no matter what particular statements are substituted for the statement variables in its premises, if the resulting premises are all true, then the conclusion is also true. To say that an argument is valid means that its form is valid.

Testing an Argument Form for Validity 1. Identify the premises and conclusion of the argument form. 2. Construct a truth table showing the truth values of all the premises and the conclusion.

Testing an Argument Form for Validity 3. A row of the truth table in which all the premises are true is called a critical row. If there is a critical row in which the conclusion is false, then it is possible for an argument of the given form to have true premises and a false conclusion, and so the argument form is invalid. If the conclusion in every critical row is true, then the argument form is valid.

Example p q r q p r p r

Example p q r q p r p r Invalid

Syllogism An argument form consisting of two premises and a conclusion is called a syllogism. The first and second premises are called the major premise and minor premise, respectively.

Modus Ponens The most famous form of syllogism in logic is called modus ponens. It has the following form: If p then q. p q

Here is an argument of this form: If the sum of the digits of 371,487 is divisible by 3, then 371,487 is divisible by 3. The sum of the digits of 371,487 is divisible by 3. 371,487 is divisible by 3. The term modus ponens is Latin meaning method of affirming (the conclusion is an affirmation).

Modus Tollens Now consider another valid argument form called Modus Tollens. It has the following form: If p then q. q p Here is an example of modus tollens: If Zeus is human, then Zeus is mortal. Zeus is not mortal. Zeus is not human.

Here is an example of modus tollens: If Zeus is human, then Zeus is mortal. Zeus is not mortal. Zeus is not human. Modus Tollens is Latin meaning method of denying (the conclusion is a denial).

Recognizing Modus Ponens and Modus Tollens Use modus ponens or modus tollens to fill in the blanks of the following arguments so that they become valid inferences. a. If there are more pigeons than there are pigeonholes, then at least two pigeons roost in the same hole. There are more pigeons than there are pigeonholes..

Recognizing Modus Ponens and Modus Tollens Use modus ponens or modus tollens to fill in the blanks of the following arguments so that they become valid inferences. b. If 870,232 is divisible by 6, then it is divisible by 3. 870,232 is not divisible by 3..