CISC-102 Winter 2016 Lecture 17

Similar documents
CISC-102 Fall 2018 Week 11

2.2: Logical Equivalence: The Laws of Logic

CSC Discrete Math I, Spring Propositional Logic

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

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

AMTH140 Lecture 8. Symbolic Logic

Compound Propositions

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

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

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

1.3 Propositional Equivalences

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

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

Equivalence and Implication

We last time we began introducing equivalency laws.

Solutions to Homework I (1.1)

MATHEMATICAL REASONING

Propositional Equivalence

Logic and Propositional Calculus

Truth-Functional Logic

THE LOGIC OF COMPOUND STATEMENTS

Propositional natural deduction

1.1 Language and Logic

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

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.

Boolean Logic. CS 231 Dianna Xu

1.1 Statements and Compound Statements

Proofs. Joe Patten August 10, 2018

Logic and Discrete Mathematics. Section 3.5 Propositional logical equivalence Negation of propositional formulae

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

The Logic of Compound Statements cont.

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

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

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Introduction to Decision Sciences Lecture 2

Chapter 1, Section 1.1 Propositional Logic

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

PROPOSITIONAL CALCULUS

Tautologies, Contradictions, and Contingencies

Logic and Propositional Calculus

3 The Semantics of the Propositional Calculus

1.1 Language and Logic

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

Propositional Logic. Spring Propositional Logic Spring / 32

Topic 1: Propositional logic

A Statement; Logical Operations

Propositional logic ( ): Review from Mat 1348


CSE 311: Foundations of Computing. Lecture 3: Digital Circuits & Equivalence

More Propositional Logic Algebra: Expressive Completeness and Completeness of Equivalences. Computability and Logic

Set Theory Basics of Set Theory. mjarrar Watch this lecture and download the slides

Propositional Logic Part 1

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

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

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

CS 226: Digital Logic Design

Definition 2. Conjunction of p and q

Chapter 4: Classical Propositional Semantics

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

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

Logic Synthesis and Verification

Language of Propositional Logic

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

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

CSE 20: Discrete Mathematics

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Proving Things. Why prove things? Proof by Substitution, within Logic. Rules of Inference: applying Logic. Using Assumptions.

Section 3.1. Statements and Logical Connectives. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

1 Propositional Logic

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

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

KP/Worksheets: Propositional Logic, Boolean Algebra and Computer Hardware Page 1 of 8

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

Propositional Logic, Predicates, and Equivalence

Propositional Logic Language

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

CSC165 Mathematical Expression and Reasoning for Computer Science

CS 173 Lecture 2: Propositional Logic

Propositional Logic. Yimei Xiang 11 February format strictly follow the laws and never skip any step.

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

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.

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

Slides for Lecture 10

2-4: The Use of Quantifiers

CS206 Lecture 03. Propositional Logic Proofs. Plan for Lecture 03. Axioms. Normal Forms

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

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

FUNDAMENTALS OF MATHEMATICS HANDOUT 1.3 DR. MCLOUGHLIN

ANALYSIS EXERCISE 1 SOLUTIONS

Mathematical Reasoning (Part I) 1

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

CA320 - Computability & Complexity

CS 486: Lecture 2, Thursday, Jan 22, 2009

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

HANDOUT AND SET THEORY. Ariyadi Wijaya

EECS 1028 M: Discrete Mathematics for Engineers

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Introduction to Sets and Logic (MATH 1190)

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

Transcription:

CISC-102 Winter 2016 Lecture 17 Logic and Propositional Calculus Propositional logic was eventually refined using symbolic logic. The 17th/18th century philosopher Gottfried Leibniz (an inventor of calculus) has been credited with being the founder of symbolic logic. Although his work was the first of its kind, it was unknown to the larger logical community. Consequently, many of the advances achieved by Leibniz were re-achieved by logicians like George Boole and Augustus De Morgan in the 19th century completely independent of Leibniz. 1

A proposition is a statement that is either true or false. For example: The earth is flat. A tomato is a fruit. The answer to the ultimate question of life, the universe, and everything is 42. 2

Basic operations Let p and q be logical variables. Basic operations are defined as: Conjunction p q (p and q) (true if both p and q are true, otherwise false) Disjunction p q (p or q) (true if either p or q are true, otherwise false) Negation p (not p) (true if p is false (not true), otherwise false) 3

! Lecture 17 March 15, 2016 Truth tables We can enumerate the values of logical expressions using a truth table. For example: p q q p q p q T T F T T T F T F T F T F F T F F T F F 4

Notation We can denote a logical expression constructed from logical variables p,q, and logical operators,, and (and, or, not) using the notation P(p,q). We call this type of expression a logical proposition. For example: (p q) ( not (p or q)) is a logical proposition that depends on the values of p and q. We can use truth tables to determine truth values of a logical proposition. p q (p q) (p q) T T T F T F T F F T T F F F F T 5

Definitions A tautology is a logical expression that is always true for all values of its variables. A contradiction is a logical expression that is always false (never true) for all values of its variables q q q q q q T F T F F T T F Whether q is true or false, q q is always true, and q q is always false. 6

Logical Equivalence Two propositions (using the same variables) P(p,q) Q(p,q) are said to be logically equivalent or equivalent or equal if they have identical truth table values. We notate equivalence: P(p,q) Q(p,q) 7

There are a set of laws of logic that are very similar to the laws of set theory. The laws of logic can be proved by using truth tables. 8

9! Table 4-1 Laws of the algebra of propositions Idempotent laws: (1a) p p p (1b) p p p Associative laws: (2a) (p q) r p (q r) (2b) (p q) r p (q r) Commutative laws: (3a) p q q p (3b) p q q p Distributive laws: (4a) p (q r) (p q) (p r) (4b) p (q r) (p q) (p r) Identity laws: (5a) p F p (5b) p T p (6a) p T T (6b) p F F Involution law: (7) p p Complement laws: (8a) p p T (8b) p p T (9a) T F (9b) F T DeMorgan s laws: (10a) (p q) p q (10b) (p q) p q Lecture 17 March 15, 2016

Lecture 17 March 15, 2016 We prove DeMorgan s law with truth tables p q (p q) T T F T F F F T F F F T p q p q F F F F T F T F F T T T 10

We prove the distributive law with truth tables p q r p (q r) T T T T T T F T T F T T T F F T F T T T F T F F F F T F F F F F p q r (p q) (p r) T T T T T T F T T F T T T F F T F T T T F T F F F F T F F F F F 11

Conditional Statements A typical statement in mathematics is of the form if p then q. For example: In all of these examples variables are assumed to be natural numbers. if a b and b a then a =b if a-7 < 0, then a < 7 if 2 a then 2 (a)(b) All of these statements are true if a and b are natural numbers. In logic we use the symbol to model this type of statement. However, using the symbol in logic does not necessarily have a causal relationship between p and q. if p then q is denoted p q, and pronounced either if p then q or p implies q. 12

A truth table is used to define the outcomes when using the logical operator. p q p q T T T T F F F T T F F T This definition does not appear to make much sense, however, this is how implication is defined in logic. if sugar is sweet then lemons are sour. Is a true implication. if sugar is sweet then the earth is flat. Is a false implication. if the earth is flat then sugar is sweet. Is a true implication. if the earth is flat then sugar is bitter. Is a true implication 13

The truth table for implications can be summarized as: 1. An implication is true when the if part is false, or the then part is true. 2. An implication is false only when the if part is true, and the then part is false. Note that p q is logically equivalent to p q. We can verify this with a truth table p q p q T T F F T F T F 14

Biconditional Implications A shorthand for the pair of statements if a b and b a then a =b if a =b then a b and b a is: a = b if and only if a b and b a This can be notated as a = b (a b) b a An often used abbreviation for if and only if is iff. 15

A truth table for the biconditional implication is: p q p q T T T T F F F T F F F T The truth table for biconditional implications can be summarized as: 1. A biconditional implication is true when both p and q are true, or both p and q are false. Note that p q is logically equivalent to (p q) (q p) as well as ( p q) ( q p). 16

Suppose we have the proposition p q the contrapositive: q p? is logically equivalent as verified by the following truth table. p q p q q p T T F F T T F F T F F T T F T F F T T T The following example may help in understanding the contrapositive. if 2 a then 2 (a)(b) is logically equivalent to if 2 (a)(b) then 2 a. 17

Suppose we have the proposition p q the converse: q p? is not logically equivalent as verified by the following truth table. p q q p T T T T F F F T T F F T The following example may help in understanding why the converse is not logically equivalent to the implication. if 2 a then 2 (a)(b) is not logically equivalent to if 2 (a)(b) then 2 a. 18

It should be obvious that an implication and its converse results in a biconditional implication. that is: p q is logically equivalent to (p q) (q p) 19